1<?xml version="1.0" encoding="utf-8"?>
2
3
4<!--****************************************************************************
5* \file shiftreg_v2-1.0.cypersonality
6* \version 1.0
7*
8* \brief
9* Shift Register personality description file.
10*
11********************************************************************************
12* \copyright
13* Copyright 2020-2022 Cypress Semiconductor Corporation
14* SPDX-License-Identifier: Apache-2.0
15*
16* Licensed under the Apache License, Version 2.0 (the "License");
17* you may not use this file except in compliance with the License.
18* You may obtain a copy of the License at
19*
20*     http://www.apache.org/licenses/LICENSE-2.0
21*
22* Unless required by applicable law or agreed to in writing, software
23* distributed under the License is distributed on an "AS IS" BASIS,
24* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25* See the License for the specific language governing permissions and
26* limitations under the License.
27*****************************************************************************-->
28
29<Personality id="mxs40shiftreg_ver2" name="ShiftReg" version="1.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v8">
30  <Dependencies>
31    <IpBlock name="mxtcpwm_ver2" />
32    <Resource name="tcpwm\.group\.cnt" />
33    <OperatingMode value="MCU"/>
34  </Dependencies>
35  <ExposedMembers />
36  <Parameters>
37    <!-- PDL documentation -->
38    <ParamDoc id="pdlDoc" name="Configuration Help" group="Overview" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__tcpwm__shiftreg.html" linkText="Open Shift Register (TCPWM) Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" />
39
40    <!--General-->
41    <ParamRange id="pCntGroup" name="pCntGroup" desc="pCntGroup" group="Internal"  default="`${getInstNumber(&quot;group&quot;)}`" min="0" max="3" resolution="1" visible="false" editable="false" />
42    <ParamRange id="pMaxGroupCount" name="pMaxGroupCount" desc="pMaxGroupCount" group="Internal"  default="4" min="0" max="4" resolution="1" visible="false" editable="false" />
43    <ParamString id="pCntWidthEx" name="pCntWidthEx" desc="pCntWidthEx" group="Internal"  default="GRP_NR[`${pCntGroup}`].CNT.GRP_CNT_WIDTH" visible="false" editable="false" />
44    <ParamRange id="pCntWidth" name="pCntWidth" desc="pCntWidth" group="Internal"  default="`${lookupExpression(pCntWidthEx)}`" min="0" max="32" resolution="1" visible="false" editable="false" />
45    <ParamRange id="pCntWidthMax" name="pCntWidthMax" desc="pCntWidthMax" group="Internal"  default="`${pow(2, pCntWidth)-1}`" min="0" max="4294967296" resolution="1" visible="false" editable="false" />
46    <ParamRange id="tcpwmInst" name="TCPWM Number" group="Internal" default="`${getInstNumber(&quot;tcpwm&quot;)}`" min="0" max="3" resolution="1" visible="false" editable="false" desc="" />
47    <ParamRange id="cntInst" name="CNT Number" group="Internal" default="`${getInstNumber(&quot;cnt&quot;) + pCntGroup * 256}`" min="0" max="1023" resolution="1" visible="false" editable="false" desc="" />
48    <ParamString id="pCntCC1Ex" name="pCntCC1Ex" desc="pCntCC1Ex" group="Internal" default="GRP_NR[`${pCntGroup}`].CNT.GRP_CC1_PRESENT" visible="false" editable="false" />
49    <ParamBool id="pCntCC1" name="pCntCC1" desc="pCntCC1" group="Internal" default="`${lookupExpression(pCntCC1Ex) eq 1}`" visible="false" editable="false" />
50    <ParamString id="pCntAMCEx" name="pCntAMCEx" desc="pCntAMCEx" group="Internal" default="GRP_NR[`${pCntGroup}`].CNT.GRP_AMC_PRESENT" visible="false" editable="false" />
51    <ParamBool id="pCntAMC" name="pCntAMC" desc="pCntAMC" group="Internal" default="`${lookupExpression(pCntAMCEx) eq 1}`" visible="false" editable="false" />
52
53    <ParamString id="TCPWM_version" name="TCPWM Version" group="General" default="TCPWM_ver2" visible="true" editable="false" desc="Version of the TCPWM hardware block"/>
54
55    <ParamChoice id="ClockPrescaler" name="Clock Prescaler" group="General" default="CY_TCPWM_SHIFTREG_PRESCALER_DIVBY_1" visible="true" editable="true" desc="Divides down the input clock." >
56      <Entry name="Divide by 1" value="CY_TCPWM_SHIFTREG_PRESCALER_DIVBY_1" visible="true" />
57      <Entry name="Divide by 2" value="CY_TCPWM_SHIFTREG_PRESCALER_DIVBY_2" visible="true" />
58      <Entry name="Divide by 4" value="CY_TCPWM_SHIFTREG_PRESCALER_DIVBY_4" visible="true" />
59      <Entry name="Divide by 8" value="CY_TCPWM_SHIFTREG_PRESCALER_DIVBY_8" visible="true" />
60      <Entry name="Divide by 16" value="CY_TCPWM_SHIFTREG_PRESCALER_DIVBY_16" visible="true" />
61      <Entry name="Divide by 32" value="CY_TCPWM_SHIFTREG_PRESCALER_DIVBY_32" visible="true" />
62      <Entry name="Divide by 64" value="CY_TCPWM_SHIFTREG_PRESCALER_DIVBY_64" visible="true" />
63      <Entry name="Divide by 128" value="CY_TCPWM_SHIFTREG_PRESCALER_DIVBY_128" visible="true" />
64    </ParamChoice>
65    <ParamChoice id="Resolution" name="Shift Register Width" group="General" default="`${(pCntWidth eq 16) ? &quot;CY_TCPWM_SHIFTREG_WIDTH_16_BITS&quot; : &quot;CY_TCPWM_SHIFTREG_WIDTH_32_BITS&quot;}`" visible="true" editable="false" desc="Selects the width of the PWM.">
66      <Entry name="16-bits" value="CY_TCPWM_SHIFTREG_WIDTH_16_BITS" visible="true" />
67      <Entry name="32-bits" value="CY_TCPWM_SHIFTREG_WIDTH_32_BITS" visible="true" />
68    </ParamChoice>
69
70    <ParamRange id="TapsEnabled" name="Taps Enabled" group="Taps" default="1" min="0" max="`${pCntWidthMax}`" resolution="1" visible="true" editable="true" desc="Sets enabled taps. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." />
71
72    <!--Compare-->
73    <ParamBool id="EnableCompare0Swap" name="Enable Compare 0 Swap" group="Compare" default="false" visible="true" editable="true" desc="If checked the compare register will be swapped at the CC0 match event." />
74    <ParamRange id="Compare0" name="Compare 0" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="true" editable="true" desc="Sets the compare value. When the count value equals the compare the compare output pulses high. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." />
75    <ParamRange id="CompareBuf0" name="Compare 0 Buff" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${EnableCompare0Swap}`" editable="true" desc="Sets the buffered compare value. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." />
76
77    <!--CompareBuf0-->
78    <ParamBool id="EnableCompare1Swap" name="Enable Compare 1 Swap" group="Compare" default="false" visible="`${pCntCC1}`" editable="true" desc="If checked the compare register will be swapped at the CC1 match event." />
79    <ParamRange id="Compare1" name="Compare 1" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${pCntCC1}`" editable="true" desc="Sets the compare value. When the count value equals the compare the compare output pulses high. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." />
80    <ParamRange id="CompareBuf1" name="Compare 1 Buff" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${EnableCompare1Swap &amp;&amp; pCntCC1}`" editable="true" desc="Sets the buffered compare value. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." />
81
82    <!--Interrupts-->
83    <ParamBool id="InterruptCC0" name="Compare 0" group="Interrupt Source" default="false" visible="true" editable="true" desc="Generates interrupt when counter value matches with compare 0 value" />
84    <ParamBool id="InterruptCC1" name="Compare 1" group="Interrupt Source" default="false" visible="`${pCntCC1}`" editable="true" desc="Generates interrupt when counter value matches with compare 1 value" />
85    <ParamString id="InterruptSource" name="InterruptSource" desc="InterruptSource" group="Interrupt Source" default="(CY_TCPWM_INT_ON_CC0 `${(InterruptCC0)? &quot;&quot; : &quot;&amp; 0U&quot;}`) | (CY_TCPWM_INT_ON_CC1 `${(InterruptCC1)? &quot;&quot; : &quot;&amp; 0U&quot;}`)" visible="false" editable="false" />
86
87    <!--Inputs-->
88    <ParamSignal port="clock_counter_en[0]" name="Clock Signal" group="Inputs" visible="`${hasVisibleOption(&quot;clock_counter_en[0]&quot;)}`"  desc="The clock input defines the operating frequency." canBeEmpty="`${!hasVisibleOption(&quot;clock_counter_en[0]&quot;)}`" />
89    <ParamSignal port="clock[0]" name="Clock Signal" group="Inputs" visible="`${hasVisibleOption(&quot;clock[0]&quot;)}`"  desc="The clock input defines the operating frequency." canBeEmpty="`${!hasVisibleOption(&quot;clock[0]&quot;)}`"/>
90
91    <ParamChoice id="ShiftInput" name="Shift Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="true" editable="true" desc="Determines the shift input event. Signal on this input causes counter to shift in right direction." >
92      <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" />
93      <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" />
94      <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" />
95      <Entry name="Level" value="CY_TCPWM_INPUT_LEVEL" visible="true" />
96      <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" />
97    </ParamChoice>
98    <ParamSignal port="count[0]" name="Shift Signal" group="Inputs" visible="`${ShiftInput ne CY_TCPWM_INPUT_DISABLED}`" desc="Determines the shift input connection." canBeEmpty="`${ShiftInput eq CY_TCPWM_INPUT_DISABLED}`" >
99      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
100        <Parameter id="DriveModes" severity="DEFAULT" reason="">
101          <Fixed value="CY_GPIO_DM_HIGHZ" />
102        </Parameter>
103      </Constraint>
104      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
105        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
106          <Fixed value="CY_GPIO_DM_HIGHZ" />
107        </Parameter>
108      </Constraint>
109      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
110    </ParamSignal>
111    <ParamChoice id="KillInput" name="Stop Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="true" editable="true" desc="Determines the stop input event. Signal on this input stops the Shift Register." >
112      <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" />
113      <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" />
114      <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" />
115      <Entry name="Level" value="CY_TCPWM_INPUT_LEVEL" visible="true" />
116      <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" />
117    </ParamChoice>
118    <ParamSignal port="stop[0]" name="Stop Signal" group="Inputs" visible="`${KillInput ne CY_TCPWM_INPUT_DISABLED}`" desc="Determines the stop input connection." canBeEmpty="`${KillInput eq CY_TCPWM_INPUT_DISABLED}`" >
119      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
120        <Parameter id="DriveModes" severity="DEFAULT" reason="">
121          <Fixed value="CY_GPIO_DM_HIGHZ" />
122        </Parameter>
123      </Constraint>
124      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
125        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
126          <Fixed value="CY_GPIO_DM_HIGHZ" />
127        </Parameter>
128      </Constraint>
129      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
130    </ParamSignal>
131    <ParamChoice id="ReloadInput" name="Reload Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="true" editable="true" desc="Determines the reload input event. Signal on this input sets the counter value to “0” and starts the counter shift operation." >
132      <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" />
133      <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" />
134      <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" />
135      <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" />
136    </ParamChoice>
137    <ParamSignal port="reload[0]" name="Reload Signal" group="Inputs" visible="`${ReloadInput ne CY_TCPWM_INPUT_DISABLED}`" desc="Determines the reload input connection." canBeEmpty="`${ReloadInput eq CY_TCPWM_INPUT_DISABLED}`" >
138      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
139        <Parameter id="DriveModes" severity="DEFAULT" reason="">
140          <Fixed value="CY_GPIO_DM_HIGHZ" />
141        </Parameter>
142      </Constraint>
143      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
144        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
145          <Fixed value="CY_GPIO_DM_HIGHZ" />
146        </Parameter>
147      </Constraint>
148      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
149    </ParamSignal>
150    <ParamChoice id="StartInput" name="Start Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="true" editable="true" desc="Determines the start input event. Signal on this input starts the shift operation using current counter value." >
151      <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" />
152      <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" />
153      <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" />
154      <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" />
155    </ParamChoice>
156    <ParamSignal port="start[0]" name="Start Signal" group="Inputs" visible="`${StartInput ne CY_TCPWM_INPUT_DISABLED}`" desc="Determines the start input connection." canBeEmpty="`${StartInput eq CY_TCPWM_INPUT_DISABLED}`" >
157      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
158        <Parameter id="DriveModes" severity="DEFAULT" reason="">
159          <Fixed value="CY_GPIO_DM_HIGHZ" />
160        </Parameter>
161      </Constraint>
162      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
163        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
164          <Fixed value="CY_GPIO_DM_HIGHZ" />
165        </Parameter>
166      </Constraint>
167      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
168    </ParamSignal>
169    <ParamChoice id="SerialInput" name="Serial Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="true" editable="true" desc="Determines the serial input event. This input is used as serial input to the MSB of the counter." >
170      <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" />
171      <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" />
172      <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" />
173      <Entry name="Level" value="CY_TCPWM_INPUT_LEVEL" visible="true" />
174      <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" />
175    </ParamChoice>
176    <ParamSignal port="capture0[0]" name="Serial Signal" group="Inputs" visible="`${SerialInput ne CY_TCPWM_INPUT_DISABLED}`" desc="Determines the serial input connection." canBeEmpty="`${SerialInput eq CY_TCPWM_INPUT_DISABLED}`" >
177      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
178        <Parameter id="DriveModes" severity="DEFAULT" reason="">
179          <Fixed value="CY_GPIO_DM_HIGHZ" />
180        </Parameter>
181      </Constraint>
182      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
183        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
184          <Fixed value="CY_GPIO_DM_HIGHZ" />
185        </Parameter>
186      </Constraint>
187      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
188    </ParamSignal>
189
190    <!--Shift Register Output Polarity-->
191    <ParamBool id="InvertShiftReg" name="Invert line Output" group="Shift Register Output Polarity" default="false" visible="true" editable="true" desc="If checked the line Shift Register output is inverted." />
192    <ParamBool id="InvertShiftReg_n" name="Invert line_n Output" group="Shift Register Output Polarity" default="false" visible="true" editable="true" desc="If checked the line_n Shift Register output is inverted." />
193
194    <!--Shift Register output on Disable-->
195    <ParamChoice id="ShiftRegDisabledOutput" name="Shift Register Output On Disable" group="Shift Register Output On Disable" default="CY_TCPWM_SHIFTREG_OUTPUT_HIGHZ" visible="true" editable="true" desc="Specifies the behavior of the Shift Register outputs while Shift Register is disabled." >
196      <Entry name="High Impedance" value="CY_TCPWM_SHIFTREG_OUTPUT_HIGHZ" visible="true" />
197      <Entry name="Retain" value="CY_TCPWM_SHIFTREG_OUTPUT_RETAIN" visible="true" />
198      <Entry name="Low" value="CY_TCPWM_SHIFTREG_OUTPUT_LOW" visible="true" />
199	  <Entry name="High" value="CY_TCPWM_SHIFTREG_OUTPUT_HIGH" visible="true" />
200    </ParamChoice>
201
202    <!--Outputs-->
203    <ParamSignal port="line[0]" name="PWM (line)" group="Outputs" visible="true" desc="Shift Register output" canBeEmpty="true" >
204      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
205        <Parameter id="DriveModes" severity="DEFAULT" reason="">
206          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
207        </Parameter>
208      </Constraint>
209      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
210        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
211          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
212        </Parameter>
213      </Constraint>
214      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
215    </ParamSignal>
216    <ParamSignal port="line_compl[0]" name="PWM_n (line_compl)" group="Outputs" visible="true" desc="Complimentary Shift Register output." canBeEmpty="true" >
217      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
218        <Parameter id="DriveModes" severity="DEFAULT" reason="">
219          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
220        </Parameter>
221      </Constraint>
222      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
223        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
224          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
225        </Parameter>
226      </Constraint>
227      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
228    </ParamSignal>
229
230    <!--Trigger Outputs-->
231    <ParamChoice id="trigger0Event" name="Trigger 0 Event" group="Trigger Outputs" default="CY_TCPWM_CNT_TRIGGER_ON_DISABLED" visible="true" editable="true" desc="This output used to connect TCPWM event signals to other peripherals." >
232      <Entry name="Compare 0 Match" value="CY_TCPWM_CNT_TRIGGER_ON_CC0_MATCH" visible="true" />
233      <Entry name="Compare 1 Match" value="CY_TCPWM_CNT_TRIGGER_ON_CC1_MATCH" visible="`${pCntCC1}`" />
234      <Entry name="Shift Register Output (line_out)" value="CY_TCPWM_CNT_TRIGGER_ON_LINE_OUT" visible="true" />
235      <Entry name="Disabled" value="CY_TCPWM_CNT_TRIGGER_ON_DISABLED" visible="true" />
236    </ParamChoice>
237    <ParamSignal port="tr_out0[0]" name="Trigger 0 Signal" group="Trigger Outputs" visible="`${trigger0Event ne CY_TCPWM_CNT_TRIGGER_ON_DISABLED}`" desc="Signals to connect on Trigger 0 Event" canBeEmpty="`${trigger0Event eq CY_TCPWM_CNT_TRIGGER_ON_DISABLED}`" >
238      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
239        <Parameter id="DriveModes" severity="DEFAULT" reason="">
240          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
241        </Parameter>
242      </Constraint>
243      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
244        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
245          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
246        </Parameter>
247      </Constraint>
248      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
249    </ParamSignal>
250    <ParamChoice id="trigger1Event" name="Trigger 1 Event" group="Trigger Outputs" default="CY_TCPWM_CNT_TRIGGER_ON_DISABLED" visible="true" editable="true" desc="This output used to connect TCPWM event signals to other peripherals." >
251      <Entry name="Compare 0 Match" value="CY_TCPWM_CNT_TRIGGER_ON_CC0_MATCH" visible="true" />
252      <Entry name="Compare 1 Match" value="CY_TCPWM_CNT_TRIGGER_ON_CC1_MATCH" visible="`${pCntCC1}`" />
253      <Entry name="Shift Register Output (line_out)" value="CY_TCPWM_CNT_TRIGGER_ON_LINE_OUT" visible="true" />
254      <Entry name="Disabled" value="CY_TCPWM_CNT_TRIGGER_ON_DISABLED" visible="true" />
255    </ParamChoice>
256    <ParamSignal port="tr_out1[0]" name="Trigger 1 Signal" group="Trigger Outputs" visible="`${trigger1Event ne CY_TCPWM_CNT_TRIGGER_ON_DISABLED}`" desc="Signals to connect on Trigger 1 Event" canBeEmpty="`${trigger1Event eq CY_TCPWM_CNT_TRIGGER_ON_DISABLED}`" >
257      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
258        <Parameter id="DriveModes" severity="DEFAULT" reason="">
259          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
260        </Parameter>
261      </Constraint>
262      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
263        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
264          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
265        </Parameter>
266      </Constraint>
267      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
268    </ParamSignal>
269
270    <!--Config-->
271    <ParamBool id="inFlash" name="Store Config in Flash" group="Advanced" default="true" visible="true" editable="true" desc="Controls whether the configuration structure is stored in flash (const, true) or SRAM (not const, false)." />
272
273     <!-- Peripheral clock divider connection -->
274    <ParamString id="definePrefix" name="Define prefix" group="Internal" default="`${&quot;TCPWM&quot; . tcpwmInst . &quot;_GRP&quot; . pCntGroup . &quot;_CNT&quot; . getInstNumber(&quot;cnt&quot;)}`" visible="false" editable="false" desc="" />
275    <ParamString id="defineInputDisabled" name="Define input disabled" group="Internal" default="`${INST_NAME . &quot;_INPUT_DISABLED &amp; 0x3U&quot;}`" visible="false" editable="false" desc="" />
276    <ParamString id="pclk" name="PCLK" group="Internal" default="`${hasVisibleOption(&quot;clock_counter_en[0]&quot;) ? getBlockFromSignal(&quot;clock_counter_en[0]&quot;):getBlockFromSignal(&quot;clock[0]&quot;)}`" visible="false" editable="false" desc="Connected peripheral clock divider (PCLK)" />
277    <ParamBool id="pclkOk" name="PCLK Valid" group="Internal" default="`${hasVisibleOption(&quot;clock_counter_en[0]&quot;) ? hasConnection(&quot;clock_counter_en&quot;, 0) &amp;&amp; isBlockUsed(pclk) : hasConnection(&quot;clock&quot;, 0) &amp;&amp; isBlockUsed(pclk)}`" visible="false" editable="false" desc="Checks whether there is a PCLK connected and enabled" />
278    <ParamString id="pclkDst" name="PCLK Destination" group="Internal" default="`${hasVisibleOption(&quot;clock_counter_en[0]&quot;) ? &quot;PCLK_TCPWM&quot; . tcpwmInst . &quot;_CLOCK_COUNTER_EN&quot; . cntInst : &quot;PCLK_TCPWM&quot; . tcpwmInst . &quot;_CLOCKS&quot; . cntInst}`" visible="false" editable="false" desc="" />
279
280     <!-- Clock Frequency -->
281    <ParamString id="sourceClock" name="sourceClock" group="General" default="`${(hasVisibleOption(&quot;clock[0]&quot;)) ? (getBlockFromSignal(&quot;clock[0]&quot;)) : (getBlockFromSignal(&quot;clock_counter_en[0]&quot;))}`" visible="false" editable="false" desc="Source Clock Resource" />
282    <ParamRange  id="tcpwmClkHz" name="tcpwmClkHz" group="General" default="`${getExposedMember(sourceClock, &quot;frequency&quot;)}`" min="0" max="400000000" resolution="1" visible="false" editable="false" desc="TCPWM clock frequency in Hz" />
283
284  </Parameters>
285
286  <DRCs>
287    <DRC type="ERROR" paramId="clock_en[0]" text="Maximum input clock signal frequency supported is 100 Mhz. Please fix input clock setting." condition="`${(hasVisibleOption(&quot;clock[0]&quot;)) &amp;&amp; (tcpwmClkHz &gt; 100000000)}`" />
288    <DRC type="ERROR" paramId="clock_counter_en[0]" text="Maximum input clock signal frequency supported is 100 Mhz. Please fix input clock setting." condition="`${(hasVisibleOption(&quot;clock_counter_en[0]&quot;)) &amp;&amp; (tcpwmClkHz &gt; 100000000)}`" />
289
290    <!--ShiftInput DRCs-->
291    <DRC type="ERROR" text="Shift Input event has to be enabled to use Shift Signal." condition="`${hasConnection(&quot;count&quot;, 0) &amp;&amp; (ShiftInput eq CY_TCPWM_INPUT_DISABLED)}`" paramId="ShiftInput">
292	    <FixIt action="SET_PARAM" target="ShiftInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" />
293	    <FixIt action="SET_PARAM" target="ShiftInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" />
294	    <FixIt action="SET_PARAM" target="ShiftInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" />
295	    <FixIt action="SET_PARAM" target="ShiftInput" value="CY_TCPWM_INPUT_LEVEL" valid="true" />
296	</DRC>
297
298    <!--ReloadInput DRCs-->
299    <DRC type="ERROR" text="Reload Event has to be enabled to use Reload Signal." condition="`${hasConnection(&quot;reload&quot;, 0) &amp;&amp; (ReloadInput eq CY_TCPWM_INPUT_DISABLED)}`" paramId="ReloadInput">
300	    <FixIt action="SET_PARAM" target="ReloadInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" />
301	    <FixIt action="SET_PARAM" target="ReloadInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" />
302	    <FixIt action="SET_PARAM" target="ReloadInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" />
303	</DRC>
304
305    <!--StartInput DRCs-->
306    <DRC type="ERROR" text="Start Event has to be enabled to use Start Signal." condition="`${hasConnection(&quot;start&quot;, 0) &amp;&amp; (StartInput eq CY_TCPWM_INPUT_DISABLED)}`" paramId="StartInput">
307	    <FixIt action="SET_PARAM" target="StartInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" />
308	    <FixIt action="SET_PARAM" target="StartInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" />
309	    <FixIt action="SET_PARAM" target="StartInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" />
310	</DRC>
311
312    <!--SerialInput DRCs-->
313    <DRC type="ERROR" text="Serial Input Event has to be enabled to use Serial Input Signal." condition="`${hasConnection(&quot;capture0&quot;, 0) &amp;&amp; (SerialInput eq CY_TCPWM_INPUT_DISABLED)}`" paramId="SerialInput">
314	    <FixIt action="SET_PARAM" target="SerialInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" />
315	    <FixIt action="SET_PARAM" target="SerialInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" />
316	    <FixIt action="SET_PARAM" target="SerialInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" />
317	    <FixIt action="SET_PARAM" target="ShiftInput" value="CY_TCPWM_INPUT_LEVEL" valid="true" />
318	</DRC>
319
320    <!--KillInput DRCs-->
321    <DRC type="ERROR" text="Kill Event has to be enabled to use Kill Signal." condition="`${hasConnection(&quot;stop&quot;, 0) &amp;&amp; (KillInput eq CY_TCPWM_INPUT_DISABLED)}`" paramId="KillInput">
322	    <FixIt action="SET_PARAM" target="KillInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" />
323	    <FixIt action="SET_PARAM" target="KillInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" />
324	    <FixIt action="SET_PARAM" target="KillInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" />
325	</DRC>
326
327	<!--Trigger Output DRCs-->
328	<DRC type="ERROR" text="Trigger 0 Event has to be enabled to use Trigger 0 Signal." condition="`${hasConnection(&quot;tr_out0&quot;, 0) &amp;&amp; (trigger0Event eq CY_TCPWM_CNT_TRIGGER_ON_DISABLED)}`" paramId="trigger0Event">
329	    <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_CC0_MATCH" valid="true" />
330	    <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_CC1_MATCH" valid="`${pCntCC1}`" />
331	    <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_LINE_OUT" valid="true" />
332	</DRC>
333	<DRC type="ERROR" text="Trigger 1 Event has to be enabled to use Trigger 1 Signal." condition="`${hasConnection(&quot;tr_out1&quot;, 0) &amp;&amp; (trigger1Event eq CY_TCPWM_CNT_TRIGGER_ON_DISABLED)}`" paramId="trigger1Event">
334	    <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_CC0_MATCH" valid="true" />
335	    <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_CC1_MATCH" valid="`${pCntCC1}`" />
336	    <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_LINE_OUT" valid="true" />
337	</DRC>
338  </DRCs>
339
340
341
342
343  <ConfigFirmware>
344    <ConfigInclude value="cy_tcpwm_shiftreg.h" include="true" />
345    <ConfigInclude value="cy_sysclk.h" include="`${pclkOk}`" />
346    <ConfigInclude value="cycfg_routing.h" include="true" />
347    <ConfigInclude value="cyhal_hwmgr.h" include="true" guard="defined (CY_USING_HAL)" />
348
349    <ConfigDefine name="`${INST_NAME}`_HW" value="TCPWM`${tcpwmInst}`" public="true" include="true" />
350    <ConfigDefine name="`${INST_NAME}`_NUM" value="`${cntInst}`UL" public="true" include="true" />
351    <ConfigDefine name="`${INST_NAME}`_IRQ" value="tcpwm_`${tcpwmInst}`_interrupts_`${cntInst}`_IRQn" public="true" include="`${InterruptCC0 || InterruptCC1}`" />
352    <ConfigDefine name="`${INST_NAME}`_INPUT_DISABLED" value="0x7U" public="false" include="true" />
353    <ConfigStruct name="`${INST_NAME . &quot;_config&quot;}`" type="cy_stc_tcpwm_shiftreg_config_t" const="`${inFlash}`" public="true" include="true" >
354      <Member name="clockPrescaler" value="`${ClockPrescaler}`" />
355      <Member name="tapsEnabled" value="`${TapsEnabled}`" />
356      <Member name="compare0" value="`${Compare0}`" />
357      <Member name="compareBuf0" value="`${CompareBuf0}`" />
358      <Member name="enableCompare0Swap" value="`${EnableCompare0Swap}`" />
359      <Member name="compare1" value="`${pCntCC1 ? Compare1 : &quot;CY_TCPWM_GRP_CNT_CC0_DEFAULT&quot;}`" />
360      <Member name="compareBuf1" value="`${pCntCC1 ? CompareBuf1 : &quot;CY_TCPWM_GRP_CNT_CC0_BUFF_DEFAULT&quot;}`" />
361      <Member name="enableCompare1Swap" value="`${EnableCompare1Swap}`" />
362      <Member name="interruptSources" value="`${InterruptSource}`" />
363      <Member name="invertShiftRegOut" value="`${InvertShiftReg ? &quot;CY_TCPWM_SHIFTREG_INVERT_ENABLE&quot; : &quot;CY_TCPWM_SHIFTREG_INVERT_DISABLE&quot;}`" />
364      <Member name="invertShiftRegOutN" value="`${InvertShiftReg_n ? &quot;CY_TCPWM_SHIFTREG_INVERT_ENABLE&quot; : &quot;CY_TCPWM_SHIFTREG_INVERT_DISABLE&quot;}`" />
365      <Member name="reloadInputMode" value="`${ReloadInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : ReloadInput}`" />
366      <Member name="reloadInput" value="`${ReloadInput eq CY_TCPWM_INPUT_DISABLED ? &quot;CY_TCPWM_INPUT_0&quot; : (definePrefix . &quot;_RELOAD_VALUE&quot;)}`" />
367      <Member name="startInputMode" value="`${StartInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : StartInput}`" />
368      <Member name="startInput" value="`${StartInput eq CY_TCPWM_INPUT_DISABLED ? &quot;CY_TCPWM_INPUT_0&quot; : (definePrefix . &quot;_START_VALUE&quot;)}`" />
369      <Member name="killInputMode" value="`${KillInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : KillInput}`" />
370      <Member name="killInput" value="`${KillInput eq CY_TCPWM_INPUT_DISABLED ? &quot;CY_TCPWM_INPUT_0&quot; : (definePrefix . &quot;_STOP_VALUE&quot;)}`" />
371      <Member name="shiftInputMode" value="`${ShiftInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : ShiftInput}`" />
372      <Member name="shiftInput" value="`${ShiftInput eq CY_TCPWM_INPUT_DISABLED ? &quot;CY_TCPWM_INPUT_1&quot; :  (definePrefix . &quot;_COUNT_VALUE&quot;)}`" />
373      <Member name="serialInputMode" value="`${SerialInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : SerialInput}`" />
374      <Member name="serialInput" value="`${SerialInput eq CY_TCPWM_INPUT_DISABLED ? &quot;CY_TCPWM_INPUT_0&quot; : (definePrefix . &quot;_CAPTURE0_VALUE&quot;)}`" />
375      <Member name="shiftRegOnDisable" value="`${ShiftRegDisabledOutput}`" />
376      <Member name="trigger0Event" value="`${trigger0Event}`" />
377      <Member name="trigger1Event" value="`${trigger1Event}`" />
378    </ConfigStruct>
379
380    <ConfigStruct name="`${INST_NAME}`_obj" type="cyhal_resource_inst_t" const="true" public="true" include="true" guard="defined (CY_USING_HAL)">
381      <Member name="type" value="CYHAL_RSC_TCPWM" />
382      <Member name="block_num" value="`${(getInstNumber(&quot;tcpwm&quot;) * pMaxGroupCount) + pCntGroup}`U" />
383      <Member name="channel_num" value="`${getInstNumber(&quot;cnt&quot;)}`U" />
384    </ConfigStruct>
385
386    <ConfigInstruction purpose="INITIALIZE" value="Cy_SysClk_PeriGroupSlaveInit(CY_MMIO_TCPWM`${tcpwmInst}`_PERI_NR, CY_MMIO_TCPWM`${tcpwmInst}`_GROUP_NR, CY_MMIO_TCPWM`${tcpwmInst}`_SLAVE_NR, CY_MMIO_TCPWM`${tcpwmInst}`_CLK_HF_NR);" include="true" guard="defined (CY_DEVICE_CONFIGURATOR_IP_ENABLE_FEATURE)" />
387    <ConfigInstruction purpose="INITIALIZE" value="Cy_SysClk_PeriphAssignDivider(`${pclkDst}`, `${getExposedMember(pclk, &quot;clockSel&quot;)}`);" include="`${pclkOk}`"  />
388    <ConfigInstruction purpose="RESERVE" value="cyhal_hwmgr_reserve(&amp;`${INST_NAME}`_obj);" include="true" guard="defined (CY_USING_HAL)" />
389  </ConfigFirmware>
390
391</Personality>
392