1<?xml version="1.0" encoding="utf-8"?>
2
3
4<!--****************************************************************************
5* \file smif.cypersonality
6* \version 1.2
7*
8* \brief
9* Quad Serial Peripheral Interface (QSPI) personality description file.
10*
11********************************************************************************
12* \copyright
13* Copyright 2018-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" name="Quad Serial Peripheral Interface (QSPI)" version="1.2" xmlns="http://cypress.com/xsd/cyhwpersonality_v7">
30  <Dependencies>
31    <IpBlock name="mxsmif" >
32        <Version major="1" />
33    </IpBlock>
34    <Resource name="smif" />
35  </Dependencies>
36  <ExposedMembers />
37  <Parameters>
38    <!-- PDL documentation -->
39    <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" />
40
41    <!-- Clocks -->
42    <ParamSignal port="clk_hf[0]" name="HF Clock" group="Clocks" visible="true" desc="High frequency source clock" canBeEmpty="false" />
43    <ParamSignal port="clk_if[0]" name="Interface Clock" group="Clocks" visible="true" desc="Transmission interface clock" canBeEmpty="false" />
44    <ParamSignal port="spi_clk[0]" name="SPI Clock" group="Clocks" visible="true" desc="The Serial Clock (SCLK) to the slave devices" canBeEmpty="false">
45      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
46        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer off'.">
47          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
48        </Parameter>
49      </Constraint>
50      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
51    </ParamSignal>
52    <ParamString id="sclkPin" name="sclkPin" group="Internal" default="`${getBlockFromSignal(&quot;spi_clk[0]&quot;)}`" visible="false" editable="false" desc="" />
53
54    <ParamString id="smifIfSource" name="smifIfSource" group="Internal" default="`${getBlockFromSignal(&quot;clk_if[0]&quot;)}`" visible="false" editable="false" desc="Interface Source Clock Resource" />
55    <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." />
56
57
58    <!-- External tools -->
59    <ParamString id="cfgFileName" name="cfgFileName" group="External Tools" default="design.cyqspi" visible="false" editable="false" desc="" />
60    <ParamString id="cfgFilePath" name="cfgFilePath" group="External Tools" default="`${cy_design_path() . &quot;/&quot; . cfgFileName}`" visible="false" editable="false" desc="" />
61
62    <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">
63      <Arg value="`${&quot;--config=&quot; . cfgFilePath}`" />
64      <Arg value="`${&quot;--output-dir=&quot; . cy_codegen_path()}`" />
65      <Arg value="`${&quot;--library=&quot; . cy_libs_file()}`" />
66    </ParamCustom>
67
68    <!-- Data -->
69    <ParamSignal port="spi_data0[0]" name="SPI Data[0]" group="Data" visible="`${hasVisibleOption(&quot;spi_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">
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="data0Pin" name="data0Pin" group="Internal" default="`${getBlockFromSignal(&quot;spi_data0[0]&quot;)}`" visible="false" editable="false" desc="" />
78    <ParamSignal port="spi_data1[0]" name="SPI Data[1]" group="Data" visible="`${hasVisibleOption(&quot;spi_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">
79      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
80        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
81          <Fixed value="CY_GPIO_DM_STRONG" />
82        </Parameter>
83      </Constraint>
84      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
85    </ParamSignal>
86    <ParamString id="data1Pin" name="data1Pin" group="Internal" default="`${getBlockFromSignal(&quot;spi_data1[0]&quot;)}`" visible="false" editable="false" desc="" />
87    <ParamSignal port="spi_data2[0]" name="SPI Data[2]" group="Data" visible="`${hasVisibleOption(&quot;spi_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">
88      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
89        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
90          <Fixed value="CY_GPIO_DM_STRONG" />
91        </Parameter>
92      </Constraint>
93      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
94    </ParamSignal>
95    <ParamString id="data2Pin" name="data2Pin" group="Internal" default="`${getBlockFromSignal(&quot;spi_data2[0]&quot;)}`" visible="false" editable="false" desc="" />
96    <ParamSignal port="spi_data3[0]" name="SPI Data[3]" group="Data" visible="`${hasVisibleOption(&quot;spi_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">
97      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
98        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
99          <Fixed value="CY_GPIO_DM_STRONG" />
100        </Parameter>
101      </Constraint>
102      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
103    </ParamSignal>
104    <ParamString id="data3Pin" name="data3Pin" group="Internal" default="`${getBlockFromSignal(&quot;spi_data3[0]&quot;)}`" visible="false" editable="false" desc="" />
105    <ParamSignal port="spi_data4[0]" name="SPI Data[4]" group="Data" visible="`${(CHIP_TOP.DATA8_PRESENT == 1) &amp;&amp; hasVisibleOption(&quot;spi_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">
106      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
107        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
108          <Fixed value="CY_GPIO_DM_STRONG" />
109        </Parameter>
110      </Constraint>
111      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
112    </ParamSignal>
113    <ParamString id="data4Pin" name="data4Pin" group="Internal" default="`${getBlockFromSignal(&quot;spi_data4[0]&quot;)}`" visible="false" editable="false" desc="" />
114    <ParamSignal port="spi_data5[0]" name="SPI Data[5]" group="Data" visible="`${(CHIP_TOP.DATA8_PRESENT == 1) &amp;&amp; hasVisibleOption(&quot;spi_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">
115      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
116        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
117          <Fixed value="CY_GPIO_DM_STRONG" />
118        </Parameter>
119      </Constraint>
120      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
121    </ParamSignal>
122    <ParamString id="data5Pin" name="data5Pin" group="Internal" default="`${getBlockFromSignal(&quot;spi_data5[0]&quot;)}`" visible="false" editable="false" desc="" />
123    <ParamSignal port="spi_data6[0]" name="SPI Data[6]" group="Data" visible="`${(CHIP_TOP.DATA8_PRESENT == 1) &amp;&amp; hasVisibleOption(&quot;spi_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">
124      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
125        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
126          <Fixed value="CY_GPIO_DM_STRONG" />
127        </Parameter>
128      </Constraint>
129      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
130    </ParamSignal>
131    <ParamString id="data6Pin" name="data6Pin" group="Internal" default="`${getBlockFromSignal(&quot;spi_data6[0]&quot;)}`" visible="false" editable="false" desc="" />
132    <ParamSignal port="spi_data7[0]" name="SPI Data[7]" group="Data" visible="`${(CHIP_TOP.DATA8_PRESENT == 1) &amp;&amp; hasVisibleOption(&quot;spi_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">
133      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
134        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer on'.">
135          <Fixed value="CY_GPIO_DM_STRONG" />
136        </Parameter>
137      </Constraint>
138      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
139    </ParamSignal>
140    <ParamString id="data7Pin" name="data7Pin" group="Internal" default="`${getBlockFromSignal(&quot;spi_data7[0]&quot;)}`" visible="false" editable="false" desc="" />
141
142    <!-- Select -->
143    <ParamSignal port="spi_select0[0]" name="SPI Slave Select 0" group="Slave Select" visible="`${hasVisibleOption(&quot;spi_select0[0]&quot;)}`" desc="Select signal 0 to specifiy which memory device to communicate with" canBeEmpty="true">
144      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
145        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer off'.">
146          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
147        </Parameter>
148      </Constraint>
149      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
150    </ParamSignal>
151    <ParamString id="ssel0Pin" name="ssel0Pin" group="Internal" default="`${getBlockFromSignal(&quot;spi_select0[0]&quot;)}`" visible="false" editable="false" desc="" />
152    <ParamSignal port="spi_select1[0]" name="SPI Slave Select 1" group="Slave Select" visible="`${hasVisibleOption(&quot;spi_select1[0]&quot;)}`" desc="Select signal 1 to specifiy which memory device to communicate with" canBeEmpty="true">
153      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
154        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer off'.">
155          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
156        </Parameter>
157      </Constraint>
158      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
159    </ParamSignal>
160    <ParamString id="ssel1Pin" name="ssel1Pin" group="Internal" default="`${getBlockFromSignal(&quot;spi_select1[0]&quot;)}`" visible="false" editable="false" desc="" />
161    <ParamSignal port="spi_select2[0]" name="SPI Slave Select 2" group="Slave Select" visible="`${hasVisibleOption(&quot;spi_select2[0]&quot;)}`" desc="Select signal 2 to specifiy which memory device to communicate with" canBeEmpty="true">
162      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
163        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer off'.">
164          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
165        </Parameter>
166      </Constraint>
167      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
168    </ParamSignal>
169    <ParamString id="ssel2Pin" name="ssel2Pin" group="Internal" default="`${getBlockFromSignal(&quot;spi_select2[0]&quot;)}`" visible="false" editable="false" desc="" />
170    <ParamSignal port="spi_select3[0]" name="SPI Slave Select 3" group="Slave Select" visible="`${hasVisibleOption(&quot;spi_select3[0]&quot;)}`" desc="Select signal 3 to specifiy which memory device to communicate with" canBeEmpty="true">
171      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
172        <Parameter id="DriveModes" severity="ERROR" reason="Drive Mode must be set to 'Strong Drive. Input buffer off'.">
173          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
174        </Parameter>
175      </Constraint>
176      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
177    </ParamSignal>
178    <ParamString id="ssel3Pin" name="ssel3Pin" group="Internal" default="`${getBlockFromSignal(&quot;spi_select3[0]&quot;)}`" visible="false" editable="false" desc="" />
179
180    <!-- Interrupt -->
181    <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" />
182    <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" />
183    <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" />
184    <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" />
185
186    <!-- DMA -->
187    <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" />
188    <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" />
189    <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" />
190    <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" />
191
192    <ParamString id="dmaRxTriggerOut" name="dmaRxTriggerOut" group="Internal" default="`${getBlockFromSignal(&quot;tr_rx_req[0]&quot;)}`" visible="false" editable="false" desc="" />
193    <ParamString id="dmaTxTriggerOut" name="dmaTxTriggerOut" group="Internal" default="`${getBlockFromSignal(&quot;tr_tx_req[0]&quot;)}`" visible="false" editable="false" desc="" />
194
195    <!-- SMIF instance number -->
196    <ParamString id="InstNumber" name="InstNumber" group="Internal" default="`${getInstNumber(&quot;smif&quot;)}`" visible="false" editable="false" desc="SMIF Instance name number." />
197
198    <!-- Other -->
199    <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)." />
200
201    <!-- Helpers -->
202    <Repeat count="8">
203      <ParamBool id="hasConnection$idx" name="" group="Hidden" default="`${hasConnection(&quot;spi_data$idx&quot;, 0)}`" visible="false" editable="false" desc="" />
204	</Repeat>
205    <Repeat count="4">
206      <ParamBool id="hasSelect$idx" name="" group="Hidden" default="`${hasConnection(&quot;spi_select$idx&quot;, 0)}`" visible="false" editable="false" desc="" />
207	</Repeat>
208    <ParamBool id="allDataConnected" name="" group="Hidden" default="`${hasConnection0 &amp;&amp; hasConnection2 &amp;&amp; hasConnection4 &amp;&amp; hasConnection6}`" visible="false" editable="false" desc="" />
209    <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="" />
210  </Parameters>
211
212  <DRCs>
213    <DRC type="ERROR" text="SPI Data[0] and SPI Data[1] must be used together" condition="`${hasConnection0 != hasConnection1}`" paramId="spi_data0[0]" />
214    <DRC type="ERROR" text="SPI Data[2] and SPI Data[3] must be used together" condition="`${hasConnection2 != hasConnection3}`" paramId="spi_data2[0]" />
215    <DRC type="ERROR" text="SPI Data[4] and SPI Data[5] must be used together" condition="`${hasConnection4 != hasConnection5}`" paramId="spi_data4[0]" />
216    <DRC type="ERROR" text="SPI Data[6] and SPI Data[7] must be used together" condition="`${hasConnection6 != hasConnection7}`" paramId="spi_data6[0]" />
217    <DRC type="ERROR" text="At least two SPI Data signal must be connected" condition="`${!(hasConnection0 || hasConnection2 || hasConnection4 || hasConnection6)}`" paramId="spi_data0[0]" />
218    <DRC type="ERROR" text="At least one SPI Select signal must be connected" condition="`${!(requireMultipleSelects || hasSelect0 || hasSelect1 || hasSelect2 || hasSelect3)}`" paramId="spi_select0[0]" />
219    <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="spi_select0[0]"/>
220    <DRC type="ERROR" text="Interface Clock must not be greater than 80 Mhz" condition="`${smifIfClkHz > 80000000}`" location="`${smifIfSource}`" />
221  </DRCs>
222
223  <ConfigFirmware>
224    <ConfigInclude value="cy_smif.h" include="true" />
225    <ConfigInclude value="cycfg_qspi_memslot.h" include="true" />
226    <ConfigInclude value="cyhal_hwmgr.h" include="true" guard="defined (CY_USING_HAL)" />
227    <ConfigInclude value="cyhal.h" include="true" guard="defined (CY_USING_HAL)" />
228
229    <ConfigDefine name="`${INST_NAME}`_HW" value="SMIF`${InstNumber}`" public="true" include="true" />
230    <ConfigDefine name="`${INST_NAME}`_IRQ" value="smif_interrupt_IRQn" public="true" include="true" />
231    <ConfigDefine name="`${INST_NAME}`_MEMORY_MODE_ALIGMENT_ERROR" value="`${isrAlignment ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
232    <ConfigDefine name="`${INST_NAME}`_RX_DATA_FIFO_UNDERFLOW" value="`${isrUnderflow ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
233    <ConfigDefine name="`${INST_NAME}`_TX_COMMAND_FIFO_OVERFLOW" value="`${isrCmdOverflow ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
234    <ConfigDefine name="`${INST_NAME}`_TX_DATA_FIFO_OVERFLOW" value="`${isrDataOverflow ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
235    <ConfigDefine name="`${INST_NAME}`_RX_DMA_TRIGGER_OUT_USED" value="`${dmaRxTriggerOut ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
236    <ConfigDefine name="`${INST_NAME}`_TX_DMA_TRIGGER_OUT_USED" value="`${dmaTxTriggerOut ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
237
238    <ConfigDefine name="`${INST_NAME}`_RX_FIFO_TRIGEER_LEVEL" value="(`${rxTriggerLevel}`UL)" public="true" include="true" />
239    <ConfigDefine name="`${INST_NAME}`_TX_FIFO_TRIGEER_LEVEL" value="(`${txTriggerLevel}`UL)" public="true" include="true" />
240
241    <ConfigDefine name="`${INST_NAME}`_DATALINES0_1" value="`${hasConnection0 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
242    <ConfigDefine name="`${INST_NAME}`_DATALINES2_3" value="`${hasConnection2 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
243    <ConfigDefine name="`${INST_NAME}`_DATALINES4_5" value="`${hasConnection4 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
244    <ConfigDefine name="`${INST_NAME}`_DATALINES6_7" value="`${hasConnection6 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
245
246    <ConfigDefine name="`${INST_NAME}`_SS0" value="`${hasSelect0 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
247    <ConfigDefine name="`${INST_NAME}`_SS1" value="`${hasSelect1 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
248    <ConfigDefine name="`${INST_NAME}`_SS2" value="`${hasSelect2 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
249    <ConfigDefine name="`${INST_NAME}`_SS3" value="`${hasSelect3 ? &quot;(1UL)&quot; : &quot;(0UL)&quot;}`" public="true" include="true" />
250
251    <ConfigDefine name="`${INST_NAME}`_DESELECT_DELAY" value="7" public="true" include="true" />
252
253    <ConfigStruct name="`${INST_NAME . &quot;_config&quot;}`" type="cy_stc_smif_config_t" const="`${inFlash}`" public="true" include="true" >
254      <Member name="mode" value="(uint32_t)CY_SMIF_NORMAL" />
255      <Member name="deselectDelay" value="`${INST_NAME}`_DESELECT_DELAY" />
256      <Member name="rxClockSel" value="(uint32_t)CY_SMIF_SEL_INV_INTERNAL_CLK" />
257      <Member name="blockEvent" value="(uint32_t)CY_SMIF_BUS_ERROR" />
258    </ConfigStruct>
259
260    <ConfigStruct name="`${INST_NAME}`_obj" type="cyhal_resource_inst_t" const="true" public="true" include="true" guard="defined (CY_USING_HAL)">
261      <Member name="type" value="CYHAL_RSC_SMIF" />
262      <Member name="block_num" value="`${getInstNumber(&quot;smif&quot;)}`U" />
263      <Member name="channel_num" value="0U" />
264    </ConfigStruct>
265
266    <ConfigStruct name="`${INST_NAME}`_hal_config" type="cyhal_qspi_configurator_t" const="`${inFlash}`" public="true" include="true" guard="defined (CY_USING_HAL)">
267      <Member name="resource" value="&amp;`${INST_NAME}`_obj" />
268      <Member name="config" value="&amp;`${INST_NAME}`_config" />
269      <Member name="clock" value="&amp;CYHAL_CLOCK_HF[`${getExposedMember(smifIfSource, &quot;clockInst&quot;)}`]" />
270      <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(sclkPin, &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;}`},}" />
271      <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" />
272      <Member name="dmas" value="`${INST_NAME}`_RX_DMA_TRIGGER_OUT_USED &#60;&#60; 1 | `${INST_NAME}`_TX_DMA_TRIGGER_OUT_USED &#60;&#60; 0" />
273    </ConfigStruct>
274
275    <ConfigInstruction value="cyhal_hwmgr_reserve(&amp;`${INST_NAME}`_obj);" include="true" guard="defined (CY_USING_HAL)" />
276  </ConfigFirmware>
277</Personality>
278