1<?xml version="1.0" encoding="utf-8"?>
2
3
4<!--****************************************************************************
5* \file smif_v2.cypersonality
6* \version 1.0
7*
8* \brief
9* Quad Serial Peripheral Interface (QSPI) personality description file.
10*
11********************************************************************************
12* \copyright
13* Copyright 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="mxs40smif_ver2" name="Quad Serial Peripheral Interface (QSPI)" version="1.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7">
30  <Dependencies>
31    <IpBlock name="mxsmif,mxsmif_ver2_s40e">
32        <Version major="3" />
33        <Version major="2" />
34    </IpBlock>
35    <Resource name="smif" />
36  </Dependencies>
37  <ExposedMembers>
38    <ExposedMember key="inFlash" paramId="inFlash" />
39  </ExposedMembers>
40  <Parameters>
41    <!-- PDL documentation -->
42    <ParamDoc id="pdlDoc" name="Configuration Help" group="Overview" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__smif.html" linkText="Open SMIF Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" />
43
44    <!-- General -->
45
46    <ParamChoice id="rx_clock_select" name="Receiver Clock Source" group="General" default="CY_SMIF_SEL_INVERTED_FEEDBACK_CLK" visible="`${getVersion() eq 2}`" editable="`${getVersion() eq 2}`" desc="Specifies the clock source for the receiver clock">
47      <Entry name="Output Clock"                 value="CY_SMIF_SEL_OUTPUT_CLK"             visible="true"/>
48      <Entry name="Inverted Output Clock"        value="CY_SMIF_SEL_INVERTED_OUTPUT_CLK"    visible="true"/>
49      <Entry name="Feedback Clock"               value="CY_SMIF_SEL_FEEDBACK_CLK"           visible="true"/>
50      <Entry name="Inverted Feedback Clock"      value="CY_SMIF_SEL_INVERTED_FEEDBACK_CLK"  visible="true"/>
51      <Entry name="Internal CLock"               value="CY_SMIF_SEL_INTERNAL_CLK"           visible="true"/>
52      <Entry name="Inverted Internal Clock"      value="CY_SMIF_SEL_INVERTED_INTERNAL_CLK"  visible="true"/>
53      <Entry name="Inverted HyperBus RWDS Clock" value="CY_SMIF_SEL_INVERTED_SPHB_RWDS_CLK" visible="true"/>
54      <Entry name="HyperBus RWDS Clock"          value="CY_SMIF_SEL_SPHB_RWDS_CLK"          visible="true"/>
55	</ParamChoice>
56
57    <ParamBool id="delay_tap_enable" name="Delay Tap Enable" group="General" default="false" visible="`${getVersion() eq 2}`" editable="`${getVersion() eq 2}`" desc="If checked Delay tap is enabled. " />
58
59    <ParamChoice id="delay_line_select" name="Delay Line Select" group="General" default="CY_SMIF_NO_DELAY_SEL" visible="`${getVersion() eq 2}`" editable="`${getVersion() eq 2}`" desc="Specifies the delay line used for RX data capturing with">
60      <Entry name="1 New Cell Per Tap" value="CY_SMIF_1_NEW_SEL_PER_TAP" visible="true"/>
61      <Entry name="1 Cell Per Tap" value="CY_SMIF_1_SEL_PER_TAP" visible="true"/>
62      <Entry name="2 Cell Per Tap" value="CY_SMIF_2_SEL_PER_TAP" visible="true"/>
63      <Entry name="4 Cell Per Tap" value="CY_SMIF_4_SEL_PER_TAP" visible="true"/>
64      <Entry name="No delay line" value="CY_SMIF_NO_DELAY_SEL" visible="true"/>
65	</ParamChoice>
66
67    <!-- Clocks -->
68    <ParamSignal port="clk_if[0]" name="Interface Clock" group="Clocks" visible="true" desc="Transmission interface clock. Divides HF clock supplied internally by 2" canBeEmpty="false" />
69    <ParamSignal port="spihb_clk[0]" name="SPI Clock" group="Clocks" visible="true" desc="The Serial Clock (SCLK) to the slave devices" canBeEmpty="false">
70      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
71        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
72          <Fixed value="CY_GPIO_DM_STRONG" />
73        </Parameter>
74      </Constraint>
75      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
76    </ParamSignal>
77    <ParamString id="smifIfSource" name="smifIfSource" group="Internal" default="`${getBlockFromSignal(&quot;clk_if[0]&quot;)}`" visible="false" editable="false" desc="Interface Source Clock Resource" />
78    <ParamRange  id="smifIfClkHz" name="smifIfClkHz" group="Internal" default="`${getExposedMember(smifIfSource, &quot;frequency&quot;)}`" min="1" max="200000000" resolution="1" visible="false" editable="false" desc="SMIF IF clock frequency in Hz." />
79    <ParamString id="sclkPin" name="sclkPin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_clk[0]&quot;)}`" visible="false" editable="false" desc="" />
80
81    <!-- External tools -->
82    <ParamString id="cfgFileName" name="cfgFileName" group="External Tools" default="design.cyqspi" visible="false" editable="false" desc="" />
83    <ParamString id="cfgFilePath" name="cfgFilePath" group="External Tools" default="`${cy_design_path() . &quot;/&quot; . cfgFileName}`" visible="false" editable="false" desc="" />
84
85    <ParamCustom id="configurator" name="QSPI Configurator" group="External Tools" default="0" path="`${cy_tools_path(&quot;qspi-configurator&quot;) . &quot;/qspi-configurator&quot;}`" modal="false" visible="true" editable="true" desc="Launch QSPI Configurator tool">
86      <Arg value="`${&quot;--config=&quot; . cfgFilePath}`" />
87      <Arg value="`${&quot;--output-dir=&quot; . cy_codegen_path()}`" />
88      <Arg value="`${&quot;--library=&quot; . cy_libs_file()}`" />
89    </ParamCustom>
90
91
92    <!-- SPI Data -->
93    <ParamSignal port="spihb_data0[0]" name="SPI Data[0]" group="Data" visible="`${hasVisibleOption(&quot;spihb_data0[0]&quot;)}`" desc="Data line 0 to be used by the QSPI block, must be used in conjunction with Data line 1" canBeEmpty="true">
94      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
95        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
96          <Fixed value="CY_GPIO_DM_STRONG" />
97        </Parameter>
98      </Constraint>
99      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
100    </ParamSignal>
101    <ParamString id="data0Pin" name="data0Pin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_data0[0]&quot;)}`" visible="false" editable="false" desc="" />
102    <ParamSignal port="spihb_data1[0]" name="SPI Data[1]" group="Data" visible="`${hasVisibleOption(&quot;spihb_data1[0]&quot;)}`" desc="Data line 1 to be used by the QSPI block, must be used in conjunction with Data line 0" canBeEmpty="true">
103      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
104        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
105          <Fixed value="CY_GPIO_DM_STRONG" />
106        </Parameter>
107      </Constraint>
108      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
109    </ParamSignal>
110    <ParamString id="data1Pin" name="data1Pin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_data1[0]&quot;)}`" visible="false" editable="false" desc="" />
111    <ParamSignal port="spihb_data2[0]" name="SPI Data[2]" group="Data" visible="`${hasVisibleOption(&quot;spihb_data2[0]&quot;)}`" desc="Data line 2 to be used by the QSPI block, must be used in conjunction with Data line 3" canBeEmpty="true">
112      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
113        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
114          <Fixed value="CY_GPIO_DM_STRONG" />
115        </Parameter>
116      </Constraint>
117      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
118    </ParamSignal>
119    <ParamString id="data2Pin" name="data2Pin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_data2[0]&quot;)}`" visible="false" editable="false" desc="" />
120    <ParamSignal port="spihb_data3[0]" name="SPI Data[3]" group="Data" visible="`${hasVisibleOption(&quot;spihb_data3[0]&quot;)}`" desc="Data line 3 to be used by the QSPI block, must be used in conjunction with Data line 2" canBeEmpty="true">
121      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
122        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
123          <Fixed value="CY_GPIO_DM_STRONG" />
124        </Parameter>
125      </Constraint>
126      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
127    </ParamSignal>
128    <ParamString id="data3Pin" name="data3Pin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_data3[0]&quot;)}`" visible="false" editable="false" desc="" />
129    <ParamSignal port="spihb_data4[0]" name="SPI Data[4]" group="Data" visible="`${(CHIP_TOP.DATA8_PRESENT == 1) &amp;&amp; hasVisibleOption(&quot;spihb_data4[0]&quot;)}`" desc="Data line 4 to be used by the QSPI block, must be used in conjunction with Data line 5" canBeEmpty="true">
130      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
131        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
132          <Fixed value="CY_GPIO_DM_STRONG" />
133        </Parameter>
134      </Constraint>
135      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
136    </ParamSignal>
137    <ParamString id="data4Pin" name="data4Pin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_data4[0]&quot;)}`" visible="false" editable="false" desc="" />
138    <ParamSignal port="spihb_data5[0]" name="SPI Data[5]" group="Data" visible="`${(CHIP_TOP.DATA8_PRESENT == 1) &amp;&amp; hasVisibleOption(&quot;spihb_data5[0]&quot;)}`" desc="Data line 5 to be used by the QSPI block, must be used in conjunction with Data line 4" canBeEmpty="true">
139      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
140        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
141          <Fixed value="CY_GPIO_DM_STRONG" />
142        </Parameter>
143      </Constraint>
144      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
145    </ParamSignal>
146    <ParamString id="data5Pin" name="data5Pin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_data5[0]&quot;)}`" visible="false" editable="false" desc="" />
147    <ParamSignal port="spihb_data6[0]" name="SPI Data[6]" group="Data" visible="`${(CHIP_TOP.DATA8_PRESENT == 1) &amp;&amp; hasVisibleOption(&quot;spihb_data6[0]&quot;)}`" desc="Data line 6 to be used by the QSPI block, must be used in conjunction with Data line 7" canBeEmpty="true">
148      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
149        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
150          <Fixed value="CY_GPIO_DM_STRONG" />
151        </Parameter>
152      </Constraint>
153      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
154    </ParamSignal>
155    <ParamString id="data6Pin" name="data6Pin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_data6[0]&quot;)}`" visible="false" editable="false" desc="" />
156    <ParamSignal port="spihb_data7[0]" name="SPI Data[7]" group="Data" visible="`${(CHIP_TOP.DATA8_PRESENT == 1) &amp;&amp; hasVisibleOption(&quot;spihb_data7[0]&quot;)}`" desc="Data line 7 to be used by the QSPI block, must be used in conjunction with Data line 6" canBeEmpty="true">
157      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
158        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
159          <Fixed value="CY_GPIO_DM_STRONG" />
160        </Parameter>
161      </Constraint>
162      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
163    </ParamSignal>
164    <ParamString id="data7Pin" name="data7Pin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_data7[0]&quot;)}`" visible="false" editable="false" desc="" />
165
166    <!-- SPI Select -->
167    <ParamSignal port="spihb_select0[0]" name="SPI Slave Select 0" group="Slave Select" visible="`${hasVisibleOption(&quot;spihb_select0[0]&quot;)}`" desc="Select signal 0 to specify which memory device to communicate with" canBeEmpty="true">
168      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
169        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer off'.">
170          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
171        </Parameter>
172      </Constraint>
173      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
174    </ParamSignal>
175    <ParamString id="ssel0Pin" name="ssel0Pin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_select0[0]&quot;)}`" visible="false" editable="false" desc="" />
176    <ParamSignal port="spihb_select1[0]" name="SPI Slave Select 1" group="Slave Select" visible="`${hasVisibleOption(&quot;spihb_select1[0]&quot;)}`" desc="Select signal 1 to specify which memory device to communicate with" canBeEmpty="true">
177      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
178        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer off'.">
179          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
180        </Parameter>
181      </Constraint>
182      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
183    </ParamSignal>
184    <ParamString id="ssel1Pin" name="ssel1Pin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_select1[0]&quot;)}`" visible="false" editable="false" desc="" />
185    <ParamSignal port="spihb_select2[0]" name="SPI Slave Select 2" group="Slave Select" visible="`${hasVisibleOption(&quot;spihb_select2[0]&quot;)}`" desc="Select signal 2 to specify which memory device to communicate with" canBeEmpty="true">
186      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
187        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer off'.">
188          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
189        </Parameter>
190      </Constraint>
191      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
192    </ParamSignal>
193    <ParamString id="ssel2Pin" name="ssel2Pin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_select2[0]&quot;)}`" visible="false" editable="false" desc="" />
194    <ParamSignal port="spihb_select3[0]" name="SPI Slave Select 3" group="Slave Select" visible="`${hasVisibleOption(&quot;spihb_select3[0]&quot;)}`" desc="Select signal 3 to specify which memory device to communicate with" canBeEmpty="true">
195      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
196        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer off'.">
197          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
198        </Parameter>
199      </Constraint>
200      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
201    </ParamSignal>
202    <ParamString id="ssel3Pin" name="ssel3Pin" group="Internal" default="`${getBlockFromSignal(&quot;spihb_select3[0]&quot;)}`" visible="false" editable="false" desc="" />
203
204    <!-- Interrupt -->
205    <ParamBool id="isrAlignment" name="Memory Mode Alignment Error" group="Interrupt" default="false" visible="true" editable="true" desc="An alignment error in the memory mode (XIP mode) is set as an interrupt cause" />
206    <ParamBool id="isrUnderflow" name="RX Data FIFO Underflow" group="Interrupt" default="false" visible="true" editable="true" desc="The Rx Data FIFO underflow condition is set as an interrupt cause" />
207    <ParamBool id="isrCmdOverflow" name="TX Command FIFO Overflow" group="Interrupt" default="false" visible="true" editable="true" desc="The TX command FIFO overflow condition is set as an interrupt cause" />
208    <ParamBool id="isrDataOverflow" name="TX Data FIFO Overflow" group="Interrupt" default="false" visible="true" editable="true" desc="The TX data FIFO overflow condition is set as an interrupt cause" />
209
210    <!-- DMA -->
211    <ParamSignal port="tr_rx_req[0]" name="RX Trigger Output" group="DMA Triggers" visible="true" desc="Enables the RX trigger output terminal (tr_rx_req)" canBeEmpty="true" />
212    <ParamRange id="rxTriggerLevel" name="RX FIFO Trigger Level" group="DMA Triggers" default="0" min="0" max="7" resolution="1" visible="true" editable="true" desc="The level that can trigger the RX FIFO to trigger an interrupt or a DMA request" />
213    <ParamSignal port="tr_tx_req[0]" name="TX Trigger Output" group="DMA Triggers" visible="true" desc="enables the TX trigger output terminal (tr_tx_req)" canBeEmpty="true" />
214    <ParamRange id="txTriggerLevel" name="TX FIFO Trigger Level" group="DMA Triggers" default="0" min="0" max="7" resolution="1" visible="true" editable="true" desc="The level that can trigger the TX FIFO to trigger an interrupt or a DMA request" />
215
216    <ParamString id="dmaRxTriggerOut" name="dmaRxTriggerOut" group="Internal" default="`${getBlockFromSignal(&quot;tr_rx_req[0]&quot;)}`" visible="false" editable="false" desc="" />
217    <ParamString id="dmaTxTriggerOut" name="dmaTxTriggerOut" group="Internal" default="`${getBlockFromSignal(&quot;tr_tx_req[0]&quot;)}`" visible="false" editable="false" desc="" />
218
219    <!-- SMIF instance number -->
220    <ParamString id="InstNumber" name="InstNumber" group="Internal" default="`${getInstNumber(&quot;smif&quot;)}`" visible="false" editable="false" desc="SMIF Instance name number." />
221
222    <!-- Other -->
223    <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)." />
224
225    <!-- Helpers -->
226    <Repeat count="8">
227      <ParamBool id="hasConnection$idx" name="" group="Hidden" default="`${hasConnection(&quot;spihb_data$idx&quot;, 0)}`" visible="false" editable="false" desc="" />
228    </Repeat>
229    <Repeat count="4">
230      <ParamBool id="hasSelect$idx" name="" group="Hidden" default="`${hasConnection(&quot;spihb_select$idx&quot;, 0)}`" visible="false" editable="false" desc="" />
231    </Repeat>
232    <ParamBool id="allDataConnected" name="" group="Hidden" default="`${hasConnection0 &amp;&amp; hasConnection2 &amp;&amp; hasConnection4 &amp;&amp; hasConnection6}`" visible="false" editable="false" desc="" />
233    <ParamBool id="requireMultipleSelects" name="" group="Hidden" default="`${!allDataConnected &amp;&amp; ((hasConnection0 &amp;&amp; hasConnection4) || (hasConnection0 &amp;&amp; hasConnection6) || (hasConnection2 &amp;&amp; hasConnection4) || (hasConnection2 &amp;&amp; hasConnection6))}`" visible="false" editable="false" desc="" />
234  </Parameters>
235
236  <DRCs>
237    <DRC type="ERROR" text="SPI Data[0] and SPI Data[1] must be used together" condition="`${hasConnection0 != hasConnection1 &amp;&amp; hasConnection0}`" paramId="spihb_data1[0]" />
238    <DRC type="ERROR" text="SPI Data[0] and SPI Data[1] must be used together" condition="`${hasConnection0 != hasConnection1 &amp;&amp; hasConnection1}`" paramId="spihb_data0[0]" />
239    <DRC type="ERROR" text="SPI Data[2] and SPI Data[3] must be used together" condition="`${hasConnection2 != hasConnection3 &amp;&amp; hasConnection2}`" paramId="spihb_data3[0]" />
240    <DRC type="ERROR" text="SPI Data[2] and SPI Data[3] must be used together" condition="`${hasConnection2 != hasConnection3 &amp;&amp; hasConnection3}`" paramId="spihb_data2[0]" />
241    <DRC type="ERROR" text="SPI Data[4] and SPI Data[5] must be used together" condition="`${hasConnection4 != hasConnection5 &amp;&amp; hasConnection4}`" paramId="spihb_data5[0]" />
242    <DRC type="ERROR" text="SPI Data[4] and SPI Data[5] must be used together" condition="`${hasConnection4 != hasConnection5 &amp;&amp; hasConnection5}`" paramId="spihb_data4[0]" />
243    <DRC type="ERROR" text="SPI Data[6] and SPI Data[7] must be used together" condition="`${hasConnection6 != hasConnection7 &amp;&amp; hasConnection6}`" paramId="spihb_data6[0]" />
244    <DRC type="ERROR" text="SPI Data[6] and SPI Data[7] must be used together" condition="`${hasConnection6 != hasConnection7 &amp;&amp; hasConnection7}`" paramId="spihb_data5[0]" />
245    <DRC type="ERROR" text="At least two SPI Data signal must be connected" condition="`${!(hasConnection0 || hasConnection2 || hasConnection4 || hasConnection6)}`" paramId="spihb_data0[0]" />
246    <DRC type="ERROR" text="At least two SPI Data signal must be connected" condition="`${!(hasConnection1 || hasConnection3 || hasConnection5 || hasConnection7)}`" paramId="spihb_data1[0]" />
247    <DRC type="ERROR" text="At least one SPI Select signal must be connected" condition="`${!(requireMultipleSelects || hasSelect0 || hasSelect1 || hasSelect2 || hasSelect3)}`" paramId="spihb_select0[0]" />
248    <DRC type="ERROR" text="At least two SPI Select signal must be connected" condition="`${requireMultipleSelects &amp;&amp; !((hasSelect0 &amp;&amp; hasSelect1) || (hasSelect0 &amp;&amp; hasSelect2) || (hasSelect0 &amp;&amp; hasSelect3) || (hasSelect1 &amp;&amp; hasSelect2) || (hasSelect1 &amp;&amp; hasSelect3) || (hasSelect2 &amp;&amp; hasSelect3))}`" paramId="spihb_select0[0]"/>
249  </DRCs>
250
251  <ConfigFirmware>
252    <ConfigInclude value="cy_smif.h" include="true" />
253    <ConfigInclude value="cycfg_qspi_memslot.h" include="true" />
254    <ConfigInclude value="cyhal_hwmgr.h" include="true" guard="defined (CY_USING_HAL)" />
255    <ConfigInclude value="cyhal_clock.h" include="true" guard="defined (CY_USING_HAL)" />
256
257    <ConfigDefine name="`${INST_NAME}`_HW" value="SMIF`${InstNumber}`" public="true" include="true" />
258    <ConfigDefine name="`${INST_NAME}`_IRQ" value="smif_interrupt_normal_IRQn" public="true" include="true" />
259    <ConfigDefine name="`${INST_NAME}`_MEMORY_MODE_ALIGMENT_ERROR" value="`${isrAlignment ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
260    <ConfigDefine name="`${INST_NAME}`_RX_DATA_FIFO_UNDERFLOW" value="`${isrUnderflow ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
261    <ConfigDefine name="`${INST_NAME}`_TX_COMMAND_FIFO_OVERFLOW" value="`${isrCmdOverflow ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
262    <ConfigDefine name="`${INST_NAME}`_TX_DATA_FIFO_OVERFLOW" value="`${isrDataOverflow ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
263    <ConfigDefine name="`${INST_NAME}`_RX_DMA_TRIGGER_OUT_USED" value="`${dmaRxTriggerOut ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
264    <ConfigDefine name="`${INST_NAME}`_TX_DMA_TRIGGER_OUT_USED" value="`${dmaTxTriggerOut ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
265
266    <ConfigDefine name="`${INST_NAME}`_RX_FIFO_TRIGEER_LEVEL" value="(`${rxTriggerLevel}`UL)" public="true" include="true" />
267    <ConfigDefine name="`${INST_NAME}`_TX_FIFO_TRIGEER_LEVEL" value="(`${txTriggerLevel}`UL)" public="true" include="true" />
268
269    <ConfigDefine name="`${INST_NAME}`_DATALINES0_1" value="`${hasConnection0 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
270    <ConfigDefine name="`${INST_NAME}`_DATALINES2_3" value="`${hasConnection2 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
271    <ConfigDefine name="`${INST_NAME}`_DATALINES4_5" value="`${hasConnection4 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
272    <ConfigDefine name="`${INST_NAME}`_DATALINES6_7" value="`${hasConnection6 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
273
274    <ConfigDefine name="`${INST_NAME}`_SS0" value="`${hasSelect0 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
275    <ConfigDefine name="`${INST_NAME}`_SS1" value="`${hasSelect1 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
276    <ConfigDefine name="`${INST_NAME}`_SS2" value="`${hasSelect2 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
277    <ConfigDefine name="`${INST_NAME}`_SS3" value="`${hasSelect3 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
278
279    <ConfigDefine name="`${INST_NAME}`_DESELECT_DELAY" value="7" public="true" include="true" />
280
281    <ConfigStruct name="`${INST_NAME . &quot;_config&quot;}`" type="cy_stc_smif_config_t" const="`${inFlash}`" public="true" include="true" >
282      <Member name="mode" value="(uint32_t)CY_SMIF_NORMAL" />
283      <Member name="deselectDelay" value="`${INST_NAME}`_DESELECT_DELAY" />
284      <Member name="rxClockSel" value="`${rx_clock_select}`" />
285      <Member name="blockEvent" value="(uint32_t)CY_SMIF_BUS_ERROR" />
286      <Member name="delayTapEnable" value="`${delay_tap_enable}`" />
287      <Member name="delayLineSelect" value="`${delay_line_select}`" />
288    </ConfigStruct>
289
290    <ConfigStruct name="`${INST_NAME}`_obj" type="cyhal_resource_inst_t" const="true" public="true" include="true" guard="defined (CY_USING_HAL)">
291      <Member name="type" value="CYHAL_RSC_SMIF" />
292      <Member name="block_num" value="`${getInstNumber(&quot;smif&quot;)}`U" />
293      <Member name="channel_num" value="0U" />
294    </ConfigStruct>
295
296    <ConfigStruct name="`${INST_NAME}`_hal_config" type="cyhal_qspi_configurator_t" const="`${inFlash}`" public="true" include="true" guard="defined (CY_USING_HAL)">
297      <Member name="resource" value="&amp;`${INST_NAME}`_obj" />
298      <Member name="config" value="&amp;`${INST_NAME}`_config" />
299      <Member name="clock" value="&amp;CYHAL_CLOCK_HF[`${getExposedMember(smifIfSource, &quot;clockInst&quot;)}`]" />
300      <Member name="gpios" value="{.sclk = `${sclkPin &amp;&amp; hasExposedMember(sclkPin, &quot;halPortPin&quot;) ? getExposedMember(sclkPin, &quot;halPortPin&quot;) : &quot;NC&quot;}`, .ssel = {`${ssel0Pin &amp;&amp; hasExposedMember(ssel0Pin, &quot;halPortPin&quot;) ? getExposedMember(ssel0Pin, &quot;halPortPin&quot;) : &quot;NC&quot;}`, `${ssel1Pin &amp;&amp; hasExposedMember(ssel1Pin, &quot;halPortPin&quot;) ? getExposedMember(ssel1Pin, &quot;halPortPin&quot;) : &quot;NC&quot;}`, `${ssel2Pin &amp;&amp; hasExposedMember(ssel2Pin, &quot;halPortPin&quot;) ? getExposedMember(ssel2Pin, &quot;halPortPin&quot;) : &quot;NC&quot;}`, `${ssel3Pin &amp;&amp; hasExposedMember(ssel3Pin, &quot;halPortPin&quot;) ? getExposedMember(ssel3Pin, &quot;halPortPin&quot;) : &quot;NC&quot;}`}, .io = {`${data0Pin &amp;&amp; hasExposedMember(data0Pin, &quot;halPortPin&quot;) ? getExposedMember(data0Pin, &quot;halPortPin&quot;) : &quot;NC&quot;}`, `${data1Pin &amp;&amp; hasExposedMember(data1Pin, &quot;halPortPin&quot;) ? getExposedMember(data1Pin, &quot;halPortPin&quot;) : &quot;NC&quot;}`, `${data2Pin &amp;&amp; hasExposedMember(data2Pin, &quot;halPortPin&quot;) ? getExposedMember(data2Pin, &quot;halPortPin&quot;) : &quot;NC&quot;}`, `${data3Pin &amp;&amp; hasExposedMember(data3Pin, &quot;halPortPin&quot;) ? getExposedMember(data3Pin, &quot;halPortPin&quot;) : &quot;NC&quot;}`, `${data4Pin &amp;&amp; hasExposedMember(data4Pin, &quot;halPortPin&quot;) ? getExposedMember(data4Pin, &quot;halPortPin&quot;) : &quot;NC&quot;}`, `${data5Pin &amp;&amp; hasExposedMember(data5Pin, &quot;halPortPin&quot;) ? getExposedMember(data5Pin, &quot;halPortPin&quot;) : &quot;NC&quot;}`, `${data6Pin &amp;&amp; hasExposedMember(data6Pin, &quot;halPortPin&quot;) ? getExposedMember(data6Pin, &quot;halPortPin&quot;) : &quot;NC&quot;}`, `${data7Pin &amp;&amp; hasExposedMember(data7Pin, &quot;halPortPin&quot;) ? getExposedMember(data7Pin, &quot;halPortPin&quot;) : &quot;NC&quot;}`},}" />
301      <Member name="irqs" value="`${INST_NAME}`_MEMORY_MODE_ALIGMENT_ERROR &#60;&#60; 5 | `${INST_NAME}`_RX_DATA_FIFO_UNDERFLOW &#60;&#60; 4 | `${INST_NAME}`_TX_COMMAND_FIFO_OVERFLOW &#60;&#60; 3 | `${INST_NAME}`_TX_DATA_FIFO_OVERFLOW &#60;&#60; 2 | (uint8_t)(`${INST_NAME}`_RX_FIFO_TRIGEER_LEVEL != 0) &#60;&#60; 1 | (uint8_t)(`${INST_NAME}`_TX_FIFO_TRIGEER_LEVEL != 0) &#60;&#60; 0" />
302      <Member name="dmas" value="`${INST_NAME}`_RX_DMA_TRIGGER_OUT_USED &#60;&#60; 1 | `${INST_NAME}`_TX_DMA_TRIGGER_OUT_USED &#60;&#60; 0" />
303    </ConfigStruct>
304
305    <ConfigInstruction value="cyhal_hwmgr_reserve(&amp;`${INST_NAME}`_obj);" include="true" guard="defined (CY_USING_HAL)" />
306  </ConfigFirmware>
307</Personality>
308