1<?xml version="1.0" encoding="utf-8"?>
2
3
4<!--****************************************************************************
5* \file smartio.cypersonality
6* \version 4.0
7*
8* \brief
9* Smart I/O personality description file.
10* This supports CAT1A, CAT1B, CAT1C and CAT1D devices.
11********************************************************************************
12* \copyright
13* Copyright 2018-2023 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="smartio" name="Smart I/O" version="4.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7">
30  <Dependencies>
31    <IpBlock name="mxs22ioss,mxs40ioss,mxs40sioss" />
32    <Resource name="ioss\.port\.smartio" />
33  </Dependencies>
34  <ExposedMembers />
35  <Parameters>
36    <!-- PDL documentation -->
37    <ParamDoc id="pdlDoc" name="Configuration Help" group="Overview" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__smartio.html" linkText="Open SmartIO Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" />
38
39    <!-- External tools -->
40    <ParamCustom id="SmartIOConfigurator" name="Smart I/O Configurator" group="External Tools" default="0" path="`${cy_tools_path(&quot;smartio-configurator&quot;) . &quot;/smartio-configurator&quot;}`" modal="true" visible="true" editable="true" desc="Launch Smart I/O Configurator">
41        <Arg value="`${&quot;--design=&quot; . cy_design_file()}`" />
42        <Arg value="`${&quot;--library=&quot; . cy_libs_file()}`" />
43        <Arg value="`${&quot;--resource=ioss[0].port[&quot; . getInstNumber(&quot;port&quot;) . &quot;].smartio[0]&quot;}`" />
44    </ParamCustom>
45
46    <!-- Debug Enable -->
47    <ParamBool id="debug" name="Debug Flag" group="General" default="false" visible="false" editable="false" desc="Set this to true to expose all parameters" />
48
49    <!--General-->
50    <ParamChoice id="clkSrc" name="Clock Source" group="General" default="CY_SMARTIO_CLK_ASYNC" visible="`${(debug eq true)}`" editable="true" desc="Smart I/O instance clock source" >
51      <Entry name="Signal on I/O terminal 0" value="CY_SMARTIO_CLK_IO0" visible="true" />
52      <Entry name="Signal on I/O terminal 1" value="CY_SMARTIO_CLK_IO1" visible="true" />
53      <Entry name="Signal on I/O terminal 2" value="CY_SMARTIO_CLK_IO2" visible="true" />
54      <Entry name="Signal on I/O terminal 3" value="CY_SMARTIO_CLK_IO3" visible="true" />
55      <Entry name="Signal on I/O terminal 4" value="CY_SMARTIO_CLK_IO4" visible="true" />
56      <Entry name="Signal on I/O terminal 5" value="CY_SMARTIO_CLK_IO5" visible="true" />
57      <Entry name="Signal on I/O terminal 6" value="CY_SMARTIO_CLK_IO6" visible="true" />
58      <Entry name="Signal on I/O terminal 7" value="CY_SMARTIO_CLK_IO7" visible="true" />
59      <Entry name="Signal on Chip terminal 0" value="CY_SMARTIO_CLK_CHIP0" visible="true" />
60      <Entry name="Signal on Chip terminal 1" value="CY_SMARTIO_CLK_CHIP1" visible="true" />
61      <Entry name="Signal on Chip terminal 2" value="CY_SMARTIO_CLK_CHIP2" visible="true" />
62      <Entry name="Signal on Chip terminal 3" value="CY_SMARTIO_CLK_CHIP3" visible="true" />
63      <Entry name="Signal on Chip terminal 4" value="CY_SMARTIO_CLK_CHIP4" visible="true" />
64      <Entry name="Signal on Chip terminal 5" value="CY_SMARTIO_CLK_CHIP5" visible="true" />
65      <Entry name="Signal on Chip terminal 6" value="CY_SMARTIO_CLK_CHIP6" visible="true" />
66      <Entry name="Signal on Chip terminal 7" value="CY_SMARTIO_CLK_CHIP7" visible="true" />
67      <Entry name="Peripheral clock divider (Active)" value="CY_SMARTIO_CLK_DIVACT" visible="true" />
68      <Entry name="Peripheral clock divider (Deep-Sleep)" value="CY_SMARTIO_CLK_DIVDS" visible="true" />
69      <Entry name="Peripheral clock divider (Hibernate)" value="CY_SMARTIO_CLK_DIVHIB" visible="true" />
70      <Entry name="Low-Frequency Clock (Clk_LF)" value="CY_SMARTIO_CLK_LFCLK" visible="true" />
71      <Entry name="Asynchronous" value="CY_SMARTIO_CLK_ASYNC" visible="true" />
72    </ParamChoice>
73
74    <ParamSignal port="clock[0]" name="Clock Divider" group="General" visible="`${(clkSrc eq CY_SMARTIO_CLK_DIVACT) || (clkSrc eq CY_SMARTIO_CLK_DIVDS) || (clkSrc eq CY_SMARTIO_CLK_DIVHIB)}`" desc="Peripheral clock divider to assign to the Smart I/O instance." canBeEmpty="`${!((clkSrc eq CY_SMARTIO_CLK_DIVACT) || (clkSrc eq CY_SMARTIO_CLK_DIVDS) || (clkSrc eq CY_SMARTIO_CLK_DIVHIB))}`" />
75    <Repeat count="8">
76      <ParamBool id="lutEn$idx"  name="LUT$idx Enable" group="General" default="false" visible="`${(debug eq true)}`" editable="true" desc="Enable/Disable LUT$idx configuration" />
77    </Repeat>
78    <ParamBool id="duEn"    name="DU Enable"   group="General" default="false" visible="`${(debug eq true)}`" editable="true" desc="Enable/Disable DU configuration" />
79    <ParamBool id="hldOvr"  name="Hold Override" group="General" default="false" visible="true" editable="true" desc="Enable/Disable hold override (Deep-Sleep functionality)" />
80
81    <!--I/O Terminal -->
82    <Repeat count="8">
83      <ParamBool id="hasIoIn$idx" group="Internal" name="has IO in signal" visible="false" editable="false" default="`${hasVisibleOption(&quot;io_in[$idx]&quot;)}`" desc="IO in signal available" />
84      <ParamBool id="hasIoOut$idx" group="Internal" name="has IO out signal" visible="false" editable="false" default="`${hasVisibleOption(&quot;io_out[$idx]&quot;)}`" desc="IO out signal available" />
85      <ParamBool id="hasAnyIo$idx" group="Internal" name="has any io connection" visible="false" editable="false" default="`${hasIoIn$idx || hasIoOut$idx}`" desc="any io connection available"/>
86      <ParamChoice id="ioMode$idx" name="I/O terminal $idx mode" group="I/O Terminal" default="`${hasAnyIo$idx ? CY_SMARTIO_BYPASS : CY_SMARTIO_NONE}`" visible="`${(debug eq true)}`" editable="`${hasAnyIo$idx}`" desc="I/O terminal $idx signal mode/direction" >
87        <Entry name="Bypass" value="CY_SMARTIO_BYPASS" visible="`${hasAnyIo$idx}`" />
88        <Entry name="Input(Sync)" value="CY_SMARTIO_SYNC_INPUT" visible="`${(clkSrc ne CY_SMARTIO_CLK_ASYNC) &amp;&amp; hasIoIn$idx}`" />
89        <Entry name="Input(Async)" value="CY_SMARTIO_ASYNC_INPUT" visible="`${hasIoIn$idx}`" />
90        <Entry name="Output" value="CY_SMARTIO_OUTPUT" visible="`${hasIoOut$idx}`" />
91        <Entry name="None" value="CY_SMARTIO_NONE" visible="true" />
92      </ParamChoice>
93      <ParamSignal port="io_in[$idx]" name="I/O terminal $idx input" group="I/O Terminal" visible="`${(ioMode$idx eq CY_SMARTIO_SYNC_INPUT) || (ioMode$idx eq CY_SMARTIO_ASYNC_INPUT)}`" desc="I/O terminal $idx input signal source" canBeEmpty="`${!((ioMode$idx eq CY_SMARTIO_SYNC_INPUT) || (ioMode$idx eq CY_SMARTIO_ASYNC_INPUT))}`" />
94      <ParamSignal port="io_out[$idx]" name="I/O terminal $idx output" group="I/O Terminal" visible="`${(ioMode$idx eq CY_SMARTIO_OUTPUT)}`" desc="I/O terminal $idx output signal source" canBeEmpty="`${!((ioMode$idx eq CY_SMARTIO_OUTPUT))}`" />
95    </Repeat>
96
97    <!--Chip Terminal -->
98    <Repeat count="8">
99      <ParamBool id="chipInConnected$idx" group="Internal" name="chip in connected"  visible="false" editable="false" default="`${hasConnection(&quot;chip_in&quot;, $idx)}`" desc="chip in connected" />
100      <ParamBool id="chipOutConnected$idx" group="Internal" name="chip out connected"  visible="false" editable="false" default="`${hasConnection(&quot;chip_out&quot;, $idx)}`" desc="chip out connected" />
101      <ParamBool id="chipInoutConnected$idx" group="Internal" name="chip inout connected"  visible="false" editable="false" default="`${hasConnection(&quot;chip_inout&quot;, $idx)}`" desc="chip inout connected" />
102      <ParamBool id="hasChipOut$idx" group="Internal" name="has chip out connection" visible="false" editable="false" default="`${hasVisibleOption(&quot;chip_out[$idx]&quot;)}`"  desc="chip out connection available" />
103      <ParamBool id="hasChipIn$idx" group="Internal" name="has chip in connection" visible="false" editable="false" default="`${hasVisibleOption(&quot;chip_in[$idx]&quot;)}`" desc="chip in connection available" />
104      <ParamBool id="hasChipInout$idx" group="Internal" name="has chip inout connection" visible="false" editable="false" default="`${hasVisibleOption(&quot;chip_inout[$idx]&quot;)}`" desc="chip inout connection available"/>
105      <ParamBool id="hasAnyChip$idx" group="Internal" name="has any chip connection" visible="false" editable="false" default="`${hasChipIn$idx || hasChipOut$idx || hasChipInout$idx}`" desc="any chip connection available"/>
106
107      <!-- Chip_in and chip_out's visibility expressions appear reversed. They are not. The in/out are with respect to the chip -->
108      <ParamChoice id="chipMode$idx" name="Chip terminal $idx mode" group="Chip Terminal" default="`${hasAnyChip$idx &amp;&amp; hasAnyIo$idx ? CY_SMARTIO_BYPASS : CY_SMARTIO_NONE}`" visible="`${(debug eq true)}`" editable="`${hasAnyChip$idx}`" desc="Chip terminal $idx signal mode/direction" >
109        <Entry name="Bypass" value="CY_SMARTIO_BYPASS" visible="`${hasAnyChip$idx &amp;&amp; hasAnyIo$idx}`" />
110        <Entry name="Input(Sync)" value="CY_SMARTIO_SYNC_INPUT" visible="`${(clkSrc ne CY_SMARTIO_CLK_ASYNC) &amp;&amp; (hasChipOut$idx || hasChipInout$idx)}`" />
111        <Entry name="Input(Async)" value="CY_SMARTIO_ASYNC_INPUT" visible="`${hasChipOut$idx || hasChipInout$idx}`" />
112        <Entry name="Output" value="CY_SMARTIO_OUTPUT" visible="`${hasChipIn$idx || hasChipInout$idx}`" />
113        <Entry name="None" value="CY_SMARTIO_NONE" visible="true" />
114      </ParamChoice>
115      <ParamSignal port="chip_in[$idx]" name="Chip terminal $idx output" group="Chip Terminal" visible="`${(chipMode$idx eq CY_SMARTIO_OUTPUT)}`" desc="Chip terminal $idx output signal source" canBeEmpty="`${!(chipMode$idx eq CY_SMARTIO_OUTPUT) || chipInoutConnected$idx}`" />
116      <ParamSignal port="chip_out[$idx]" name="Chip terminal $idx input" group="Chip Terminal" visible="`${(chipMode$idx eq CY_SMARTIO_SYNC_INPUT) || (chipMode$idx eq CY_SMARTIO_ASYNC_INPUT)}`" desc="Chip terminal $idx input signal source" canBeEmpty="`${!((chipMode$idx eq CY_SMARTIO_SYNC_INPUT) || (chipMode$idx eq CY_SMARTIO_ASYNC_INPUT)) || chipInoutConnected$idx}`" />
117      <ParamSignal port="chip_inout[$idx]" name="Chip terminal $idx inout" group="Chip Terminal" visible="`${(chipMode$idx eq CY_SMARTIO_OUTPUT) || (chipMode$idx eq CY_SMARTIO_SYNC_INPUT) || (chipMode$idx eq CY_SMARTIO_ASYNC_INPUT)}`" desc="Chip terminal $idx inout signal source" canBeEmpty="`${!((chipMode$idx eq CY_SMARTIO_OUTPUT) || (chipMode$idx eq CY_SMARTIO_SYNC_INPUT) || (chipMode$idx eq CY_SMARTIO_ASYNC_INPUT)) || chipInConnected$idx || chipOutConnected$idx}`" />
118    </Repeat>
119
120    <!--LUTs -->
121    <Repeat count="8">
122      <ParamChoice id="lut$idxOpcode" name="Op-code" group="LUT$idx" default="CY_SMARTIO_LUTOPC_COMB" visible="`${(debug eq true)}`" editable="true" desc="LUT$idx opcode" >
123        <Entry name="Combinatorial output" value="CY_SMARTIO_LUTOPC_COMB" visible="true" />
124        <Entry name="TR2 gated, combinatorial output" value="CY_SMARTIO_LUTOPC_GATED_TR2" visible="`${(clkSrc ne CY_SMARTIO_CLK_ASYNC)}`" />
125        <Entry name="Sequential (gated) output" value="CY_SMARTIO_LUTOPC_GATED_OUT" visible="`${(clkSrc ne CY_SMARTIO_CLK_ASYNC)}`" />
126        <Entry name="Asynchronous Set/Reset mode" value="CY_SMARTIO_LUTOPC_ASYNC_SR" visible="`${(clkSrc ne CY_SMARTIO_CLK_ASYNC)}`" />
127      </ParamChoice>
128
129      <ParamRange id="lut$idxMap" name="LUT mapping" group="LUT$idx" default="0" min="0" max="`${pow(2, 8)-1}`" resolution="1" visible="`${(debug eq true)}`" editable="true" desc="LUT truth table: LUT out = 3'b{TR2,TR1,TR0}" />
130
131      <ParamChoice id="lut$idxTr0" name="Input TR0" group="LUT$idx" default="CY_SMARTIO_LUTTR_INVALID" visible="`${(debug eq true)}`" editable="true" desc="LUT$idx input trigger 0 selection" >
132        <Entry name="DU" value="CY_SMARTIO_LUTTR_DU_OUT" visible="true" />
133        <Entry name="LUT1" value="CY_SMARTIO_LUTTR_LUT1_OUT" visible="true" />
134        <Entry name="LUT2" value="CY_SMARTIO_LUTTR_LUT2_OUT" visible="true" />
135        <Entry name="LUT3" value="CY_SMARTIO_LUTTR_LUT3_OUT" visible="true" />
136        <Entry name="LUT4" value="CY_SMARTIO_LUTTR_LUT4_OUT" visible="true" />
137        <Entry name="LUT5" value="CY_SMARTIO_LUTTR_LUT5_OUT" visible="true" />
138        <Entry name="LUT6" value="CY_SMARTIO_LUTTR_LUT6_OUT" visible="true" />
139        <Entry name="LUT7" value="CY_SMARTIO_LUTTR_LUT7_OUT" visible="true" />
140        <Entry name="Chip 0" value="CY_SMARTIO_LUTTR_CHIP0" visible="`${hasAnyChip$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP0)) : false}`" />
141        <Entry name="Chip 1" value="CY_SMARTIO_LUTTR_CHIP1" visible="`${hasAnyChip$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP1)) : false}`" />
142        <Entry name="Chip 2" value="CY_SMARTIO_LUTTR_CHIP2" visible="`${hasAnyChip$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP2)) : false}`" />
143        <Entry name="Chip 3" value="CY_SMARTIO_LUTTR_CHIP3" visible="`${hasAnyChip$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP3)) : false}`" />
144        <Entry name="Chip 4" value="CY_SMARTIO_LUTTR_CHIP4" visible="`${hasAnyChip$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP4)) : false}`" />
145        <Entry name="Chip 5" value="CY_SMARTIO_LUTTR_CHIP5" visible="`${hasAnyChip$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP5)) : false}`" />
146        <Entry name="Chip 6" value="CY_SMARTIO_LUTTR_CHIP6" visible="`${hasAnyChip$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP6)) : false}`" />
147        <Entry name="Chip 7" value="CY_SMARTIO_LUTTR_CHIP7" visible="`${hasAnyChip$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP7)) : false}`" />
148        <Entry name="I/O 0" value="CY_SMARTIO_LUTTR_IO0" visible="`${hasAnyIo$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO0)) : false}`" />
149        <Entry name="I/O 1" value="CY_SMARTIO_LUTTR_IO1" visible="`${hasAnyIo$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO1)) : false}`" />
150        <Entry name="I/O 2" value="CY_SMARTIO_LUTTR_IO2" visible="`${hasAnyIo$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO2)) : false}`" />
151        <Entry name="I/O 3" value="CY_SMARTIO_LUTTR_IO3" visible="`${hasAnyIo$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO3)) : false}`" />
152        <Entry name="I/O 4" value="CY_SMARTIO_LUTTR_IO4" visible="`${hasAnyIo$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO4)) : false}`" />
153        <Entry name="I/O 5" value="CY_SMARTIO_LUTTR_IO5" visible="`${hasAnyIo$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO5)) : false}`" />
154        <Entry name="I/O 6" value="CY_SMARTIO_LUTTR_IO6" visible="`${hasAnyIo$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO6)) : false}`" />
155        <Entry name="I/O 7" value="CY_SMARTIO_LUTTR_IO7" visible="`${hasAnyIo$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO7)) : false}`" />
156        <Entry name="None" value="CY_SMARTIO_LUTTR_INVALID" visible="true" />
157      </ParamChoice>
158
159      <ParamChoice id="lut$idxTr1" name="Input TR1" group="LUT$idx" default="CY_SMARTIO_LUTTR_INVALID" visible="`${(debug eq true)}`" editable="true" desc="LUT$idx input trigger 1 selection" >
160        <Entry name="LUT0" value="CY_SMARTIO_LUTTR_LUT0_OUT" visible="true" />
161        <Entry name="LUT1" value="CY_SMARTIO_LUTTR_LUT1_OUT" visible="true" />
162        <Entry name="LUT2" value="CY_SMARTIO_LUTTR_LUT2_OUT" visible="true" />
163        <Entry name="LUT3" value="CY_SMARTIO_LUTTR_LUT3_OUT" visible="true" />
164        <Entry name="LUT4" value="CY_SMARTIO_LUTTR_LUT4_OUT" visible="true" />
165        <Entry name="LUT5" value="CY_SMARTIO_LUTTR_LUT5_OUT" visible="true" />
166        <Entry name="LUT6" value="CY_SMARTIO_LUTTR_LUT6_OUT" visible="true" />
167        <Entry name="LUT7" value="CY_SMARTIO_LUTTR_LUT7_OUT" visible="true" />
168        <Entry name="Chip 0" value="CY_SMARTIO_LUTTR_CHIP0" visible="`${hasAnyChip$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP0)) : false}`" />
169        <Entry name="Chip 1" value="CY_SMARTIO_LUTTR_CHIP1" visible="`${hasAnyChip$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP1)) : false}`" />
170        <Entry name="Chip 2" value="CY_SMARTIO_LUTTR_CHIP2" visible="`${hasAnyChip$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP2)) : false}`" />
171        <Entry name="Chip 3" value="CY_SMARTIO_LUTTR_CHIP3" visible="`${hasAnyChip$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP3)) : false}`" />
172        <Entry name="Chip 4" value="CY_SMARTIO_LUTTR_CHIP4" visible="`${hasAnyChip$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP4)) : false}`" />
173        <Entry name="Chip 5" value="CY_SMARTIO_LUTTR_CHIP5" visible="`${hasAnyChip$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP5)) : false}`" />
174        <Entry name="Chip 6" value="CY_SMARTIO_LUTTR_CHIP6" visible="`${hasAnyChip$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP6)) : false}`" />
175        <Entry name="Chip 7" value="CY_SMARTIO_LUTTR_CHIP7" visible="`${hasAnyChip$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP7)) : false}`" />
176        <Entry name="I/O 0" value="CY_SMARTIO_LUTTR_IO0" visible="`${hasAnyIo$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO0)) : false}`" />
177        <Entry name="I/O 1" value="CY_SMARTIO_LUTTR_IO1" visible="`${hasAnyIo$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO1)) : false}`" />
178        <Entry name="I/O 2" value="CY_SMARTIO_LUTTR_IO2" visible="`${hasAnyIo$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO2)) : false}`" />
179        <Entry name="I/O 3" value="CY_SMARTIO_LUTTR_IO3" visible="`${hasAnyIo$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO3)) : false}`" />
180        <Entry name="I/O 4" value="CY_SMARTIO_LUTTR_IO4" visible="`${hasAnyIo$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO4)) : false}`" />
181        <Entry name="I/O 5" value="CY_SMARTIO_LUTTR_IO5" visible="`${hasAnyIo$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO5)) : false}`" />
182        <Entry name="I/O 6" value="CY_SMARTIO_LUTTR_IO6" visible="`${hasAnyIo$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO6)) : false}`" />
183        <Entry name="I/O 7" value="CY_SMARTIO_LUTTR_IO7" visible="`${hasAnyIo$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO7)) : false}`" />
184        <Entry name="None" value="CY_SMARTIO_LUTTR_INVALID" visible="true" />
185      </ParamChoice>
186
187      <ParamChoice id="lut$idxTr2" name="Input TR2" group="LUT$idx" default="CY_SMARTIO_LUTTR_INVALID" visible="`${(debug eq true)}`" editable="true" desc="LUT$idx input trigger 2 selection" >
188        <Entry name="LUT0" value="CY_SMARTIO_LUTTR_LUT0_OUT" visible="true" />
189        <Entry name="LUT1" value="CY_SMARTIO_LUTTR_LUT1_OUT" visible="true" />
190        <Entry name="LUT2" value="CY_SMARTIO_LUTTR_LUT2_OUT" visible="true" />
191        <Entry name="LUT3" value="CY_SMARTIO_LUTTR_LUT3_OUT" visible="true" />
192        <Entry name="LUT4" value="CY_SMARTIO_LUTTR_LUT4_OUT" visible="true" />
193        <Entry name="LUT5" value="CY_SMARTIO_LUTTR_LUT5_OUT" visible="true" />
194        <Entry name="LUT6" value="CY_SMARTIO_LUTTR_LUT6_OUT" visible="true" />
195        <Entry name="LUT7" value="CY_SMARTIO_LUTTR_LUT7_OUT" visible="true" />
196        <Entry name="Chip 0" value="CY_SMARTIO_LUTTR_CHIP0" visible="`${hasAnyChip$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP0)) : false}`" />
197        <Entry name="Chip 1" value="CY_SMARTIO_LUTTR_CHIP1" visible="`${hasAnyChip$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP1)) : false}`" />
198        <Entry name="Chip 2" value="CY_SMARTIO_LUTTR_CHIP2" visible="`${hasAnyChip$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP2)) : false}`" />
199        <Entry name="Chip 3" value="CY_SMARTIO_LUTTR_CHIP3" visible="`${hasAnyChip$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP3)) : false}`" />
200        <Entry name="Chip 4" value="CY_SMARTIO_LUTTR_CHIP4" visible="`${hasAnyChip$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP4)) : false}`" />
201        <Entry name="Chip 5" value="CY_SMARTIO_LUTTR_CHIP5" visible="`${hasAnyChip$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP5)) : false}`" />
202        <Entry name="Chip 6" value="CY_SMARTIO_LUTTR_CHIP6" visible="`${hasAnyChip$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP6)) : false}`" />
203        <Entry name="Chip 7" value="CY_SMARTIO_LUTTR_CHIP7" visible="`${hasAnyChip$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_CHIP7)) : false}`" />
204        <Entry name="I/O 0" value="CY_SMARTIO_LUTTR_IO0" visible="`${hasAnyIo$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO0)) : false}`" />
205        <Entry name="I/O 1" value="CY_SMARTIO_LUTTR_IO1" visible="`${hasAnyIo$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO1)) : false}`" />
206        <Entry name="I/O 2" value="CY_SMARTIO_LUTTR_IO2" visible="`${hasAnyIo$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO2)) : false}`" />
207        <Entry name="I/O 3" value="CY_SMARTIO_LUTTR_IO3" visible="`${hasAnyIo$idx ? (($idx lt 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO3)) : false}`" />
208        <Entry name="I/O 4" value="CY_SMARTIO_LUTTR_IO4" visible="`${hasAnyIo$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO4)) : false}`" />
209        <Entry name="I/O 5" value="CY_SMARTIO_LUTTR_IO5" visible="`${hasAnyIo$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO5)) : false}`" />
210        <Entry name="I/O 6" value="CY_SMARTIO_LUTTR_IO6" visible="`${hasAnyIo$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO6)) : false}`" />
211        <Entry name="I/O 7" value="CY_SMARTIO_LUTTR_IO7" visible="`${hasAnyIo$idx ? (($idx ge 4) &amp;&amp; (clkSrc ne CY_SMARTIO_CLK_IO7)) : false}`" />
212        <Entry name="None" value="CY_SMARTIO_LUTTR_INVALID" visible="true" />
213      </ParamChoice>
214
215    </Repeat>
216
217    <!--DU -->
218    <ParamChoice id="duOpcode" name="Op-code" group="DU" default="CY_SMARTIO_DUOPC_INCR" visible="`${(debug eq true)}`" editable="true" desc="DU opcode" >
219      <Entry name="Increment" value="CY_SMARTIO_DUOPC_INCR" visible="true" />
220      <Entry name="Decrement" value="CY_SMARTIO_DUOPC_DECR" visible="true" />
221      <Entry name="Increment and wrap" value="CY_SMARTIO_DUOPC_INCR_WRAP" visible="true" />
222      <Entry name="Decrement and wrap" value="CY_SMARTIO_DUOPC_DECR_WRAP" visible="true" />
223      <Entry name="Increment/Decrement" value="CY_SMARTIO_DUOPC_INCR_DECR" visible="true" />
224      <Entry name="Increment/Decrement and wrap" value="CY_SMARTIO_DUOPC_INCR_DECR_WRAP" visible="true" />
225      <Entry name="Rotate Right" value="CY_SMARTIO_DUOPC_ROR" visible="true" />
226      <Entry name="Shift Right" value="CY_SMARTIO_DUOPC_SHR" visible="true" />
227      <Entry name="AND, OR" value="CY_SMARTIO_DUOPC_AND_OR" visible="true" />
228      <Entry name="Shift right and Majority 3" value="CY_SMARTIO_DUOPC_SHR_MAJ3" visible="true" />
229      <Entry name="Shift right and Compare" value="CY_SMARTIO_DUOPC_SHR_EQL" visible="true" />
230    </ParamChoice>
231
232    <ParamChoice id="duSize" name="Size" group="DU" default="CY_SMARTIO_DUSIZE_8" visible="`${(debug eq true)}`" editable="true" desc="DU operand size/width" >
233      <Entry name="1-bit size/width operand" value="CY_SMARTIO_DUSIZE_1" visible="true" />
234      <Entry name="2-bits size/width operand" value="CY_SMARTIO_DUSIZE_2" visible="true" />
235      <Entry name="3-bits size/width operand" value="CY_SMARTIO_DUSIZE_3" visible="true" />
236      <Entry name="4-bits size/width operand" value="CY_SMARTIO_DUSIZE_4" visible="true" />
237      <Entry name="5-bits size/width operand" value="CY_SMARTIO_DUSIZE_5" visible="true" />
238      <Entry name="6-bits size/width operand" value="CY_SMARTIO_DUSIZE_6" visible="true" />
239      <Entry name="7-bits size/width operand" value="CY_SMARTIO_DUSIZE_7" visible="true" />
240      <Entry name="8-bits size/width operand" value="CY_SMARTIO_DUSIZE_8" visible="true" />
241    </ParamChoice>
242
243    <ParamChoice id="duTr0" name="Input TR0" group="DU" default="CY_SMARTIO_DUTR_ZERO" visible="`${(debug eq true)}`" editable="true" desc="DU input trigger 0 selection" >
244      <Entry name="Constant 0" value="CY_SMARTIO_DUTR_ZERO" visible="true" />
245      <Entry name="Constant 1" value="CY_SMARTIO_DUTR_ONE" visible="true" />
246      <Entry name="DU" value="CY_SMARTIO_DUTR_DU_OUT" visible="true" />
247      <Entry name="LUT0" value="CY_SMARTIO_DUTR_LUT0_OUT" visible="true" />
248      <Entry name="LUT1" value="CY_SMARTIO_DUTR_LUT1_OUT" visible="true" />
249      <Entry name="LUT2" value="CY_SMARTIO_DUTR_LUT2_OUT" visible="true" />
250      <Entry name="LUT3" value="CY_SMARTIO_DUTR_LUT3_OUT" visible="true" />
251      <Entry name="LUT4" value="CY_SMARTIO_DUTR_LUT4_OUT" visible="true" />
252      <Entry name="LUT5" value="CY_SMARTIO_DUTR_LUT5_OUT" visible="true" />
253      <Entry name="LUT6" value="CY_SMARTIO_DUTR_LUT6_OUT" visible="true" />
254      <Entry name="LUT7" value="CY_SMARTIO_DUTR_LUT7_OUT" visible="true" />
255    </ParamChoice>
256
257    <ParamChoice id="duTr1" name="Input TR1" group="DU" default="CY_SMARTIO_DUTR_ZERO" visible="`${(debug eq true)}`" editable="true" desc="DU input trigger 1 selection" >
258      <Entry name="Constant 0" value="CY_SMARTIO_DUTR_ZERO" visible="true" />
259      <Entry name="Constant 1" value="CY_SMARTIO_DUTR_ONE" visible="true" />
260      <Entry name="DU" value="CY_SMARTIO_DUTR_DU_OUT" visible="true" />
261      <Entry name="LUT0" value="CY_SMARTIO_DUTR_LUT0_OUT" visible="true" />
262      <Entry name="LUT1" value="CY_SMARTIO_DUTR_LUT1_OUT" visible="true" />
263      <Entry name="LUT2" value="CY_SMARTIO_DUTR_LUT2_OUT" visible="true" />
264      <Entry name="LUT3" value="CY_SMARTIO_DUTR_LUT3_OUT" visible="true" />
265      <Entry name="LUT4" value="CY_SMARTIO_DUTR_LUT4_OUT" visible="true" />
266      <Entry name="LUT5" value="CY_SMARTIO_DUTR_LUT5_OUT" visible="true" />
267      <Entry name="LUT6" value="CY_SMARTIO_DUTR_LUT6_OUT" visible="true" />
268      <Entry name="LUT7" value="CY_SMARTIO_DUTR_LUT7_OUT" visible="true" />
269    </ParamChoice>
270
271    <ParamChoice id="duTr2" name="Input TR2" group="DU" default="CY_SMARTIO_DUTR_ZERO" visible="`${(debug eq true)}`" editable="true" desc="DU input trigger 2 selection" >
272      <Entry name="Constant 0" value="CY_SMARTIO_DUTR_ZERO" visible="true" />
273      <Entry name="Constant 1" value="CY_SMARTIO_DUTR_ONE" visible="true" />
274      <Entry name="DU" value="CY_SMARTIO_DUTR_DU_OUT" visible="true" />
275      <Entry name="LUT0" value="CY_SMARTIO_DUTR_LUT0_OUT" visible="true" />
276      <Entry name="LUT1" value="CY_SMARTIO_DUTR_LUT1_OUT" visible="true" />
277      <Entry name="LUT2" value="CY_SMARTIO_DUTR_LUT2_OUT" visible="true" />
278      <Entry name="LUT3" value="CY_SMARTIO_DUTR_LUT3_OUT" visible="true" />
279      <Entry name="LUT4" value="CY_SMARTIO_DUTR_LUT4_OUT" visible="true" />
280      <Entry name="LUT5" value="CY_SMARTIO_DUTR_LUT5_OUT" visible="true" />
281      <Entry name="LUT6" value="CY_SMARTIO_DUTR_LUT6_OUT" visible="true" />
282      <Entry name="LUT7" value="CY_SMARTIO_DUTR_LUT7_OUT" visible="true" />
283    </ParamChoice>
284
285     <ParamChoice id="duData0" name="Input DATA0" group="DU" default="CY_SMARTIO_DUDATA_ZERO" visible="`${(debug eq true)}`" editable="true" desc="DU input DATA0 selection" >
286      <Entry name="Constant 0" value="CY_SMARTIO_DUDATA_ZERO" visible="true" />
287      <Entry name="Chip signal [7:0]" value="CY_SMARTIO_DUDATA_CHIP" visible="true" />
288      <Entry name="I/O signal [7:0]" value="CY_SMARTIO_DUDATA_IO" visible="true" />
289      <Entry name="DATA Register" value="CY_SMARTIO_DUDATA_DATAREG" visible="true" />
290    </ParamChoice>
291
292    <ParamChoice id="duData1" name="Input DATA1" group="DU" default="CY_SMARTIO_DUDATA_ZERO" visible="`${(debug eq true)}`" editable="true" desc="DU input DATA1 selection" >
293      <Entry name="Constant 0" value="CY_SMARTIO_DUDATA_ZERO" visible="true" />
294      <Entry name="Chip signal [7:0]" value="CY_SMARTIO_DUDATA_CHIP" visible="true" />
295      <Entry name="I/O signal [7:0]" value="CY_SMARTIO_DUDATA_IO" visible="true" />
296      <Entry name="DATA Register" value="CY_SMARTIO_DUDATA_DATAREG" visible="true" />
297    </ParamChoice>
298
299    <ParamRange id="duDataReg" name="DATA Register" group="DU" default="0" min="0" max="`${pow(2, 8)-1}`" resolution="1" visible="`${(debug eq true)}`" editable="true" desc="DU DATA 8-bit Register value" />
300
301    <!--Config-->
302    <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)." />
303
304    <!-- Port instance number -->
305    <ParamString id="InstNumber" name="InstNumber" group="Internal" default="`${getInstNumber(&quot;port&quot;)}`" visible="false" editable="false" desc="Port Instance name number." />
306
307    <!-- Peripheral clock divider connection -->
308    <ParamString id="pclk" name="PCLK" group="Internal" default="`${getBlockFromSignal(&quot;clock[0]&quot;)}`" visible="false" editable="false" desc="Connected peripheral clock divider (PCLK)." />
309    <ParamBool id="pclkOk" name="PCLK Valid" group="Internal" default="`${hasConnection(&quot;clock&quot;, 0) &amp;&amp; isBlockUsed(pclk)}`" visible="false" editable="false" desc="Checks whether there is a PCLK connected and enabled." />
310    <ParamString id="ipblockName" name="IP Block Name" group="Internal" default="`${getIpBlockName()}`" visible="false" editable="false" desc="Gets the name of the IP Block." />
311    <ParamBool id="mxs40iossIpblock" name="IP Block Name Check" group="Internal" default="`${(ipblockName eq &quot;mxs40ioss&quot;)}`" visible="false" editable="false" desc="Checks if mxs40ioss is the IP Block." />
312    <ParamString id="version" name="version number" group="Internal" default="`${getVersion()}`" visible="false" editable="false" desc="" />
313    <ParamString id="pclkDst1" name="PCLK Destination 1" group="Internal" default="PCLK_SMARTIO`${getInstNumber(&quot;port&quot;)}`_CLOCK" visible="false" editable="false" desc="Clock connection macro for CAT1A and CAT1C devices" />
314    <ParamString id="pclkDst2" name="PCLK Destination 2" group="Internal" default="PCLK_IOSS_CLOCK_SMARTIO_PCLK_POS_EN`${getInstNumber(&quot;port&quot;)}`" visible="false" editable="false" desc="Clock connection macro for CAT1B and CAT1D devices" />
315    <ParamString id="pclkDst" name="PCLK Destination" group="Internal" default="`${(mxs40iossIpblock ? pclkDst1 : pclkDst2)}`" visible="false" editable="false" desc="Generates PCLK connection define." />
316    <ParamString id="Ioss" name="Ioss" group="Internal" default="`${getInstNumber(&quot;ioss&quot;)}`" visible="false" editable="false" desc="Ioss instance name number." />
317
318  </Parameters>
319
320  <DRCs>
321    <!--ioMode DRCs-->
322    <DRC type="ERROR" text="The complementary chip terminal [$idx] is set to &quot;Bypass&quot; mode. Either set the I/O terminal [$idx] to &quot;Bypass&quot; mode or update the chip terminal [$idx] mode." condition="`${(chipMode$idx eq CY_SMARTIO_BYPASS) &amp;&amp; (ioMode$idx ne CY_SMARTIO_BYPASS)}`" repeatCount="8" />
323    <!--chipMode DRCs-->
324    <DRC type="ERROR" text="The complementary I/O terminal [$idx] is set to &quot;Bypass&quot; mode. Either set the chip terminal [$idx] to &quot;Bypass&quot; mode or update the I/O terminal [$idx] mode." condition="`${(chipMode$idx ne CY_SMARTIO_BYPASS) &amp;&amp; (ioMode$idx eq CY_SMARTIO_BYPASS)}`" repeatCount="8" />
325    <!--LUT chip terminal clock DRCs-->
326    <DRC type="ERROR" text="Chip terminal [$idx] cannot simultaneously be used as an input to a LUT$idx input trigger and be used as the Smart I/O block clock source." condition="`${((lut$idxTr0 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut$idxTr1 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut$idxTr2 eq CY_SMARTIO_LUTTR_CHIP$idx)) &amp;&amp; (clkSrc eq CY_SMARTIO_CLK_CHIP$idx)}`" repeatCount="8" />
327    <!--LUT I/O terminal clock DRCs-->
328    <DRC type="ERROR" text="I/O terminal [$idx] cannot simultaneously be used as an input to a LUT$idx input trigger and be used as the Smart I/O block clock source." condition="`${((lut$idxTr0 eq CY_SMARTIO_LUTTR_IO$idx) || (lut$idxTr1 eq CY_SMARTIO_LUTTR_IO$idx) || (lut$idxTr2 eq CY_SMARTIO_LUTTR_IO$idx)) &amp;&amp; (clkSrc eq CY_SMARTIO_CLK_IO$idx)}`" repeatCount="8" />
329
330    <!--LUT TR DRCs-->
331    <DRC type="ERROR" text="Invalid LUT connection. All three input trigger terminals of LUT [$idx] must have signal sources."
332    condition="`${((lut$idxTr0 ne CY_SMARTIO_LUTTR_INVALID) &amp;&amp; (lut$idxTr1 ne CY_SMARTIO_LUTTR_INVALID) &amp;&amp; (lut$idxTr2 eq CY_SMARTIO_LUTTR_INVALID))
333    || ((lut$idxTr0 ne CY_SMARTIO_LUTTR_INVALID) &amp;&amp; (lut$idxTr1 eq CY_SMARTIO_LUTTR_INVALID) &amp;&amp; (lut$idxTr2 ne CY_SMARTIO_LUTTR_INVALID))
334    || ((lut$idxTr0 ne CY_SMARTIO_LUTTR_INVALID) &amp;&amp; (lut$idxTr1 eq CY_SMARTIO_LUTTR_INVALID) &amp;&amp; (lut$idxTr2 eq CY_SMARTIO_LUTTR_INVALID))
335    || ((lut$idxTr0 eq CY_SMARTIO_LUTTR_INVALID) &amp;&amp; (lut$idxTr1 ne CY_SMARTIO_LUTTR_INVALID) &amp;&amp; (lut$idxTr2 ne CY_SMARTIO_LUTTR_INVALID))
336    || ((lut$idxTr0 eq CY_SMARTIO_LUTTR_INVALID) &amp;&amp; (lut$idxTr1 ne CY_SMARTIO_LUTTR_INVALID) &amp;&amp; (lut$idxTr2 eq CY_SMARTIO_LUTTR_INVALID))
337    || ((lut$idxTr0 eq CY_SMARTIO_LUTTR_INVALID) &amp;&amp; (lut$idxTr1 eq CY_SMARTIO_LUTTR_INVALID) &amp;&amp; (lut$idxTr2 ne CY_SMARTIO_LUTTR_INVALID))}`"
338    repeatCount="8" />
339
340    <!--LUT-DU TR0 DRCs-->
341    <DRC type="ERROR" text="Invalid LUT connection. LUT [$idx] TR0 is sourced from DU but the Data Unit is not enabled to drive it."
342    condition="`${(lut$idxTr0 eq CY_SMARTIO_LUTTR_DU_OUT) &amp;&amp; (duEn eq false)}`" repeatCount="8" />
343
344    <!--DU-LUT TR0 DRCs-->
345    <DRC type="ERROR" text="Invalid DU connection. DU TR0 is sourced from LUT [$idx] but the LUT is not enabled to drive it."
346    condition="`${(duTr0 eq CY_SMARTIO_DUTR_LUT$idx_OUT) &amp;&amp; (lutEn$idx eq false)}`" repeatCount="8" />
347
348    <!--DU-LUT TR1 DRCs-->
349    <DRC type="ERROR" text="Invalid DU connection. DU TR1 is sourced from LUT [$idx] but the LUT is not enabled to drive it."
350    condition="`${(duTr1 eq CY_SMARTIO_DUTR_LUT$idx_OUT) &amp;&amp; (lutEn$idx eq false)}`" repeatCount="8" />
351
352    <!--DU-LUT TR2 DRCs-->
353    <DRC type="ERROR" text="Invalid DU connection. DU TR2 is sourced from LUT [$idx] but the LUT is not enabled to drive it."
354    condition="`${(duTr2 eq CY_SMARTIO_DUTR_LUT$idx_OUT) &amp;&amp; (lutEn$idx eq false)}`" repeatCount="8" />
355
356    <!--I/O input terminal DRCs-->
357    <DRC type="WARNING" text="I/O [$idx] terminal is configured to be an input but it is not used in this design."
358    condition="`${((ioMode$idx eq CY_SMARTIO_SYNC_INPUT) || (ioMode$idx eq CY_SMARTIO_ASYNC_INPUT)) &amp;&amp;
359    (((lut0Tr0 eq CY_SMARTIO_LUTTR_IO$idx) || (lut0Tr1 eq CY_SMARTIO_LUTTR_IO$idx) || (lut0Tr2 eq CY_SMARTIO_LUTTR_IO$idx) ||
360     (lut1Tr0 eq CY_SMARTIO_LUTTR_IO$idx) || (lut1Tr1 eq CY_SMARTIO_LUTTR_IO$idx) || (lut1Tr2 eq CY_SMARTIO_LUTTR_IO$idx) ||
361     (lut2Tr0 eq CY_SMARTIO_LUTTR_IO$idx) || (lut2Tr1 eq CY_SMARTIO_LUTTR_IO$idx) || (lut2Tr2 eq CY_SMARTIO_LUTTR_IO$idx) ||
362     (lut3Tr0 eq CY_SMARTIO_LUTTR_IO$idx) || (lut3Tr1 eq CY_SMARTIO_LUTTR_IO$idx) || (lut3Tr2 eq CY_SMARTIO_LUTTR_IO$idx) ||
363     (lut4Tr0 eq CY_SMARTIO_LUTTR_IO$idx) || (lut4Tr1 eq CY_SMARTIO_LUTTR_IO$idx) || (lut4Tr2 eq CY_SMARTIO_LUTTR_IO$idx) ||
364     (lut5Tr0 eq CY_SMARTIO_LUTTR_IO$idx) || (lut5Tr1 eq CY_SMARTIO_LUTTR_IO$idx) || (lut5Tr2 eq CY_SMARTIO_LUTTR_IO$idx) ||
365     (lut6Tr0 eq CY_SMARTIO_LUTTR_IO$idx) || (lut6Tr1 eq CY_SMARTIO_LUTTR_IO$idx) || (lut6Tr2 eq CY_SMARTIO_LUTTR_IO$idx) ||
366     (lut7Tr0 eq CY_SMARTIO_LUTTR_IO$idx) || (lut7Tr1 eq CY_SMARTIO_LUTTR_IO$idx) || (lut7Tr2 eq CY_SMARTIO_LUTTR_IO$idx)) eq false)}`"
367    repeatCount="8" />
368
369    <!--I/O output terminal DRCs-->
370    <DRC type="WARNING" text="I/O [$idx] terminal is configured to be an output but LUT [$idx] is not enabled to drive it."
371    condition="`${(ioMode$idx eq CY_SMARTIO_OUTPUT) &amp;&amp; (lutEn$idx eq false)}`" repeatCount="8" />
372
373    <!--Chip input terminal DRCs-->
374    <DRC type="WARNING" text="Chip [$idx] terminal is configured to be an input but it is not used in this design."
375    condition="`${((chipMode$idx eq CY_SMARTIO_SYNC_INPUT) || (chipMode$idx eq CY_SMARTIO_ASYNC_INPUT)) &amp;&amp;
376    (((lut0Tr0 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut0Tr1 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut0Tr2 eq CY_SMARTIO_LUTTR_CHIP$idx) ||
377     (lut1Tr0 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut1Tr1 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut1Tr2 eq CY_SMARTIO_LUTTR_CHIP$idx) ||
378     (lut2Tr0 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut2Tr1 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut2Tr2 eq CY_SMARTIO_LUTTR_CHIP$idx) ||
379     (lut3Tr0 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut3Tr1 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut3Tr2 eq CY_SMARTIO_LUTTR_CHIP$idx) ||
380     (lut4Tr0 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut4Tr1 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut4Tr2 eq CY_SMARTIO_LUTTR_CHIP$idx) ||
381     (lut5Tr0 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut5Tr1 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut5Tr2 eq CY_SMARTIO_LUTTR_CHIP$idx) ||
382     (lut6Tr0 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut6Tr1 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut6Tr2 eq CY_SMARTIO_LUTTR_CHIP$idx) ||
383     (lut7Tr0 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut7Tr1 eq CY_SMARTIO_LUTTR_CHIP$idx) || (lut7Tr2 eq CY_SMARTIO_LUTTR_CHIP$idx)) eq false)}`"
384    repeatCount="8" />
385
386    <!--Chip output terminal DRCs-->
387    <DRC type="WARNING" text="Chip [$idx] terminal is configured to be an output but LUT [$idx] is not enabled to drive it."
388    condition="`${(chipMode$idx eq CY_SMARTIO_OUTPUT) &amp;&amp; (lutEn$idx eq false)}`" repeatCount="8" />
389
390    <!-- in/out is deliberately flipped between the condition and the DRC. In/out are with respect to the chip, so we reverse them for text we show to the user -->
391    <DRC type="ERROR" text="The chip output terminal $idx cannot be connected when the chip inout terminal $idx is connected." condition="`${hasConnection(&quot;chip_in&quot;, $idx) &amp;&amp; chipInoutConnected$idx}`" paramId="chip_inout[$idx]" repeatCount="8" />
392    <DRC type="ERROR" text="The chip input terminal $idx cannot be connected when the chip inout terminal $idx is connected." condition="`${hasConnection(&quot;chip_out&quot;, $idx) &amp;&amp; chipInoutConnected$idx}`" paramId="chip_inout[$idx]" repeatCount="8" />
393
394    <!-- Enable used pins DRC -->
395    <DRC type="ERROR"
396         text="`${&quot;Smart I/O &quot; . InstNumber . &quot; requires &quot; . getBlockDisplayName(&quot;ioss[&quot; . Ioss . &quot;].port[&quot; . InstNumber . &quot;].pin[$idx]&quot;,false) . &quot; to be enabled.&quot;}`"
397         condition="`${hasBlock(&quot;ioss[&quot; . Ioss . &quot;].port[&quot; . InstNumber . &quot;].pin[$idx]&quot;) ? (((chipMode$idx ne CY_SMARTIO_BYPASS) || (ioMode$idx ne CY_SMARTIO_BYPASS)) &amp;&amp; isBlockUsed(&quot;ioss[&quot; . Ioss . &quot;].port[&quot; . InstNumber . &quot;].pin[$idx]&quot;) == false) : false}`"
398         repeatCount="8" >
399      <FixIt action="ENABLE_BLOCK" target="`${&quot;ioss[&quot; . Ioss . &quot;].port[&quot; . InstNumber . &quot;].pin[$idx]&quot;}`" value="" valid="true" />
400    </DRC>
401
402  </DRCs>
403
404  <!--Config Structs-->
405  <ConfigFirmware>
406    <ConfigInclude value="cy_smartio.h" include="true" />
407    <ConfigInclude value="cy_sysclk.h" include="`${pclkOk}`" />
408    <ConfigDefine name="`${INST_NAME}`_HW" value="SMARTIO_PRT`${InstNumber}`" public="true" include="true" />
409    <ConfigStruct name="`${INST_NAME . &quot;_lutCfg$idx&quot;}`" type="cy_stc_smartio_lutcfg_t" const="`${inFlash}`" public="true" include="`${lutEn$idx}`" repeatCount="8" >
410      <Member name="tr0" value="`${lut$idxTr0}`" />
411      <Member name="tr1" value="`${lut$idxTr1}`" />
412      <Member name="tr2" value="`${lut$idxTr2}`" />
413      <Member name="opcode" value="`${lut$idxOpcode}`" />
414      <Member name="lutMap" value="`${lut$idxMap}`" />
415    </ConfigStruct>
416
417    <ConfigStruct name="`${INST_NAME . &quot;_duCfg&quot;}`" type="cy_stc_smartio_ducfg_t" const="`${inFlash}`" public="true" include="`${duEn}`" >
418      <Member name="tr0" value="`${duTr0}`" />
419      <Member name="tr1" value="`${duTr1}`" />
420      <Member name="tr2" value="`${duTr2}`" />
421      <Member name="data0" value="`${duData0}`" />
422      <Member name="data1" value="`${duData1}`" />
423      <Member name="opcode" value="`${duOpcode}`" />
424      <Member name="size" value="`${duSize}`" />
425      <Member name="dataReg" value="`${duDataReg}`" />
426    </ConfigStruct>
427    <ConfigStruct name="`${INST_NAME . &quot;_config&quot;}`" type="cy_stc_smartio_config_t" const="`${inFlash}`" public="true" include="true" >
428      <Member name="clkSrc" value="`${clkSrc}`" />
429      <Member name="bypassMask" value="`${
430      ((ioMode0 eq CY_SMARTIO_BYPASS) ? &quot;CY_SMARTIO_CHANNEL0&quot; : &quot;0u&quot;) . &quot;|&quot; .
431      ((ioMode1 eq CY_SMARTIO_BYPASS) ? &quot;CY_SMARTIO_CHANNEL1&quot; : &quot;0u&quot;) . &quot;|&quot; .
432      ((ioMode2 eq CY_SMARTIO_BYPASS) ? &quot;CY_SMARTIO_CHANNEL2&quot; : &quot;0u&quot;) . &quot;|&quot; .
433      ((ioMode3 eq CY_SMARTIO_BYPASS) ? &quot;CY_SMARTIO_CHANNEL3&quot; : &quot;0u&quot;) . &quot;|&quot; .
434      ((ioMode4 eq CY_SMARTIO_BYPASS) ? &quot;CY_SMARTIO_CHANNEL4&quot; : &quot;0u&quot;) . &quot;|&quot; .
435      ((ioMode5 eq CY_SMARTIO_BYPASS) ? &quot;CY_SMARTIO_CHANNEL5&quot; : &quot;0u&quot;) . &quot;|&quot; .
436      ((ioMode6 eq CY_SMARTIO_BYPASS) ? &quot;CY_SMARTIO_CHANNEL6&quot; : &quot;0u&quot;) . &quot;|&quot; .
437      ((ioMode7 eq CY_SMARTIO_BYPASS) ? &quot;CY_SMARTIO_CHANNEL7&quot; : &quot;0u&quot;)}`" />
438      <Member name="ioSyncEn" value="`${
439      ((ioMode0 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL0&quot; : &quot;0u&quot;) . &quot;|&quot; .
440      ((ioMode1 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL1&quot; : &quot;0u&quot;) . &quot;|&quot; .
441      ((ioMode2 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL2&quot; : &quot;0u&quot;) . &quot;|&quot; .
442      ((ioMode3 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL3&quot; : &quot;0u&quot;) . &quot;|&quot; .
443      ((ioMode4 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL4&quot; : &quot;0u&quot;) . &quot;|&quot; .
444      ((ioMode5 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL5&quot; : &quot;0u&quot;) . &quot;|&quot; .
445      ((ioMode6 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL6&quot; : &quot;0u&quot;) . &quot;|&quot; .
446      ((ioMode7 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL7&quot; : &quot;0u&quot;)}`" />
447      <Member name="chipSyncEn" value="`${
448      ((chipMode0 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL0&quot; : &quot;0u&quot;) . &quot;|&quot; .
449      ((chipMode1 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL1&quot; : &quot;0u&quot;) . &quot;|&quot; .
450      ((chipMode2 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL2&quot; : &quot;0u&quot;) . &quot;|&quot; .
451      ((chipMode3 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL3&quot; : &quot;0u&quot;) . &quot;|&quot; .
452      ((chipMode4 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL4&quot; : &quot;0u&quot;) . &quot;|&quot; .
453      ((chipMode5 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL5&quot; : &quot;0u&quot;) . &quot;|&quot; .
454      ((chipMode6 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL6&quot; : &quot;0u&quot;) . &quot;|&quot; .
455      ((chipMode7 eq CY_SMARTIO_SYNC_INPUT) ? &quot;CY_SMARTIO_CHANNEL7&quot; : &quot;0u&quot;)}`" />
456      <Member name="lutCfg0" value="`${lutEn0 eq true ? (&quot;&amp;&quot; . INST_NAME . &quot;_lutCfg0&quot;) : &quot;NULL&quot;}`" />
457      <Member name="lutCfg1" value="`${lutEn1 eq true ? (&quot;&amp;&quot; . INST_NAME . &quot;_lutCfg1&quot;) : &quot;NULL&quot;}`" />
458      <Member name="lutCfg2" value="`${lutEn2 eq true ? (&quot;&amp;&quot; . INST_NAME . &quot;_lutCfg2&quot;) : &quot;NULL&quot;}`" />
459      <Member name="lutCfg3" value="`${lutEn3 eq true ? (&quot;&amp;&quot; . INST_NAME . &quot;_lutCfg3&quot;) : &quot;NULL&quot;}`" />
460      <Member name="lutCfg4" value="`${lutEn4 eq true ? (&quot;&amp;&quot; . INST_NAME . &quot;_lutCfg4&quot;) : &quot;NULL&quot;}`" />
461      <Member name="lutCfg5" value="`${lutEn5 eq true ? (&quot;&amp;&quot; . INST_NAME . &quot;_lutCfg5&quot;) : &quot;NULL&quot;}`" />
462      <Member name="lutCfg6" value="`${lutEn6 eq true ? (&quot;&amp;&quot; . INST_NAME . &quot;_lutCfg6&quot;) : &quot;NULL&quot;}`" />
463      <Member name="lutCfg7" value="`${lutEn7 eq true ? (&quot;&amp;&quot; . INST_NAME . &quot;_lutCfg7&quot;) : &quot;NULL&quot;}`" />
464      <Member name="duCfg" value="`${duEn eq true ? (&quot;&amp;&quot; . INST_NAME . &quot;_duCfg&quot;) : &quot;NULL&quot;}`" />
465      <Member name="hldOvr" value="`${hldOvr}`" />
466    </ConfigStruct>
467    <ConfigInstruction value="Cy_SysClk_PeriphAssignDivider(`${pclkDst1}`, `${getExposedMember(pclk, &quot;clockSel&quot;)}`);" include="`${((mxs40iossIpblock) &amp;&amp; (version &lt; 3) &amp;&amp; pclkOk)}`"  />
468    <ConfigInstruction value="Cy_SysClk_PeriPclkAssignDivider(`${pclkDst}`, `${getExposedMember(pclk, &quot;clockSel&quot;)}`);" include="`${((((mxs40iossIpblock) &amp;&amp; (version &gt; 2)) || (!mxs40iossIpblock)) &amp;&amp; pclkOk)}`"  />
469  </ConfigFirmware>
470</Personality>
471