1 <?xml version="1.0" standalone="no"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:svg="http://www.w3.org/2000/svg"
4 xmlns:exsl="http://exslt.org/common"
5 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 xmlns:math="http://exslt.org/math"
7 xmlns:xlink="http://www.w3.org/1999/xlink"
8 extension-element-prefixes="math">
10 <xsl:include href="MdtSVG_Colors.xsl"/>
11 <xsl:include href="MdtSVG_BifShapes.xsl"/>
13 <xsl:include href="MdtSvgBLKD_Busses.xsl"/>
14 <xsl:include href="MdtSvgBLKD_IOPorts.xsl"/>
15 <xsl:include href="MdtSvgBLKD_Dimensions.xsl"/>
16 <xsl:include href="MdtSvgBLKD_Processors.xsl"/>
17 <xsl:include href="MdtSvgBLKD_Peripherals.xsl"/>
18 <xsl:include href="MdtSvgBLKD_Calculations.xsl"/>
19 <xsl:include href="MdtSvgBLKD_BusLaneSpaces.xsl"/>
21 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"
22 doctype-public="-//W3C//DTD SVG 1.0//EN"
23 doctype-system="svg10.dtd"/>
25 <xsl:param name="ADD_VIEWBOX" select="'FALSE'"/>
26 <xsl:param name="IN_TESTMODE" select="'FALSE'"/>
28 <xsl:param name="CSS_SVG_DIAGRAMS" select="'MdtSVG_Diagrams.css'"/>
31 ===========================================================================
32 CALCULATE GLOBAL DIMENSIONS BASED ON BLKDSHAPES DEF IN INPUT XML
33 ===========================================================================
36 <xsl:variable name="G_total_StandAloneMpmc_H">
37 <xsl:if test="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/MPMCSHAPE">
38 <xsl:value-of select="($BLKD_MPMC_MOD_H + $BLKD_MPMC2PROC_GAP)"/>
40 <xsl:if test="not(/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/MPMCSHAPE)">0</xsl:if>
43 <xsl:variable name="G_max_Stack_BlwSbs_H">
44 <xsl:call-template name="_calc_Max_Stack_BlwSbs_Height"/>
47 <xsl:variable name="G_max_Stack_AbvSbs_H">
48 <xsl:call-template name="_calc_Max_Stack_AbvSbs_Height"/>
51 <xsl:variable name="G_total_Stacks_W">
52 <xsl:call-template name="_calc_Stack_X">
53 <xsl:with-param name="iStackIdx" select="(/EDKSYSTEM/BLKDSHAPES/@STACK_HORIZ_WIDTH)"/>
57 <xsl:variable name="G_NumOfSharedBusses" select="count(/EDKSYSTEM/BLKDSHAPES/SBSSHAPES/MODULE)"/>
58 <xsl:variable name="G_total_SharedBus_H" select="($G_NumOfSharedBusses * $BLKD_SBS_LANE_H)"/>
60 <xsl:variable name="G_NumOfBridges" select="count(/EDKSYSTEM/BLKDSHAPES/BRIDGESHAPES/MODULE)"/>
61 <xsl:variable name="G_total_Bridges_W" select="(($G_NumOfBridges * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))) + $BLKD_BRIDGE_GAP)"/>
63 <xsl:variable name="G_total_drawarea_CLC" select="($G_total_Stacks_W + $G_total_Bridges_W + ($BLKD_INNER_GAP * 2))"/>
65 <xsl:variable name="G_total_drawarea_W">
66 <xsl:if test="$G_total_drawarea_CLC > ($BLKD_KEY_W + $BLKD_SPECS_W + $BLKD_SPECS2KEY_GAP)">
67 <xsl:value-of select="$G_total_drawarea_CLC"/>
69 <xsl:if test="not($G_total_drawarea_CLC > ($BLKD_KEY_W + $BLKD_SPECS2KEY_GAP + $BLKD_SPECS_W))">
70 <xsl:value-of select="($BLKD_KEY_W + $BLKD_SPECS_W + $BLKD_SPECS2KEY_GAP)"/>
74 <xsl:variable name="G_IpBucketMods_H">
75 <xsl:if test="/EDKSYSTEM/BLKDSHAPES/IPBUCKET/@MODS_H"><xsl:value-of select="/EDKSYSTEM/BLKDSHAPES/IPBUCKET/@MODS_H"/></xsl:if>
76 <xsl:if test="not(/EDKSYSTEM/BLKDSHAPES/IPBUCKET/@MODS_H)">0</xsl:if>
78 <xsl:variable name="G_total_IpBucket_H" select="($G_IpBucketMods_H * ($BLKD_MOD_H + $BLKD_BIF_H))"/>
80 <xsl:variable name="G_total_UnkBucket_H">
81 <xsl:if test="/EDKSYSTEM/BLKDSHAPES/UNKBUCKET">
83 <xsl:variable name="unkBucketMods_H_">
84 <xsl:if test="/EDKSYSTEM/BLKDSHAPES/UNKBUCKET/@MODS_H"><xsl:value-of select="/EDKSYSTEM/BLKDSHAPES/UNKBUCKET/@MODS_H"/></xsl:if>
85 <xsl:if test="not(/EDKSYSTEM/BLKDSHAPES/UNKBUCKET/@MODS_H)">0</xsl:if>
88 <xsl:variable name="total_UnkMod_H_" select="($unkBucketMods_H_ * ($BLKD_MOD_H + $BLKD_BIF_H))"/> <xsl:variable name="unkBucketBifs_H_"> <xsl:if test="/EDKSYSTEM/BLKDSHAPES/UNKBUCKET/@BIFS_H"><xsl:value-of select="/EDKSYSTEM/BLKDSHAPES/UNKBUCKET/@BIFS_H"/></xsl:if>
89 <xsl:if test="not(/EDKSYSTEM/BLKDSHAPES/UNKBUCKET/@BIFS_H)">0</xsl:if>
91 <xsl:variable name="total_UnkBif_H_" select="($unkBucktBifs_H_ * ($BLKD_MOD_H + $BLKD_BIF_H))"/>
93 <xsl:value-of select="($total_UnkBif_H_ + $G_totalUnkMod_H_)"/>
96 <xsl:if test="not(/EDKSYSTEM/BLKDSHAPES/UNKBUCKET)">0</xsl:if>
99 <xsl:variable name="G_SharedBus_Y" select="($BLKD_INNER_Y + $G_total_StandAloneMpmc_H + $G_max_Stack_AbvSbs_H + $BLKD_PROC2SBS_GAP)"/>
101 <!-- ===========================================================================
102 Calculate the width of the Block Diagram based on the total number of
103 buslanes and modules in the design. If there are no buslanes or modules,
104 a default width, just wide enough to display the KEY and SPECS is used
105 =========================================================================== -->
106 <xsl:variable name="G_total_blkd_W" select="($G_total_drawarea_W + (($BLKD_PRTCHAN_W + $BLKD_IORCHAN_W)* 2))"/>
107 <xsl:variable name="G_total_diag_W" select="$G_total_blkd_W"/>
109 <!-- =========================================================================== -->
110 <!-- Calculate the height of the Block Diagram based on the total number of -->
111 <!-- buslanes and modules in the design. Take into account special shapes such -->
112 <!-- as MultiProc shapes. -->
113 <!-- =========================================================================== -->
116 <xsl:variable name="G_total_drawarea_H" select="($G_total_StandAloneMpmc_H + $G_max_Stack_AbvSbs_H + $BLKD_PROC2SBS_GAP + $G_total_SharedBus_H + $G_max_Stack_BlwSbs_H + $BLKD_SBS2IP_GAP + $G_total_IpBucket_H + $BLKD_IP2UNK_GAP + $G_total_UnkBucket_H + ($BLKD_INNER_GAP * 2))"/>
117 <xsl:variable name="G_total_blkd_H" select="($G_total_drawarea_H + (($BLKD_PRTCHAN_H + $BLKD_IORCHAN_H)* 2))"/>
119 <xsl:variable name="G_total_diag_H">
120 <xsl:if test="($IN_TESTMODE = 'TRUE')">
121 <xsl:message>Generating Blkdiagram in TestMode </xsl:message>
122 <xsl:value-of select="$G_total_blkd_H"/>
124 <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
125 <xsl:value-of select="($G_total_blkd_H + $BLKD_DRAWAREA2KEY_GAP + $BLKD_KEY_H)"/>
129 <!-- ======================= MAIN SVG BLOCK =============================== -->
130 <xsl:template match="EDKSYSTEM">
133 <xsl:message>STCK_W is <xsl:value-of select="$G_total_Stacks_W"/></xsl:message>
134 <xsl:message>BRDG_W is <xsl:value-of select="$G_total_Bridges_W"/></xsl:message>
135 <xsl:message>MPMC is <xsl:value-of select="$G_total_StandAloneMpmc_H"/></xsl:message>
136 <xsl:message>MPMC is <xsl:value-of select="$G_total_StandAloneMpmc_H"/></xsl:message>
137 <xsl:message>MABV is <xsl:value-of select="$G_max_Stack_AbvSbs_H"/></xsl:message>
138 <xsl:message>MBLW is <xsl:value-of select="$G_max_Stack_BlwSbs_H"/></xsl:message>
139 <xsl:message>IPBK is <xsl:value-of select="$G_total_IpBucket_H"/></xsl:message>
140 <xsl:message>Blkd Total is <xsl:value-of select="$blkd_H_"/></xsl:message>
141 <xsl:message>max abv is <xsl:value-of select="$max_Stack_AbvSbs_H_"/></xsl:message>
142 <xsl:message>max blw is <xsl:value-of select="$max_Stack_BlwSbs_H_"/></xsl:message>
143 <xsl:message>Ip Bkt is <xsl:value-of select="$totalIpBkt_H_"/></xsl:message>
144 <xsl:message>Sbs is <xsl:value-of select="$totalSbs_H_"/></xsl:message>
145 <xsl:message>Unk Bkt is <xsl:value-of select="$totalUnkBkt_H_"/></xsl:message>
146 <xsl:message>Blkd DrawArea height as <xsl:value-of select="$total_drawarea_H_"/></xsl:message>
149 <!--specify a css for the file -->
150 <xsl:processing-instruction name="xml-stylesheet">href="<xsl:value-of select="$CSS_SVG_DIAGRAMS"/>" type="text/css"</xsl:processing-instruction>
152 <xsl:variable name="BLKD_ZOOM_Y">
154 <xsl:when test="($ADD_VIEWBOX = 'TRUE')">
155 <xsl:value-of select="($G_total_diag_H * 2)"/>
157 <xsl:otherwise>0</xsl:otherwise>
161 <xsl:text> </xsl:text>
162 <svg width="{$G_total_diag_W}" height="{$G_total_diag_H}" viewBox="0 0 0 {$BLKD_ZOOM_Y}">
164 ===============================================
165 Layout All the various definitions
166 ===============================================
169 <!-- Diagram Key Definition -->
170 <xsl:call-template name="Define_BlkDiagram_Key"/>
172 <!-- Diagram Specs Definition -->
173 <xsl:call-template name="Define_BlkDiagram_Specs">
174 <xsl:with-param name="iArch" select="@ARCH"/>
175 <xsl:with-param name="iPart" select="@PART"/>
176 <xsl:with-param name="iTimeStamp" select="@TIMESTAMP"/>
177 <xsl:with-param name="iEdkVersion" select="@EDKVERSION"/>
180 <!-- IO Port Defs -->
181 <xsl:call-template name="Define_IOPorts"/>
184 <xsl:call-template name="Define_BifTypes"/>
187 <xsl:call-template name="Define_Busses"/>
189 <!-- Shared Bus Buckets Defs -->
190 <xsl:call-template name="Define_SBSBuckets"/>
192 <!-- IP Bucket Defs -->
193 <xsl:call-template name="Define_IPBucket"/>
196 <xsl:call-template name="Define_AllStacks"/>
199 <xsl:call-template name="Define_BusLaneSpaces"/>
201 <!-- Main MPMC Defs -->
202 <xsl:if test="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/MPMCSHAPE">
203 <xsl:call-template name="Define_StandAlone_MPMC"/>
207 <!-- =============================================== -->
208 <!-- Draw Outlines -->
209 <!-- =============================================== -->
211 <!-- The surrounding black liner -->
214 width ="{$G_total_diag_W}"
215 height="{$G_total_diag_H}" style="fill:{$COL_WHITE}; stroke:{$COL_BLACK};stroke-width:4"/>
217 <!-- The outer IO channel -->
218 <rect x="{$BLKD_PRTCHAN_W}"
219 y="{$BLKD_PRTCHAN_H}"
220 width= "{$G_total_blkd_W - ($BLKD_PRTCHAN_W * 2)}"
221 height="{$G_total_blkd_H - ($BLKD_PRTCHAN_H * 2)}" style="fill:{$COL_IORING}"/>
223 <!-- The Diagram's drawing area -->
224 <rect x="{$BLKD_PRTCHAN_W + $BLKD_IORCHAN_W}"
225 y="{$BLKD_PRTCHAN_H + $BLKD_IORCHAN_H}"
226 width= "{$G_total_drawarea_W}"
227 height="{$G_total_drawarea_H}" rx="8" ry="8" style="fill:{$COL_BG}"/>
229 <!-- =============================================== -->
230 <!-- Draw All the various components -->
231 <!-- =============================================== -->
233 <!-- Layout the IO Ports -->
234 <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
235 <xsl:call-template name="Draw_IOPorts"/>
238 <!-- Layout the Shapes -->
239 <xsl:call-template name="Draw_BlkDiagram_Shapes"/>
243 <!-- ======================= END MAIN SVG BLOCK =============================== -->
246 <xsl:template name="Draw_BlkDiagram_Shapes">
249 ===========================================================
250 Draw the shared busses
251 ===========================================================
253 <use x="{$BLKD_INNER_X}" y="{$G_SharedBus_Y}" xlink:href="#group_sharedBusses"/>
257 ===========================================================
258 Draw the Bus Lane Spaces
259 ===========================================================
261 <xsl:call-template name="Draw_BlkDiagram_BusLaneSpaces"/>
264 ===========================================================
266 ===========================================================
268 <xsl:call-template name="Draw_BlkDiagram_Bridges"/>
272 ===========================================================
274 ===========================================================
276 <xsl:call-template name="Draw_BlkDiagram_Stacks"/>
279 ===========================================================
280 Draw the Stand Alone MPMC, (if any)
281 ===========================================================
283 <xsl:if test="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/MPMCSHAPE">
284 <xsl:variable name="mpmc_inst_" select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/MPMCSHAPE/@INSTANCE"/>
285 <use x="{$BLKD_INNER_X}" y="{$BLKD_INNER_Y}" xlink:href="#mpmcmodule_{$mpmc_inst_}"/>
288 ===========================================================
289 Draw the connections to the Stand Alone MPMC
290 ===========================================================
292 <xsl:call-template name="Draw_BlkDiagram_StandAloneMpmcConnections"/>
296 ===========================================================
298 ===========================================================
301 <xsl:call-template name="Draw_BlkDiagram_IPBucket"/>
305 ===========================================================
307 ===========================================================
309 <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
310 <use x="{$G_total_blkd_W - $BLKD_KEY_W - $BLKD_PRTCHAN_W}" y="{$G_total_blkd_H + $BLKD_DRAWAREA2KEY_GAP - 8}" xlink:href="#BlkDiagram_Key"/>
314 ===========================================================
316 ===========================================================
318 <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
319 <use x="{$BLKD_PRTCHAN_W}" y="{$G_total_blkd_H + $BLKD_DRAWAREA2KEY_GAP - 8}" xlink:href="#BlkDiagram_Specs"/>
323 ************************************************************
324 *************** DONE DRAWING BLOCK DIAGRAM **************
325 ************************************************************
331 <!-- ======================================================================= -->
332 <!-- FUNCTION TEMPLATE -->
334 <!-- Draw stacks on the Block Diagram -->
335 <!-- ======================================================================= -->
336 <xsl:template name="Draw_BlkDiagram_Stacks">
338 <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/BCLANESPACES/BCLANESPACE[(@EAST < /EDKSYSTEM/BLKDSHAPES/@STACK_HORIZ_WIDTH)]">
340 <xsl:variable name="stack_line_x_">
341 <xsl:call-template name="_calc_Stack_X">
342 <xsl:with-param name="iStackIdx" select="@EAST"/>
346 <xsl:variable name="stack_abv_sbs_">
347 <xsl:call-template name="_calc_Stack_AbvSbs_Height">
348 <xsl:with-param name="iStackIdx" select="@EAST"/>
352 <xsl:variable name="bridges_w_" select="(($G_NumOfBridges * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))) + $BLKD_BRIDGE_GAP)"/>
354 <xsl:variable name="stack_y_" select="($G_SharedBus_Y - $stack_abv_sbs_ - $BLKD_PROC2SBS_GAP)"/>
355 <xsl:variable name="stack_x_" select="($BLKD_INNER_X + $stack_line_x_ + $bridges_w_)"/>
357 <xsl:variable name="stack_name_">
358 <xsl:call-template name="_gen_Stack_Name">
359 <xsl:with-param name="iHorizIdx" select="@EAST"/>
363 <use x="{$stack_x_}" y="{$stack_y_}" xlink:href="#{$stack_name_}"/>
369 <xsl:template name="Draw_BlkDiagram_StandAloneMpmcConnections">
371 <xsl:variable name="mpmcInst_" select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/MPMCSHAPE/@INSTANCE"/>
372 <xsl:variable name="lastStack_" select="(/EDKSYSTEM/BLKDSHAPES/@STACK_HORIZ_WIDTH) - 1"/>
375 <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/BCLANESPACES/BCLANESPACE">
376 <xsl:variable name="currentLane_" select="position()"/>
378 <xsl:message>Looking in space <xsl:value-of select="$currentLane_"/></xsl:message>
380 <xsl:variable name="stackToEast_">
382 <xsl:when test="not(@WEST = $lastStack_)"><xsl:value-of select="@EAST"/></xsl:when>
383 <xsl:when test=" (@WEST = $lastStack_)"><xsl:value-of select="'NONE'"/></xsl:when>
387 <xsl:variable name="stackToWest_">
389 <xsl:when test="not(@WEST = $lastStack_)"><xsl:value-of select="'NONE'"/></xsl:when>
390 <xsl:when test=" (@WEST = $lastStack_)"><xsl:value-of select="@WEST"/></xsl:when>
394 <xsl:variable name="spaceAbvSbs_H_">
395 <xsl:call-template name="_calc_Space_AbvSbs_Height">
396 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
397 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
401 <xsl:variable name="space_y_" select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/>
404 <xsl:message>Stack To East <xsl:value-of select="$stackToEast_"/></xsl:message>
405 <xsl:message>Stack To West <xsl:value-of select="$stackToWest_"/></xsl:message>
406 <xsl:variable name="space_X_">
407 <xsl:call-template name="_calc_Space_X">
408 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
409 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
412 <xsl:variable name="space_y_" select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/>
413 <xsl:variable name="space_x_" select="($BLKD_INNER_X + $G_total_Bridges_W + $space_line_x_)"/>
417 <xsl:for-each select="BUSCONNLANE[@IS_MPMCCONN]">
420 <xsl:variable name="bifSide_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = BUSCONN/@INSTANCE)]/BUSINTERFACE[(@BUSNAME = @BUSNAME)]/@BIF_X"/>
422 <xsl:variable name="bifInst_" select="BUSCONN/@INSTANCE"/>
423 <xsl:variable name="busName_" select="@BUSNAME"/>
424 <xsl:variable name="bifSide_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $bifInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@BIF_X"/>
426 <xsl:variable name="mpmcBifName_">
428 <xsl:when test=" (@IS_SBSCONN)"><xsl:value-of select="BUSCONN/@BUSINTERFACE"/></xsl:when>
429 <xsl:when test="not(@IS_SBSCONN)"><xsl:value-of select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@NAME"/></xsl:when>
430 <xsl:otherwise><xsl:value-of select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@NAME"/></xsl:otherwise>
434 <xsl:message>MPMC Bif Name <xsl:value-of select="$mpmcBifName_"/></xsl:message>
435 <xsl:message>Bif Side <xsl:value-of select="$bifSide_"/></xsl:message>
436 <xsl:message>Bus Name <xsl:value-of select="@BUSNAME"/></xsl:message>
437 <xsl:message>Instance <xsl:value-of select="$bifInst_"/></xsl:message>
440 <xsl:variable name="space_line_X_">
441 <xsl:call-template name="_calc_Space_X">
442 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
443 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
447 <xsl:variable name="space_X_" select="($BLKD_INNER_X + $G_total_Bridges_W + $space_line_X_)"/>
449 <xsl:variable name = "stackToWest_W_">
451 <xsl:when test="(($stackToEast_ = '0') and ($stackToWest_ = 'NONE'))">0</xsl:when>
452 <xsl:when test="(($stackToEast_ = 'NONE') and not($stackToWest_ = 'NONE'))">
453 <xsl:call-template name="_calc_Stack_Width">
454 <xsl:with-param name="iStackIdx" select="$stackToWest_"/>
457 <xsl:when test="(not($stackToEast_ = '0') and not($stackToEast_ = 'NONE') and ($stackToWest_ = 'NONE'))">
458 <xsl:call-template name="_calc_Stack_Width">
459 <xsl:with-param name="iStackIdx" select="($stackToEast_ - 1)"/>
462 <xsl:otherwise>0</xsl:otherwise>
466 <xsl:variable name = "stackToEast_W_">
467 <xsl:call-template name="_calc_Stack_Width">
468 <xsl:with-param name="iStackIdx" select="$stackToEast_"/>
472 <xsl:variable name ="extSpaceWest_W_" select="ceiling($stackToWest_W_ div 2)"/>
473 <xsl:variable name ="extSpaceEast_W_" select="ceiling($stackToEast_W_ div 2)"/>
475 <xsl:message>extSpaceWest_W_ <xsl:value-of select="$extSpaceWest_W_"/></xsl:message>
476 <xsl:message>extSpaceEast_W_ <xsl:value-of select="$extSpaceEast_W_"/></xsl:message>
477 <xsl:message>Found a MPMC lane in space <xsl:value-of select="$currentLane_"/> at X <xsl:value-of select="$lane_X_"/></xsl:message>
478 <xsl:message>mpmcBifRank <xsl:value-of select="$mpmcBifRank_"/></xsl:message>
482 <xsl:variable name="laneInSpace_X_" select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W))"/>
484 <xsl:variable name="laneInSpace_X_">
486 <xsl:when test="(@ORIENTED = 'EAST')">
487 <xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W) - $BLKD_BUS_ARROW_W - $BLKD_P2P_BUS_W)"/>
489 <xsl:otherwise><xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W))"/></xsl:otherwise>
495 <xsl:variable name="lane_X_" select="($space_X_ + $laneInSpace_X_)"/>
497 <xsl:variable name="mpmcBifRank_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@BUSNAME = @BUSNAME)]/@BIFRANK"/>
500 <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/>
501 <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/>
502 <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/>
505 <xsl:variable name="bc_Y_" select="($BLKD_INNER_Y + $BLKD_MPMC_MOD_H)"/>
506 <xsl:variable name="bc_X_" >
508 <xsl:when test="($bifSide_ = '0')"><xsl:value-of select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/></xsl:when>
509 <xsl:when test="($bifSide_ = '1')"><xsl:value-of select="($lane_X_ + $BLKD_BIFC_dx)"/></xsl:when>
510 <xsl:otherwise> <xsl:value-of select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/></xsl:otherwise>
514 <xsl:variable name="busColor_">
515 <xsl:call-template name="BusType2Color">
516 <xsl:with-param name="iBusType" select="@BUSSTD"/>
520 <!-- Place the MPMC bif label -->
521 <xsl:variable name="bcl_X_" select="($bc_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BIF_W div 2))"/>
522 <xsl:variable name="bcl_Y_" select="($bc_Y_ - $BLKD_BIF_H - $BLKD_MOD_BIF_GAP_H)"/>
523 <use x="{$bcl_X_}" y="{$bcl_Y_}" xlink:href="#{@BUSSTD}_Bif"/>
524 <text class="mpmcbiflabel"
525 x="{$bcl_X_ + ceiling($BLKD_BIF_W div 2)}"
526 y="{$bcl_Y_ + ceiling($BLKD_BIF_H div 2) + 3}"><xsl:value-of select="$mpmcBifName_"/></text>
528 <!-- Place the MPMC bif -->
529 <use x="{$bc_X_}" y="{$bc_Y_}" xlink:href="#{@BUSSTD}_busconn_{$mpmcBifRank_}"/>
531 <xsl:variable name="bcArrow_X_" select="($bc_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_H div 2))"/>
532 <xsl:variable name="bcArrow_Y_" select="($bc_Y_ + $BLKD_BIFC_H - 3)"/>
534 <!-- Place the MPMC Arrow -->
535 <use x="{$bcArrow_X_}" y="{$bcArrow_Y_}" xlink:href="#{@BUSSTD}_BusArrowNorth"/>
538 Place a block to cover the gap btw MPMC and top of Bus Lane Space, or to the correct SBS
539 For non SBS connections a vertical block will already have been drawn to the top of the
543 <xsl:variable name="sbsDy_">
545 <xsl:when test="@IS_SBSCONN"><xsl:value-of select="2 + (/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $busName_)]/@BUSINDEX * $BLKD_SBS_LANE_H)"/></xsl:when>
546 <xsl:when test="not(@IS_SBSCONN)">0</xsl:when>
547 <xsl:otherwise>0></xsl:otherwise>
551 <xsl:variable name="mpmcBusHeight_">
553 <xsl:when test="(@IS_SBSCONN)"><xsl:value-of select="($G_SharedBus_Y - ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4) + $sbsDy_)"/></xsl:when>
554 <xsl:when test="not(@IS_SBSCONN)">
556 <xsl:when test="($space_y_ >= ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))">
557 <xsl:value-of select="($space_y_ - ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))"/>
559 <xsl:when test="($space_y_ < ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))">
560 <xsl:value-of select="(($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_) - $space_y_)"/>
564 <xsl:otherwise><xsl:value-of select="$BLKD_BIFC_H"/></xsl:otherwise>
568 <rect x="{$bcArrow_X_ + $BLKD_BUS_ARROW_G}"
569 y="{$bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4}"
570 width= "{$BLKD_P2P_BUS_W}"
571 height="{$mpmcBusHeight_}"
572 style="stroke:none; fill:{$busColor_}"/>
574 <!-- place the bus label here -->
575 <text class="p2pbuslabel"
576 x="{$bcArrow_X_ + $BLKD_BUS_ARROW_W + 6}"
577 y="{$bcArrow_Y_ + ceiling($mpmcBusHeight_ div 2) + 6}"><xsl:value-of select="$busName_"/></text>
586 <!-- ======================================================================= -->
587 <!-- FUNCTION TEMPLATE -->
589 <!-- Draw bus lane spaces on the Block Diagram -->
590 <!-- ======================================================================= -->
591 <xsl:template name="Draw_BlkDiagram_BusLaneSpaces">
593 <xsl:variable name="lastStack_" select="(/EDKSYSTEM/BLKDSHAPES/@STACK_HORIZ_WIDTH) - 1"/>
595 <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/BCLANESPACES/BCLANESPACE[@EAST]">
596 <xsl:sort select="@EAST" data-type="number"/>
598 <xsl:call-template name="Draw_BlkDiagram_BusLaneSpace">
599 <xsl:with-param name="iStackToEast" select="@EAST"/>
603 <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/BCLANESPACES/BCLANESPACE[(@WEST = $lastStack_)]">
604 <xsl:call-template name="Draw_BlkDiagram_BusLaneSpace">
605 <xsl:with-param name="iStackToWest" select="$lastStack_"/>
611 <xsl:template name="Draw_BlkDiagram_BusLaneSpace">
613 <xsl:param name="iStackToEast" select="'NONE'"/>
614 <xsl:param name="iStackToWest" select="'NONE'"/>
616 <xsl:variable name="spaceAbvSbs_H_">
617 <xsl:call-template name="_calc_Space_AbvSbs_Height">
618 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
619 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
623 <xsl:variable name="spaceBlwSbs_H_">
624 <xsl:call-template name="_calc_Space_BlwSbs_Height">
625 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
626 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
630 <xsl:variable name="space_line_x_">
631 <xsl:call-template name="_calc_Space_X">
632 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
633 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
637 <xsl:variable name="space_y_" select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/>
638 <xsl:variable name="space_x_" select="($BLKD_INNER_X + $G_total_Bridges_W + $space_line_x_)"/>
640 <xsl:variable name="stackToEast_">
642 <xsl:when test="not($iStackToEast = 'NONE')"><xsl:value-of select="$iStackToEast"/></xsl:when>
643 <xsl:otherwise>NONE</xsl:otherwise>
647 <xsl:variable name="stackToWest_">
649 <xsl:when test=" not($iStackToWest = 'NONE')"><xsl:value-of select="$iStackToWest"/></xsl:when>
650 <xsl:when test="(not($iStackToEast = 'NONE') and not($iStackToEast = '0'))"><xsl:value-of select="($iStackToEast - 1)"/></xsl:when>
651 <xsl:otherwise>NONE</xsl:otherwise>
656 <xsl:variable name="space_Name_">
657 <xsl:call-template name="_gen_Space_Name">
658 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
659 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
664 <xsl:message>StackToEast is <xsl:value-of select="$iStackToEast"/></xsl:message>
665 <xsl:message>StackToWest is <xsl:value-of select="$iStackToWest"/></xsl:message>
666 <xsl:message>SpaceName is <xsl:value-of select="$space_Name_"/></xsl:message>
669 <use x="{$space_x_}" y="{$space_y_}" xlink:href="#{$space_Name_}"/>
674 <!-- =========================================================================== -->
675 <!-- FUNCTION TEMPLATE -->
677 <!-- Draw Bridges on the Block Diagram -->
678 <!-- =========================================================================== -->
679 <xsl:template name="Draw_BlkDiagram_Bridges">
681 <!-- First save all the bridge indexs in a variable -->
682 <xsl:variable name="bridgeShapes_">
683 <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/BRIDGESHAPES/MODULE/BUSCONNS[(@ORIENTED = 'WEST')]/BUSCONN">
684 <BRIDGE BUSINDEX="{@BUSINDEX}" INSTANCE="{../../@INSTANCE}" POSITION="{(position() -1)}"/>
685 <BRIDGECONN BUSINDEX="{@BUSINDEX}" INSTANCE="{../../@INSTANCE}" ORIENTED="{../@ORIENTED}" POSITION="{(position() - 1)}" BUSSTD="{@BUSSTD}" BIFRANK="{@BIFRANK}"/>
686 <!-- So both bus conns have same position.... -->
687 <xsl:if test="../../BUSCONNS[(@ORIENTED = 'EAST')]">
688 <BRIDGECONN BUSINDEX="{../../BUSCONNS[(@ORIENTED ='EAST')]/BUSCONN/@BUSINDEX}" INSTANCE="{../../@INSTANCE}" ORIENTED="EAST" POSITION="{(position() - 1)}" BUSSTD="{../../BUSCONNS[(@ORIENTED = 'EAST')]/BUSCONN/@BUSSTD}" BIFRANK="{../../BUSCONNS[(@ORIENTED = 'EAST')]/BUSCONN/@BIFRANK}"/>
693 <xsl:message>Found an east connection on <xsl:value-of select="../../@INSTANCE"/></xsl:message>
695 <!-- Now layout the bridge shapes between the shared busses -->
696 <xsl:for-each select="exsl:node-set($bridgeShapes_)/BRIDGE">
697 <xsl:sort select="@POSITION" data-type="number"/>
699 <xsl:variable name="brdgPosition_" select="@POSITION"/>
700 <xsl:variable name="brdgInstance_" select="@INSTANCE"/>
702 <xsl:variable name="min_bus_idx_" select="math:min(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUSINDEX)"/>
704 <xsl:variable name="max_bus_idx_" select="math:max(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUSINDEX)"/>
706 <xsl:message>Maximum index <xsl:value-of select="$max_bus_idx_"/></xsl:message>
707 <xsl:message>Minimum index <xsl:value-of select="$min_bus_idx_"/></xsl:message>
711 <xsl:variable name="brdg_X_" select="($BLKD_INNER_X + $BLKD_BRIDGE_GAP + $BLKD_BUS_LANE_W + (@POSITION * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))))"/>
712 <xsl:variable name="brdg_Y_" select="($G_SharedBus_Y + ($min_bus_idx_ * $BLKD_SBS_LANE_H) + ceiling($BLKD_SBS_LANE_H div 2) - ceiling($BLKD_MOD_H div 2))"/>
714 <use x="{$brdg_X_}" y="{$brdg_Y_}" xlink:href="#symbol_{$brdgInstance_}"/>
720 <xsl:message>Found <xsl:value-of select="count(exsl:node-set($bridgeShapes_)/BRIDGECONN)"/> busconns </xsl:message>
721 <xsl:message>Drawing connection for bridge <xsl:value-of select="$brdgInstance_"/> at <xsl:value-of select="@POSITION"/> </xsl:message>
724 <xsl:for-each select="exsl:node-set($bridgeShapes_)/BRIDGECONN">
725 <xsl:sort select="@POSITION" data-type="number"/>
727 <xsl:variable name="brdgInstance_" select="@INSTANCE"/>
728 <xsl:variable name="brdgPosition_" select="@POSITION"/>
730 <xsl:variable name="busColor_">
731 <xsl:call-template name="BusType2Color">
732 <xsl:with-param name="iBusType" select="@BUSSTD"/>
736 <xsl:variable name="min_bus_idx_" select="math:min(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUSINDEX)"/>
737 <xsl:variable name="brdg_Y1_" select="($G_SharedBus_Y + ($min_bus_idx_ * $BLKD_SBS_LANE_H) + ceiling($BLKD_SBS_LANE_H div 2) - ceiling($BLKD_MOD_H div 2))"/>
738 <xsl:variable name="brdg_X_" select="($BLKD_INNER_X + $BLKD_BRIDGE_GAP + $BLKD_BUS_LANE_W + (@POSITION * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))))"/>
740 <xsl:variable name="bc_Y_" select="$brdg_Y1_ + $BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2)"/>
741 <xsl:variable name="bc_X_">
743 <xsl:when test="@ORIENTED='WEST'">
744 <xsl:value-of select="($brdg_X_ - $BLKD_BIFC_W)"/>
746 <xsl:when test="@ORIENTED='EAST'">
747 <xsl:value-of select="($brdg_X_ + $BLKD_MOD_W)"/>
752 <!-- Layout the bus conn -->
753 <use x="{$bc_X_}" y="{$bc_Y_}" xlink:href="#{@BUSSTD}_busconn_{@BIFRANK}"/>
755 <!-- Figure out the positions of the lines -->
758 <xsl:variable name="vert_line_x_" select="$bc_X_ + ceiling($BLKD_BIFC_W div 2)"/>
759 <xsl:message>vert line x <xsl:value-of select="$vert_line_x_"/></xsl:message>
760 <xsl:message>bus index <xsl:value-of select="@BUSINDEX"/></xsl:message>
763 <xsl:variable name="vert_line_x_">
765 <xsl:when test="@ORIENTED='WEST'">
766 <xsl:value-of select="($bc_X_ - ($BLKD_BUS_LANE_W - $BLKD_BIFC_W))"/>
768 <xsl:when test="@ORIENTED='EAST'">
769 <xsl:value-of select="($bc_X_ + ($BLKD_BUS_LANE_W - $BLKD_P2P_BUS_W))"/>
774 <!-- At least one of the points is going to be the bus -->
776 <xsl:variable name="vert_line_y1_" select="($G_SharedBus_Y + $BLKD_PROC2SBS_GAP + (@BUSINDEX * $BLKD_SBS_LANE_H))"/>
778 <xsl:variable name="vert_line_y1_" select="($G_SharedBus_Y + (@BUSINDEX * $BLKD_SBS_LANE_H))"/>
779 <xsl:variable name="vert_line_y2_" select="$bc_Y_ + ceiling($BLKD_BIFC_H div 2)"/>
781 <xsl:variable name="v_bus_ul_y_">
783 <xsl:when test="$vert_line_y1_ > $vert_line_y2_">
784 <xsl:value-of select="$vert_line_y2_"/>
786 <xsl:when test="$vert_line_y2_ > $vert_line_y1_">
787 <xsl:value-of select="$vert_line_y1_"/>
792 <xsl:variable name="v_bus_ul_x_" select="$vert_line_x_"/>
794 <xsl:variable name="v_bus_ul_x_">
796 <xsl:when test="@ORIENTED='WEST'">
797 <xsl:value-of select="($vert_line_x_ + $BLKD_MOD_BIF_GAP_H)"/>
799 <xsl:when test="@ORIENTED='EAST'">
800 <xsl:value-of select="($vert_line_x_ - $BLKD_MOD_BIF_GAP_H)"/>
806 <xsl:variable name="v_bus_width_" select="$BLKD_P2P_BUS_W"/>
807 <xsl:variable name="v_bus_height_">
809 <xsl:when test="$vert_line_y1_ > $vert_line_y2_">
810 <xsl:value-of select="($vert_line_y1_ - $vert_line_y2_)"/>
812 <xsl:when test="$vert_line_y2_ > $vert_line_y1_">
813 <xsl:value-of select="($vert_line_y2_ - $vert_line_y1_)"/>
818 <xsl:variable name="h_bus_ul_x_">
820 <xsl:when test="@ORIENTED='WEST'">
821 <xsl:value-of select="($bc_X_ - ($BLKD_BUS_LANE_W - $BLKD_BIFC_W) + $BLKD_MOD_BIF_GAP_H)"/>
823 <xsl:when test="@ORIENTED='EAST'">
824 <xsl:value-of select="($bc_X_ + $BLKD_BIFC_W - ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2))"/>
829 <xsl:variable name="h_bus_ul_y_" select="$bc_Y_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
830 <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/>
832 <xsl:variable name="h_bus_width_">
834 <xsl:when test="@ORIENTED='WEST'">
835 <xsl:value-of select="(($bc_X_ + ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2)) - $h_bus_ul_x_ + 1)"/>
837 <xsl:when test="@ORIENTED='EAST'">
838 <xsl:value-of select="(($v_bus_ul_x_ + $BLKD_P2P_BUS_W) - $h_bus_ul_x_)"/>
845 <xsl:message>vert line y1 <xsl:value-of select="$vert_line_y1_"/></xsl:message>
848 <rect x="{$v_bus_ul_x_}"
849 y="{$v_bus_ul_y_ + 2}"
850 width= "{$v_bus_width_}"
851 height="{$v_bus_height_}"
852 style="stroke:none; fill:{$busColor_}"/>
854 <rect x="{$h_bus_ul_x_}"
856 width= "{$h_bus_width_}"
857 height="{$h_bus_height_}"
858 style="stroke:none; fill:{$busColor_}"/>
867 <!-- =========================================================================== -->
868 <!-- FUNCTION TEMPLATE -->
870 <!-- Draw the IP Bucket -->
871 <!-- =========================================================================== -->
872 <xsl:template name="Draw_BlkDiagram_IPBucket">
874 <!-- Draw IP Bucket -->
875 <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/IPBUCKET">
877 <xsl:variable name="bucket_w_" select="(($BLKD_MOD_BKTLANE_W * 2) + (($BLKD_MOD_W * @MODS_W) + ($BLKD_MOD_BUCKET_G * (@MODS_W - 1))))"/>
878 <xsl:variable name="bucket_h_" select="(($BLKD_MOD_BKTLANE_H * 2) + (($BLKD_MOD_H * @MODS_H) + ($BLKD_MOD_BUCKET_G * (@MODS_H - 1))))"/>
880 <xsl:variable name="bucket_x_" select="(ceiling($G_total_blkd_W div 2) - ceiling($bucket_w_ div 2))"/>
881 <xsl:variable name="bucket_y_" select="($G_SharedBus_Y + $G_total_SharedBus_H + $G_max_Stack_BlwSbs_H + $BLKD_SBS2IP_GAP)"/>
883 <text class="ipclass"
885 y="{$bucket_y_ - 4}">IP</text>
887 <use x="{$bucket_x_}" y="{$bucket_y_}" xlink:href="#ipbucket"/>
894 <xsl:template name="Draw_BlkDiagram_Key">
895 <use x="{ceiling($G_blkd_W div 2) - ceiling($BLKD_KEY_W div 2)}" y="0" xlink:href="#BlkDiagram_Key"/>
898 <xsl:template name="Define_BlkDiagram_Key">
900 <xsl:variable name="key_col_">
901 <xsl:call-template name="BusType2Color">
902 <xsl:with-param name="iBusType" select="'KEY'"/>
906 <xsl:variable name="key_lt_col_">
907 <xsl:call-template name="BusType2LightColor">
908 <xsl:with-param name="iBusType" select="'KEY'"/>
912 <symbol id="KEY_IntrCntrl">
918 width= "{ceiling($BLKD_INTR_W div 2)}"
919 height="{$BLKD_INTR_H}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/>
922 y1="{ceiling($BLKD_INTR_H div 4)}"
923 x2="{ceiling($BLKD_INTR_W div 2)}"
924 y2="{ceiling($BLKD_INTR_H div 4)}"
925 style="stroke:{$COL_BLACK};stroke-width:2"/>
927 <text class="intrsymbol"
929 y="{7 + ceiling($BLKD_INTR_H div 2)}">x</text>
933 <symbol id="KEY_IntrdProc">
939 width= "{ceiling($BLKD_INTR_W div 2)}"
940 height="{$BLKD_INTR_H}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/>
943 y1="{ceiling($BLKD_INTR_H div 4) - 2}"
944 x2="{ceiling($BLKD_INTR_W div 2)}"
945 y2="{ceiling($BLKD_INTR_H div 4) - 2}"
946 style="stroke:{$COL_BLACK};stroke-width:1"/>
949 y1="{ceiling($BLKD_INTR_H div 4) + 2}"
950 x2="{ceiling($BLKD_INTR_W div 2)}"
951 y2="{ceiling($BLKD_INTR_H div 4) + 2}"
952 style="stroke:{$COL_BLACK};stroke-width:1"/>
954 <text class="intrsymbol"
956 y="{7 + ceiling($BLKD_INTR_H div 2)}">x</text>
959 <symbol id="KEY_IntrSrc">
965 width= "{$BLKD_INTR_W}"
966 height="{ceiling($BLKD_INTR_H div 2)}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/>
968 <line x1="{ceiling($BLKD_INTR_W div 2)}"
970 x2="{ceiling($BLKD_INTR_W div 2)}"
971 y2="{ceiling($BLKD_INTR_H div 2)}"
972 style="stroke:{$COL_BLACK};stroke-width:1"/>
974 <text class="intrsymbol"
978 <text class="intrsymbol"
979 x="{2 + ceiling($BLKD_INTR_W div 2)}"
984 <symbol id="BlkDiagram_Key">
988 width= "{$BLKD_KEY_W}"
989 height="{$BLKD_KEY_H}"
990 style="fill:{$COL_BG}; stroke:none;"/>
995 width= "{$BLKD_KEY_W}"
997 style="fill:{$COL_BG}; stroke:none;"/>
999 <text class="keytitle"
1000 x="{ceiling($BLKD_KEY_W div 2)} "
1006 width= "{$BLKD_KEY_W}"
1008 style="fill:{$COL_BG_LT}; stroke:none;"/>
1010 <text class="keyheader"
1011 x="{ceiling($BLKD_KEY_W div 2)} "
1012 y="30">SYMBOLS</text>
1014 <use x="32" y="47" xlink:href="#KEY_Bif" transform="scale(0.75)"/>
1015 <text class="keylabel"
1017 y="60">bus interface</text>
1019 <use x="20" y="68" xlink:href="#KEY_SharedBus"/>
1020 <text class="keylabel"
1022 y="85">shared bus</text>
1024 <text class="keylblul"
1026 y="47">Bus connections</text>
1028 <use x="110" y="58" xlink:href="#KEY_busconn_MASTER"/>
1029 <text class="keylabel"
1031 y="72">master or initiator</text>
1033 <use x="110" y="{58 + (($BLKD_BIFC_H + 4) * 1)}" xlink:href="#KEY_busconn_SLAVE"/>
1034 <text class="keylabel"
1036 y="{72 + (($BLKD_BIFC_H + 4) * 1)}">slave or target</text>
1038 <use x="110" y="{58 + (($BLKD_BIFC_H + 4) * 2)}" xlink:href="#KEY_busconn_MASTER_SLAVE"/>
1039 <text class="keylabel"
1041 y="{72 + (($BLKD_BIFC_H + 4) * 2)}">master slave</text>
1043 <use x="110" y="{58 + (($BLKD_BIFC_H + 4) * 3)}" xlink:href="#KEY_busconn_MONITOR"/>
1044 <text class="keylabel"
1046 y="{72 + (($BLKD_BIFC_H + 4) * 3)}">monitor</text>
1048 <text class="keylblul"
1050 y="47">External Ports</text>
1052 <use x="258" y="58" xlink:href="#KEY_INPort"/>
1053 <text class="keylabel"
1057 <use x="258" y="{58 + ($BLKD_IOP_H * 1) + 4}" xlink:href="#KEY_OUTPort"/>
1058 <text class="keylabel"
1060 y="{72 + ($BLKD_IOP_H * 1) + 4}">output</text>
1062 <use x="258" y="{58 + ($BLKD_IOP_H * 2) + 8}" xlink:href="#KEY_INOUTPort"/>
1063 <text class="keylabel"
1065 y="{72 + ($BLKD_IOP_H * 2) + 8}">inout</text>
1068 <text class="keylblul"
1070 y="47">Interrupts</text>
1072 <use x="380" y="58" xlink:href="#KEY_IntrCntrl"/>
1073 <text class="keylabel"
1075 y="64">interrupt</text>
1076 <text class="keylabel"
1078 y="74">controller</text>
1081 <use x="380" y="88" xlink:href="#KEY_IntrdProc"/>
1082 <text class="keylabel"
1084 y="94">interrupted</text>
1085 <text class="keylabel"
1087 y="104">processor</text>
1090 <use x="380" y="118" xlink:href="#KEY_IntrSrc"/>
1091 <text class="keylabel"
1093 y="124">interrupt</text>
1094 <text class="keylabel"
1096 y="134">source</text>
1098 <text class="keylabel"
1100 y="146">x = controller ID</text>
1102 <text class="keylabel"
1104 y="156">y = priority</text>
1106 <text class="keylabel"
1108 y="134">source</text>
1114 width= "{$BLKD_KEY_W}"
1116 style="fill:{$COL_BG_LT}; stroke:none;"/>
1118 <text class="keyheader"
1119 x="{ceiling($BLKD_KEY_W div 2)} "
1120 y="172">COLORS</text>
1123 <text class="keylblul"
1125 y="190">Bus Standards</text>
1127 <xsl:variable name="dcr_col_">
1128 <xsl:call-template name="BusType2Color">
1129 <xsl:with-param name="iBusType" select="'DCR'"/>
1130 </xsl:call-template>
1134 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 0)}"
1136 width= "{$BLKD_BIFC_H}"
1137 height="{$BLKD_BIFC_W}"
1138 style="fill:{$dcr_col_}; stroke:none;"/>
1139 <text class="keylabel"
1140 x="{12 + $BLKD_BIFC_W + 4}"
1141 y="{200 + (($BLKD_BIF_H + 4) * 1)}">DCR</text>
1143 <xsl:variable name="fcb_col_">
1144 <xsl:call-template name="BusType2Color">
1145 <xsl:with-param name="iBusType" select="'FCB'"/>
1146 </xsl:call-template>
1150 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 0)}"
1151 y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1152 width= "{$BLKD_BIFC_H}"
1153 height="{$BLKD_BIFC_W}"
1154 style="fill:{$fcb_col_}; stroke:none;"/>
1155 <text class="keylabel"
1156 x="{12 + $BLKD_BIFC_W + 4}"
1157 y="{200 + (($BLKD_BIF_H + 4) * 2)}">FCB</text>
1159 <xsl:variable name="fsl_col_">
1160 <xsl:call-template name="BusType2Color">
1161 <xsl:with-param name="iBusType" select="'FSL'"/>
1162 </xsl:call-template>
1166 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1168 width= "{$BLKD_BIFC_H}"
1169 height="{$BLKD_BIFC_W}"
1170 style="fill:{$fsl_col_}; stroke:none;"/>
1171 <text class="keylabel"
1172 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1173 y="{200 + (($BLKD_BIF_H + 4) * 1)}">FSL</text>
1175 <xsl:variable name="col_lmb_">
1176 <xsl:call-template name="BusType2Color">
1177 <xsl:with-param name="iBusType" select="'LMB'"/>
1178 </xsl:call-template>
1182 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1183 y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1184 width= "{$BLKD_BIFC_H}"
1185 height="{$BLKD_BIFC_W}"
1186 style="fill:{$col_lmb_}; stroke:none;"/>
1187 <text class="keylabel"
1188 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1189 y="{200 + (($BLKD_BIF_H + 4) * 2)}">LMB</text>
1192 <xsl:variable name="opb_col_">
1193 <xsl:call-template name="BusType2Color">
1194 <xsl:with-param name="iBusType" select="'OPB'"/>
1195 </xsl:call-template>
1199 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1201 width= "{$BLKD_BIFC_H}"
1202 height="{$BLKD_BIFC_W}"
1203 style="fill:{$opb_col_}; stroke:none;"/>
1204 <text class="keylabel"
1205 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1206 y="{200 + (($BLKD_BIF_H + 4) * 1)}">OPB</text>
1208 <xsl:variable name="plb_col_">
1209 <xsl:call-template name="BusType2Color">
1210 <xsl:with-param name="iBusType" select="'PLB'"/>
1211 </xsl:call-template>
1215 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1216 y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1217 width= "{$BLKD_BIFC_H}"
1218 height="{$BLKD_BIFC_W}"
1219 style="fill:{$plb_col_}; stroke:none;"/>
1220 <text class="keylabel"
1221 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1222 y="{200 + (($BLKD_BIF_H + 4) * 2)}">PLB</text>
1225 <xsl:variable name="ocm_col_">
1226 <xsl:call-template name="BusType2Color">
1227 <xsl:with-param name="iBusType" select="'OCM'"/>
1228 </xsl:call-template>
1232 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1234 width= "{$BLKD_BIFC_H}"
1235 height="{$BLKD_BIFC_W}"
1236 style="fill:{$ocm_col_}; stroke:none;"/>
1237 <text class="keylabel"
1238 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1239 y="{200 + (($BLKD_BIF_H + 4) * 1)}">SOCM</text>
1242 <xsl:variable name="xil_col_">
1243 <xsl:call-template name="BusType2Color">
1244 <xsl:with-param name="iBusType" select="'XIL'"/>
1245 </xsl:call-template>
1249 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1250 y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1251 width= "{$BLKD_BIFC_H}"
1252 height="{$BLKD_BIFC_W}"
1253 style="fill:{$xil_col_}; stroke:none;"/>
1254 <text class="keylabel"
1255 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1256 y="{200 + (($BLKD_BIF_H + 4) * 2)}">XIL (prefix) P2P</text>
1259 <xsl:variable name="trs_col_">
1260 <xsl:call-template name="BusType2Color">
1261 <xsl:with-param name="iBusType" select="'TRS'"/>
1262 </xsl:call-template>
1266 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 4)}"
1268 width= "{$BLKD_BIFC_H}"
1269 height="{$BLKD_BIFC_W}"
1270 style="fill:{$trs_col_}; stroke:none;"/>
1271 <text class="keylabel"
1272 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 4)}"
1273 y="{200 + (($BLKD_BIF_H + 4) * 1)}">GEN. P2P, USER, etc</text>
1278 <xsl:template name="Define_BlkDiagram_Specs">
1280 <xsl:param name="iArch" select="'NA'"/>
1281 <xsl:param name="iPart" select="'NA'"/>
1282 <xsl:param name="iTimeStamp" select="'NA'"/>
1283 <xsl:param name="iEdkVersion" select="'NA'"/>
1285 <symbol id="BlkDiagram_Specs">
1289 width= "{$BLKD_SPECS_W}"
1290 height="{$BLKD_SPECS_H}"
1291 style="fill:{$COL_BG}; stroke:none;"/>
1296 width= "{$BLKD_SPECS_W}"
1298 style="fill:{$COL_BG}; stroke:none;"/>
1300 <text class="keytitle"
1301 x="{ceiling($BLKD_SPECS_W div 2)} "
1307 width= "{$BLKD_SPECS_W}"
1309 style="fill:{$COL_BG_LT}; stroke:none;"/>
1311 <text class="specsheader"
1313 y="32">EDK VERSION</text>
1316 <text class="specsvalue"
1317 x="{($BLKD_SPECS_W + 1) - (string-length($blkd_edkver) * 6.5)}"
1318 y="32"><xsl:value-of select="$blkd_edkver"/></text>
1320 <text class="specsvaluemid"
1321 x="{($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)}"
1322 y="32"><xsl:value-of select="$iEdkVersion"/></text>
1327 width= "{$BLKD_SPECS_W}"
1329 style="fill:{$COL_BG_LT}; stroke:none;"/>
1331 <text class="specsheader"
1336 <text class="specsvalue"
1337 x="{($BLKD_SPECS_W + 1) - (string-length($blkd_arch) * 6.5)}"
1338 y="52"><xsl:value-of select="$blkd_arch"/></text>
1340 <text class="specsvaluemid"
1341 x="{($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)}"
1342 y="52"><xsl:value-of select="$iArch"/></text>
1347 width= "{$BLKD_SPECS_W}"
1349 style="fill:{$COL_BG_LT}; stroke:none;"/>
1351 <text class="specsheader"
1356 <text class="specsvalue"
1357 x="{($BLKD_SPECS_W + 1) - ((string-length($blkd_part) + 2) * 6.5)}"
1358 y="72"><xsl:value-of select="$blkd_part"/></text>
1360 <text class="specsvaluemid"
1361 x="{($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)}"
1362 y="72"><xsl:value-of select="$iPart"/></text>
1367 width= "{$BLKD_SPECS_W}"
1369 style="fill:{$COL_BG_LT}; stroke:none;"/>
1371 <text class="specsheader"
1373 y="92">GENERATED</text>
1375 <text class="specsvalue"
1376 x="{($BLKD_SPECS_W + 1) - (string-length($iTimeStamp) * 6.5)}"
1377 y="92"><xsl:value-of select="$iTimeStamp"/></text>
1388 <!-- =========================================================================== -->
1389 <!-- FUNCTION TEMPLATE -->
1391 <!-- =========================================================================== -->