1 <?xml version="1.0" standalone="no"?>
4 <!ENTITY UPPERCASE "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
5 <!ENTITY LOWERCASE "abcdefghijklmnopqrstuvwxyz">
7 <!ENTITY UPPER2LOWER " '&UPPERCASE;' , '&LOWERCASE;' ">
8 <!ENTITY LOWER2UPPER " '&LOWERCASE;' , '&UPPERCASE;' ">
10 <!ENTITY ALPHALOWER "ABCDEFxX0123456789">
11 <!ENTITY HEXUPPER "ABCDEFxX0123456789">
12 <!ENTITY HEXLOWER "abcdefxX0123456789">
13 <!ENTITY HEXU2L " '&HEXLOWER;' , '&HEXUPPER;' ">
16 <xsl:stylesheet version="1.0"
17 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
18 xmlns:exsl="http://exslt.org/common"
19 xmlns:dyn="http://exslt.org/dynamic"
20 xmlns:math="http://exslt.org/math"
21 xmlns:xlink="http://www.w3.org/1999/xlink"
22 extension-element-prefixes="math dyn exsl xlink">
25 ================================================================================
26 Generate XTeller for PORTS
27 ================================================================================
29 <xsl:param name="SHOW_IOIF" select="'TRUE'"/>
30 <xsl:param name="SHOW_BUSIF" select="'TRUE'"/>
32 <xsl:template name="WRITE_VIEW_PORT_TREE">
34 <xsl:variable name="num_of_ext_ports_" select="count($G_SYS_EXPS/PORT)"/>
36 <xsl:if test="$G_DEBUG='TRUE'">
37 <xsl:message>WRITING PORT in MODE :<xsl:value-of select="@MODE"/></xsl:message>
39 <xsl:message>EXTERNAL PORT <xsl:value-of select="$num_of_ext_ports_"/></xsl:message>
44 <xsl:if test="$num_of_ext_ports_ > 0">
45 <xsl:call-template name="WRITE_VIEW_EXTP_TREE_SET"/>
48 <xsl:for-each select="$G_SYS_MODS/MODULE">
49 <xsl:sort data-type="number" select="@ROW_INDEX" order="ascending"/>
50 <xsl:variable name= "instName_" select="@INSTANCE"/>
51 <xsl:variable name="moduleRef_" select="self::node()"/>
53 <xsl:call-template name="WRITE_VIEW_PORT_TREE_SET">
54 <xsl:with-param name="iModRef" select="$moduleRef_"/>
57 </xsl:for-each> <!-- End of MODULES loop -->
60 <xsl:template name="WRITE_VIEW_EXTP_TREE_SET">
62 <xsl:element name="SET">
63 <xsl:attribute name="ID">ExternalPorts</xsl:attribute>
64 <xsl:attribute name="CLASS">MODULE</xsl:attribute>
66 <xsl:for-each select="$G_SYS_EXPS">
68 <xsl:element name="VARIABLE">
69 <xsl:attribute name="NAME">Name</xsl:attribute>
70 <xsl:attribute name="VALUE">External Ports</xsl:attribute>
71 <xsl:attribute name="VIEWDISP">Name</xsl:attribute>
72 <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
75 <xsl:for-each select="PORT">
76 <xsl:sort select="@NAME" order="ascending"/>
78 <xsl:sort data-type="number" select="@MHS_INDEX" order="ascending"/>
81 <xsl:element name="SET">
82 <xsl:attribute name="ID"><xsl:value-of select="@NAME"/></xsl:attribute>
83 <xsl:attribute name="CLASS">PORT</xsl:attribute>
84 <xsl:attribute name="ROW_INDEX"><xsl:value-of select="(position() - 1)"/></xsl:attribute>
86 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{@SIGNAME}" IS_EDITABLE="TRUE"/>
87 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Name" NAME="NAME" VALUE="{@NAME}"/>
88 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Direction" NAME="DIR" VALUE="{@DIR}"/>
90 <xsl:if test="(@SIGIS)">
91 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Class" NAME="SIGIS" VALUE="{@SIGIS}"/>
93 <xsl:if test="not(@SIGIS)">
94 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Class" NAME="SIGIS" VALUE="NONE"/>
98 <xsl:when test="@LEFT and @RIGHT">
99 <xsl:variable name="vecformula_txt_">[<xsl:value-of select="@LEFT"/>:<xsl:value-of select="@RIGHT"/>]</xsl:variable>
100 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Range" NAME="VECFORMULA" VALUE="{$vecformula_txt_}"/>
102 <xsl:when test="@MSB and @LSB">
103 <xsl:variable name="vecformula_txt_">[<xsl:value-of select="@MSB"/>:<xsl:value-of select="@LSB"/>]</xsl:variable>
104 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Range" NAME="VECFORMULA" VALUE="{$vecformula_txt_}"/>
106 <xsl:when test="(not(@MSB) and not(@LSB) and not(@SIGIS = 'CLK') and not(@SIGIS = 'CLOCK') and not(@SIGIS = 'DCMCLK') and not(@SIGIS = 'RST') and not(@SIGIS = 'RESET'))">
107 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Range" NAME="VECFORMULA" VALUE=""/>
111 <xsl:if test="((@SIGIS = 'CLK') or (@SIGIS = 'CLOCK') or (@SIGIS = 'DCMCLK'))">
112 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Frequency(Hz)" NAME="CLKFREQUENCY" VALUE="{@CLKFREQUENCY}"/>
115 <xsl:if test="(@SIGIS = 'RST' or @SIGIS = 'RESET')">
116 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Reset Polarity" NAME="RSTPOLARITY" VALUE="{@RSTPOLARITY}"/>
119 <xsl:if test="(@SIGIS = 'INTERRUPT')">
120 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE="{@SENSITIVITY}"/>
123 </xsl:for-each> <!-- End of EXTERNAL PORTS loop -->
124 </xsl:for-each> <!-- End of EXTERNAL PORTS loop -->
125 </xsl:element> <!-- End of EXTERNAL PORTS SET -->
128 <xsl:template name="WRITE_VIEW_PORT_TREE_SET">
129 <xsl:param name="iModRef" select="'__NONE__'"/>
131 <xsl:variable name="m_inst_" select="$iModRef/@INSTANCE"/>
132 <xsl:variable name="m_class_" select="$iModRef/@MODCLASS"/>
133 <xsl:variable name="m_type_" select="$iModRef/@MODTYPE"/>
134 <xsl:variable name="m_type_lc_" select="translate($m_type_,&UPPER2LOWER;)"/>
135 <xsl:variable name="m_version_" select="$iModRef/@HWVERSION"/>
136 <xsl:variable name="m_licinfo_" select="$iModRef/LICENSEINFO"/>
137 <xsl:variable name="m_ports_" select="$iModRef/PORTS"/>
139 <xsl:variable name="is_axi_interconnect_">
141 <xsl:when test="$m_type_ = 'axi_interconnect'">TRUE</xsl:when>
142 <xsl:when test="$m_type_lc_ = 'axi_interconnect'">TRUE</xsl:when>
143 <xsl:otherwise>FALSE</xsl:otherwise>
147 <xsl:for-each select="$G_SYS_MODS"> <!-- To put things in the right scope for the keys below -->
149 <xsl:variable name="m_iofs_all_" select="key('G_MAP_ALL_IOFS', $m_inst_)"/>
150 <xsl:variable name="m_bifs_all_" select="key('G_MAP_ALL_BIFS', $m_inst_)"/>
152 <xsl:variable name="m_ports_def_" select="key('G_MAP_DEF_PORTS',$m_inst_)"/>
153 <xsl:variable name="m_ports_ndf_" select="key('G_MAP_NDF_PORTS',$m_inst_)"/>
155 <xsl:if test="$G_DEBUG = 'TRUE'">
156 <xsl:message><xsl:value-of select="$m_inst_"/> has <xsl:value-of select="count($m_bifs_all_)"/> valid bifs </xsl:message>
157 <xsl:message><xsl:value-of select="$m_inst_"/> has <xsl:value-of select="count($m_iofs_all_)"/> valid iofs </xsl:message>
158 <xsl:message><xsl:value-of select="$m_inst_"/> has <xsl:value-of select="count($m_ports_def_)"/> default ports </xsl:message>
159 <xsl:message><xsl:value-of select="$m_inst_"/> has <xsl:value-of select="count($m_ports_ndf_)"/> non default ports </xsl:message>
160 <xsl:message></xsl:message>
164 <SET ID="{$m_inst_}" CLASS="MODULE">
166 Can only modify INSTANCE name in Hierarchal view.
168 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Name" NAME="INSTANCE" VALUE="{$m_inst_}"/>
169 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type" NAME="MODTYPE" VALUE="{$m_type_}" VIEWICON="{$m_licinfo_/@ICON_NAME}"/>
170 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{$m_version_}"/>
174 (among others) special case of axi_interconnect_aclk which is a member of
175 a bus interface, but should be treated as a non interface port, (i.e. appear even
176 if the bus interfaces its a member of is invalid.
178 <xsl:if test="($is_axi_interconnect_ = 'TRUE')">
179 <!-- do it this way so we also catch the lower-upper case mismatches -->
180 <xsl:for-each select="key('G_MAP_ALL_PORTS',$m_inst_)[contains(@SIGIS,'CLK')]">
181 <xsl:variable name="uc_portName_" select="translate(@NAME,&LOWER2UPPER;)"/>
182 <xsl:if test="($uc_portName_= 'INTERCONNECT_ACLK')">
184 <xsl:message><xsl:value-of select="$m_inst_"/>.<xsl:value-of select="@NAME"/> = <xsl:value-of select="@SIGIS"/></xsl:message>
186 <xsl:variable name="portName_" select="@NAME"/>
187 <xsl:variable name="portDir_" select="@DIR"/>
188 <xsl:variable name="portSig_" select="@SIGNAME"/>
190 <xsl:variable name="portSigIs_">
192 <xsl:when test="not(@SIGIS)">__NONE__</xsl:when>
193 <xsl:otherwise><xsl:value-of select="@SIGIS"/></xsl:otherwise>
197 <xsl:variable name="portSensi_">
199 <xsl:when test="(@SENSITIVITY)"><xsl:value-of select="@SENSITIVIITY"/></xsl:when>
200 <xsl:otherwise>__NONE__</xsl:otherwise>
204 <xsl:variable name="portVecFormula_">
206 <xsl:when test="@VECFORMULA"><xsl:value-of select="@VECFORMULA"/></xsl:when>
207 <xsl:otherwise>__NONE__</xsl:otherwise>
211 <xsl:call-template name="WRITE_PORT_SET">
212 <xsl:with-param name="iName" select="$portName_"/>
213 <xsl:with-param name="iDir" select="$portDir_"/>
214 <xsl:with-param name="iSigName" select="$portSig_"/>
215 <xsl:with-param name="iSigIs" select="$portSigIs_"/>
216 <xsl:with-param name="iSensitivity" select="$portSensi_"/>
217 <xsl:with-param name="iVecFormula" select="$portVecFormula_"/>
223 <!-- PORTS not part of an INTERFACE -->
224 <xsl:for-each select="$m_ports_ndf_">
226 <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/>
227 <xsl:variable name="uc_portName_" select="translate(@NAME,&LOWER2UPPER;)"/>
230 <xsl:if test="((not(@BUS) and not(@IOS)) or (($is_axi_interconnect_ = 'TRUE') and ($uc_portName_= 'INTERCONNECT_ACLK')))">
235 <xsl:variable name="portName_" select="@NAME"/>
236 <xsl:variable name="portDir_" select="@DIR"/>
237 <xsl:variable name="portSig_" select="@SIGNAME"/>
239 <xsl:variable name="portSigIs_">
241 <xsl:when test="not(@SIGIS)">__NONE__</xsl:when>
242 <xsl:otherwise><xsl:value-of select="@SIGIS"/></xsl:otherwise>
246 <xsl:variable name="portSensi_">
248 <xsl:when test="(@SENSITIVITY)"><xsl:value-of select="@SENSITIVIITY"/></xsl:when>
249 <xsl:otherwise>__NONE__</xsl:otherwise>
253 <xsl:variable name="portVecFormula_">
255 <xsl:when test="@VECFORMULA"><xsl:value-of select="@VECFORMULA"/></xsl:when>
256 <xsl:otherwise>__NONE__</xsl:otherwise>
261 <xsl:call-template name="WRITE_PORT_SET">
262 <xsl:with-param name="iName" select="$portName_"/>
263 <xsl:with-param name="iDir" select="$portDir_"/>
264 <xsl:with-param name="iSigName" select="$portSig_"/>
265 <xsl:with-param name="iSigIs" select="$portSigIs_"/>
266 <xsl:with-param name="iSensitivity" select="$portSensi_"/>
267 <xsl:with-param name="iVecFormula" select="$portVecFormula_"/>
269 </xsl:for-each> <!-- END of PORTS NOT OF INTERFACE -->
271 <!-- PORTS part of a BUSINTERFACE -->
272 <xsl:if test="$SHOW_BUSIF = 'TRUE'">
273 <xsl:for-each select="$m_bifs_all_">
274 <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/>
276 <xsl:variable name="bifName_" select="@NAME"/>
277 <xsl:variable name="bifRef_" select="self::node()"/>
278 <xsl:variable name="portmapsRef_" select="$bifRef_/PORTMAPS"/>
281 <xsl:variable name="bpmsCnt_" select="count($bpmsRef_/PORTMAP)"/>
282 <xsl:message><xsl:value-of select="$instName_"/>.<xsl:value-of select="$bifName_"/>.<xsl:value-of select="$bpmsCnt_"/></xsl:message>
285 <xsl:variable name="is_external_">
286 <xsl:call-template name="F_IS_Interface_External">
287 <xsl:with-param name="iInstRef" select="$iModRef"/>
288 <xsl:with-param name="iIntfRef" select="$bifRef_"/>
292 <xsl:variable name="bif_connection_">
294 <xsl:when test="not(@BUSNAME = '__NOC__')">Connected to BUS <xsl:value-of select="@BUSNAME"/></xsl:when>
295 <xsl:when test="($is_external_ = 'TRUE')">Connected to External Ports</xsl:when>
296 <xsl:otherwise>Not connected to BUS or External Ports</xsl:otherwise>
300 <!-- <SET ID="{@NAME}" CLASS="BUSINTERFACE.PORTS"/> -->
301 <xsl:element name="SET">
303 <xsl:attribute name="ID"><xsl:value-of select="@NAME"/></xsl:attribute>
304 <xsl:attribute name="CLASS">BUSINTERFACE.PORTS</xsl:attribute>
306 <xsl:if test="$is_external_ = 'TRUE'">
307 <xsl:attribute name="IS_EXTERNAL">TRUE</xsl:attribute>
310 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="NAME" NAME="NAME" VALUE="(BUS_IF) {@NAME}"/>
311 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="BUSINTERFACE.CONNECTION" VALUE="{$bif_connection_}"/>
313 <xsl:for-each select="$portmapsRef_/PORTMAP">
315 <xsl:variable name="portDir_" select="@DIR"/>
316 <xsl:variable name="portName_" select="@PHYSICAL"/>
318 <xsl:if test="$m_ports_def_[(@NAME = $portName_)]"><!-- Only in map if port is valid -->
321 <xsl:if test="(not($portRef_/@IS_VALID) or ($portRef_/@IS_VALID = 'TRUE'))"/>
322 <xsl:sort select="@MPD_INDEX" order="ascending"/>
323 <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/>
325 <xsl:variable name="portRef_" select="$m_ports_def_[(@NAME = $portName_)]"/>
326 <xsl:variable name="portSig_" select="$portRef_/@SIGNAME"/>
328 <xsl:variable name="portSigIs_">
330 <xsl:when test="not($portRef_/@SIGIS)">__NONE__</xsl:when>
331 <xsl:otherwise><xsl:value-of select="$portRef_/@SIGIS"/></xsl:otherwise>
335 <xsl:variable name="portSensi_">
337 <xsl:when test="($portRef_/@SENSITIVITY)"><xsl:value-of select="$portRef_/@SENSITIVITY"/></xsl:when>
338 <xsl:otherwise>__NONE__</xsl:otherwise>
342 <xsl:variable name="portVecFormula_">
344 <xsl:when test="$portRef_/@VECFORMULA"><xsl:value-of select="$portRef_/@VECFORMULA"/></xsl:when>
345 <xsl:otherwise>__NONE__</xsl:otherwise>
349 <xsl:call-template name="WRITE_PORT_SET">
350 <xsl:with-param name="iName" select="$portName_"/>
351 <xsl:with-param name="iDir" select="$portDir_"/>
352 <xsl:with-param name="iSigName" select="$portSig_"/>
353 <xsl:with-param name="iSigIs" select="$portSigIs_"/>
354 <xsl:with-param name="iSensitivity" select="$portSensi_"/>
355 <xsl:with-param name="iVecFormula" select="$portVecFormula_"/>
358 </xsl:for-each> <!-- END BIF PORTMAPS LOOP -->
360 </xsl:for-each> <!-- END BIFS LOOP -->
361 </xsl:if> <!-- END IF SHOW_BUSIFS -->
364 <!-- PORTS part of a IOINTERFACE -->
365 <xsl:if test="$SHOW_IOIF = 'TRUE'">
367 <xsl:for-each select="$m_iofs_all_[PORTMAPS/PORTMAP]">
368 <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/>
370 <xsl:variable name="iifName_" select="@NAME"/>
371 <xsl:variable name="iifRef_" select="self::node()"/>
372 <xsl:variable name="portmapsRef_" select="$iifRef_/PORTMAPS"/>
374 <xsl:variable name="is_external_">
375 <xsl:call-template name="F_IS_Interface_External">
376 <xsl:with-param name="iInstRef" select="$iModRef"/>
377 <xsl:with-param name="iIntfRef" select="$iifRef_"/>
381 <xsl:variable name="iif_connection_">
383 <xsl:when test="($is_external_ ='TRUE')">Connected to External Ports</xsl:when>
384 <xsl:otherwise>Not connected to External Ports</xsl:otherwise>
388 <xsl:element name="SET">
390 <xsl:attribute name="ID"><xsl:value-of select="@NAME"/></xsl:attribute>
391 <xsl:attribute name="CLASS">IOINTERFACE.PORTS</xsl:attribute>
393 <xsl:if test="$is_external_ = 'TRUE'">
394 <xsl:attribute name="IS_EXTERNAL">TRUE</xsl:attribute>
397 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="NAME" NAME="NAME" VALUE="(IO_IF) {@NAME}"/>
398 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="IOINTERFACE.CONNECTION" VALUE="{$iif_connection_}"/>
400 <xsl:for-each select="$portmapsRef_/PORTMAP">
402 <xsl:variable name="portName_" select="@PHYSICAL"/>
403 <xsl:variable name="portDir_" select="@DIR"/>
406 <xsl:variable name="port_is_valid_">
408 <xsl:when test="$portRef_/@IS_VALID = 'FALSE'">FALSE</xsl:when>
409 <xsl:otherwise>TRUE</xsl:otherwise>
412 <xsl:message><xsl:value-of select="$portName_"/> : <xsl:value-of select="$port_is_valid_"/> : <xsl:value-of select="$portRef_/@IS_VALID"/></xsl:message>
415 <xsl:if test="$m_ports_def_[(@NAME = $portName_)]"> <!-- Only in map if port is valid -->
417 <xsl:message><xsl:value-of select="$portName_"/> </xsl:message>
420 <xsl:variable name="portRef_" select="$m_ports_def_[(@NAME = $portName_)]"/>
421 <xsl:variable name="portSig_" select="$portRef_/@SIGNAME"/>
423 <xsl:variable name="portSigIs_">
425 <xsl:when test="not($portRef_/@SIGIS)">__NONE__</xsl:when>
426 <xsl:otherwise><xsl:value-of select="$portRef_/@SIGIS"/></xsl:otherwise>
430 <xsl:variable name="portSensi_">
432 <xsl:when test="($portRef_/@SENSITIVITY)"><xsl:value-of select="$portRef_/@SENSITIVITY"/></xsl:when>
433 <xsl:otherwise>__NONE__</xsl:otherwise>
437 <xsl:variable name="portVecFormula_">
439 <xsl:when test="$portRef_/@VECFORMULA"><xsl:value-of select="$portRef_/@VECFORMULA"/></xsl:when>
440 <xsl:otherwise>__NONE__</xsl:otherwise>
444 <xsl:call-template name="WRITE_PORT_SET">
445 <xsl:with-param name="iName" select="$portName_"/>
446 <xsl:with-param name="iDir" select="$portDir_"/>
447 <xsl:with-param name="iSigName" select="$portSig_"/>
448 <xsl:with-param name="iSigIs" select="$portSigIs_"/>
449 <xsl:with-param name="iSensitivity" select="$portSensi_"/>
450 <xsl:with-param name="iVecFormula" select="$portVecFormula_"/>
452 </xsl:if> <!-- End of port is valid check -->
453 </xsl:for-each> <!-- END IO INTERFACE PORTMAPS LOOP -->
455 </xsl:for-each> <!-- END IIFS LOOP -->
456 </xsl:if> <!-- END IF SHOW_IOIFS -->
459 </xsl:for-each> <!-- End of the scoping for key functions-->
462 <xsl:template name="WRITE_VIEW_PORT_FLAT">
464 <xsl:if test="$G_DEBUG='TRUE'">
465 <xsl:message>WRITING PORT MODE <xsl:value-of select="@MODE"/></xsl:message>
468 <xsl:variable name="num_of_ext_ports_" select="count($G_SYS_EXPS/PORT)"/>
469 <xsl:if test="$num_of_ext_ports_ > 0">
470 <xsl:call-template name="WRITE_VIEW_EXTP_FLAT_SET"/>
474 <xsl:for-each select="$G_SYS_MODS/MODULE">
475 <xsl:sort data-type="number" select="@ROW_INDEX" order="ascending"/>
476 <xsl:variable name="instName_" select="@INSTANCE"/>
477 <xsl:variable name="moduleRef_" select="self::node()"/>
479 <xsl:call-template name="WRITE_VIEW_PORT_FLAT_SET">
480 <xsl:with-param name="iModRef" select="$moduleRef_"/>
483 </xsl:for-each> <!-- End of Modules Loop -->
486 <xsl:template name="WRITE_VIEW_EXTP_FLAT_SET">
488 <xsl:for-each select="$G_SYS_EXPS">
489 <xsl:for-each select="PORT[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]">
490 <xsl:sort data-type="number" select="@MHS_INDEX" order="ascending"/>
491 <xsl:variable name="ext_is_interrupt_">
492 <xsl:if test="@SIGIS = 'INTERRUPT'">TRUE</xsl:if>
493 <xsl:if test="not(@SIGIS = 'INTERRUPT')">FALSE</xsl:if>
496 <SET ID="{@NAME}" CLASS="PORT">
498 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance" NAME="INSTANCE" VALUE="External Ports"/>
499 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Port Name" NAME="NAME" VALUE="{@NAME}"/>
502 <xsl:when test="@LEFT and @RIGHT">
503 <xsl:variable name="vecformula_txt_">[<xsl:value-of select="@LEFT"/>:<xsl:value-of select="@RIGHT"/>]</xsl:variable>
504 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Range" NAME="VECFORMULA" VALUE="{$vecformula_txt_}"/>
506 <xsl:when test="@MSB and @LSB">
507 <xsl:variable name="vecformula_txt_">[<xsl:value-of select="@MSB"/>:<xsl:value-of select="@LSB"/>]</xsl:variable>
508 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Range" NAME="VECFORMULA" VALUE="{$vecformula_txt_}"/>
510 <xsl:when test="(not(@MSB) and not(@LSB) and not(@SIGIS = 'CLK') and not(@SIGIS = 'CLOCK') and not(@SIGIS = 'DCMCLK') and not(@SIGIS = 'RST') and not(@SIGIS = 'RESET'))">
511 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Range" NAME="VECFORMULA" VALUE=""/>
515 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{@SIGNAME}" IS_EDITABLE="TRUE"/>
516 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Direction" NAME="DIR" VALUE="{@DIR}"/>
518 <xsl:if test="(@SIGIS)">
519 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Class" NAME="SIGIS" VALUE="{@SIGIS}"/>
521 <xsl:if test="not(@SIGIS)">
522 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Class" NAME="SIGIS" VALUE="NONE"/>
525 <xsl:if test="(@SIGIS = 'RST' or @SIGIS = 'RESET')">
526 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Reset Polarity" NAME="RSTPOLARITY" VALUE="{@RSTPOLARITY}"/>
528 <xsl:if test="((@SIGIS = 'CLK') or (@SIGIS = 'CLOCK') or (@SIGIS = 'DCMCLK'))">
529 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Frequency(Hz)" NAME="CLKFREQUENCY" VALUE="{@CLKFREQUENCY}"/>
532 <!-- SENSITIVITY Settings on Interrupt ports -->
534 <xsl:when test="((@SIGNAME = '__NOC__') and ($ext_is_interrupt_ = 'TRUE') and not(@SENSITIVITY))">
535 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE=""/>
537 <xsl:when test="((@SIGNAME = '__NOC__') and ($ext_is_interrupt_ = 'TRUE') and (@SENSITIVITY))">
538 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE="{@SENSITIVITY}"/>
541 <xsl:when test="((@SIGNAME = '__DEF__') and ($ext_is_interrupt_ = 'TRUE') and not(@SENSITIVITY))">
542 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE=""/>
544 <xsl:when test="((@SIGNAME = '__DEF__') and ($ext_is_interrupt_ = 'TRUE') and (@SENSITIVITY))">
545 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE="{@SENSITIVITY}"/>
548 <xsl:when test="(not(@SIGNAME = '__DEF__') and not(@SIGNAME = '__NOC__') and ($ext_is_interrupt_ = 'TRUE') and not(@SENSITIVITY))">
549 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE=""/>
552 <xsl:when test="(not(@SIGNAME = '__DEF__') and not(@SIGNAME = '__NOC__') and ($ext_is_interrupt_ = 'TRUE') and (@SENSITIVITY))">
553 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE="{@SENSITIVITY}"/>
561 <xsl:template name="WRITE_VIEW_PORT_FLAT_SET">
563 <xsl:param name="iModRef" select="'__NONE__'"/>
565 <xsl:variable name="m_inst_" select="$iModRef/@INSTANCE"/>
566 <xsl:variable name="m_class_" select="$iModRef/@MODCLASS"/>
567 <xsl:variable name="m_type_" select="$iModRef/@MODTYPE"/>
568 <xsl:variable name="m_type_lc_" select="translate($m_type_,&UPPER2LOWER;)"/>
569 <xsl:variable name="m_version_" select="$iModRef/@HWVERSION"/>
570 <xsl:variable name="m_licinfo_" select="$iModRef/LICENSEINFO"/>
572 <xsl:variable name="is_axi_interconnect_">
574 <xsl:when test="$m_type_ = 'axi_interconnect'">TRUE</xsl:when>
575 <xsl:when test="$m_type_lc_ = 'axi_interconnect'">TRUE</xsl:when>
576 <xsl:otherwise>FALSE</xsl:otherwise>
580 <xsl:for-each select="$G_SYS_MODS"> <!-- To put things in the right scope for the keys below -->
582 <xsl:variable name="m_bifs_all_" select="key('G_MAP_ALL_BIFS', $m_inst_)"/>
583 <xsl:variable name="m_ports_all_" select="key('G_MAP_ALL_PORTS',$m_inst_)"/>
585 <xsl:if test="$G_DEBUG = 'TRUE'">
586 <xsl:message><xsl:value-of select="$m_inst_"/> has <xsl:value-of select="count($m_ports_all_)"/> valid ports </xsl:message>
589 <xsl:for-each select="$m_ports_all_">
590 <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/>
591 <!-- <xsl:message>PORTNM : <xsl:value-of select="@NAME"/></xsl:message> -->
593 <xsl:variable name="p_nm_uc_" select="translate(@NAME,&LOWER2UPPER;)"/>
594 <xsl:variable name="p_bif_" select="@BUS"/>
596 <xsl:variable name="port_is_valid_">
598 <xsl:when test="@IS_VALID = 'FALSE'">FALSE</xsl:when>
599 <xsl:when test="(($is_axi_interconnect_ = 'TRUE') and ($p_nm_uc_= 'INTERCONNECT_ACLK'))">TRUE</xsl:when>
600 <xsl:when test="not(@BUS) or (@BUS and key('G_MAP_ALL_BIFS', $m_inst_)[(@NAME = $p_bif_)])">TRUE</xsl:when>
601 <xsl:otherwise>FALSE</xsl:otherwise>
605 <xsl:if test="$port_is_valid_ = 'TRUE'">
607 <xsl:message>PORT <xsl:value-of select="@BUS"/>.<xsl:value-of select="@NAME"/></xsl:message>
609 <SET ID="{@NAME}" CLASS="PORT">
612 Can only modify INSTANCE name in Hierarchal view.
614 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance" NAME="INSTANCE" VALUE="{$m_inst_}"/>
615 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type" NAME="MODTYPE" VALUE="{$m_type_}" VIEWICON="{$m_licinfo_/@ICON_NAME}"/>
616 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{$m_version_}"/>
618 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Port Name" NAME="NAME" VALUE="{@NAME}"/>
619 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Direction" NAME="DIR" VALUE="{@DIR}"/>
621 <xsl:if test="@SIGIS">
622 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Class" NAME="SIGIS" VALUE="{@SIGIS}"/>
625 <xsl:if test="@VECFORMULA">
626 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Range" NAME="VECFORMULA" VALUE="{@VECFORMULA}"/>
629 <xsl:if test="@SENSITIVITY">
630 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE="{@SENSITIVITY}"/>
633 <xsl:variable name="is_interrupt">
634 <xsl:if test="@SIGIS = 'INTERRUPT'">TRUE</xsl:if>
635 <xsl:if test="not(@SIGIS = 'INTERRUPT')">FALSE</xsl:if>
638 <xsl:variable name="is_input">
640 <xsl:when test="(@DIR= 'I')">TRUE</xsl:when>
641 <xsl:when test="(@DIR= 'IN')">TRUE</xsl:when>
642 <xsl:when test="(@DIR= 'INPUT')">TRUE</xsl:when>
643 <xsl:otherwise>FALSE</xsl:otherwise>
647 <!-- VECFORMULA Settings if Interrupt settings -->
650 <xsl:when test="((@SIGNAME = '__NOC__') and ($is_interrupt = 'TRUE') and ($is_input = 'TRUE') and not(@VECFORMULA))">
651 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="No Connection" IS_INTERRUPT="{$is_interrupt}"/>
654 <xsl:when test="((@SIGNAME = '__NOC__') and ($is_interrupt = 'TRUE') and ($is_input = 'TRUE') and (@VECFORMULA))">
655 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="No Connection" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/>
658 <xsl:when test="@SIGNAME = '__NOC__'">
659 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="No Connection" IS_EDITABLE="TRUE"/>
662 <xsl:when test="((@SIGNAME = '__DEF__') and ($is_interrupt = 'TRUE') and ($is_input = 'TRUE') and not(@VECFORMULA))">
663 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="Default Connection" IS_INTERRUPT="{$is_interrupt}"/>
665 <xsl:when test="((@SIGNAME = '__DEF__') and ($is_interrupt = 'TRUE') and ($is_input = 'TRUE') and (@VECFORMULA))">
666 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="Default Connection" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/>
668 <xsl:when test="@SIGNAME = '__DEF__'">
669 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="Default Connection"/>
672 <xsl:when test="(not(@SIGNAME = '__DEF__') and not(@SIGNAME = '__NOC__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE') and (@VECFORMULA))">
673 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{@SIGNAME}" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/>
675 <xsl:when test="(not(@SIGNAME = '__DEF__') and not(@SIGNAME = '__NOC__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE'))">
676 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{@SIGNAME}" IS_INTERRUPT="{$is_interrupt}"/>
680 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{@SIGNAME}" IS_EDITABLE="TRUE"/>
684 </xsl:if> <!-- End of port validity check -->
685 </xsl:for-each> <!-- End of Ports Loop -->
689 <xsl:template name="WRITE_PORT_SET">
691 <xsl:param name="iName" select="'__NONE__'"/>
692 <xsl:param name="iDir" select="'__NONE__'"/>
693 <xsl:param name="iSigName" select="'__NONE__'"/>
694 <xsl:param name="iSigIs" select="'__NONE__'"/>
695 <xsl:param name="iVecFormula" select="'__NONE__'"/>
696 <xsl:param name="iSensitivity" select="'__NONE__'"/>
698 <SET ID="{$iName}" CLASS="PORT">
700 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="NAME" NAME="NAME" VALUE="{$iName}"/>
702 <xsl:variable name="is_interrupt">
703 <xsl:if test="$iSigIs = 'INTERRUPT'">TRUE</xsl:if>
704 <xsl:if test="not($iSigIs = 'INTERRUPT')">FALSE</xsl:if>
707 <xsl:variable name="is_input">
709 <xsl:when test="($iDir = 'I')">TRUE</xsl:when>
710 <xsl:when test="($iDir = 'IN')">TRUE</xsl:when>
711 <xsl:when test="($iDir = 'INPUT')">TRUE</xsl:when>
712 <xsl:otherwise>FALSE</xsl:otherwise>
718 <xsl:when test="(($iSigName = '__NOC__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE') and ($iVecFormula = '__NONE__'))">
719 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="No Connection" IS_INTERRUPT="{$is_interrupt}"/>
721 <xsl:when test="(($iSigName = '__NOC__') and ($is_input ='TRUE') and ($is_interrupt = 'TRUE') and not($iVecFormula = '__NONE__'))">
722 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="No Connection" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/>
724 <xsl:when test="$iSigName = '__NOC__'">
725 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="No Connection" IS_EDITABLE="TRUE"/>
728 <xsl:when test="(($iSigName = '__DEF__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE') and ($iVecFormula = '__NONE__'))">
729 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="Default Connection" IS_INTERRUPT="{$is_interrupt}"/>
731 <xsl:when test="(($iSigName = '__DEF__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE') and not($iVecFormula = '__NONE__'))">
732 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="Default Connection" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/>
735 <xsl:when test="($iSigName = '__DEF__')">
736 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="Default Connection"/>
739 <xsl:when test="(not($iSigName = '__DEF__') and not($iSigName = '__NOC__') and ($is_input ='TRUE') and ($is_interrupt = 'TRUE') and not($iVecFormula = '__NONE__'))">
740 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{$iSigName}" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/>
743 <xsl:when test="(not($iSigName = '__DEF__') and not($iSigName = '__NOC__') and ($is_input ='TRUE') and ($is_interrupt = 'TRUE'))">
744 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{$iSigName}" IS_INTERRUPT="{$is_interrupt}"/>
748 <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{$iSigName}" IS_EDITABLE="TRUE"/>
752 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Direction" NAME="DIR" VALUE="{$iDir}"/>
754 <xsl:if test="not($iSigIs = '__NONE__')">
755 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Class" NAME="SIGIS" VALUE="{$iSigIs}"/>
758 <xsl:if test="not($iVecFormula = '__NONE__')">
759 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Range" NAME="VECFORMULA" VALUE="{$iVecFormula}"/>
762 <xsl:if test="not($iSensitivity = '__NONE__')">
763 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE="{$iSensitivity}"/>