📄 mdtsvgblkd_buslanespaces.xsl
字号:
<?xml version="1.0" standalone="no"?><xsl:stylesheet version="1.0" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:math="http://exslt.org/math" xmlns:xlink="http://www.w3.org/1999/xlink" extension-element-prefixes="math"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD SVG 1.0//EN" doctype-system="http://www.w3.org/TR/SVG/DTD/svg10.dtd"/> <!-- =========================================================== Handle Bucket connections to the shared busses. ===========================================================--> <xsl:template name="BCLaneSpace_BucketToSharedBus"> <xsl:param name="iBusStd" select="'NONE'"/> <xsl:param name="iBusName" select="'NONE'"/> <xsl:param name="iBifRank" select="'NONE'"/> <xsl:param name="iStackToEast" select="'NONE'"/> <xsl:param name="iStackToWest" select="'NONE'"/> <xsl:param name="iStackToEast_W" select="0"/> <xsl:param name="iStackToWest_W" select="0"/> <xsl:param name="iLaneInSpace_X" select="0"/> <xsl:param name="iSpaceSharedBus_Y" select="0"/> <!-- <xsl:message>Stack To East <xsl:value-of select="$iStackToEast"/></xsl:message> <xsl:message>Stack to West <xsl:value-of select="$iStackToWest"/></xsl:message> <xsl:message>Stack to East Width <xsl:value-of select="$iStackToEast_W"/></xsl:message> <xsl:message>Stack to West Width <xsl:value-of select="$iStackToWest_W"/></xsl:message> <xsl:message>Shared Bus Y <xsl:value-of select="$iSpaceSharedBus_Y"/></xsl:message> <xsl:message>Lane in space X <xsl:value-of select="$iLaneInSpace_X"/></xsl:message>--> <xsl:variable name="busColor_"> <xsl:call-template name="BusType2Color"> <xsl:with-param name="iBusType" select="$iBusStd"/> </xsl:call-template> </xsl:variable> <xsl:variable name="sbs_idx_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE= $iBusName)]/@BUSINDEX"/> <xsl:variable name="sbs_name_" select="/EDKSYSTEM/BLKDSHAPES/SBSBUCKETS/SBSBUCKET[(@BUSINDEX = $sbs_idx_)]/@BUSNAME"/> <xsl:variable name="sbs_bc_y_" select="($iSpaceSharedBus_Y + ($sbs_idx_ * $BLKD_SBS_LANE_H))"/> <xsl:variable name="bktshp_hori_idx_" select="/EDKSYSTEM/BLKDSHAPES/SBSBUCKETS/SBSBUCKET[(@BUSINDEX = $sbs_idx_)]/@STACK_HORIZ_INDEX"/> <xsl:variable name="bktshp_vert_idx_" select="/EDKSYSTEM/BLKDSHAPES/SBSBUCKETS/SBSBUCKET[(@BUSINDEX = $sbs_idx_)]/@SHAPE_VERTI_INDEX"/> <xsl:variable name="space_W_"> <xsl:call-template name="_calc_Space_Width"> <xsl:with-param name="iStackToEast" select="$iStackToEast"/> <xsl:with-param name="iStackToWest" select="$iStackToWest"/> </xsl:call-template> </xsl:variable> <xsl:variable name ="extSpaceWest_W_" select="ceiling($iStackToWest_W div 2)"/> <xsl:variable name ="extSpaceEast_W_" select="ceiling($iStackToEast_W div 2)"/> <!-- <xsl:message>Ext Shape to West <xsl:value-of select="$extSpaceWest_W_"/></xsl:message> <xsl:message>Ext Shape to East <xsl:value-of select="$extSpaceEast_W_"/></xsl:message>--> <xsl:variable name="bktshp_Y_"> <xsl:call-template name="_calc_Stack_Shape_Y"> <xsl:with-param name="iHorizIdx" select="$bktshp_hori_idx_"/> <xsl:with-param name="iVertiIdx" select="$bktshp_vert_idx_"/> </xsl:call-template> </xsl:variable> <xsl:variable name="sbsStack_H_diff_"> <xsl:choose> <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when> <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))"> <xsl:variable name="stackToWest_AbvSbs_H_"> <xsl:call-template name="_calc_Stack_AbvSbs_Height"> <xsl:with-param name="iStackIdx" select="$iStackToWest"/> </xsl:call-template> </xsl:variable> <xsl:variable name="stackToEast_AbvSbs_H_"> <xsl:call-template name="_calc_Stack_AbvSbs_Height"> <xsl:with-param name="iStackIdx" select="$iStackToEast"/> </xsl:call-template> </xsl:variable> <!-- <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message> <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>--> <xsl:if test="($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_)"> <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/> </xsl:if> <xsl:if test="not($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_)">0</xsl:if> </xsl:when> </xsl:choose> </xsl:variable> <xsl:variable name="vert_line_x_" select="($iLaneInSpace_X + ceiling($BLKD_BIFC_W div 2))"/> <xsl:variable name="vert_line_y1_" select="($iSpaceSharedBus_Y + ($sbs_idx_ * $BLKD_SBS_LANE_H) + ceiling($BLKD_BIFC_W div 2))"/> <xsl:variable name="vert_line_y2_" select="($bktshp_Y_ + ceiling($BLKD_MOD_W div 2) + $sbsStack_H_diff_)"/> <xsl:variable name="bcInSpace_X_" select="($iLaneInSpace_X + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/> <!-- <xsl:message>Shared Bus Y <xsl:value-of select="$G_SharedBus_Y"/></xsl:message> <xsl:message>Vert Bus Y <xsl:value-of select="$vert_line_y1_"/></xsl:message> <xsl:message>vert y1 <xsl:value-of select="$vert_line_y1_"/></xsl:message> <xsl:message>vert y2 <xsl:value-of select="$vert_line_y2_"/></xsl:message>--> <xsl:variable name="horz_line_y_" select="$vert_line_y2_"/> <xsl:variable name="horz_line_x1_" select="$vert_line_x_"/> <xsl:variable name="horz_line_x2_" select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_)"/> <xsl:variable name="v_bus_ul_x_" select="$vert_line_x_"/> <xsl:variable name="v_bus_ul_y_" select="$vert_line_y1_"/> <xsl:variable name="v_bus_width_" select="$BLKD_P2P_BUS_W"/> <xsl:variable name="v_bus_height_" select="(($vert_line_y2_ - $vert_line_y1_) - ceiling($BLKD_BIFC_H div 2))"/> <xsl:variable name="h_bus_ul_x_" select="$v_bus_ul_x_"/> <xsl:variable name="h_bus_ul_y_" select="$vert_line_y2_ - $BLKD_BIFC_H + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/> <xsl:variable name="h_bus_width_" select="ceiling($space_W_ div 2) + $extSpaceEast_W_"/> <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/> <!-- <xsl:variable name="h_bus_width_" select="($space_W_ + ceiling(($extSpaceWest_W_ + $extSpaceEast_W_) div 2) - $BLKD_BIFC_W)"/> <xsl:message>v bus x <xsl:value-of select="$v_bus_ul_x_"/></xsl:message> <xsl:message>v bus y <xsl:value-of select="$v_bus_ul_y_"/></xsl:message> <xsl:message>v bus w <xsl:value-of select="$v_bus_width_"/></xsl:message> <xsl:message>v bus y1 <xsl:value-of select="$vert_line_y1_"/></xsl:message> <xsl:message>v bus y2 <xsl:value-of select="$vert_line_y2_"/></xsl:message> <xsl:message>v bus h <xsl:value-of select="$v_bus_height_"/></xsl:message> <xsl:message>h bus w <xsl:value-of select="$h_bus_width_"/></xsl:message>--> <!-- Draw rectangular parts of the bus --> <rect x="{$v_bus_ul_x_}" y="{$v_bus_ul_y_ - 2}" width= "{$v_bus_width_}" height="{$v_bus_height_}" style="stroke:none; fill:{$busColor_}"/> <rect x="{$h_bus_ul_x_}" y="{$h_bus_ul_y_ - 5}" width= "{$h_bus_width_}" height="{$h_bus_height_}" style="stroke:none; fill:{$busColor_}"/><!-- --> </xsl:template> <!-- =========================================================== Handle Processor's Shared bus connections. ===========================================================--> <xsl:template name="BCLaneSpace_ProcBifToSharedBus"> <xsl:param name="iBusStd" select="'NONE'"/> <xsl:param name="iBusName" select="'NONE'"/> <xsl:param name="iBifRank" select="'NONE'"/> <xsl:param name="iStackToEast" select="'NONE'"/> <xsl:param name="iStackToWest" select="'NONE'"/> <xsl:param name="iStackToEast_W" select="0"/> <xsl:param name="iStackToWest_W" select="0"/> <xsl:param name="iLaneInSpace_X" select="0"/> <xsl:param name="iSpaceSharedBus_Y" select="0"/> <!-- <xsl:message>Proc diff <xsl:value-of select="$procStack_H_diff_"/></xsl:message> <xsl:message>Proc inst <xsl:value-of select="$procInst_"/></xsl:message> <xsl:message>Proc Bif Name <xsl:value-of select="$procBifName_"/></xsl:message> <xsl:message>Proc Bif Rank <xsl:value-of select="$procBifRank_"/></xsl:message>--> <xsl:variable name="busColor_"> <xsl:call-template name="BusType2Color"> <xsl:with-param name="iBusType" select="$iBusStd"/> </xsl:call-template> </xsl:variable> <xsl:variable name="sbs_idx_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE= $iBusName)]/@BUSINDEX"/> <xsl:variable name="sbs_bc_y_" select="($iSpaceSharedBus_Y + ($sbs_idx_ * $BLKD_SBS_LANE_H))"/> <xsl:variable name="procInst_" select="BUSCONN/@INSTANCE"/> <!-- <xsl:message>Shared Bus Idx <xsl:value-of select="$sbs_idx_"/></xsl:message> <xsl:message>Proc inst <xsl:value-of select="$procInst_"/></xsl:message>--> <xsl:variable name="procBif_Y_" select="((($BLKD_BIF_H + $BLKD_BIF_GAP_V) * BUSCONN/@BIF_Y) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_BIF_GAP_V))"/> <xsl:variable name="procBifName_" select="BUSCONN/@BUSINTERFACE"/> <xsl:variable name="procBifSide_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $procInst_)]/BUSINTERFACE[(@NAME = $procBifName_)]/@BIF_X"/> <xsl:variable name="procBifRank_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $procInst_)]/BUSINTERFACE[(@NAME = $procBifName_)]/@BIFRANK"/> <xsl:variable name="procshp_hori_idx_" select="/EDKSYSTEM/BLKDSHAPES/PROCSHAPES/MODULE[(@INSTANCE = $procInst_)]/@STACK_HORIZ_INDEX"/> <xsl:variable name="procshp_vert_idx_" select="/EDKSYSTEM/BLKDSHAPES/PROCSHAPES/MODULE[(@INSTANCE = $procInst_)]/@SHAPE_VERTI_INDEX"/> <xsl:variable name="space_W_"> <xsl:call-template name="_calc_Space_Width"> <xsl:with-param name="iStackToEast" select="$iStackToEast"/> <xsl:with-param name="iStackToWest" select="$iStackToWest"/> </xsl:call-template> </xsl:variable> <xsl:variable name ="extSpaceWest_W_" select="ceiling($iStackToWest_W div 2)"/> <xsl:variable name ="extSpaceEast_W_" select="ceiling($iStackToEast_W div 2)"/> <!-- <xsl:message>Stack horiz <xsl:value-of select="$procshp_hori_idx_"/></xsl:message> <xsl:message>Stack verti <xsl:value-of select="$procshp_vert_idx_"/></xsl:message> <xsl:message>Proc Bif Y <xsl:value-of select="$procBif_Y_"/></xsl:message>--> <xsl:variable name="procshp_Y_"> <xsl:call-template name="_calc_Stack_Shape_Y"> <xsl:with-param name="iHorizIdx" select="$procshp_hori_idx_"/> <xsl:with-param name="iVertiIdx" select="$procshp_vert_idx_"/> </xsl:call-template> </xsl:variable> <xsl:variable name="procStack_H_diff_"> <xsl:choose> <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when> <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))"> <xsl:variable name="stackToWest_AbvSbs_H_"> <xsl:call-template name="_calc_Stack_AbvSbs_Height"> <xsl:with-param name="iStackIdx" select="$iStackToWest"/> </xsl:call-template> </xsl:variable> <xsl:variable name="stackToEast_AbvSbs_H_"> <xsl:call-template name="_calc_Stack_AbvSbs_Height"> <xsl:with-param name="iStackIdx" select="$iStackToEast"/> </xsl:call-template> </xsl:variable> <!-- <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message> <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>--> <xsl:choose> <xsl:when test="(($procshp_hori_idx_ = $iStackToEast) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))"> <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/> </xsl:when> <xsl:when test="(($procshp_hori_idx_ = $iStackToWest) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))"> <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/> </xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:when> </xsl:choose> </xsl:variable> <xsl:variable name="bc_Y_" select="($procshp_Y_ + $procBif_Y_ + ceiling($BIF_H div 2) + $procStack_H_diff_) - ceiling($BLKD_BIFC_H div 2)"/><!-- <xsl:variable name="bc_x_" select="($laneInSpace_X + ceiling($BLKD_BIFC_W div 2))"/> <xsl:variable name="bc_x_" select="0"/>--> <xsl:variable name="bc_X_"> <xsl:choose> <xsl:when test="$procBifSide_ = '0'"> <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - (ceiling($BLKD_MOD_W div 2) + $BLKD_BIFC_W))"/><!-- <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - ceiling($BLKD_MOD_W div 2))"/> <xsl:value-of select="($space_W_ - ceiling($BLKD_MOD_W div 2))"/>--> </xsl:when> <xsl:when test="$procBifSide_ = '1'"> <xsl:value-of select="ceiling($BLKD_MOD_W div 2)"/> </xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:variable> <!-- Place the bus connection --> <use x="{$bc_X_}" y="{$bc_Y_}" xlink:href="#{$iBusStd}_busconn_{$procBifRank_}"/> <xsl:variable name="vert_line_x_" select="($iLaneInSpace_X + ceiling($BLKD_BIFC_W div 2))"/> <xsl:variable name="vert_line_y1_" select="($procshp_Y_ + $procBif_Y_ + ceiling($BLKD_BIF_H div 2) + $procStack_H_diff_)"/> <xsl:variable name="vert_line_y2_" select="($iSpaceSharedBus_Y + ($sbs_idx_ * $BLKD_SBS_LANE_H) + ceiling($BLKD_BIFC_W div 2))"/> <!-- <xsl:message>Vert line Y1 <xsl:value-of select="$vert_line_y1_"/></xsl:message> <xsl:message>Vert line Y2 <xsl:value-of select="$vert_line_y2_"/></xsl:message>--> <xsl:variable name="v_bus_ul_y_"> <xsl:choose> <xsl:when test="$vert_line_y1_ > $vert_line_y2_">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -