1 <?xml version="1.0" standalone="no"?>
3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:exsl="http://exslt.org/common"
6 xmlns:dyn="http://exslt.org/dynamic"
7 xmlns:math="http://exslt.org/math"
8 xmlns:xlink="http://www.w3.org/1999/xlink"
9 extension-element-prefixes="math dyn exsl xlink">
13 xmlns:svg="http://www.w3.org/2000/svg"
14 ===============================================
16 ===============================================
18 <xsl:include href="MdtSvgBLKD_Dimensions.xsl"/>
20 <xsl:include href="MdtSvgDiag_Colors.xsl"/>
21 <xsl:include href="MdtSvgDiag_Globals.xsl"/>
22 <xsl:include href="MdtSvgDiag_StyleDefs.xsl"/>
24 <xsl:include href="MdtTinySvgDiag_BifShapes.xsl"/>
26 <xsl:include href="MdtTinySvgBLKD_IOPorts.xsl"/>
27 <xsl:include href="MdtTinySvgBLKD_Busses.xsl"/>
28 <xsl:include href="MdtTinySvgBLKD_Globals.xsl"/>
29 <xsl:include href="MdtTinySvgBLKD_Functions.xsl"/>
30 <xsl:include href="MdtTinySvgBLKD_Peripherals.xsl"/>
31 <xsl:include href="MdtTinySvgBLKD_Processors.xsl"/>
32 <xsl:include href="MdtTinySvgBLKD_BusLaneSpaces.xsl"/>
34 <xsl:output method="xml"
38 doctype-public="-//W3C//DTD SVG 1.1//EN"
39 doctype-system="http://www.w3.org/Graphics/SVG/1.1/svg11-tiny.dtd"/>
42 ===============================================
44 ===============================================
47 <xsl:param name="ADD_VIEWBOX" select="'FALSE'"/>
48 <xsl:param name="IN_TESTMODE" select="'FALSE'"/>
52 <xsl:param name="CSS_SVG_DIAGRAMS" select="'MdtSvgDiag_StyleDefs.css'"/>
53 <xsl:param name="CSS_SVG_DIAGRAMS" select="'__INTERNAL__'"/>
57 ======================================================
58 MAIN BLOCKDIAGRAM TEMPLATE
59 ======================================================
61 <xsl:template match="EDKSYSTEM[not(BLKDIAGRAM)]">
62 <xsl:message>ERROT: Project is missing BLKDIAGRAM Element. Cannot generate.</xsl:message>
65 <xsl:template match="EDKSYSTEM[BLKDIAGRAM]">
68 <xsl:message>STCK_W is <xsl:value-of select="$G_Total_Stacks_W"/></xsl:message>
69 <xsl:message>BRDG_W is <xsl:value-of select="$G_Total_Bridges_W"/></xsl:message>
70 <xsl:message>MPMC is <xsl:value-of select="$G_Total_StandAloneMpmc_H"/></xsl:message>
71 <xsl:message>MPMC is <xsl:value-of select="$G_Total_StandAloneMpmc_H"/></xsl:message>
72 <xsl:message>MABV is <xsl:value-of select="$G_Max_Stack_AbvSbs_H"/></xsl:message>
73 <xsl:message>MBLW is <xsl:value-of select="$G_Max_Stack_BlwSbs_H"/></xsl:message>
74 <xsl:message>IPBK is <xsl:value-of select="$G_Total_IpBucket_H"/></xsl:message>
75 <xsl:message>Blkd Total is <xsl:value-of select="$blkd_H_"/></xsl:message>
76 <xsl:message>max abv is <xsl:value-of select="$max_Stack_AbvSbs_H_"/></xsl:message>
77 <xsl:message>max blw is <xsl:value-of select="$max_Stack_BlwSbs_H_"/></xsl:message>
78 <xsl:message>Ip Bkt is <xsl:value-of select="$totalIpBkt_H_"/></xsl:message>
79 <xsl:message>Sbs is <xsl:value-of select="$totalSbs_H_"/></xsl:message>
80 <xsl:message>Unk Bkt is <xsl:value-of select="$totalUnkBkt_H_"/></xsl:message>
81 <xsl:message>Blkd DrawArea height as <xsl:value-of select="$total_DrawArea_H_"/></xsl:message>
84 <!--specify a css for the file -->
86 <xsl:processing-instruction name="xml-stylesheet">href="<xsl:value-of select="$CSS_SVG_DIAGRAMS"/>" type="text/css"</xsl:processing-instruction>
87 <xsl:variable name="BLKD_ZOOM_Y">
89 <xsl:when test="($ADD_VIEWBOX = 'TRUE')">
90 <xsl:value-of select="($G_Total_Diag_H * 2)"/>
92 <xsl:otherwise>0</xsl:otherwise>
95 <xsl:message>EDWVERSION is <xsl:value-of select="$G_ROOT/EDKSYSTEM/@EDWVERSION"/></xsl:message>
98 <xsl:text> </xsl:text>
100 <svg width="{$G_Total_Diag_W}" height="{$G_Total_Diag_H}" viewBox="0 0 0 {$BLKD_ZOOM_Y}">
102 <svg width="{$G_Total_Diag_W}" height="{$G_Total_Diag_H}">
104 ===============================================
105 Layout All the various definitions
106 ===============================================
110 <!-- IO Port Defs -->
111 <xsl:call-template name="Define_IOPorts"/>
114 <xsl:call-template name="Define_ConnectedBifTypes"/>
117 <xsl:call-template name="Define_Busses"/>
119 <!-- Shared Bus Buckets Defs -->
120 <xsl:call-template name="Define_SBSBuckets"/>
122 <!-- IP Bucket Defs -->
123 <xsl:call-template name="Define_IPBucket"/>
126 <xsl:call-template name="Define_AllStacks"/>
129 <xsl:call-template name="Define_BusLaneSpaces"/>
131 <!-- Main MPMC Defs -->
132 <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE">
133 <xsl:call-template name="Define_StandAlone_MPMC"/>
136 <!-- Diagram Key Definition -->
137 <xsl:call-template name="Define_BlkDiagram_Key"/>
139 <!-- Diagram Specs Definition -->
140 <xsl:call-template name="Define_BlkDiagram_Specs">
141 <xsl:with-param name="iArch" select="SYSTEMINFO/@ARCH"/>
142 <xsl:with-param name="iPart" select="SYSTEMINFO/@PART"/>
143 <xsl:with-param name="iTimeStamp" select="@TIMESTAMP"/>
144 <xsl:with-param name="iEdkVersion" select="@EDKVERSION"/>
149 <!-- =============================================== -->
150 <!-- Draw Outlines -->
151 <!-- =============================================== -->
153 <!-- The surrounding black liner -->
156 width ="{$G_Total_Diag_W}"
157 height="{$G_Total_Diag_H}"
159 stroke="{$COL_BLACK}"
162 <!-- The outer IO channel -->
163 <rect x="{$BLKD_PRTCHAN_W}"
164 y="{$BLKD_PRTCHAN_H}"
165 width= "{$G_Total_Blkd_W - ($BLKD_PRTCHAN_W * 2)}"
166 height="{$G_Total_Blkd_H - ($BLKD_PRTCHAN_H * 2)}" style="fill:{$COL_IORING}"/>
168 <!-- The Diagram's drawing area -->
169 <rect x="{$BLKD_PRTCHAN_W + $BLKD_IORCHAN_W}"
170 y="{$BLKD_PRTCHAN_H + $BLKD_IORCHAN_H}"
173 width= "{$G_Total_DrawArea_W}"
174 height="{$G_Total_DrawArea_H}"
177 <!-- =============================================== -->
178 <!-- Draw All the various components -->
179 <!-- =============================================== -->
181 <!-- Layout the IO Ports -->
183 <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
184 <xsl:call-template name="Draw_IOPorts"/>
188 <!-- Layout the Shapes -->
189 <xsl:call-template name="Draw_BlkDiagram_Shapes"/>
193 <!-- ======================= END MAIN SVG BLOCK =============================== -->
196 <xsl:template name="Draw_BlkDiagram_Shapes">
199 ************************************************************
200 *************** BEGIN DRAWING BLOCK DIAGRAM *************
201 ************************************************************
205 ===========================================================
206 Draw the Stand Alone MPMC, (if any)
207 ===========================================================
209 <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE">
211 <xsl:variable name="mpmc_inst_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE/@INSTANCE"/>
213 <use x="{$BLKD_INNER_X}" y="{$BLKD_INNER_Y}" xlink:href="#mpmcmodule_{$mpmc_inst_}"/>
215 ===========================================================
216 Draw the connections to the Stand Alone MPMC
217 ===========================================================
219 <xsl:call-template name="Draw_BlkDiagram_StandAloneMpmcConnections"/>
223 ===========================================================
225 ===========================================================
227 <xsl:call-template name="Draw_BlkDiagram_Stacks"/>
230 ===========================================================
231 Draw the Bus Lane Spaces
232 ===========================================================
234 <xsl:call-template name="Draw_BlkDiagram_BusLaneSpaces"/>
237 ===========================================================
238 Draw the shared busses
239 ===========================================================
241 <use x="{$BLKD_INNER_X}" y="{$G_SharedBus_Y}" xlink:href="#group_sharedBusses"/>
244 ===========================================================
246 ===========================================================
248 <xsl:call-template name="Draw_BlkDiagram_Bridges"/>
252 ===========================================================
254 ===========================================================
256 <xsl:call-template name="Draw_BlkDiagram_IPBucket"/>
259 ===========================================================
261 ===========================================================
263 <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
264 <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"/>
268 ===========================================================
270 ===========================================================
272 <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
273 <use x="{$BLKD_PRTCHAN_W}" y="{$G_Total_Blkd_H + $BLKD_DRAWAREA2KEY_GAP - 8}" xlink:href="#BlkDiagram_Specs"/>
277 ************************************************************
278 *************** DONE DRAWING BLOCK DIAGRAM **************
279 ************************************************************
285 <!-- ======================================================================= -->
286 <!-- FUNCTION TEMPLATE -->
288 <!-- Draw stacks on the Block Diagram -->
289 <!-- ======================================================================= -->
290 <xsl:template name="Draw_BlkDiagram_Stacks">
292 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE[(@EAST < $G_ROOT/EDKSYSTEM/BLKDIAGRAM/@STACK_HORIZ_WIDTH)]">
294 <xsl:variable name="stack_line_x_">
295 <xsl:call-template name="F_Calc_Stack_X">
296 <xsl:with-param name="iStackIdx" select="@EAST"/>
300 <xsl:variable name="stack_abv_sbs_">
301 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
302 <xsl:with-param name="iStackIdx" select="@EAST"/>
306 <xsl:variable name="bridges_w_" select="(($G_NumOfBridges * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))) + $BLKD_BRIDGE_GAP)"/>
308 <xsl:variable name="stack_y_" select="($G_SharedBus_Y - $stack_abv_sbs_ - $BLKD_PROC2SBS_GAP)"/>
309 <xsl:variable name="stack_x_" select="($BLKD_INNER_X + $stack_line_x_ + $bridges_w_)"/>
311 <xsl:variable name="stack_name_">
312 <xsl:call-template name="F_generate_Stack_Name">
313 <xsl:with-param name="iHorizIdx" select="@EAST"/>
317 <use x="{$stack_x_}" y="{$stack_y_}" xlink:href="#{$stack_name_}"/>
323 <xsl:template name="Draw_BlkDiagram_StandAloneMpmcConnections">
325 <xsl:variable name="mpmcInst_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE/@INSTANCE"/>
326 <xsl:variable name="lastStack_" select="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/@STACK_HORIZ_WIDTH) - 1"/>
329 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE">
330 <xsl:variable name="currentLane_" select="position()"/>
332 <xsl:message>Current lane <xsl:value-of select="$currentLane_"/></xsl:message>
334 <xsl:variable name="stackToEast_">
336 <xsl:when test="not(@WEST = $lastStack_)"><xsl:value-of select="@EAST"/></xsl:when>
337 <xsl:when test=" (@WEST = $lastStack_)"><xsl:value-of select="'NONE'"/></xsl:when>
341 <xsl:variable name="stackToWest_">
343 <xsl:when test="not(@WEST = $lastStack_)"><xsl:value-of select="'NONE'"/></xsl:when>
344 <xsl:when test=" (@WEST = $lastStack_)"><xsl:value-of select="@WEST"/></xsl:when>
348 <xsl:variable name="spaceAbvSbs_H_">
349 <xsl:call-template name="F_Calc_Space_AbvSbs_Height">
350 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
351 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
355 <xsl:variable name="space_y_" select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/>
358 <xsl:message>Stack To East <xsl:value-of select="$stackToEast_"/></xsl:message>
359 <xsl:message>Stack To West <xsl:value-of select="$stackToWest_"/></xsl:message>
360 <xsl:variable name="space_X_">
361 <xsl:call-template name="F_Calc_Space_X">
362 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
363 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
366 <xsl:variable name="space_y_" select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/>
367 <xsl:variable name="space_x_" select="($BLKD_INNER_X + $G_Total_Bridges_W + $space_line_x_)"/>
371 <xsl:for-each select="BUSCONNLANE[@IS_MPMCCONN]">
374 <xsl:variable name="bifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = BUSCONN/@INSTANCE)]/BUSINTERFACE[(@BUSNAME = @BUSNAME)]/@BIF_X"/>
376 <xsl:variable name="bifInst_" select="BUSCONN/@INSTANCE"/>
377 <xsl:variable name="busName_" select="@BUSNAME"/>
378 <xsl:variable name="bifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $bifInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@BIF_X"/>
380 <xsl:variable name="mpmcBifName_">
382 <xsl:when test=" (@IS_SBSCONN)"><xsl:value-of select="BUSCONN/@BUSINTERFACE"/></xsl:when>
383 <xsl:when test="not(@IS_SBSCONN)"><xsl:value-of select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@NAME"/></xsl:when>
384 <xsl:otherwise><xsl:value-of select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@NAME"/></xsl:otherwise>
389 <xsl:message>MPMC Bif Name <xsl:value-of select="$mpmcBifName_"/></xsl:message>
390 <xsl:message>Bif Side <xsl:value-of select="$bifSide_"/></xsl:message>
391 <xsl:message>Bus Name <xsl:value-of select="@BUSNAME"/></xsl:message>
392 <xsl:message>Instance <xsl:value-of select="$bifInst_"/></xsl:message>
393 <xsl:message>Space line x <xsl:value-of select="$space_line_X_"/></xsl:message>
395 <xsl:variable name="space_line_X_">
396 <xsl:call-template name="F_Calc_Space_X">
397 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
398 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
402 <xsl:variable name="space_X_" select="($BLKD_INNER_X + $G_Total_Bridges_W + $space_line_X_)"/>
404 <xsl:variable name = "stackToWest_W_">
406 <xsl:when test="(($stackToEast_ = '0') and ($stackToWest_ = 'NONE'))">0</xsl:when>
407 <xsl:when test="(($stackToEast_ = 'NONE') and not($stackToWest_ = 'NONE'))">
408 <xsl:call-template name="F_Calc_Stack_Width">
409 <xsl:with-param name="iStackIdx" select="$stackToWest_"/>
412 <xsl:when test="(not($stackToEast_ = '0') and not($stackToEast_ = 'NONE') and ($stackToWest_ = 'NONE'))">
413 <xsl:call-template name="F_Calc_Stack_Width">
414 <xsl:with-param name="iStackIdx" select="($stackToEast_ - 1)"/>
417 <xsl:otherwise>0</xsl:otherwise>
421 <xsl:variable name = "stackToEast_W_">
422 <xsl:call-template name="F_Calc_Stack_Width">
423 <xsl:with-param name="iStackIdx" select="$stackToEast_"/>
427 <xsl:variable name ="extSpaceWest_W_" select="ceiling($stackToWest_W_ div 2)"/>
428 <xsl:variable name ="extSpaceEast_W_" select="ceiling($stackToEast_W_ div 2)"/>
429 <xsl:variable name="laneInSpace_X_">
431 <xsl:when test="(@ORIENTED = 'EAST')">
432 <xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W) - $BLKD_BUS_ARROW_W - $BLKD_P2P_BUS_W)"/>
434 <xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W) - $BLKD_BUS_LANE_W - $BLKD_BUS_ARROW_W - $BLKD_P2P_BUS_W)"/>
437 <xsl:otherwise><xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W))"/></xsl:otherwise>
442 <xsl:variable name="lane_X_" select="($space_X_ + $laneInSpace_X_)"/>
444 <xsl:variable name="mpmcBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@NAME = $mpmcBifName_)]/@TYPE"/>
447 <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/>
448 <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/>
449 <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/>
452 <xsl:variable name="bc_Y_" select="($BLKD_INNER_Y + $BLKD_MPMC_MOD_H)"/>
453 <xsl:variable name="bc_X_" >
455 <xsl:when test="($bifSide_ = '0')"><xsl:value-of select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/></xsl:when>
456 <xsl:when test="($bifSide_ = '1')"><xsl:value-of select="($lane_X_ + $BLKD_BIFC_dx)"/></xsl:when>
457 <xsl:otherwise> <xsl:value-of select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/></xsl:otherwise>
461 <xsl:variable name="busColor_">
462 <xsl:call-template name="F_BusStd2RGB">
463 <xsl:with-param name="iBusStd" select="@BUSSTD"/>
467 <!-- Place the MPMC bif label -->
468 <xsl:variable name="bcl_X_" select="($bc_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BIF_W div 2))"/>
469 <xsl:variable name="bcl_Y_" select="($bc_Y_ - $BLKD_BIF_H - $BLKD_MOD_BIF_GAP_H)"/>
470 <use x="{$bcl_X_}" y="{$bcl_Y_}" xlink:href="#{@BUSSTD}_BifLabel"/>
472 <xsl:call-template name="F_WriteText">
473 <xsl:with-param name="iX" select="($bcl_X_ + ceiling($BLKD_BIF_W div 2))"/>
474 <xsl:with-param name="iY" select="($bcl_Y_ + ceiling($BLKD_BIF_H div 2) + 3)"/>
475 <xsl:with-param name="iText" select="$mpmcBifName_"/>
476 <xsl:with-param name="iClass" select="'mpmc_biflabel'"/>
479 <!-- Place the MPMC bif -->
480 <use x="{$bc_X_}" y="{$bc_Y_}" xlink:href="#{@BUSSTD}_busconn_{$mpmcBifType_}"/>
484 <xsl:variable name="bcArrow_X_" select="($bc_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_H div 2))"/>
485 <xsl:variable name="bcArrow_Y_" select="($bc_Y_ + $BLKD_BIFC_H - 3)"/>
487 <!-- Place the MPMC Arrow -->
488 <use x="{$bcArrow_X_}" y="{$bcArrow_Y_}" xlink:href="#{@BUSSTD}_BusArrowNorth"/>
491 Place a block to cover the gap btw MPMC and top of Bus Lane Space, or to the correct SBS
492 For non SBS connections a vertical block will already have been drawn to the top of the
496 <xsl:variable name="sbsDy_">
498 <xsl:when test="@IS_SBSCONN"><xsl:value-of select="2 + ($G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $busName_)]/@BUS_INDEX * $BLKD_SBS_LANE_H)"/></xsl:when>
499 <xsl:when test="not(@IS_SBSCONN)">0</xsl:when>
500 <xsl:otherwise>0></xsl:otherwise>
504 <xsl:variable name="mpmcBusHeight_">
506 <xsl:when test="(@IS_SBSCONN)"><xsl:value-of select="($G_SharedBus_Y - ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4) + $sbsDy_)"/></xsl:when>
507 <xsl:when test="not(@IS_SBSCONN)">
509 <xsl:when test="($space_y_ >= ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))">
510 <xsl:value-of select="($space_y_ - ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))"/>
512 <xsl:when test="($space_y_ < ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))">
513 <xsl:value-of select="(($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_) - $space_y_)"/>
517 <xsl:otherwise><xsl:value-of select="$BLKD_BIFC_H"/></xsl:otherwise>
521 <rect x="{$bcArrow_X_ + $BLKD_BUS_ARROW_G}"
522 y="{$bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4}"
523 width= "{$BLKD_P2P_BUS_W}"
524 height="{$mpmcBusHeight_}"
525 style="stroke:none; fill:{$busColor_}"/>
527 <!-- place the bus label here -->
529 <xsl:call-template name="F_WriteText">
530 <xsl:with-param name="iX" select="($bcArrow_X_ + $BLKD_BUS_ARROW_W + 6)"/>
531 <xsl:with-param name="iY" select="($bcArrow_Y_ + ceiling($mpmcBusHeight_ div 2) + 6)"/>
532 <xsl:with-param name="iText" select="$busName_"/>
533 <xsl:with-param name="iClass" select="'p2pbus_label'"/>
542 <!-- ======================================================================= -->
543 <!-- FUNCTION TEMPLATE -->
545 <!-- Draw bus lane spaces on the Block Diagram -->
546 <!-- ======================================================================= -->
547 <xsl:template name="Draw_BlkDiagram_BusLaneSpaces">
549 <xsl:variable name="lastStack_" select="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/@STACK_HORIZ_WIDTH) - 1"/>
551 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE[@EAST]">
552 <xsl:sort select="@EAST" data-type="number"/>
554 <xsl:call-template name="Draw_BlkDiagram_BusLaneSpace">
555 <xsl:with-param name="iStackToEast" select="@EAST"/>
559 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE[(@WEST = $lastStack_)]">
560 <xsl:call-template name="Draw_BlkDiagram_BusLaneSpace">
561 <xsl:with-param name="iStackToWest" select="$lastStack_"/>
567 <xsl:template name="Draw_BlkDiagram_BusLaneSpace">
569 <xsl:param name="iStackToEast" select="'NONE'"/>
570 <xsl:param name="iStackToWest" select="'NONE'"/>
572 <xsl:variable name="spaceAbvSbs_H_">
573 <xsl:call-template name="F_Calc_Space_AbvSbs_Height">
574 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
575 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
579 <xsl:variable name="spaceBlwSbs_H_">
580 <xsl:call-template name="F_Calc_Space_BlwSbs_Height">
581 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
582 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
586 <xsl:variable name="space_line_x_">
587 <xsl:call-template name="F_Calc_Space_X">
588 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
589 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
593 <xsl:variable name="space_y_" select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/>
594 <xsl:variable name="space_x_" select="($BLKD_INNER_X + $G_Total_Bridges_W + $space_line_x_)"/>
596 <xsl:variable name="stackToEast_">
598 <xsl:when test="not($iStackToEast = 'NONE')"><xsl:value-of select="$iStackToEast"/></xsl:when>
599 <xsl:otherwise>NONE</xsl:otherwise>
603 <xsl:variable name="stackToWest_">
605 <xsl:when test=" not($iStackToWest = 'NONE')"><xsl:value-of select="$iStackToWest"/></xsl:when>
606 <xsl:when test="(not($iStackToEast = 'NONE') and not($iStackToEast = '0'))"><xsl:value-of select="($iStackToEast - 1)"/></xsl:when>
607 <xsl:otherwise>NONE</xsl:otherwise>
612 <xsl:variable name="space_Name_">
613 <xsl:call-template name="F_generate_Space_Name">
614 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
615 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
620 <xsl:message>StackToEast is <xsl:value-of select="$iStackToEast"/></xsl:message>
621 <xsl:message>StackToWest is <xsl:value-of select="$iStackToWest"/></xsl:message>
622 <xsl:message>SpaceName is <xsl:value-of select="$space_Name_"/></xsl:message>
625 <use x="{$space_x_}" y="{$space_y_}" xlink:href="#{$space_Name_}"/>
630 <!-- =========================================================================== -->
631 <!-- FUNCTION TEMPLATE -->
633 <!-- Draw Bridges on the Block Diagram -->
634 <!-- =========================================================================== -->
635 <xsl:template name="Draw_BlkDiagram_Bridges">
637 <!-- First save all the bridge indexs in a variable -->
638 <xsl:variable name="bridgeShapes_">
639 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BRIDGESHAPES/MODULE/BUSCONNS[(@ORIENTED = 'WEST')]/BUSCONN">
640 <BRIDGE BUS_INDEX="{@BUS_INDEX}" INSTANCE="{../../@INSTANCE}" POSITION="{(position() -1)}"/>
641 <BRIDGECONN BUS_INDEX="{@BUS_INDEX}" INSTANCE="{../../@INSTANCE}" ORIENTED="{../@ORIENTED}" POSITION="{(position() - 1)}" BUSSTD="{@BUSSTD}" TYPE="{@TYPE}"/>
642 <!-- So both bus conns have same position.... -->
643 <xsl:if test="../../BUSCONNS[(@ORIENTED = 'EAST')]">
644 <BRIDGECONN BUS_INDEX="{../../BUSCONNS[(@ORIENTED ='EAST')]/BUSCONN/@BUS_INDEX}" INSTANCE="{../../@INSTANCE}" ORIENTED="EAST" POSITION="{(position() - 1)}" BUSSTD="{../../BUSCONNS[(@ORIENTED = 'EAST')]/BUSCONN/@BUSSTD}" TYPE="{../../BUSCONNS[(@ORIENTED = 'EAST')]/BUSCONN/@TYPE}"/>
649 <xsl:message>Found an east connection on <xsl:value-of select="../../@INSTANCE"/></xsl:message>
651 <!-- Now layout the bridge shapes between the shared busses -->
652 <xsl:for-each select="exsl:node-set($bridgeShapes_)/BRIDGE">
653 <xsl:sort select="@POSITION" data-type="number"/>
655 <xsl:variable name="brdgPosition_" select="@POSITION"/>
656 <xsl:variable name="brdgInstance_" select="@INSTANCE"/>
658 <xsl:variable name="min_bus_idx_" select="math:min(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUS_INDEX)"/>
660 <xsl:variable name="max_bus_idx_" select="math:max(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUS_INDEX)"/>
662 <xsl:message>Maximum index <xsl:value-of select="$max_bus_idx_"/></xsl:message>
663 <xsl:message>Minimum index <xsl:value-of select="$min_bus_idx_"/></xsl:message>
667 <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))))"/>
668 <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))"/>
670 <use x="{$brdg_X_}" y="{$brdg_Y_}" xlink:href="#symbol_{$brdgInstance_}"/>
676 <xsl:message>Found <xsl:value-of select="count(exsl:node-set($bridgeShapes_)/BRIDGECONN)"/> busconns </xsl:message>
677 <xsl:message>Drawing connection for bridge <xsl:value-of select="$brdgInstance_"/> at <xsl:value-of select="@POSITION"/> </xsl:message>
680 <xsl:for-each select="exsl:node-set($bridgeShapes_)/BRIDGECONN">
681 <xsl:sort select="@POSITION" data-type="number"/>
683 <xsl:variable name="brdgInstance_" select="@INSTANCE"/>
684 <xsl:variable name="brdgPosition_" select="@POSITION"/>
686 <xsl:variable name="busColor_">
687 <xsl:call-template name="F_BusStd2RGB">
688 <xsl:with-param name="iBusStd" select="@BUSSTD"/>
692 <xsl:variable name="min_bus_idx_" select="math:min(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUS_INDEX)"/>
693 <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))"/>
694 <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))))"/>
696 <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)"/>
697 <xsl:variable name="bc_X_">
699 <xsl:when test="@ORIENTED='WEST'">
700 <xsl:value-of select="($brdg_X_ - $BLKD_BIFC_W)"/>
702 <xsl:when test="@ORIENTED='EAST'">
703 <xsl:value-of select="($brdg_X_ + $BLKD_MOD_W)"/>
708 <!-- Layout the bus conn -->
709 <use x="{$bc_X_}" y="{$bc_Y_}" xlink:href="#{@BUSSTD}_busconn_{@TYPE}"/>
711 <!-- Figure out the positions of the lines -->
714 <xsl:variable name="vert_line_x_" select="$bc_X_ + ceiling($BLKD_BIFC_W div 2)"/>
715 <xsl:message>vert line x <xsl:value-of select="$vert_line_x_"/></xsl:message>
716 <xsl:message>bus index <xsl:value-of select="@BUS_INDEX"/></xsl:message>
719 <xsl:variable name="vert_line_x_">
721 <xsl:when test="@ORIENTED='WEST'">
722 <xsl:value-of select="($bc_X_ - ($BLKD_BUS_LANE_W - $BLKD_BIFC_W))"/>
724 <xsl:when test="@ORIENTED='EAST'">
725 <xsl:value-of select="($bc_X_ + ($BLKD_BUS_LANE_W - $BLKD_P2P_BUS_W))"/>
730 <!-- At least one of the points is going to be the bus -->
732 <xsl:variable name="vert_line_y1_" select="($G_SharedBus_Y + $BLKD_PROC2SBS_GAP + (@BUS_INDEX * $BLKD_SBS_LANE_H))"/>
734 <xsl:variable name="vert_line_y1_" select="($G_SharedBus_Y + (@BUS_INDEX * $BLKD_SBS_LANE_H))"/>
735 <xsl:variable name="vert_line_y2_" select="$bc_Y_ + ceiling($BLKD_BIFC_H div 2)"/>
737 <xsl:variable name="v_bus_ul_y_">
739 <xsl:when test="$vert_line_y1_ > $vert_line_y2_">
740 <xsl:value-of select="$vert_line_y2_"/>
742 <xsl:when test="$vert_line_y2_ > $vert_line_y1_">
743 <xsl:value-of select="$vert_line_y1_"/>
748 <xsl:variable name="v_bus_ul_x_" select="$vert_line_x_"/>
750 <xsl:variable name="v_bus_ul_x_">
752 <xsl:when test="@ORIENTED='WEST'">
753 <xsl:value-of select="($vert_line_x_ + $BLKD_MOD_BIF_GAP_H)"/>
755 <xsl:when test="@ORIENTED='EAST'">
756 <xsl:value-of select="($vert_line_x_ - $BLKD_MOD_BIF_GAP_H)"/>
762 <xsl:variable name="v_bus_width_" select="$BLKD_P2P_BUS_W"/>
763 <xsl:variable name="v_bus_height_">
765 <xsl:when test="$vert_line_y1_ > $vert_line_y2_">
766 <xsl:value-of select="($vert_line_y1_ - $vert_line_y2_)"/>
768 <xsl:when test="$vert_line_y2_ > $vert_line_y1_">
769 <xsl:value-of select="($vert_line_y2_ - $vert_line_y1_)"/>
774 <xsl:variable name="h_bus_ul_x_">
776 <xsl:when test="@ORIENTED='WEST'">
777 <xsl:value-of select="($bc_X_ - ($BLKD_BUS_LANE_W - $BLKD_BIFC_W) + $BLKD_MOD_BIF_GAP_H)"/>
779 <xsl:when test="@ORIENTED='EAST'">
780 <xsl:value-of select="($bc_X_ + $BLKD_BIFC_W - ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2))"/>
785 <xsl:variable name="h_bus_ul_y_" select="$bc_Y_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
786 <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/>
788 <xsl:variable name="h_bus_width_">
790 <xsl:when test="@ORIENTED='WEST'">
791 <xsl:value-of select="(($bc_X_ + ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2)) - $h_bus_ul_x_ + 1)"/>
793 <xsl:when test="@ORIENTED='EAST'">
794 <xsl:value-of select="(($v_bus_ul_x_ + $BLKD_P2P_BUS_W) - $h_bus_ul_x_)"/>
801 <xsl:message>vert line y1 <xsl:value-of select="$vert_line_y1_"/></xsl:message>
804 <rect x="{$v_bus_ul_x_}"
805 y="{$v_bus_ul_y_ + 2}"
806 width= "{$v_bus_width_}"
807 height="{$v_bus_height_}"
808 style="stroke:none; fill:{$busColor_}"/>
810 <rect x="{$h_bus_ul_x_}"
812 width= "{$h_bus_width_}"
813 height="{$h_bus_height_}"
814 style="stroke:none; fill:{$busColor_}"/>
823 <!-- =========================================================================== -->
824 <!-- FUNCTION TEMPLATE -->
826 <!-- Draw the IP Bucket -->
827 <!-- =========================================================================== -->
828 <xsl:template name="Draw_BlkDiagram_IPBucket">
830 <!-- Draw IP Bucket -->
831 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/IPBUCKET">
833 <xsl:variable name="bucket_w_" select="(($BLKD_MOD_BKTLANE_W * 2) + (($BLKD_MOD_W * @MODS_W) + ($BLKD_MOD_BUCKET_G * (@MODS_W - 1))))"/>
834 <xsl:variable name="bucket_h_" select="(($BLKD_MOD_BKTLANE_H * 2) + (($BLKD_MOD_H * @MODS_H) + ($BLKD_MOD_BUCKET_G * (@MODS_H - 1))))"/>
836 <xsl:variable name="bucket_x_" select="(ceiling($G_Total_Blkd_W div 2) - ceiling($bucket_w_ div 2))"/>
837 <xsl:variable name="bucket_y_" select="($G_SharedBus_Y + $G_Total_SharedBus_H + $G_Max_Stack_BlwSbs_H + $BLKD_SBS2IP_GAP)"/>
839 <xsl:call-template name="F_WriteText">
840 <xsl:with-param name="iX" select="$bucket_x_"/>
841 <xsl:with-param name="iY" select="($bucket_y_ - 4)"/>
842 <xsl:with-param name="iText" select="'IP'"/>
843 <xsl:with-param name="iClass" select="'bkt_label'"/>
846 <use x="{$bucket_x_}" y="{$bucket_y_}" xlink:href="#ipbucket"/>
853 <xsl:template name="Draw_BlkDiagram_Key">
854 <use x="{ceiling($G_Total_Blkd_W div 2) - ceiling($BLKD_KEY_W div 2)}" y="0" xlink:href="#BlkDiagram_Key"/>
857 <xsl:template name="Define_BlkDiagram_Key">
859 <xsl:variable name="key_col_">
860 <xsl:call-template name="F_BusStd2RGB">
861 <xsl:with-param name="iBusStd" select="'KEY'"/>
865 <xsl:variable name="key_lt_col_">
866 <xsl:call-template name="F_BusStd2RGB_LT">
867 <xsl:with-param name="iBusStd" select="'KEY'"/>
871 <g id="KEY_IntrCntrl">
877 width= "{ceiling($BLKD_INTR_W div 2)}"
878 height="{$BLKD_INTR_H}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/>
881 y1="{ceiling($BLKD_INTR_H div 4)}"
882 x2="{ceiling($BLKD_INTR_W div 2)}"
883 y2="{ceiling($BLKD_INTR_H div 4)}"
884 style="stroke:{$COL_BLACK};stroke-width:2"/>
886 <xsl:call-template name="F_WriteText">
887 <xsl:with-param name="iX" select="1.5"/>
888 <xsl:with-param name="iY" select="(7 + ceiling($BLKD_INTR_H div 2))"/>
889 <xsl:with-param name="iText" select="'x'"/>
890 <xsl:with-param name="iClass" select="'intr_symbol'"/>
895 <g id="KEY_IntrdProc">
901 width= "{ceiling($BLKD_INTR_W div 2)}"
902 height="{$BLKD_INTR_H}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/>
905 y1="{ceiling($BLKD_INTR_H div 4) - 2}"
906 x2="{ceiling($BLKD_INTR_W div 2)}"
907 y2="{ceiling($BLKD_INTR_H div 4) - 2}"
908 style="stroke:{$COL_BLACK};stroke-width:1"/>
911 y1="{ceiling($BLKD_INTR_H div 4) + 2}"
912 x2="{ceiling($BLKD_INTR_W div 2)}"
913 y2="{ceiling($BLKD_INTR_H div 4) + 2}"
914 style="stroke:{$COL_BLACK};stroke-width:1"/>
916 <xsl:call-template name="F_WriteText">
917 <xsl:with-param name="iX" select="1.5"/>
918 <xsl:with-param name="iY" select="(7 + ceiling($BLKD_INTR_H div 2))"/>
919 <xsl:with-param name="iText" select="'x'"/>
920 <xsl:with-param name="iClass" select="'intr_symbol'"/>
930 width= "{$BLKD_INTR_W}"
931 height="{ceiling($BLKD_INTR_H div 2)}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/>
933 <line x1="{ceiling($BLKD_INTR_W div 2)}"
935 x2="{ceiling($BLKD_INTR_W div 2)}"
936 y2="{ceiling($BLKD_INTR_H div 2)}"
937 style="stroke:{$COL_BLACK};stroke-width:1"/>
939 <xsl:call-template name="F_WriteText">
940 <xsl:with-param name="iX" select="'2'"/>
941 <xsl:with-param name="iY" select="'7'"/>
942 <xsl:with-param name="iText" select="'y'"/>
943 <xsl:with-param name="iClass" select="'intr_symbol'"/>
946 <xsl:call-template name="F_WriteText">
947 <xsl:with-param name="iX" select="(2 + ceiling($BLKD_INTR_W div 2))"/>
948 <xsl:with-param name="iY" select="'7'"/>
949 <xsl:with-param name="iText" select="'x'"/>
950 <xsl:with-param name="iClass" select="'intr_symbol'"/>
955 <g id="BlkDiagram_Key">
959 width= "{$BLKD_KEY_W}"
960 height="{$BLKD_KEY_H}"
961 style="fill:{$COL_BG}; stroke:none;"/>
965 width= "{$BLKD_KEY_W}"
967 style="fill:{$COL_BG}; stroke:none;"/>
969 <xsl:call-template name="F_WriteText">
970 <xsl:with-param name="iX" select="ceiling($BLKD_KEY_W div 2)"/>
971 <xsl:with-param name="iY" select="'14'"/>
972 <xsl:with-param name="iText" select="'KEY'"/>
973 <xsl:with-param name="iClass" select="'key_title'"/>
978 width= "{$BLKD_KEY_W}"
980 style="fill:{$COL_BG_LT}; stroke:none;"/>
982 <xsl:call-template name="F_WriteText">
983 <xsl:with-param name="iX" select="ceiling($BLKD_KEY_W div 2)"/>
984 <xsl:with-param name="iY" select="'30'"/>
985 <xsl:with-param name="iText" select="'SYMBOLS'"/>
986 <xsl:with-param name="iClass" select="'key_header'"/>
989 <use x="32" y="47" xlink:href="#KEY_BifLabel" transform="scale(0.75)"/>
990 <xsl:call-template name="F_WriteText">
991 <xsl:with-param name="iX" select="'12'"/>
992 <xsl:with-param name="iY" select="'60'"/>
993 <xsl:with-param name="iText" select="'bus interface'"/>
994 <xsl:with-param name="iClass" select="'key_label'"/>
997 <use x="20" y="68" xlink:href="#KEY_SharedBus"/>
998 <xsl:call-template name="F_WriteText">
999 <xsl:with-param name="iX" select="'12'"/>
1000 <xsl:with-param name="iY" select="'89'"/>
1001 <xsl:with-param name="iText" select="'shared bus'"/>
1002 <xsl:with-param name="iClass" select="'key_label'"/>
1003 </xsl:call-template>
1007 ==================================
1009 ==================================
1012 <xsl:call-template name="F_WriteText">
1013 <xsl:with-param name="iX" select="'110'"/>
1014 <xsl:with-param name="iY" select="'47'"/>
1015 <xsl:with-param name="iText" select="'Bus connections'"/>
1016 <xsl:with-param name="iClass" select="'key_label_ul'"/>
1017 </xsl:call-template>
1019 <use x="110" y="58" xlink:href="#KEY_busconn_MASTER"/>
1020 <xsl:call-template name="F_WriteText">
1021 <xsl:with-param name="iX" select="'140'"/>
1022 <xsl:with-param name="iY" select="'72'"/>
1023 <xsl:with-param name="iText" select="'master or initiator'"/>
1024 <xsl:with-param name="iClass" select="'key_label'"/>
1025 </xsl:call-template>
1027 <use x="110" y="{58 + (($BLKD_BIFC_H + 4) * 1)}" xlink:href="#KEY_busconn_SLAVE"/>
1028 <xsl:call-template name="F_WriteText">
1029 <xsl:with-param name="iX" select="'140'"/>
1030 <xsl:with-param name="iY" select="(72 + (($BLKD_BIFC_H + 4) * 1))"/>
1031 <xsl:with-param name="iText" select="'slave or target'"/>
1032 <xsl:with-param name="iClass" select="'key_label'"/>
1033 </xsl:call-template>
1035 <use x="110" y="{58 + (($BLKD_BIFC_H + 4) * 2)}" xlink:href="#KEY_busconn_MASTER_SLAVE"/>
1036 <xsl:call-template name="F_WriteText">
1037 <xsl:with-param name="iX" select="'140'"/>
1038 <xsl:with-param name="iY" select="(72 + (($BLKD_BIFC_H + 4) * 2))"/>
1039 <xsl:with-param name="iText" select="'master slave'"/>
1040 <xsl:with-param name="iClass" select="'key_label'"/>
1041 </xsl:call-template>
1044 <use x="110" y="{58 + (($BLKD_BIFC_H + 4) * 3)}" xlink:href="#KEY_busconn_MONITOR"/>
1045 <xsl:call-template name="F_WriteText">
1046 <xsl:with-param name="iX" select="'140'"/>
1047 <xsl:with-param name="iY" select="(72 + (($BLKD_BIFC_H + 4) * 3))"/>
1048 <xsl:with-param name="iText" select="'monitor'"/>
1049 <xsl:with-param name="iClass" select="'key_label'"/>
1050 </xsl:call-template>
1053 ==================================
1055 ==================================
1057 <xsl:call-template name="F_WriteText">
1058 <xsl:with-param name="iX" select="'258'"/>
1059 <xsl:with-param name="iY" select="'47'"/>
1060 <xsl:with-param name="iText" select="'External Ports'"/>
1061 <xsl:with-param name="iClass" select="'key_label_ul'"/>
1062 </xsl:call-template>
1064 <use x="258" y="58" xlink:href="#KEY_INPort"/>
1065 <xsl:call-template name="F_WriteText">
1066 <xsl:with-param name="iX" select="'288'"/>
1067 <xsl:with-param name="iY" select="'72'"/>
1068 <xsl:with-param name="iText" select="'input'"/>
1069 <xsl:with-param name="iClass" select="'key_label'"/>
1070 </xsl:call-template>
1072 <use x="258" y="{58 + ($BLKD_IOP_H * 1) + 4}" xlink:href="#KEY_OUTPort"/>
1073 <xsl:call-template name="F_WriteText">
1074 <xsl:with-param name="iX" select="'288'"/>
1075 <xsl:with-param name="iY" select="(72 + ($BLKD_IOP_H * 1) + 4)"/>
1076 <xsl:with-param name="iText" select="'output'"/>
1077 <xsl:with-param name="iClass" select="'key_label'"/>
1078 </xsl:call-template>
1080 <use x="258" y="{58 + ($BLKD_IOP_H * 2) + 8}" xlink:href="#KEY_INOUTPort"/>
1081 <xsl:call-template name="F_WriteText">
1082 <xsl:with-param name="iX" select="'288'"/>
1083 <xsl:with-param name="iY" select="(72 + ($BLKD_IOP_H * 2) + 8)"/>
1084 <xsl:with-param name="iText" select="'inout'"/>
1085 <xsl:with-param name="iClass" select="'key_label'"/>
1086 </xsl:call-template>
1090 ==================================
1092 ==================================
1094 <xsl:call-template name="F_WriteText">
1095 <xsl:with-param name="iX" select="'380'"/>
1096 <xsl:with-param name="iY" select="'47'"/>
1097 <xsl:with-param name="iText" select="'Interrupts'"/>
1098 <xsl:with-param name="iClass" select="'key_label_ul'"/>
1099 </xsl:call-template>
1101 <use x="380" y="58" xlink:href="#KEY_IntrCntrl"/>
1102 <xsl:call-template name="F_WriteText">
1103 <xsl:with-param name="iX" select="'396'"/>
1104 <xsl:with-param name="iY" select="'64'"/>
1105 <xsl:with-param name="iText" select="'Interrupt'"/>
1106 <xsl:with-param name="iClass" select="'key_label_small'"/>
1107 </xsl:call-template>
1108 <xsl:call-template name="F_WriteText">
1109 <xsl:with-param name="iX" select="'396'"/>
1110 <xsl:with-param name="iY" select="'74'"/>
1111 <xsl:with-param name="iText" select="'Controller'"/>
1112 <xsl:with-param name="iClass" select="'key_label_small'"/>
1113 </xsl:call-template>
1116 <use x="380" y="88" xlink:href="#KEY_IntrdProc"/>
1117 <xsl:call-template name="F_WriteText">
1118 <xsl:with-param name="iX" select="'396'"/>
1119 <xsl:with-param name="iY" select="'94'"/>
1120 <xsl:with-param name="iText" select="'Interrupt'"/>
1121 <xsl:with-param name="iClass" select="'key_label'"/>
1122 </xsl:call-template>
1123 <xsl:call-template name="F_WriteText">
1124 <xsl:with-param name="iX" select="'396'"/>
1125 <xsl:with-param name="iY" select="'104'"/>
1126 <xsl:with-param name="iText" select="'Target'"/>
1127 <xsl:with-param name="iClass" select="'key_label_small'"/>
1128 </xsl:call-template>
1131 <use x="380" y="118" xlink:href="#KEY_IntrSrc"/>
1132 <xsl:call-template name="F_WriteText">
1133 <xsl:with-param name="iX" select="'400'"/>
1134 <xsl:with-param name="iY" select="'124'"/>
1135 <xsl:with-param name="iText" select="'Interrupt'"/>
1136 <xsl:with-param name="iClass" select="'key_label_small'"/>
1137 </xsl:call-template>
1138 <xsl:call-template name="F_WriteText">
1139 <xsl:with-param name="iX" select="'400'"/>
1140 <xsl:with-param name="iY" select="'134'"/>
1141 <xsl:with-param name="iText" select="'Source'"/>
1142 <xsl:with-param name="iClass" select="'key_label_small'"/>
1143 </xsl:call-template>
1145 <xsl:call-template name="F_WriteText">
1146 <xsl:with-param name="iX" select="'360'"/>
1147 <xsl:with-param name="iY" select="'146'"/>
1148 <xsl:with-param name="iText" select="'X = Controller ID'"/>
1149 <xsl:with-param name="iClass" select="'key_label_small'"/>
1150 </xsl:call-template>
1151 <xsl:call-template name="F_WriteText">
1152 <xsl:with-param name="iX" select="'360'"/>
1153 <xsl:with-param name="iY" select="'156'"/>
1154 <xsl:with-param name="iText" select="'Y = Interrupt Priority'"/>
1155 <xsl:with-param name="iClass" select="'key_label_small'"/>
1156 </xsl:call-template>
1159 ==================================
1161 ==================================
1165 width= "{$BLKD_KEY_W}"
1167 style="fill:{$COL_BG_LT}; stroke:none;"/>
1169 <xsl:call-template name="F_WriteText">
1170 <xsl:with-param name="iX" select="ceiling($BLKD_KEY_W div 2)"/>
1171 <xsl:with-param name="iY" select="'172'"/>
1172 <xsl:with-param name="iText" select="'COLORS'"/>
1173 <xsl:with-param name="iClass" select="'key_header'"/>
1174 </xsl:call-template>
1177 <text class="keylblul"
1179 y="190">Bus Standards</text>
1181 <xsl:call-template name="F_WriteText">
1182 <xsl:with-param name="iX" select="'110'"/>
1183 <xsl:with-param name="iY" select="'190'"/>
1184 <xsl:with-param name="iText" select="'Bus Standard'"/>
1185 <xsl:with-param name="iClass" select="'key_label'"/>
1186 </xsl:call-template>
1188 <xsl:variable name="dcr_col_">
1189 <xsl:call-template name="F_BusStd2RGB">
1190 <xsl:with-param name="iBusStd" select="'DCR'"/>
1191 </xsl:call-template>
1194 <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 0)}"
1196 width= "{$BLKD_BIFC_H}"
1197 height="{$BLKD_BIFC_W}"
1198 style="fill:{$dcr_col_}; stroke:none;"/>
1201 <text class="keylabel"
1202 x="{12 + $BLKD_BIFC_W + 4}"
1203 y="{200 + (($BLKD_BIF_H + 4) * 1)}">DCR</text>
1205 <xsl:call-template name="F_WriteText">
1206 <xsl:with-param name="iX" select="(12 + $BLKD_BIFC_W + 4)"/>
1207 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/>
1208 <xsl:with-param name="iText" select="'DCR'"/>
1209 <xsl:with-param name="iClass" select="'key_label'"/>
1210 </xsl:call-template>
1212 <xsl:variable name="fcb_col_">
1213 <xsl:call-template name="F_BusStd2RGB">
1214 <xsl:with-param name="iBusStd" select="'FCB'"/>
1215 </xsl:call-template>
1218 <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 0)}"
1219 y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1220 width= "{$BLKD_BIFC_H}"
1221 height="{$BLKD_BIFC_W}"
1222 style="fill:{$fcb_col_}; stroke:none;"/>
1225 <text class="keylabel"
1226 x="{12 + $BLKD_BIFC_W + 4}"
1227 y="{200 + (($BLKD_BIF_H + 4) * 2)}">FCB</text>
1229 <xsl:call-template name="F_WriteText">
1230 <xsl:with-param name="iX" select="(12 + $BLKD_BIFC_W + 4)"/>
1231 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 2))"/>
1232 <xsl:with-param name="iText" select="'FCB'"/>
1233 <xsl:with-param name="iClass" select="'key_label'"/>
1234 </xsl:call-template>
1236 <xsl:variable name="fsl_col_">
1237 <xsl:call-template name="F_BusStd2RGB">
1238 <xsl:with-param name="iBusStd" select="'FSL'"/>
1239 </xsl:call-template>
1242 <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1244 width= "{$BLKD_BIFC_H}"
1245 height="{$BLKD_BIFC_W}"
1246 style="fill:{$fsl_col_}; stroke:none;"/>
1248 <text class="keylabel"
1249 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1250 y="{200 + (($BLKD_BIF_H + 4) * 1)}">FSL</text>
1253 <xsl:call-template name="F_WriteText">
1254 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1))"/>
1255 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/>
1256 <xsl:with-param name="iText" select="'FSL'"/>
1257 <xsl:with-param name="iClass" select="'key_label'"/>
1258 </xsl:call-template>
1260 <xsl:variable name="col_lmb_">
1261 <xsl:call-template name="F_BusStd2RGB">
1262 <xsl:with-param name="iBusStd" select="'LMB'"/>
1263 </xsl:call-template>
1266 <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1267 y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1268 width= "{$BLKD_BIFC_H}"
1269 height="{$BLKD_BIFC_W}"
1270 style="fill:{$col_lmb_}; stroke:none;"/>
1272 <text class="keylabel"
1273 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1274 y="{200 + (($BLKD_BIF_H + 4) * 2)}">LMB</text>
1277 <xsl:call-template name="F_WriteText">
1278 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1))"/>
1279 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 2))"/>
1280 <xsl:with-param name="iText" select="'LMB'"/>
1281 <xsl:with-param name="iClass" select="'key_label'"/>
1282 </xsl:call-template>
1284 <xsl:variable name="opb_col_">
1285 <xsl:call-template name="F_BusStd2RGB">
1286 <xsl:with-param name="iBusStd" select="'OPB'"/>
1287 </xsl:call-template>
1291 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1293 width= "{$BLKD_BIFC_H}"
1294 height="{$BLKD_BIFC_W}"
1295 style="fill:{$opb_col_}; stroke:none;"/>
1297 <text class="keylabel"
1298 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1299 y="{200 + (($BLKD_BIF_H + 4) * 1)}">OPB</text>
1301 <xsl:call-template name="F_WriteText">
1302 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2))"/>
1303 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/>
1304 <xsl:with-param name="iText" select="'OPB'"/>
1305 <xsl:with-param name="iClass" select="'key_label'"/>
1306 </xsl:call-template>
1308 <xsl:variable name="plb_col_">
1309 <xsl:call-template name="F_BusStd2RGB">
1310 <xsl:with-param name="iBusStd" select="'PLB'"/>
1311 </xsl:call-template>
1314 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1315 y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1316 width= "{$BLKD_BIFC_H}"
1317 height="{$BLKD_BIFC_W}"
1318 style="fill:{$plb_col_}; stroke:none;"/>
1320 <text class="keylabel"
1321 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1322 y="{200 + (($BLKD_BIF_H + 4) * 2)}">PLB</text>
1324 <xsl:call-template name="F_WriteText">
1325 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2))"/>
1326 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 2))"/>
1327 <xsl:with-param name="iText" select="'PLB'"/>
1328 <xsl:with-param name="iClass" select="'key_header'"/>
1329 </xsl:call-template>
1332 <xsl:variable name="ocm_col_">
1333 <xsl:call-template name="F_BusStd2RGB">
1334 <xsl:with-param name="iBusStd" select="'OCM'"/>
1335 </xsl:call-template>
1339 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1341 width= "{$BLKD_BIFC_H}"
1342 height="{$BLKD_BIFC_W}"
1343 style="fill:{$ocm_col_}; stroke:none;"/>
1345 <text class="keylabel"
1346 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1347 y="{200 + (($BLKD_BIF_H + 4) * 1)}">SOCM</text>
1350 <xsl:call-template name="F_WriteText">
1351 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3))"/>
1352 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/>
1353 <xsl:with-param name="iText" select="'SOCM'"/>
1354 <xsl:with-param name="iClass" select="'key_label'"/>
1355 </xsl:call-template>
1358 <xsl:variable name="xil_p2p_col_">
1359 <xsl:call-template name="F_BusStd2RGB">
1360 <xsl:with-param name="iBusStd" select="'XIL'"/>
1361 </xsl:call-template>
1365 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1366 y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1367 width= "{$BLKD_BIFC_H}"
1368 height="{$BLKD_BIFC_W}"
1369 style="fill:{$xil_p2p_col_}; stroke:none;"/>
1371 <text class="keylabel"
1372 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1373 y="{200 + (($BLKD_BIF_H + 4) * 2)}">Xilinx P2P</text>
1375 <xsl:call-template name="F_WriteText">
1376 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3))"/>
1377 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 2))"/>
1378 <xsl:with-param name="iText" select="'Xilinx P2P'"/>
1379 <xsl:with-param name="iClass" select="'key_label'"/>
1380 </xsl:call-template>
1383 <xsl:variable name="user_p2p_col_">
1384 <xsl:call-template name="F_BusStd2RGB">
1385 <xsl:with-param name="iBusStd" select="'USER'"/>
1386 </xsl:call-template>
1389 <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 4)}"
1391 width= "{$BLKD_BIFC_H}"
1392 height="{$BLKD_BIFC_W}"
1393 style="fill:{$user_p2p_col_}; stroke:none;"/>
1395 <text class="keylabel"
1396 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 4)}"
1397 y="{200 + (($BLKD_BIF_H + 4) * 1)}">USER P2P</text>
1400 <xsl:call-template name="F_WriteText">
1401 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 4))"/>
1402 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/>
1403 <xsl:with-param name="iText" select="'USER P2P'"/>
1404 <xsl:with-param name="iClass" select="'key_label'"/>
1405 </xsl:call-template>
1411 <xsl:template name="Define_BlkDiagram_Specs">
1413 <xsl:param name="iArch" select="'NA'"/>
1414 <xsl:param name="iPart" select="'NA'"/>
1415 <xsl:param name="iTimeStamp" select="'NA'"/>
1416 <xsl:param name="iEdkVersion" select="'NA'"/>
1418 <g id="BlkDiagram_Specs">
1422 width= "{$BLKD_SPECS_W}"
1423 height="{$BLKD_SPECS_H}"
1424 style="fill:{$COL_BG}; stroke:none;"/>
1429 width= "{$BLKD_SPECS_W}"
1431 style="fill:{$COL_BG}; stroke:none;"/>
1433 ==================================
1435 ==================================
1437 <xsl:call-template name="F_WriteText">
1438 <xsl:with-param name="iClass" select="'key_title'"/>
1439 <xsl:with-param name="iX" select="ceiling($BLKD_SPECS_W div 2)"/>
1440 <xsl:with-param name="iY" select="'14'"/>
1441 <xsl:with-param name="iText" select="'SPECS'"/>
1442 </xsl:call-template>
1444 <text class="keytitle"
1445 x="{ceiling($BLKD_SPECS_W div 2)} "
1450 ==================================
1452 ==================================
1456 width= "{$BLKD_SPECS_W}"
1458 style="fill:{$COL_BG_LT}; stroke:none;"/>
1459 <xsl:call-template name="F_WriteText">
1460 <xsl:with-param name="iClass" select="'blkd_spec_name'"/>
1461 <xsl:with-param name="iX" select="'4'"/>
1462 <xsl:with-param name="iY" select="'32'"/>
1463 <xsl:with-param name="iText" select="'EDK VERSION'"/>
1464 </xsl:call-template>
1466 <xsl:call-template name="F_WriteText">
1467 <xsl:with-param name="iClass" select="'blkd_spec_value_mid'"/>
1468 <xsl:with-param name="iX" select="($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)"/>
1469 <xsl:with-param name="iY" select="'32'"/>
1470 <xsl:with-param name="iText" select="$iEdkVersion"/>
1471 </xsl:call-template>
1474 ==================================
1476 ==================================
1480 width= "{$BLKD_SPECS_W}"
1482 style="fill:{$COL_BG_LT}; stroke:none;"/>
1484 <xsl:call-template name="F_WriteText">
1485 <xsl:with-param name="iClass" select="'blkd_spec_name'"/>
1486 <xsl:with-param name="iX" select="'4'"/>
1487 <xsl:with-param name="iY" select="'52'"/>
1488 <xsl:with-param name="iText" select="'ARCH'"/>
1489 </xsl:call-template>
1491 <xsl:call-template name="F_WriteText">
1492 <xsl:with-param name="iClass" select="'blkd_spec_value_mid'"/>
1493 <xsl:with-param name="iX" select="($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)"/>
1494 <xsl:with-param name="iY" select="'52'"/>
1495 <xsl:with-param name="iText" select="$iArch"/>
1496 </xsl:call-template>
1499 <text class="specsvalue"
1500 x="{($BLKD_SPECS_W + 1) - (string-length($blkd_arch) * 6.5)}"
1501 y="52"><xsl:value-of select="$blkd_arch"/></text>
1502 <text class="specsvaluemid"
1503 x="{($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)}"
1504 y="52"><xsl:value-of select="$iArch"/></text>
1508 ==================================
1510 ==================================
1514 width= "{$BLKD_SPECS_W}"
1516 style="fill:{$COL_BG_LT}; stroke:none;"/>
1518 <xsl:call-template name="F_WriteText">
1519 <xsl:with-param name="iClass" select="'blkd_spec_name'"/>
1520 <xsl:with-param name="iX" select="'4'"/>
1521 <xsl:with-param name="iY" select="'72'"/>
1522 <xsl:with-param name="iText" select="'PART'"/>
1523 </xsl:call-template>
1525 <xsl:call-template name="F_WriteText">
1526 <xsl:with-param name="iClass" select="'blkd_spec_value_mid'"/>
1527 <xsl:with-param name="iX" select="($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)"/>
1528 <xsl:with-param name="iY" select="'72'"/>
1529 <xsl:with-param name="iText" select="$iPart"/>
1530 </xsl:call-template>
1533 ==================================
1535 ==================================
1540 width= "{$BLKD_SPECS_W}"
1542 style="fill:{$COL_BG_LT}; stroke:none;"/>
1544 <xsl:call-template name="F_WriteText">
1545 <xsl:with-param name="iClass" select="'blkd_spec_name'"/>
1546 <xsl:with-param name="iX" select="'4'"/>
1547 <xsl:with-param name="iY" select="'92'"/>
1548 <xsl:with-param name="iText" select="'GENERATED'"/>
1549 </xsl:call-template>
1551 <xsl:call-template name="F_WriteText">
1552 <xsl:with-param name="iClass" select="'blkd_spec_value_mid'"/>
1553 <xsl:with-param name="iX" select="($BLKD_SPECS_W + 1) - (string-length($iTimeStamp) * 3.5)"/>
1554 <xsl:with-param name="iY" select="'92'"/>
1555 <xsl:with-param name="iText" select="$iTimeStamp"/>
1556 </xsl:call-template>
1563 <!-- =========================================================================== -->
1564 <!-- FUNCTION TEMPLATE -->
1566 <!-- =========================================================================== -->