?? mdtsvgblkd_peripherals.xsl
字號:
<xsl:for-each select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iIPName)]/BUSINTERFACE[not(@BUSNAME = '__NOC__')]"> <xsl:variable name="bif_busstd_"> <xsl:choose> <xsl:when test="@BUSSTD"> <xsl:value-of select="@BUSSTD"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="'TRS'"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="bif_name_"> <xsl:choose> <xsl:when test="string-length(@NAME) <= 5"> <xsl:value-of select="@NAME"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="substring(@NAME,0,5)"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="bif_x_" select="ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_BIF_W div 2)"/> <!-- Draw the BIF --> <use x="{$bif_x_}" y="{$bif_y_}" xlink:href="#{$bif_busstd_}_Bif"/> <!-- <symbol id="{$bus_type}_busconn_SLAVE"> --> <!-- Draw the BIF connection --> <use x="{$bif_x_ + ceiling($BLKD_BIF_W div 2) - ceiling($BLKD_BIFC_W div 2)}" y="{$bif_y_ - $BLKD_BIFC_H - $BLKD_MOD_LANE_H}" xlink:href="#{$bif_busstd_}_busconn_{@BIFRANK}"/> <text class="biflabel" x="{$bif_x_ + ceiling($BLKD_BIF_W div 2)}" y="{$bif_y_ + ceiling($BLKD_BIF_H div 2) + 3}"> <xsl:value-of select="$bif_name_"/> </text> </xsl:for-each> <xsl:if test="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE=$iIPName)]/@INTCINDEX"> <xsl:variable name="intr_col_"> <xsl:call-template name="intcIdx2Color"> <xsl:with-param name="iIntcIdx" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE=$iIPName)]/@INTCINDEX"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="_draw_InterruptCntrl"> <xsl:with-param name="iIntr_X" select="($BLKD_MOD_W - ceiling($BLKD_INTR_W div 2))"/> <xsl:with-param name="iIntr_Y" select="3 + $BLKD_BIFC_H"/> <xsl:with-param name="iIntr_COL" select="$intr_col_"/> <xsl:with-param name="iIntr_IDX" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE=$iIPName)]/@INTCINDEX"/> </xsl:call-template> </xsl:if> <xsl:for-each select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE=$iIPName)]/INTCCNTLRTRGS/INTCTRG"> <xsl:variable name="intr_col_"> <xsl:call-template name="intcIdx2Color"> <xsl:with-param name="iIntcIdx" select="@INTCINDEX"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="_draw_InterruptSource"> <xsl:with-param name="iIntr_X" select="($BLKD_MOD_W - $BLKD_INTR_W)"/> <xsl:with-param name="iIntr_Y" select="((position() - 1) * (ceiling($BLKD_INTR_H div 2) + 3)) + $BLKD_BIFC_H"/> <xsl:with-param name="iIntr_COL" select="$intr_col_"/> <xsl:with-param name="iIntr_PRI" select="@PRIORITY"/> <xsl:with-param name="iIntr_IDX" select="@INTCINDEX"/> </xsl:call-template> </xsl:for-each> </symbol> </xsl:template> <xsl:template name="Define_IPBucketModule"> <xsl:param name="iIPType" select="'_ip_type_'"/> <xsl:param name="iIPName" select="'_ip_name_'"/> <xsl:variable name="bif_y_"> <xsl:value-of select="$BLKD_MOD_LANE_H"/> </xsl:variable> <xsl:variable name="label_y_"> <xsl:value-of select="(ceiling($BLKD_MOD_H div 2) - ceiling($BLKD_MOD_LABEL_H div 2))"/> </xsl:variable> <symbol id="ipbktmodule_{$iIPName}"> <rect x="0" y="0" rx="6" ry="6" width = "{$BLKD_MOD_W}" height= "{$BLKD_MOD_H}" style="fill:{$COL_BG}; stroke:{$COL_BLACK}; stroke-width:2"/> <rect x="{ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_MOD_LABEL_W div 2)}" y="{$label_y_}" rx="3" ry="3" width= "{$BLKD_MOD_LABEL_W}" height="{$BLKD_MOD_LABEL_H}" style="fill:{$COL_WHITE}; stroke:none;"/> <!-- y="{$label_y_ + ceiling($BLKD_MOD_LABEL_H div 2) - 4}" y="{$label_y_ + ceiling($BLKD_MOD_LABEL_H div 2) + 4}"--> <text class="bciptype" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + 8}"> <xsl:value-of select="$iIPType"/> </text> <text class="bciplabel" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + 16}"> <xsl:value-of select="$iIPName"/> </text> <xsl:if test="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iIPName)]/@GROUP"> <rect x="{ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_MOD_LABEL_W div 2)}" y="{$label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) - 2}" rx="3" ry="3" width= "{$BLKD_MOD_LABEL_W}" height="{$BLKD_BIF_H}" style="fill:{$COL_IORING_LT}; stroke:none;"/> <text class="ioplblgrp" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) + 12}"> <xsl:value-of select="/EDKSYSTEM/MODULES/MODULE[@INSTANCE=$iIPName]/@GROUP"/> </text> </xsl:if> <xsl:for-each select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE=$iIPName)]/INTCCNTLRTRGS/INTCTRG"> <xsl:variable name="intr_col_"> <xsl:call-template name="intcIdx2Color"> <xsl:with-param name="iIntcIdx" select="@INTCINDEX"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="_draw_InterruptSource"> <xsl:with-param name="iIntr_X" select="($BLKD_MOD_W - $BLKD_INTR_W)"/> <xsl:with-param name="iIntr_Y" select="((position() - 1) * (ceiling($BLKD_INTR_H div 2) + 3))"/> <xsl:with-param name="iIntr_COL" select="$intr_col_"/> <xsl:with-param name="iIntr_PRI" select="@PRIORITY"/> <xsl:with-param name="iIntr_IDX" select="@INTCINDEX"/> </xsl:call-template> </xsl:for-each> </symbol> </xsl:template> <xsl:template name="Define_Peripheral"> <!-- when the module is oriented normal its label goes above the bifs when the module is oriented rot180, (part of a processor memory controller for example) its label goes below the bifs --> <xsl:param name="iModVori" select="'normal'"/> <xsl:param name="iModInst" select="'_instance_'"/> <xsl:param name="iModType" select="'_modtype_'"/> <xsl:param name="iUnkInst" select="'_unknown_'"/> <xsl:param name="iHorizIdx" select="'_unknown_'"/> <xsl:param name="iVertiIdx" select="'_unknown_'"/> <!-- <xsl:message>Stack Y <xsl:value-of select="$cstkMods_Y"/></xsl:message> <xsl:message>Stack Index Y <xsl:value-of select="$cstkIndex"/></xsl:message>--> <xsl:variable name="modName_"> <xsl:choose> <xsl:when test="$iUnkInst = '_unknown_'"> <xsl:value-of select="$iModInst"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$iUnkInst"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="modSymbolName_"> <xsl:choose> <xsl:when test="(not($iHorizIdx = '_unknown_') and not($iVertiIdx = '_unknown_'))"> <xsl:call-template name="_gen_Stack_SymbolName"> <xsl:with-param name="iHorizIdx" select="$iHorizIdx"/> <xsl:with-param name="iVertiIdx" select="$iVertiIdx"/> </xsl:call-template> </xsl:when> <xsl:otherwise>symbol_<xsl:value-of select="$modName_"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="modTypeName_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iModInst)]/@MODTYPE"/> <!-- <xsl:message>The symbol type of the module is <xsl:value-of select="$modTypeName_"/></xsl:message> <xsl:message>The symbol name of the module is <xsl:value-of select="$modSymbolName_"/></xsl:message>--> <xsl:variable name="bifs_h_"> <xsl:if test="not(/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE/MODULE[(@INSTANCE = $iModInst)]/@BIFS_H) and not(/EDKSYSTEM/BLKDSHAPES/BRIDGESHAPES/MODULE[(@INSTANCE = $iModInst)]/@BIFS_H)">0</xsl:if> <xsl:if test="(/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE/MODULE[(@INSTANCE = $iModInst)]/@BIFS_H)"> <xsl:value-of select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE/MODULE[(@INSTANCE = $iModInst)]/@BIFS_H"/> </xsl:if> <xsl:if test="(/EDKSYSTEM/BLKDSHAPES/BRIDGESHAPES/MODULE[(@INSTANCE = $iModInst)]/@BIFS_H)"> <xsl:value-of select="/EDKSYSTEM/BLKDSHAPES/BRIDGESHAPES/MODULE[(@INSTANCE = $iModInst)]/@BIFS_H"/> </xsl:if> </xsl:variable> <xsl:variable name="label_y_"> <xsl:choose> <xsl:when test="$iModVori = 'rot180'"> <xsl:value-of select="($BLKD_MOD_LANE_H + (($BLKD_BIF_H + $BLKD_BIF_GAP_V) * $bifs_h_))"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$BLKD_MOD_LANE_H"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="bif_dy_"> <xsl:choose> <xsl:when test="$iModVori = 'rot180'"> <xsl:value-of select="$BLKD_MOD_LANE_H"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_BIF_GAP_V)"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="peri_stroke_col_"> <xsl:choose> <xsl:when test="((@MODCLASS = 'MASTER_SLAVE') or (@MODCLASS = 'MONITOR')) and BUSCONNS/BUSCONN"> <xsl:call-template name="BusType2Color"> <xsl:with-param name="iBusType" select="BUSCONNS/BUSCONN/@BUSSTD"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$COL_WHITE"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="modHeight_"> <xsl:call-template name="_calc_PeriShape_Height"> <xsl:with-param name="iShapeInst" select="$modName_"/> </xsl:call-template> </xsl:variable> <symbol id="{$modSymbolName_}"> <xsl:if test="$modTypeName_ = 'mpmc'"> <rect x="0" y="0" rx="6" ry="6" width = "{$BLKD_MOD_W}" height= "{$modHeight_}" style="fill:{$COL_MPMC_BG}; stroke:{$peri_stroke_col_}; stroke-width:2"/> </xsl:if> <xsl:if test="not($modTypeName_ = 'mpmc')"> <rect x="0" y="0" rx="6" ry="6" width = "{$BLKD_MOD_W}" height= "{$modHeight_}" style="fill:{$COL_BG}; stroke:{$peri_stroke_col_}; stroke-width:2"/> </xsl:if> <rect x="{ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_MOD_LABEL_W div 2)}" y="{$label_y_}" rx="3" ry="3" width= "{$BLKD_MOD_LABEL_W}" height="{$BLKD_MOD_LABEL_H}" style="fill:{$COL_WHITE}; stroke:none;"/> <!-- y="{$label_y_ + ceiling($BLKD_MOD_LABEL_H div 2) - 4}"> y="{$label_y_ + ceiling($BLKD_MOD_LABEL_H div 2) + 4}">--> <text class="bciptype" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + 8}"> <xsl:value-of select="$iModType"/> </text> <text class="bciplabel" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + 16}"> <xsl:value-of select="$iModInst"/> </text> <xsl:if test="/EDKSYSTEM/MODULES/MODULE[@INSTANCE=$iModInst]/@GROUP"> <rect x="{ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_MOD_LABEL_W div 2)}" y="{$label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) - 2}" rx="3" ry="3" width= "{$BLKD_MOD_LABEL_W}" height="{$BLKD_BIF_H}" style="fill:{$COL_IORING_LT}; stroke:none;"/> <text class="ioplblgrp" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) + 12}"> <xsl:value-of select="/EDKSYSTEM/MODULES/MODULE[@INSTANCE=$iModInst]/@GROUP"/> </text> </xsl:if> <xsl:for-each select="/EDKSYSTEM/MODULES/MODULE[@INSTANCE=$iModInst]/BUSINTERFACE[(@BIF_X and @BIF_Y and not(@BUSNAME = '__NOC__'))]"> <xsl:variable name="bif_busstd_"> <xsl:choose> <xsl:when test="@BUSSTD"> <xsl:value-of select="@BUSSTD"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="'TRS'"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="bif_y_"> <xsl:value-of select="(($BLKD_BIF_H + $BLKD_BIF_GAP_V) * @BIF_Y)"/> </xsl:variable> <xsl:variable name="bif_buscol_"> <xsl:call-template name="BusType2Color"> <xsl:with-param name="iBusType" select="$bif_busstd_"/> </xsl:call-template> </xsl:variable> <xsl:variable name="bif_name_"> <xsl:choose> <xsl:when test="not(@NAME)">'UNK'</xsl:when> <xsl:when test="string-length(@NAME) <= 5"> <xsl:value-of select="@NAME"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="substring(@NAME,0,5)"/> </xsl:otherwise> </xsl:choose>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -