?? mdtsvgblkd_peripherals.xsl
字號:
</xsl:variable> <xsl:variable name="bif_x_" > <xsl:if test="not(@ORIENTED='CENTER')"> <xsl:value-of select="(($BLKD_BIF_W * @BIF_X) + ($BLKD_BIF_GAP_H * @BIF_X) + ($BLKD_MOD_LANE_W * 1))"/> </xsl:if> <xsl:if test="(@ORIENTED='CENTER')"> <xsl:value-of select="ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_BIF_W div 2)"/> </xsl:if> </xsl:variable> <xsl:if test="not(@IS_INTCONN)"> <xsl:variable name="horz_line_y_" select="($bif_y_ + $bif_dy_ + ceiling($BLKD_BIFC_H div 2))"/> <xsl:variable name="horz_line_x1_"> <xsl:choose> <xsl:when test="@BIF_X = '0'">0</xsl:when> <xsl:otherwise><xsl:value-of select="($BLKD_MOD_W - $BLKD_MOD_LANE_W)"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="horz_line_x2_"> <xsl:choose> <xsl:when test="@BIF_X = '0'"><xsl:value-of select="$BLKD_MOD_LANE_W"/></xsl:when> <xsl:otherwise><xsl:value-of select="$BLKD_MOD_W + 1"/></xsl:otherwise> </xsl:choose> </xsl:variable> <line x1="{$horz_line_x1_}" y1="{$horz_line_y_ - 2}" x2="{$horz_line_x2_}" y2="{$horz_line_y_ - 2}" style="stroke:{$bif_buscol_};stroke-width:1"/> </xsl:if> <use x="{$bif_x_}" y="{$bif_y_ + $bif_dy_}" xlink:href="#{$bif_busstd_}_Bif"/> <text class="biflabel" x="{$bif_x_ + ceiling($BLKD_BIF_W div 2)}" y="{$bif_y_ + $bif_dy_ + ceiling($BLKD_BIF_H div 2) + 3}"> <xsl:value-of select="$bif_name_"/> </text> </xsl:for-each> <!-- <xsl:if test="@INTCINDEX"> <xsl:variable name="intr_col_"> <xsl:call-template name="intcIdx2Color"> <xsl:with-param name="intcIdx" select="@INTCINDEX"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="_draw_InterruptCntrl"> <xsl:with-param name="intr_col" select="$intr_col_"/> <xsl:with-param name="intr_x" select="($BLKD_MOD_W - ceiling($BLKD_INTR_W div 2))"/> <xsl:with-param name="intr_y" select="3"/> <xsl:with-param name="intr_idx" select="@INTCINDEX"/> </xsl:call-template> </xsl:if>--> <xsl:if test="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iModInst)]/@INTCINDEX"> <xsl:variable name="intr_col_"> <xsl:call-template name="intcIdx2Color"> <xsl:with-param name="iIntcIdx" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iModInst)]/@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"/> <xsl:with-param name="iIntr_COL" select="$intr_col_"/> <xsl:with-param name="iIntr_IDX" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iModInst)]/@INTCINDEX"/> </xsl:call-template> </xsl:if> <xsl:for-each select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iModInst)]/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_MemoryUnit"> <xsl:param name="iShapeId" select="1000"/> <xsl:variable name="horiz_idx_" select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/@STACK_HORIZ_INDEX"/> <xsl:variable name="is_multistk_" select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/@IS_MULTISTK"/> <xsl:choose> <xsl:when test="(($is_multistk_ = 'TRUE') or (/EDKSYSTEM/BLKDSHAPES/PROCSHAPES/MODULE[(@STACK_HORIZ_INDEX = $horiz_idx_)]))"> <xsl:call-template name="Define_Processor_MemoryUnit"> <xsl:with-param name="iShapeId" select="$iShapeId"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="Define_StandAlone_MemoryUnit"> <xsl:with-param name="iShapeId" select="$iShapeId"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="Define_Processor_MemoryUnit"> <xsl:param name="iShapeId" select="1000"/> <!-- <xsl:param name="cstkIndex" select="'_processor_'"/>--> <xsl:variable name="mods_h_" select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/@MODS_H"/> <xsl:variable name="mods_w_" select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/@MODS_W"/> <xsl:variable name="memW_" select="($BLKD_MOD_W * $mods_w_)"/> <xsl:variable name="memH_" select="($BLKD_MOD_H * $mods_h_)"/> <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]"> <!-- first define its symbols as individual modules --> <xsl:for-each select="MODULE[@MODCLASS='MEMORY']"> <xsl:variable name="modInst_" select="@INSTANCE"/> <xsl:variable name="modType_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE=$modInst_)]/@MODTYPE"/> <xsl:call-template name="Define_Peripheral"> <xsl:with-param name="iModVori" select="'normal'"/> <xsl:with-param name="iModInst" select="$modInst_"/> <xsl:with-param name="iModType" select="$modType_"/> </xsl:call-template> </xsl:for-each> <xsl:for-each select="MODULE[@MODCLASS='MEMORY_CNTLR']"> <xsl:variable name="modInst_" select="@INSTANCE"/> <xsl:variable name="modType_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE=$modInst_)]/@MODTYPE"/> <xsl:call-template name="Define_Peripheral"> <xsl:with-param name="iModVori" select="'rot180'"/> <xsl:with-param name="iModInst" select="$modInst_"/> <xsl:with-param name="iModType" select="$modType_"/> </xsl:call-template> </xsl:for-each> </xsl:for-each> <!-- --> <xsl:variable name="symbol_name_"> <xsl:call-template name="_gen_Stack_SymbolName"> <xsl:with-param name="iHorizIdx" select="@STACK_HORIZ_INDEX"/> <xsl:with-param name="iVertiIdx" select="@SHAPE_VERTI_INDEX"/> </xsl:call-template> </xsl:variable> <!-- <xsl:message>The mp stack name is <xsl:value-of select="$mp_stack_name_"/></xsl:message>--> <symbol id="{$symbol_name_}"> <rect x="0" y="0" rx="6" ry="6" width = "{$memW_}" height= "{$memH_}" style="fill:{$COL_BG}; stroke:{$COL_WHITE}; stroke-width:2"/> <!-- Draw the memory block--> <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(@MODCLASS = 'MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="{ceiling($memW_ div 2) - ($BLKD_MOD_W div 2)}" y="0" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[((@MODCLASS='MEMORY_CNTLR') and (@ORIENTED = 'WEST'))]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="0" y="{$BLKD_MOD_H}" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[((@MODCLASS='MEMORY_CNTLR') and (@ORIENTED = 'EAST'))]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="{$BLKD_MOD_W}" y="{$BLKD_MOD_H}" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[((@MODCLASS='MEMORY_CNTLR') and (@ORIENTED = 'CENTER'))]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="{ceiling($memW_ div 2) - ($BLKD_MOD_W div 2)}" y="{$BLKD_MOD_H}" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> </symbol> </xsl:template> <xsl:template name="Define_StandAlone_MemoryUnit"> <xsl:param name="iShapeId" select="0"/> <xsl:variable name="mods_h_" select="@MODS_H"/> <xsl:variable name="mods_w_" select="@MODS_W"/> <xsl:variable name="memc_name_" select="MODULE[not(@MODCLASS = 'MEMORY')]/@INSTANCE"/> <xsl:variable name="memc_busstd_" select="/EDKSYSTEM/BLKDSHAPES/BCLANESPACES/BCLANESPACE/BUSCONNLANE[(BUSCONN[(@INSTANCE = $memc_name_)])]/@BUSSTD"/> <!-- <xsl:variable name="memc_busstd_" select="/EDKSYSTEM/BLKDSHAPES/BCLANESPACES/BCLANESPACE/BUSCONNLANE/@BUSSTD"/> <xsl:variable name="memc_busstd_" select="/EDKSYSTEM/BCLANESPACES/BCLANESPACE/BUSCONNLANE[(BUSCONN[(@INSTANCE)])]/@BUSSTD"/> <xsl:message>Memory cntlr name <xsl:value-of select="$memc_name_"/></xsl:message> <xsl:message>Memory cntlr name <xsl:value-of select="$memc_name_"/></xsl:message> <xsl:message>Memory cntlr busstd <xsl:value-of select="$memc_busstd_"/></xsl:message>--> <xsl:variable name="peri_col_"> <xsl:choose> <xsl:when test="$mods_w_ > 1"> <xsl:value-of select="$COL_BG"/> </xsl:when> <xsl:when test="/EDKSYSTEM/BLKDSHAPES/BCLANESPACES/BCLANESPACE/BUSCONNLANE[(BUSCONN[(@INSTANCE = $memc_name_)])]/@BUSSTD"> <xsl:call-template name="BusType2Color"> <xsl:with-param name="iBusType" select="$memc_busstd_"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="BusType2Color"> <xsl:with-param name="iBusType" select="'TRS'"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> <!-- first define its symbols as individual modules --> <xsl:for-each select="MODULE[(@MODCLASS = 'MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <xsl:variable name="modType_" select="/EDKSYSTEM/MODULES/MODULE[@INSTANCE=$modInst_]/@MODTYPE"/> <xsl:call-template name="Define_Peripheral"> <xsl:with-param name="iModVori" select="'rot180'"/> <xsl:with-param name="iModInst" select="$modInst_"/> <xsl:with-param name="iModType" select="$modType_"/> </xsl:call-template> </xsl:for-each> <xsl:for-each select="MODULE[not(@MODCLASS='MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <xsl:variable name="modType_" select="/EDKSYSTEM/MODULES/MODULE[@INSTANCE=$modInst_]/@MODTYPE"/> <!-- <xsl:message>Memory cntlr inst <xsl:value-of select="$modInst_"/></xsl:message>--> <xsl:call-template name="Define_Peripheral"> <xsl:with-param name="iModVori" select="'normal'"/> <xsl:with-param name="iModInst" select="$modInst_"/> <xsl:with-param name="iModType" select="$modType_"/> </xsl:call-template> </xsl:for-each> <xsl:variable name="memW_" select="($BLKD_MOD_W * $mods_w_)"/> <xsl:variable name="memH_" select="($BLKD_MOD_H * $mods_h_)"/> <xsl:variable name="symbol_name_"> <xsl:call-template name="_gen_Stack_SymbolName"> <xsl:with-param name="iHorizIdx" select="@STACK_HORIZ_INDEX"/> <xsl:with-param name="iVertiIdx" select="@SHAPE_VERTI_INDEX"/> </xsl:call-template> </xsl:variable> <symbol id="{$symbol_name_}"> <rect x="0" y="0" rx="6" ry="6" width = "{$memW_ + 4}" height= "{$memH_ + 4}" style="fill:{$peri_col_}; stroke:{$peri_col_}; stroke-width:2"/> <!-- Draw the memory block--> <xsl:choose> <xsl:when test="$mods_w_ = 1"> <xsl:for-each select="MODULE[(@MODCLASS='MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="2" y="{$BLKD_MOD_H + 2}" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <!-- Draw the memory controllers--> <xsl:for-each select="MODULE[not(@MODCLASS='MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="2" y="0" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> </xsl:when> <xsl:when test="$mods_w_ > 1"> <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(@MODCLASS = 'MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="{ceiling($memW_ div 2) - ($BLKD_MOD_W div 2)}" y="{$BLKD_MOD_H + 2}" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(not(@MODCLASS='MEMORY') and (@ORIENTED = 'WEST'))]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="0" y="0" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(not(@MODCLASS='MEMORY') and (@ORIENTED = 'EAST'))]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="{$BLKD_MOD_W}" y="0" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(not(@MODCLASS='MEMORY') and (@ORIENTED = 'CENTER'))]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="{ceiling($memW_ div 2) - ($BLKD_MOD_W div 2)}" y="0" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> </xsl:when> </xsl:choose> </symbol>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -