1<?xml version="1.0" encoding="utf-8"?>
2
3
4<!--****************************************************************************
5* \file pclk_v2.cypersonality
6* \version 1.0
7*
8* \brief
9* Peripheral Clock personality description file.
10* This supports CAT1B, CAT1C and CAT1D devices.
11*
12********************************************************************************
13* \copyright
14* Copyright (c) (2020-2022), Cypress Semiconductor Corporation (an Infineon company) or
15* an affiliate of Cypress Semiconductor Corporation.
16* SPDX-License-Identifier: Apache-2.0
17*
18* Licensed under the Apache License, Version 2.0 (the "License");
19* you may not use this file except in compliance with the License.
20* You may obtain a copy of the License at
21*
22*     http://www.apache.org/licenses/LICENSE-2.0
23*
24* Unless required by applicable law or agreed to in writing, software
25* distributed under the License is distributed on an "AS IS" BASIS,
26* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27* See the License for the specific language governing permissions and
28* limitations under the License.
29*****************************************************************************-->
30
31<Personality id="pclk_v2" name="Peripheral Clock" version="1.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7">
32  <Dependencies>
33    <IpBlock name="mxperi_ver3,mxsperi" />
34    <Resource name="peri\.group\.div_(8|16|16_5|24_5)" />
35  </Dependencies>
36  <ExposedMembers>
37    <ExposedMember key="type" paramId="typeApiConst" />
38    <ExposedMember key="number" paramId="number" />
39    <ExposedMember key="clockSel" paramId="clockSel" />
40    <ExposedMember key="frequency" paramId="frequency" />
41    <ExposedMember key="divider" paramId="divider" />
42    <ExposedMember key="accuracy" paramId="accuracy" />
43    <ExposedMember key="error" paramId="srcNotUsed" />
44  </ExposedMembers>
45  <Parameters>
46    <!-- PDL documentation -->
47    <ParamDoc id="pdlDoc" name="Configuration Help" group="Overview" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__sysclk__clk__peripheral.html" linkText="Open Peripherals Clock Dividers Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" />
48
49    <!-- Get the name of the source clock resource -->
50    <ParamString id="sourceClockRscV1" name="Source Clock Resource V1" group="Internal" default="`${getInstNumber(&quot;group&quot;) eq 0 ? &quot;srss[0].clock[0].hfclk[0]&quot; : &quot;srss[0].clock[0].hfclk[1]&quot;}`" visible="false" editable="false" desc="" />
51    <ParamString id="sourceClockRscV2" name="Source Clock Resource V2" group="Internal" default="`${hasBlock(&quot;peri[1]&quot;) ? (getInstNumber(&quot;peri&quot;) eq 0 ?
52                                                                                              (getInstNumber(&quot;group&quot;) eq 0 ? &quot;srss[0].clock[0].hfclk[0]&quot; :
53                                                                                               getInstNumber(&quot;group&quot;) eq 1 ? &quot;srss[0].clock[0].hfclk[10]&quot; :
54                                                                                               getInstNumber(&quot;group&quot;) eq 2 ? &quot;srss[0].clock[0].hfclk[9]&quot; :
55                                                                                               getInstNumber(&quot;group&quot;) eq 3 ? &quot;srss[0].clock[0].hfclk[5]&quot; :
56                                                                                               getInstNumber(&quot;group&quot;) eq 4 ? &quot;srss[0].clock[0].hfclk[6]&quot; :
57                                                                                               getInstNumber(&quot;group&quot;) eq 5 ? &quot;srss[0].clock[0].hfclk[10]&quot; :
58                                                                                               getInstNumber(&quot;group&quot;) eq 6 ? &quot;srss[0].clock[0].hfclk[13]&quot; :
59                                                                                               getInstNumber(&quot;group&quot;) eq 7 ? &quot;srss[0].clock[0].hfclk[1]&quot; :
60																							   getInstNumber(&quot;group&quot;) eq 8 ? &quot;srss[0].clock[0].hfclk[11]&quot; :
61																							   getInstNumber(&quot;group&quot;) eq 9 ? &quot;srss[0].clock[0].hfclk[13]&quot; :
62                                                                                               &quot;srss[0].clock[0].hfclk[1]&quot;) :
63                                                                                              (getInstNumber(&quot;group&quot;) eq 0 ? &quot;srss[0].clock[0].hfclk[1]&quot; :
64                                                                                               getInstNumber(&quot;group&quot;) eq 1 ? &quot;srss[0].clock[0].hfclk[7]&quot; :
65                                                                                               getInstNumber(&quot;group&quot;) eq 2 ? &quot;srss[0].clock[0].hfclk[5]&quot; :
66                                                                                               getInstNumber(&quot;group&quot;) eq 3 ? &quot;srss[0].clock[0].hfclk[6]&quot; :
67																							   getInstNumber(&quot;group&quot;) eq 4 ? &quot;srss[0].clock[0].hfclk[0]&quot; :
68                                                                                               getInstNumber(&quot;group&quot;) eq 5 ? &quot;srss[0].clock[0].hfclk[2]&quot; :
69                                                                                               &quot;srss[0].clock[0].hfclk[0]&quot;)) :
70																							  (getInstNumber(&quot;group&quot;) eq 0 ? &quot;srss[0].clock[0].hfclk[0]&quot; :
71                                                                                               getInstNumber(&quot;group&quot;) eq 1 ? &quot;srss[0].clock[0].hfclk[1]&quot; :
72                                                                                               getInstNumber(&quot;group&quot;) eq 2 ? &quot;srss[0].clock[0].hfclk[0]&quot; :
73                                                                                               getInstNumber(&quot;group&quot;) eq 3 ? &quot;srss[0].clock[0].hfclk[1]&quot; :
74                                                                                               getInstNumber(&quot;group&quot;) eq 4 ? &quot;srss[0].clock[0].hfclk[2]&quot; :
75                                                                                               getInstNumber(&quot;group&quot;) eq 5 ? &quot;srss[0].clock[0].hfclk[3]&quot; :
76                                                                                               getInstNumber(&quot;group&quot;) eq 6 ? &quot;srss[0].clock[0].hfclk[4]&quot; :
77                                                                                               &quot;srss[0].clock[0].hfclk[0]&quot;)}`" visible="false" editable="false" desc="" />
78    <ParamString id="sourceClockRscV3" name="Source Clock Resource V3" group="Internal" default="`${getInstNumber(&quot;group&quot;) eq 0 ? &quot;srss[0].clock[0].periclk[0]&quot; : &quot;srss[0].clock[0].hfclk[2]&quot;}`" visible="false" editable="false" desc="" />
79    <ParamString id="sourceClockRsc" name="Source Clock Resource" group="Internal" default="`${&quot;mxsperi&quot; eq getIpBlockName() ? (getVersion() eq 1 ? sourceClockRscV1 : sourceClockRscV2) : sourceClockRscV3 }`" visible="false" editable="false" desc="" />
80
81    <!-- Set an error if the source clock is not enabled or contains an error -->
82    <ParamBool id="srcNotUsed" name="Clock Source Enabled" group="Internal" default="`${!isBlockUsed(sourceClockRsc)}`" visible="false" editable="false" desc="" />
83    <ParamBool id="error" name="Clock Error" group="Internal" default="`${srcNotUsed || getExposedMember(sourceClockRsc, &quot;error&quot;)}`" visible="false" editable="false" desc="" />
84
85    <!-- Source clock frequency -->
86    <ParamRange  id="sourceFreq" name="sourceFrequency" group="Internal" default="`${!error ? getExposedMember(sourceClockRsc, &quot;frequency&quot;) : 0}`" min="0" max="400000000" resolution="1" visible="false" editable="false" desc="" />
87    <ParamString id="accuracy" name="accuracy" group="General" default="`${!error ? getExposedMember(sourceClockRsc, &quot;accuracy&quot;) : 0}`" visible="false" editable="false" desc="" />
88    <ParamString id="sourceFreqInfoV1" name="Source Clock V1" group="Internal" default="`${getInstNumber(&quot;group&quot;) eq 0 ? &quot;CLK_HF0&quot; : &quot;CLK_HF1&quot;}` (`${formatFrequency(sourceFreq,accuracy)}`)" visible="false" editable="false" desc="Source clock frequency" />
89    <ParamString id="sourceFreqInfoV2" name="Source Clock V2" group="Internal" default="`${hasBlock(&quot;peri[1]&quot;) ? (getInstNumber(&quot;peri&quot;) eq 0 ?
90                                                                                              (getInstNumber(&quot;group&quot;) eq 0 ? &quot;CLK_HF0&quot; :
91                                                                                               getInstNumber(&quot;group&quot;) eq 1 ? &quot;CLK_HF10&quot; :
92                                                                                               getInstNumber(&quot;group&quot;) eq 2 ? &quot;CLK_HF9&quot; :
93                                                                                               getInstNumber(&quot;group&quot;) eq 3 ? &quot;CLK_HF5&quot; :
94                                                                                               getInstNumber(&quot;group&quot;) eq 4 ? &quot;CLK_HF6&quot; :
95                                                                                               getInstNumber(&quot;group&quot;) eq 5 ? &quot;CLK_HF10&quot; :
96                                                                                               getInstNumber(&quot;group&quot;) eq 6 ? &quot;CLK_HF13&quot; :
97                                                                                               getInstNumber(&quot;group&quot;) eq 7 ? &quot;CLK_HF1&quot; :
98                                                                                               getInstNumber(&quot;group&quot;) eq 8 ? &quot;CLK_HF11&quot; :
99																							   getInstNumber(&quot;group&quot;) eq 9 ? &quot;CLK_HF13&quot; :
100																							   &quot;CLK_HF1&quot;) :
101                                                                                              (getInstNumber(&quot;group&quot;) eq 0 ? &quot;CLK_HF1&quot; :
102                                                                                               getInstNumber(&quot;group&quot;) eq 1 ? &quot;CLK_HF7&quot; :
103                                                                                               getInstNumber(&quot;group&quot;) eq 2 ? &quot;CLK_HF5&quot; :
104                                                                                               getInstNumber(&quot;group&quot;) eq 3 ? &quot;CLK_HF6&quot; :
105                                                                                               getInstNumber(&quot;group&quot;) eq 4 ? &quot;CLK_HF0&quot; :
106																							   getInstNumber(&quot;group&quot;) eq 5 ? &quot;CLK_HF2&quot; :
107																							   &quot;CLK_HF0&quot;)) :
108																							  (getInstNumber(&quot;group&quot;) eq 0 ? &quot;CLK_HF0&quot; :
109                                                                                               getInstNumber(&quot;group&quot;) eq 1 ? &quot;CLK_HF1&quot; :
110                                                                                               getInstNumber(&quot;group&quot;) eq 2 ? &quot;CLK_HF0&quot; :
111                                                                                               getInstNumber(&quot;group&quot;) eq 3 ? &quot;CLK_HF1&quot; :
112                                                                                               getInstNumber(&quot;group&quot;) eq 4 ? &quot;CLK_HF2&quot; :
113                                                                                               getInstNumber(&quot;group&quot;) eq 5 ? &quot;CLK_HF3&quot; :
114                                                                                               getInstNumber(&quot;group&quot;) eq 6 ? &quot;CLK_HF4&quot; :
115																							   &quot;CLK_HF0&quot;)}`  (`${formatFrequency(sourceFreq,accuracy)}`)" visible="false" editable="false" desc="Source clock frequency" />
116    <ParamString id="sourceFreqInfoV3" name="Source Clock V3" group="Internal" default="`${getInstNumber(&quot;group&quot;) eq 0 ? &quot;CLK_PERI&quot; : &quot;CLK_HF2&quot;}` (`${formatFrequency(sourceFreq,accuracy)}`)" visible="false" editable="false" desc="Source clock frequency" />
117
118    <ParamString id="sourceFreqInfo" name="Source Clock" group="General" default="`${&quot;mxsperi&quot; eq getIpBlockName() ? (getVersion() eq 1 ? sourceFreqInfoV1 : sourceFreqInfoV2) : sourceFreqInfoV3}`" visible="true" editable="false" desc="Source clock frequency" />
119    <!-- Get the peripheral clock divider type, width and number -->
120    <ParamChoice id="type" name="Divider type" group="Internal" default="`${getBlockType(2)}`" visible="false" editable="false" desc="">
121      <Entry name="div_8"    value="div_8"    visible="true" />
122      <Entry name="div_16"   value="div_16"   visible="true" />
123      <Entry name="div_16_5" value="div_16_5" visible="true" />
124      <Entry name="div_24_5" value="div_24_5" visible="true" />
125    </ParamChoice>
126    <ParamRange  id="width"  name="Divider width" group="Internal" default="`${type eq div_8 ? 8 : type eq div_24_5 ? 24 : 16}`" min="8" max="24" resolution="1" visible="false" editable="false" desc="" />
127    <ParamRange  id="number" name="Divider number" group="Internal" default="`${getInstNumber(getBlockType(2))}`" min="0" max="63" resolution="1" visible="false" editable="false" desc="" />
128
129    <!-- Determine if the divider is fractional -->
130    <ParamBool   id="isFractional" name="isFractional" group="Internal" default="`${(type eq div_16_5) || (type eq div_24_5)}`" visible="false" editable="false" desc="" />
131
132    <!-- Dividers -->
133    <ParamRange  id="intDivider" name="`${isFractional ? &quot;Integer Divider&quot; : &quot;Divider&quot;}`" group="General" default="1" min="1" max="`${pow(2, width)}`" resolution="1" visible="true" editable="true" desc="" />
134    <ParamRange  id="fracDivider" name="Fractional Divider" group="General" default="0" min="0" max="31" resolution="1" visible="`${isFractional}`" editable="true" desc="" />
135    <ParamRange  id="divider" name="Divider" group="Internal" default="`${isFractional ? intDivider + fracDivider / 32.0 : intDivider}`" min="1" max="`${pow(2, width) + 31.0/32.0}`" resolution="0.00001" visible="false" editable="false" desc="" />
136
137    <!-- Output frequency -->
138    <ParamRange id="frequency" name="Frequency" group="General" default="`${cast(int64, ((sourceFreq / cast(float, divider) + 0.0005) * 1000)) / 1000.0}`" min="0" max="400000000" resolution="0.001" visible="false" editable="false" desc="The resulting output clock frequency" />
139
140    <ParamString id="frequencyInfo" name="Frequency" group="General" default="`${formatFrequency(frequency,accuracy)}`" visible="true" editable="false" desc="The resulting output clock frequency" />
141
142    <ParamBool   id="startOnReset" name="Start on Reset" group="General" default="true" visible="true" editable="true" desc="If checked, this option will cause the clock to be enabled by the clock initialization routine" />
143
144    <ParamString id="typeApiConst" name="typeApiConst" group="Internal" default="`${type eq div_8    ? &quot;CY_SYSCLK_DIV_8_BIT&quot;   :
145                                                                                   type eq div_16   ? &quot;CY_SYSCLK_DIV_16_BIT&quot;   :
146                                                                                   type eq div_16_5 ? &quot;CY_SYSCLK_DIV_16_5_BIT&quot; :
147                                                                                                      &quot;CY_SYSCLK_DIV_24_5_BIT&quot;}`" visible="false" editable="false" desc="API constants for the divider type" />
148
149    <ParamString id="typeApiConstHal" name="typeApiConst" group="Internal" default="`${type eq div_8    ? &quot;8BIT&quot;   :
150                                                                                   type eq div_16   ? &quot;16BIT&quot;   :
151                                                                                   type eq div_16_5 ? &quot;16_5BIT&quot; :
152                                                                                                      &quot;24_5BIT&quot;}`" visible="false" editable="false" desc="API constants for the divider type" />
153
154    <ParamString id="clockSel" name="clockSel" group="Internal" default="`${typeApiConst}`, `${number}`U" visible="false" editable="false" desc="Divider type and number" />
155
156    <ParamSignal port="clk[0]" name="Peripherals" group="General" visible="true" desc="This signal can be used to drive peripherals" canBeEmpty="true" />
157  </Parameters>
158
159  <DRCs>
160    <DRC type="ERROR" text="CLK_HF1 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;)  &gt; 0) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 1)}`" >
161      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[1]&quot;}`" value="" valid="true" />
162    </DRC>
163
164    <DRC type="ERROR" text="CLK_HF1 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[1]&quot;) &amp;&amp; hasBlock(&quot;peri[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 7) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
165      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[1]&quot;}`" value="" valid="true" />
166    </DRC>
167    <DRC type="ERROR" text="CLK_HF1 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 1) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 0) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
168      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[1]&quot;}`" value="" valid="true" />
169    </DRC>
170
171    <DRC type="ERROR" text="CLK_HF1 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[1]&quot;) &amp;&amp; !hasBlock(&quot;peri[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 1) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
172      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[1]&quot;}`" value="" valid="true" />
173    </DRC>
174
175    <DRC type="ERROR" text="CLK_HF1 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[1]&quot;) &amp;&amp; !hasBlock(&quot;peri[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 3) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
176      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[1]&quot;}`" value="" valid="true" />
177    </DRC>
178
179    <DRC type="ERROR" text="CLK_HF2 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[2]&quot;) &amp;&amp; !hasBlock(&quot;peri[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 4) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
180      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[2]&quot;}`" value="" valid="true" />
181    </DRC>
182
183    <DRC type="ERROR" text="CLK_HF3 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[3]&quot;) &amp;&amp; !hasBlock(&quot;peri[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 5) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
184      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[3]&quot;}`" value="" valid="true" />
185    </DRC>
186
187    <DRC type="ERROR" text="CLK_HF4 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[4]&quot;) &amp;&amp; !hasBlock(&quot;peri[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 6) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
188      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[4]&quot;}`" value="" valid="true" />
189    </DRC>
190
191    <DRC type="ERROR" text="CLK_HF5 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[5]&quot;) &amp;&amp; hasBlock(&quot;peri[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 3) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
192      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[5]&quot;}`" value="" valid="true" />
193    </DRC>
194    <DRC type="ERROR" text="CLK_HF5 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[5]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 1) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 2) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
195      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[5]&quot;}`" value="" valid="true" />
196    </DRC>
197
198    <DRC type="ERROR" text="CLK_HF6 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[6]&quot;) &amp;&amp; hasBlock(&quot;peri[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 4) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
199      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[6]&quot;}`" value="" valid="true" />
200    </DRC>
201    <DRC type="ERROR" text="CLK_HF6 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[6]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 1) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 3) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
202      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[6]&quot;}`" value="" valid="true" />
203    </DRC>
204
205    <DRC type="ERROR" text="CLK_HF7 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[7]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 1) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 1) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
206      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[7]&quot;}`" value="" valid="true" />
207    </DRC>
208
209    <DRC type="ERROR" text="CLK_HF9 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[9]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 2) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
210      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[9]&quot;}`" value="" valid="true" />
211    </DRC>
212
213    <DRC type="ERROR" text="CLK_HF10 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[10]&quot;) &amp;&amp; hasBlock(&quot;peri[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 1) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
214      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[10]&quot;}`" value="" valid="true" />
215    </DRC>
216    <DRC type="ERROR" text="CLK_HF10 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[10]&quot;) &amp;&amp; hasBlock(&quot;peri[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 5) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
217      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[10]&quot;}`" value="" valid="true" />
218    </DRC>
219
220	<DRC type="ERROR" text="CLK_HF11 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[11]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 8) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
221      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[11]&quot;}`" value="" valid="true" />
222    </DRC>
223
224	<DRC type="ERROR" text="CLK_HF13 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[13]&quot;) &amp;&amp; hasBlock(&quot;peri[1]&quot;) &amp;&amp; (getInstNumber(&quot;peri&quot;) eq 0) &amp;&amp; (getInstNumber(&quot;group&quot;) eq 6) &amp;&amp; (&quot;mxsperi&quot; eq getIpBlockName()) &amp;&amp; (getVersion() eq 2)}`" >
225      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[13]&quot;}`" value="" valid="true" />
226    </DRC>
227
228	<DRC type="ERROR" text="CLK_HF2 clock is not enabled" condition="`${!isBlockUsed(&quot;srss[0].clock[0].hfclk[2]&quot;) &amp;&amp; (getInstNumber(&quot;group&quot;) &gt; 0) &amp;&amp; (&quot;mxperi_ver3&quot; eq getIpBlockName())}`" >
229      <FixIt action="ENABLE_BLOCK" target="`${&quot;srss[0].clock[0].hfclk[2]&quot;}`" value="" valid="true" />
230    </DRC>
231  </DRCs>
232
233  <ConfigFirmware>
234    <ConfigInclude value="cy_sysclk.h" include="true" />
235    <ConfigInclude value="cyhal_hwmgr.h" include="true" guard="defined (CY_USING_HAL)" />
236
237    <ConfigDefine name="`${INST_NAME}`_HW" value="CYHAL_CLOCK_BLOCK_PERIPHERAL`${getInstNumber(&quot;group&quot;)}`_`${typeApiConstHal}`" public="true" include="true" guard="defined (CY_USING_HAL)"/>
238    <ConfigDefine name="`${INST_NAME}`_HW" value="`${typeApiConst}`" public="true" include="true" guard="!defined (CY_USING_HAL)"/>
239    <ConfigDefine name="`${INST_NAME}`_NUM" value="`${number}`U" public="true" include="true" />
240    <ConfigDefine name="`${toUpper(INST_NAME)}`_GRP_NUM" value="(`${getInstNumber(&quot;group&quot;)}`U &lt;&lt; PERI_PCLK_GR_NUM_Pos)" public="true" include="true" />
241    <ConfigStruct name="`${INST_NAME}`_obj" type="cyhal_resource_inst_t" const="true" public="true" include="true" guard="defined (CY_USING_HAL)">
242      <Member name="type" value="CYHAL_RSC_CLOCK" />
243      <Member name="block_num" value="`${INST_NAME}`_HW" />
244      <Member name="channel_num" value="`${INST_NAME}`_NUM" />
245    </ConfigStruct>
246    <ConfigInstruction value="Cy_SysClk_PeriPclkDisableDivider((en_clk_dst_t)`${toUpper(INST_NAME)}`_GRP_NUM, `${clockSel}`);" include="true"  />
247    <ConfigInstruction value="Cy_SysClk_PeriPclkSetDivider((en_clk_dst_t)`${toUpper(INST_NAME)}`_GRP_NUM, `${clockSel}`, `${intDivider-1}`U);" include="`${!isFractional}`"  />
248    <ConfigInstruction value="Cy_SysClk_PeriPclkSetFracDivider((en_clk_dst_t)`${toUpper(INST_NAME)}`_GRP_NUM, `${clockSel}`, `${intDivider-1}`U, `${fracDivider}`U);" include="`${isFractional}`"  />
249    <ConfigInstruction value="Cy_SysClk_PeriPclkEnableDivider((en_clk_dst_t)`${toUpper(INST_NAME)}`_GRP_NUM, `${clockSel}`);" include="`${startOnReset}`"  />
250    <ConfigInstruction value="cyhal_hwmgr_reserve(&amp;`${INST_NAME}`_obj);" include="true" guard="defined (CY_USING_HAL)" />
251  </ConfigFirmware>
252</Personality>
253