1 <?xml version="1.0" standalone="no"?>
3 <xsl:stylesheet version="1.0"
4 xmlns:svg="http://www.w3.org/2000/svg"
5 xmlns:exsl="http://exslt.org/common"
6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7 xmlns:math="http://exslt.org/math"
8 xmlns:xlink="http://www.w3.org/1999/xlink"
9 extension-element-prefixes="math">
13 ===============================================
15 ===============================================
17 <xsl:include href="MdtSvgBLKD_Dimensions.xsl"/>
19 <xsl:include href="MdtSvgDiag_Colors.xsl"/>
20 <xsl:include href="MdtSvgDiag_Globals.xsl"/>
21 <xsl:include href="MdtSvgDiag_StyleDefs.xsl"/>
23 <xsl:include href="MdtTinySvgDiag_BifShapes.xsl"/>
25 <xsl:include href="MdtTinySvgBLKD_IOPorts.xsl"/>
26 <xsl:include href="MdtTinySvgBLKD_Busses.xsl"/>
27 <xsl:include href="MdtTinySvgBLKD_Globals.xsl"/>
28 <xsl:include href="MdtTinySvgBLKD_Functions.xsl"/>
29 <xsl:include href="MdtTinySvgBLKD_Peripherals.xsl"/>
30 <xsl:include href="MdtTinySvgBLKD_Processors.xsl"/>
31 <xsl:include href="MdtTinySvgBLKD_BusLaneSpaces.xsl"/>
33 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"
34 doctype-public="-//W3C//DTD SVG 1.0//EN"
35 doctype-system="svg10.dtd"/>
38 ===============================================
40 ===============================================
43 <xsl:param name="ADD_VIEWBOX" select="'FALSE'"/>
44 <xsl:param name="IN_TESTMODE" select="'FALSE'"/>
47 <xsl:param name="CSS_SVG_DIAGRAMS" select="'MdtSvgDiag_StyleDefs.css'"/>
48 <xsl:param name="CSS_SVG_DIAGRAMS" select="'__INTERNAL__'"/>
52 ======================================================
53 MAIN BLOCKDIAGRAM TEMPLATE
54 ======================================================
56 <xsl:template match="EDKSYSTEM[not(BLKDIAGRAM)]">
57 <xsl:message>ERROT: Project is missing BLKDIAGRAM Element. Cannot generate.</xsl:message>
60 <xsl:template match="EDKSYSTEM[BLKDIAGRAM]">
63 <xsl:message>STCK_W is <xsl:value-of select="$G_Total_Stacks_W"/></xsl:message>
64 <xsl:message>BRDG_W is <xsl:value-of select="$G_Total_Bridges_W"/></xsl:message>
65 <xsl:message>MPMC is <xsl:value-of select="$G_Total_StandAloneMpmc_H"/></xsl:message>
66 <xsl:message>MPMC is <xsl:value-of select="$G_Total_StandAloneMpmc_H"/></xsl:message>
67 <xsl:message>MABV is <xsl:value-of select="$G_Max_Stack_AbvSbs_H"/></xsl:message>
68 <xsl:message>MBLW is <xsl:value-of select="$G_Max_Stack_BlwSbs_H"/></xsl:message>
69 <xsl:message>IPBK is <xsl:value-of select="$G_Total_IpBucket_H"/></xsl:message>
70 <xsl:message>Blkd Total is <xsl:value-of select="$blkd_H_"/></xsl:message>
71 <xsl:message>max abv is <xsl:value-of select="$max_Stack_AbvSbs_H_"/></xsl:message>
72 <xsl:message>max blw is <xsl:value-of select="$max_Stack_BlwSbs_H_"/></xsl:message>
73 <xsl:message>Ip Bkt is <xsl:value-of select="$totalIpBkt_H_"/></xsl:message>
74 <xsl:message>Sbs is <xsl:value-of select="$totalSbs_H_"/></xsl:message>
75 <xsl:message>Unk Bkt is <xsl:value-of select="$totalUnkBkt_H_"/></xsl:message>
76 <xsl:message>Blkd DrawArea height as <xsl:value-of select="$total_DrawArea_H_"/></xsl:message>
79 <!--specify a css for the file -->
81 <xsl:processing-instruction name="xml-stylesheet">href="<xsl:value-of select="$CSS_SVG_DIAGRAMS"/>" type="text/css"</xsl:processing-instruction>
82 <xsl:variable name="BLKD_ZOOM_Y">
84 <xsl:when test="($ADD_VIEWBOX = 'TRUE')">
85 <xsl:value-of select="($G_Total_Diag_H * 2)"/>
87 <xsl:otherwise>0</xsl:otherwise>
92 <xsl:text> </xsl:text>
94 <svg width="{$G_Total_Diag_W}" height="{$G_Total_Diag_H}" viewBox="0 0 0 {$BLKD_ZOOM_Y}">
96 <svg width="{$G_Total_Diag_W}" height="{$G_Total_Diag_H}">
98 ===============================================
99 Layout All the various definitions
100 ===============================================
104 <!-- IO Port Defs -->
105 <xsl:call-template name="Define_IOPorts"/>
108 <xsl:call-template name="Define_ConnectedBifTypes"/>
111 <xsl:call-template name="Define_Busses"/>
113 <!-- Shared Bus Buckets Defs -->
114 <xsl:call-template name="Define_SBSBuckets"/>
116 <!-- IP Bucket Defs -->
117 <xsl:call-template name="Define_IPBucket"/>
120 <xsl:call-template name="Define_AllStacks"/>
123 <xsl:call-template name="Define_BusLaneSpaces"/>
125 <!-- Main MPMC Defs -->
126 <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE">
127 <xsl:call-template name="Define_StandAlone_MPMC"/>
130 <!-- Diagram Key Definition -->
131 <xsl:call-template name="Define_BlkDiagram_Key"/>
133 <!-- Diagram Specs Definition -->
134 <xsl:call-template name="Define_BlkDiagram_Specs">
135 <xsl:with-param name="iArch" select="SYSTEMINFO/@ARCH"/>
136 <xsl:with-param name="iPart" select="SYSTEMINFO/@PART"/>
137 <xsl:with-param name="iTimeStamp" select="@TIMESTAMP"/>
138 <xsl:with-param name="iEdkVersion" select="@EDKVERSION"/>
143 <!-- =============================================== -->
144 <!-- Draw Outlines -->
145 <!-- =============================================== -->
147 <!-- The surrounding black liner -->
150 width ="{$G_Total_Diag_W}"
151 height="{$G_Total_Diag_H}" style="fill:{$COL_WHITE}; stroke:{$COL_BLACK};stroke-width:4"/>
153 <!-- The outer IO channel -->
154 <rect x="{$BLKD_PRTCHAN_W}"
155 y="{$BLKD_PRTCHAN_H}"
156 width= "{$G_Total_Blkd_W - ($BLKD_PRTCHAN_W * 2)}"
157 height="{$G_Total_Blkd_H - ($BLKD_PRTCHAN_H * 2)}" style="fill:{$COL_IORING}"/>
159 <!-- The Diagram's drawing area -->
160 <rect x="{$BLKD_PRTCHAN_W + $BLKD_IORCHAN_W}"
161 y="{$BLKD_PRTCHAN_H + $BLKD_IORCHAN_H}"
162 width= "{$G_Total_DrawArea_W}"
163 height="{$G_Total_DrawArea_H}" rx="8" ry="8" style="fill:{$COL_BG}"/>
165 <!-- =============================================== -->
166 <!-- Draw All the various components -->
167 <!-- =============================================== -->
169 <!-- Layout the IO Ports -->
171 <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
172 <xsl:call-template name="Draw_IOPorts"/>
176 <!-- Layout the Shapes -->
177 <xsl:call-template name="Draw_BlkDiagram_Shapes"/>
181 <!-- ======================= END MAIN SVG BLOCK =============================== -->
184 <xsl:template name="Draw_BlkDiagram_Shapes">
187 ===========================================================
188 Draw the Stand Alone MPMC, (if any)
189 ===========================================================
191 <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE">
193 <xsl:variable name="mpmc_inst_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE/@INSTANCE"/>
194 <use x="{$BLKD_INNER_X}" y="{$BLKD_INNER_Y}" xlink:href="#mpmcmodule_{$mpmc_inst_}"/>
197 ===========================================================
198 Draw the connections to the Stand Alone MPMC
199 ===========================================================
201 <xsl:call-template name="Draw_BlkDiagram_StandAloneMpmcConnections"/>
205 ===========================================================
207 ===========================================================
209 <xsl:call-template name="Draw_BlkDiagram_Stacks"/>
214 ===========================================================
215 Draw the Bus Lane Spaces
216 ===========================================================
218 <xsl:call-template name="Draw_BlkDiagram_BusLaneSpaces"/>
222 ===========================================================
223 Draw the shared busses
224 ===========================================================
226 <use x="{$BLKD_INNER_X}" y="{$G_SharedBus_Y}" xlink:href="#group_sharedBusses"/>
229 ===========================================================
231 ===========================================================
233 <xsl:call-template name="Draw_BlkDiagram_Bridges"/>
237 ===========================================================
239 ===========================================================
241 <xsl:call-template name="Draw_BlkDiagram_IPBucket"/>
245 ===========================================================
247 ===========================================================
249 <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
250 <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"/>
254 ===========================================================
256 ===========================================================
258 <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
259 <use x="{$BLKD_PRTCHAN_W}" y="{$G_Total_Blkd_H + $BLKD_DRAWAREA2KEY_GAP - 8}" xlink:href="#BlkDiagram_Specs"/>
263 ************************************************************
264 *************** DONE DRAWING BLOCK DIAGRAM **************
265 ************************************************************
271 <!-- ======================================================================= -->
272 <!-- FUNCTION TEMPLATE -->
274 <!-- Draw stacks on the Block Diagram -->
275 <!-- ======================================================================= -->
276 <xsl:template name="Draw_BlkDiagram_Stacks">
278 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE[(@EAST < $G_ROOT/EDKSYSTEM/BLKDIAGRAM/@STACK_HORIZ_WIDTH)]">
280 <xsl:variable name="stack_line_x_">
281 <xsl:call-template name="F_Calc_Stack_X">
282 <xsl:with-param name="iStackIdx" select="@EAST"/>
286 <xsl:variable name="stack_abv_sbs_">
287 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
288 <xsl:with-param name="iStackIdx" select="@EAST"/>
292 <xsl:variable name="bridges_w_" select="(($G_NumOfBridges * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))) + $BLKD_BRIDGE_GAP)"/>
294 <xsl:variable name="stack_y_" select="($G_SharedBus_Y - $stack_abv_sbs_ - $BLKD_PROC2SBS_GAP)"/>
295 <xsl:variable name="stack_x_" select="($BLKD_INNER_X + $stack_line_x_ + $bridges_w_)"/>
297 <xsl:variable name="stack_name_">
298 <xsl:call-template name="F_generate_Stack_Name">
299 <xsl:with-param name="iHorizIdx" select="@EAST"/>
303 <use x="{$stack_x_}" y="{$stack_y_}" xlink:href="#{$stack_name_}"/>
309 <xsl:template name="Draw_BlkDiagram_StandAloneMpmcConnections">
311 <xsl:variable name="mpmcInst_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE/@INSTANCE"/>
312 <xsl:variable name="lastStack_" select="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/@STACK_HORIZ_WIDTH) - 1"/>
315 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE">
316 <xsl:variable name="currentLane_" select="position()"/>
318 <xsl:message>Current lane <xsl:value-of select="$currentLane_"/></xsl:message>
320 <xsl:variable name="stackToEast_">
322 <xsl:when test="not(@WEST = $lastStack_)"><xsl:value-of select="@EAST"/></xsl:when>
323 <xsl:when test=" (@WEST = $lastStack_)"><xsl:value-of select="'NONE'"/></xsl:when>
327 <xsl:variable name="stackToWest_">
329 <xsl:when test="not(@WEST = $lastStack_)"><xsl:value-of select="'NONE'"/></xsl:when>
330 <xsl:when test=" (@WEST = $lastStack_)"><xsl:value-of select="@WEST"/></xsl:when>
334 <xsl:variable name="spaceAbvSbs_H_">
335 <xsl:call-template name="F_Calc_Space_AbvSbs_Height">
336 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
337 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
341 <xsl:variable name="space_y_" select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/>
344 <xsl:message>Stack To East <xsl:value-of select="$stackToEast_"/></xsl:message>
345 <xsl:message>Stack To West <xsl:value-of select="$stackToWest_"/></xsl:message>
346 <xsl:variable name="space_X_">
347 <xsl:call-template name="F_Calc_Space_X">
348 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
349 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
352 <xsl:variable name="space_y_" select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/>
353 <xsl:variable name="space_x_" select="($BLKD_INNER_X + $G_Total_Bridges_W + $space_line_x_)"/>
357 <xsl:for-each select="BUSCONNLANE[@IS_MPMCCONN]">
360 <xsl:variable name="bifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = BUSCONN/@INSTANCE)]/BUSINTERFACE[(@BUSNAME = @BUSNAME)]/@BIF_X"/>
362 <xsl:variable name="bifInst_" select="BUSCONN/@INSTANCE"/>
363 <xsl:variable name="busName_" select="@BUSNAME"/>
364 <xsl:variable name="bifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $bifInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@BIF_X"/>
366 <xsl:variable name="mpmcBifName_">
368 <xsl:when test=" (@IS_SBSCONN)"><xsl:value-of select="BUSCONN/@BUSINTERFACE"/></xsl:when>
369 <xsl:when test="not(@IS_SBSCONN)"><xsl:value-of select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@NAME"/></xsl:when>
370 <xsl:otherwise><xsl:value-of select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@NAME"/></xsl:otherwise>
375 <xsl:message>MPMC Bif Name <xsl:value-of select="$mpmcBifName_"/></xsl:message>
376 <xsl:message>Bif Side <xsl:value-of select="$bifSide_"/></xsl:message>
377 <xsl:message>Bus Name <xsl:value-of select="@BUSNAME"/></xsl:message>
378 <xsl:message>Instance <xsl:value-of select="$bifInst_"/></xsl:message>
379 <xsl:message>Space line x <xsl:value-of select="$space_line_X_"/></xsl:message>
382 <xsl:variable name="space_line_X_">
383 <xsl:call-template name="F_Calc_Space_X">
384 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
385 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
389 <xsl:variable name="space_X_" select="($BLKD_INNER_X + $G_Total_Bridges_W + $space_line_X_)"/>
391 <xsl:variable name = "stackToWest_W_">
393 <xsl:when test="(($stackToEast_ = '0') and ($stackToWest_ = 'NONE'))">0</xsl:when>
394 <xsl:when test="(($stackToEast_ = 'NONE') and not($stackToWest_ = 'NONE'))">
395 <xsl:call-template name="F_Calc_Stack_Width">
396 <xsl:with-param name="iStackIdx" select="$stackToWest_"/>
399 <xsl:when test="(not($stackToEast_ = '0') and not($stackToEast_ = 'NONE') and ($stackToWest_ = 'NONE'))">
400 <xsl:call-template name="F_Calc_Stack_Width">
401 <xsl:with-param name="iStackIdx" select="($stackToEast_ - 1)"/>
404 <xsl:otherwise>0</xsl:otherwise>
408 <xsl:variable name = "stackToEast_W_">
409 <xsl:call-template name="F_Calc_Stack_Width">
410 <xsl:with-param name="iStackIdx" select="$stackToEast_"/>
414 <xsl:variable name ="extSpaceWest_W_" select="ceiling($stackToWest_W_ div 2)"/>
415 <xsl:variable name ="extSpaceEast_W_" select="ceiling($stackToEast_W_ div 2)"/>
416 <xsl:variable name="laneInSpace_X_">
418 <xsl:when test="(@ORIENTED = 'EAST')">
419 <xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W) - $BLKD_BUS_LANE_W - $BLKD_BUS_ARROW_W - $BLKD_P2P_BUS_W)"/>
421 <xsl:otherwise><xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W))"/></xsl:otherwise>
426 <xsl:variable name="lane_X_" select="($space_X_ + $laneInSpace_X_)"/>
428 <xsl:variable name="mpmcBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@NAME = $mpmcBifName_)]/@TYPE"/>
431 <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/>
432 <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/>
433 <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/>
436 <xsl:variable name="bc_Y_" select="($BLKD_INNER_Y + $BLKD_MPMC_MOD_H)"/>
437 <xsl:variable name="bc_X_" >
439 <xsl:when test="($bifSide_ = '0')"><xsl:value-of select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/></xsl:when>
440 <xsl:when test="($bifSide_ = '1')"><xsl:value-of select="($lane_X_ + $BLKD_BIFC_dx)"/></xsl:when>
441 <xsl:otherwise> <xsl:value-of select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/></xsl:otherwise>
445 <xsl:variable name="busColor_">
446 <xsl:call-template name="F_BusStd2RGB">
447 <xsl:with-param name="iBusStd" select="@BUSSTD"/>
451 <!-- Place the MPMC bif label -->
452 <xsl:variable name="bcl_X_" select="($bc_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BIF_W div 2))"/>
453 <xsl:variable name="bcl_Y_" select="($bc_Y_ - $BLKD_BIF_H - $BLKD_MOD_BIF_GAP_H)"/>
454 <use x="{$bcl_X_}" y="{$bcl_Y_}" xlink:href="#{@BUSSTD}_BifLabel"/>
456 <xsl:call-template name="F_WriteText">
457 <xsl:with-param name="iX" select="($bcl_X_ + ceiling($BLKD_BIF_W div 2))"/>
458 <xsl:with-param name="iY" select="($bcl_Y_ + ceiling($BLKD_BIF_H div 2) + 3)"/>
459 <xsl:with-param name="iText" select="$mpmcBifName_"/>
460 <xsl:with-param name="iClass" select="'mpmc_biflabel'"/>
464 <!-- Place the MPMC bif -->
465 <use x="{$bc_X_}" y="{$bc_Y_}" xlink:href="#{@BUSSTD}_busconn_{$mpmcBifType_}"/>
467 <xsl:variable name="bcArrow_X_" select="($bc_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_H div 2))"/>
468 <xsl:variable name="bcArrow_Y_" select="($bc_Y_ + $BLKD_BIFC_H - 3)"/>
470 <!-- Place the MPMC Arrow -->
471 <use x="{$bcArrow_X_}" y="{$bcArrow_Y_}" xlink:href="#{@BUSSTD}_BusArrowNorth"/>
474 Place a block to cover the gap btw MPMC and top of Bus Lane Space, or to the correct SBS
475 For non SBS connections a vertical block will already have been drawn to the top of the
479 <xsl:variable name="sbsDy_">
481 <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>
482 <xsl:when test="not(@IS_SBSCONN)">0</xsl:when>
483 <xsl:otherwise>0></xsl:otherwise>
487 <xsl:variable name="mpmcBusHeight_">
489 <xsl:when test="(@IS_SBSCONN)"><xsl:value-of select="($G_SharedBus_Y - ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4) + $sbsDy_)"/></xsl:when>
490 <xsl:when test="not(@IS_SBSCONN)">
492 <xsl:when test="($space_y_ >= ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))">
493 <xsl:value-of select="($space_y_ - ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))"/>
495 <xsl:when test="($space_y_ < ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))">
496 <xsl:value-of select="(($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_) - $space_y_)"/>
500 <xsl:otherwise><xsl:value-of select="$BLKD_BIFC_H"/></xsl:otherwise>
504 <rect x="{$bcArrow_X_ + $BLKD_BUS_ARROW_G}"
505 y="{$bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4}"
506 width= "{$BLKD_P2P_BUS_W}"
507 height="{$mpmcBusHeight_}"
508 style="stroke:none; fill:{$busColor_}"/>
510 <!-- place the bus label here -->
512 <xsl:call-template name="F_WriteText">
513 <xsl:with-param name="iX" select="($bcArrow_X_ + $BLKD_BUS_ARROW_W + 6)"/>
514 <xsl:with-param name="iY" select="($bcArrow_Y_ + ceiling($mpmcBusHeight_ div 2) + 6)"/>
515 <xsl:with-param name="iText" select="$busName_"/>
516 <xsl:with-param name="iClass" select="'p2pbus_label'"/>
525 <!-- ======================================================================= -->
526 <!-- FUNCTION TEMPLATE -->
528 <!-- Draw bus lane spaces on the Block Diagram -->
529 <!-- ======================================================================= -->
530 <xsl:template name="Draw_BlkDiagram_BusLaneSpaces">
532 <xsl:variable name="lastStack_" select="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/@STACK_HORIZ_WIDTH) - 1"/>
534 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE[@EAST]">
535 <xsl:sort select="@EAST" data-type="number"/>
537 <xsl:call-template name="Draw_BlkDiagram_BusLaneSpace">
538 <xsl:with-param name="iStackToEast" select="@EAST"/>
542 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE[(@WEST = $lastStack_)]">
543 <xsl:call-template name="Draw_BlkDiagram_BusLaneSpace">
544 <xsl:with-param name="iStackToWest" select="$lastStack_"/>
550 <xsl:template name="Draw_BlkDiagram_BusLaneSpace">
552 <xsl:param name="iStackToEast" select="'NONE'"/>
553 <xsl:param name="iStackToWest" select="'NONE'"/>
555 <xsl:variable name="spaceAbvSbs_H_">
556 <xsl:call-template name="F_Calc_Space_AbvSbs_Height">
557 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
558 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
562 <xsl:variable name="spaceBlwSbs_H_">
563 <xsl:call-template name="F_Calc_Space_BlwSbs_Height">
564 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
565 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
569 <xsl:variable name="space_line_x_">
570 <xsl:call-template name="F_Calc_Space_X">
571 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
572 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
576 <xsl:variable name="space_y_" select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/>
577 <xsl:variable name="space_x_" select="($BLKD_INNER_X + $G_Total_Bridges_W + $space_line_x_)"/>
579 <xsl:variable name="stackToEast_">
581 <xsl:when test="not($iStackToEast = 'NONE')"><xsl:value-of select="$iStackToEast"/></xsl:when>
582 <xsl:otherwise>NONE</xsl:otherwise>
586 <xsl:variable name="stackToWest_">
588 <xsl:when test=" not($iStackToWest = 'NONE')"><xsl:value-of select="$iStackToWest"/></xsl:when>
589 <xsl:when test="(not($iStackToEast = 'NONE') and not($iStackToEast = '0'))"><xsl:value-of select="($iStackToEast - 1)"/></xsl:when>
590 <xsl:otherwise>NONE</xsl:otherwise>
595 <xsl:variable name="space_Name_">
596 <xsl:call-template name="F_generate_Space_Name">
597 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
598 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
603 <xsl:message>StackToEast is <xsl:value-of select="$iStackToEast"/></xsl:message>
604 <xsl:message>StackToWest is <xsl:value-of select="$iStackToWest"/></xsl:message>
605 <xsl:message>SpaceName is <xsl:value-of select="$space_Name_"/></xsl:message>
608 <use x="{$space_x_}" y="{$space_y_}" xlink:href="#{$space_Name_}"/>
613 <!-- =========================================================================== -->
614 <!-- FUNCTION TEMPLATE -->
616 <!-- Draw Bridges on the Block Diagram -->
617 <!-- =========================================================================== -->
618 <xsl:template name="Draw_BlkDiagram_Bridges">
620 <!-- First save all the bridge indexs in a variable -->
621 <xsl:variable name="bridgeShapes_">
622 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BRIDGESHAPES/MODULE/BUSCONNS[(@ORIENTED = 'WEST')]/BUSCONN">
623 <BRIDGE BUS_INDEX="{@BUS_INDEX}" INSTANCE="{../../@INSTANCE}" POSITION="{(position() -1)}"/>
624 <BRIDGECONN BUS_INDEX="{@BUS_INDEX}" INSTANCE="{../../@INSTANCE}" ORIENTED="{../@ORIENTED}" POSITION="{(position() - 1)}" BUSSTD="{@BUSSTD}" TYPE="{@TYPE}"/>
625 <!-- So both bus conns have same position.... -->
626 <xsl:if test="../../BUSCONNS[(@ORIENTED = 'EAST')]">
627 <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}"/>
632 <xsl:message>Found an east connection on <xsl:value-of select="../../@INSTANCE"/></xsl:message>
634 <!-- Now layout the bridge shapes between the shared busses -->
635 <xsl:for-each select="exsl:node-set($bridgeShapes_)/BRIDGE">
636 <xsl:sort select="@POSITION" data-type="number"/>
638 <xsl:variable name="brdgPosition_" select="@POSITION"/>
639 <xsl:variable name="brdgInstance_" select="@INSTANCE"/>
641 <xsl:variable name="min_bus_idx_" select="math:min(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUS_INDEX)"/>
643 <xsl:variable name="max_bus_idx_" select="math:max(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUS_INDEX)"/>
645 <xsl:message>Maximum index <xsl:value-of select="$max_bus_idx_"/></xsl:message>
646 <xsl:message>Minimum index <xsl:value-of select="$min_bus_idx_"/></xsl:message>
650 <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))))"/>
651 <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))"/>
653 <use x="{$brdg_X_}" y="{$brdg_Y_}" xlink:href="#symbol_{$brdgInstance_}"/>
659 <xsl:message>Found <xsl:value-of select="count(exsl:node-set($bridgeShapes_)/BRIDGECONN)"/> busconns </xsl:message>
660 <xsl:message>Drawing connection for bridge <xsl:value-of select="$brdgInstance_"/> at <xsl:value-of select="@POSITION"/> </xsl:message>
663 <xsl:for-each select="exsl:node-set($bridgeShapes_)/BRIDGECONN">
664 <xsl:sort select="@POSITION" data-type="number"/>
666 <xsl:variable name="brdgInstance_" select="@INSTANCE"/>
667 <xsl:variable name="brdgPosition_" select="@POSITION"/>
669 <xsl:variable name="busColor_">
670 <xsl:call-template name="F_BusStd2RGB">
671 <xsl:with-param name="iBusStd" select="@BUSSTD"/>
675 <xsl:variable name="min_bus_idx_" select="math:min(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUS_INDEX)"/>
676 <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))"/>
677 <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))))"/>
679 <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)"/>
680 <xsl:variable name="bc_X_">
682 <xsl:when test="@ORIENTED='WEST'">
683 <xsl:value-of select="($brdg_X_ - $BLKD_BIFC_W)"/>
685 <xsl:when test="@ORIENTED='EAST'">
686 <xsl:value-of select="($brdg_X_ + $BLKD_MOD_W)"/>
691 <!-- Layout the bus conn -->
692 <use x="{$bc_X_}" y="{$bc_Y_}" xlink:href="#{@BUSSTD}_busconn_{@TYPE}"/>
694 <!-- Figure out the positions of the lines -->
697 <xsl:variable name="vert_line_x_" select="$bc_X_ + ceiling($BLKD_BIFC_W div 2)"/>
698 <xsl:message>vert line x <xsl:value-of select="$vert_line_x_"/></xsl:message>
699 <xsl:message>bus index <xsl:value-of select="@BUS_INDEX"/></xsl:message>
702 <xsl:variable name="vert_line_x_">
704 <xsl:when test="@ORIENTED='WEST'">
705 <xsl:value-of select="($bc_X_ - ($BLKD_BUS_LANE_W - $BLKD_BIFC_W))"/>
707 <xsl:when test="@ORIENTED='EAST'">
708 <xsl:value-of select="($bc_X_ + ($BLKD_BUS_LANE_W - $BLKD_P2P_BUS_W))"/>
713 <!-- At least one of the points is going to be the bus -->
715 <xsl:variable name="vert_line_y1_" select="($G_SharedBus_Y + $BLKD_PROC2SBS_GAP + (@BUS_INDEX * $BLKD_SBS_LANE_H))"/>
717 <xsl:variable name="vert_line_y1_" select="($G_SharedBus_Y + (@BUS_INDEX * $BLKD_SBS_LANE_H))"/>
718 <xsl:variable name="vert_line_y2_" select="$bc_Y_ + ceiling($BLKD_BIFC_H div 2)"/>
720 <xsl:variable name="v_bus_ul_y_">
722 <xsl:when test="$vert_line_y1_ > $vert_line_y2_">
723 <xsl:value-of select="$vert_line_y2_"/>
725 <xsl:when test="$vert_line_y2_ > $vert_line_y1_">
726 <xsl:value-of select="$vert_line_y1_"/>
731 <xsl:variable name="v_bus_ul_x_" select="$vert_line_x_"/>
733 <xsl:variable name="v_bus_ul_x_">
735 <xsl:when test="@ORIENTED='WEST'">
736 <xsl:value-of select="($vert_line_x_ + $BLKD_MOD_BIF_GAP_H)"/>
738 <xsl:when test="@ORIENTED='EAST'">
739 <xsl:value-of select="($vert_line_x_ - $BLKD_MOD_BIF_GAP_H)"/>
745 <xsl:variable name="v_bus_width_" select="$BLKD_P2P_BUS_W"/>
746 <xsl:variable name="v_bus_height_">
748 <xsl:when test="$vert_line_y1_ > $vert_line_y2_">
749 <xsl:value-of select="($vert_line_y1_ - $vert_line_y2_)"/>
751 <xsl:when test="$vert_line_y2_ > $vert_line_y1_">
752 <xsl:value-of select="($vert_line_y2_ - $vert_line_y1_)"/>
757 <xsl:variable name="h_bus_ul_x_">
759 <xsl:when test="@ORIENTED='WEST'">
760 <xsl:value-of select="($bc_X_ - ($BLKD_BUS_LANE_W - $BLKD_BIFC_W) + $BLKD_MOD_BIF_GAP_H)"/>
762 <xsl:when test="@ORIENTED='EAST'">
763 <xsl:value-of select="($bc_X_ + $BLKD_BIFC_W - ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2))"/>
768 <xsl:variable name="h_bus_ul_y_" select="$bc_Y_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
769 <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/>
771 <xsl:variable name="h_bus_width_">
773 <xsl:when test="@ORIENTED='WEST'">
774 <xsl:value-of select="(($bc_X_ + ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2)) - $h_bus_ul_x_ + 1)"/>
776 <xsl:when test="@ORIENTED='EAST'">
777 <xsl:value-of select="(($v_bus_ul_x_ + $BLKD_P2P_BUS_W) - $h_bus_ul_x_)"/>
784 <xsl:message>vert line y1 <xsl:value-of select="$vert_line_y1_"/></xsl:message>
787 <rect x="{$v_bus_ul_x_}"
788 y="{$v_bus_ul_y_ + 2}"
789 width= "{$v_bus_width_}"
790 height="{$v_bus_height_}"
791 style="stroke:none; fill:{$busColor_}"/>
793 <rect x="{$h_bus_ul_x_}"
795 width= "{$h_bus_width_}"
796 height="{$h_bus_height_}"
797 style="stroke:none; fill:{$busColor_}"/>
806 <!-- =========================================================================== -->
807 <!-- FUNCTION TEMPLATE -->
809 <!-- Draw the IP Bucket -->
810 <!-- =========================================================================== -->
811 <xsl:template name="Draw_BlkDiagram_IPBucket">
813 <!-- Draw IP Bucket -->
814 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/IPBUCKET">
816 <xsl:variable name="bucket_w_" select="(($BLKD_MOD_BKTLANE_W * 2) + (($BLKD_MOD_W * @MODS_W) + ($BLKD_MOD_BUCKET_G * (@MODS_W - 1))))"/>
817 <xsl:variable name="bucket_h_" select="(($BLKD_MOD_BKTLANE_H * 2) + (($BLKD_MOD_H * @MODS_H) + ($BLKD_MOD_BUCKET_G * (@MODS_H - 1))))"/>
819 <xsl:variable name="bucket_x_" select="(ceiling($G_Total_Blkd_W div 2) - ceiling($bucket_w_ div 2))"/>
820 <xsl:variable name="bucket_y_" select="($G_SharedBus_Y + $G_Total_SharedBus_H + $G_Max_Stack_BlwSbs_H + $BLKD_SBS2IP_GAP)"/>
822 <xsl:call-template name="F_WriteText">
823 <xsl:with-param name="iX" select="$bucket_x_"/>
824 <xsl:with-param name="iY" select="($bucket_y_ - 4)"/>
825 <xsl:with-param name="iText" select="'IP'"/>
826 <xsl:with-param name="iClass" select="'bkt_label'"/>
829 <use x="{$bucket_x_}" y="{$bucket_y_}" xlink:href="#ipbucket"/>
836 <xsl:template name="Draw_BlkDiagram_Key">
837 <use x="{ceiling($G_Total_Blkd_W div 2) - ceiling($BLKD_KEY_W div 2)}" y="0" xlink:href="#BlkDiagram_Key"/>
840 <xsl:template name="Define_BlkDiagram_Key">
842 <xsl:variable name="key_col_">
843 <xsl:call-template name="F_BusStd2RGB">
844 <xsl:with-param name="iBusStd" select="'KEY'"/>
848 <xsl:variable name="key_lt_col_">
849 <xsl:call-template name="F_BusStd2RGB_LT">
850 <xsl:with-param name="iBusStd" select="'KEY'"/>
854 <g id="KEY_IntrCntrl">
860 width= "{ceiling($BLKD_INTR_W div 2)}"
861 height="{$BLKD_INTR_H}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/>
864 y1="{ceiling($BLKD_INTR_H div 4)}"
865 x2="{ceiling($BLKD_INTR_W div 2)}"
866 y2="{ceiling($BLKD_INTR_H div 4)}"
867 style="stroke:{$COL_BLACK};stroke-width:2"/>
869 <xsl:call-template name="F_WriteText">
870 <xsl:with-param name="iX" select="1.5"/>
871 <xsl:with-param name="iY" select="(7 + ceiling($BLKD_INTR_H div 2))"/>
872 <xsl:with-param name="iText" select="'x'"/>
873 <xsl:with-param name="iClass" select="'intr_symbol'"/>
878 <g id="KEY_IntrdProc">
884 width= "{ceiling($BLKD_INTR_W div 2)}"
885 height="{$BLKD_INTR_H}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/>
888 y1="{ceiling($BLKD_INTR_H div 4) - 2}"
889 x2="{ceiling($BLKD_INTR_W div 2)}"
890 y2="{ceiling($BLKD_INTR_H div 4) - 2}"
891 style="stroke:{$COL_BLACK};stroke-width:1"/>
894 y1="{ceiling($BLKD_INTR_H div 4) + 2}"
895 x2="{ceiling($BLKD_INTR_W div 2)}"
896 y2="{ceiling($BLKD_INTR_H div 4) + 2}"
897 style="stroke:{$COL_BLACK};stroke-width:1"/>
899 <xsl:call-template name="F_WriteText">
900 <xsl:with-param name="iX" select="1.5"/>
901 <xsl:with-param name="iY" select="(7 + ceiling($BLKD_INTR_H div 2))"/>
902 <xsl:with-param name="iText" select="'x'"/>
903 <xsl:with-param name="iClass" select="'intr_symbol'"/>
913 width= "{$BLKD_INTR_W}"
914 height="{ceiling($BLKD_INTR_H div 2)}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/>
916 <line x1="{ceiling($BLKD_INTR_W div 2)}"
918 x2="{ceiling($BLKD_INTR_W div 2)}"
919 y2="{ceiling($BLKD_INTR_H div 2)}"
920 style="stroke:{$COL_BLACK};stroke-width:1"/>
922 <xsl:call-template name="F_WriteText">
923 <xsl:with-param name="iX" select="'2'"/>
924 <xsl:with-param name="iY" select="'7'"/>
925 <xsl:with-param name="iText" select="'y'"/>
926 <xsl:with-param name="iClass" select="'intr_symbol'"/>
929 <xsl:call-template name="F_WriteText">
930 <xsl:with-param name="iX" select="(2 + ceiling($BLKD_INTR_W div 2))"/>
931 <xsl:with-param name="iY" select="'7'"/>
932 <xsl:with-param name="iText" select="'x'"/>
933 <xsl:with-param name="iClass" select="'intr_symbol'"/>
938 <g id="BlkDiagram_Key">
942 width= "{$BLKD_KEY_W}"
943 height="{$BLKD_KEY_H}"
944 style="fill:{$COL_BG}; stroke:none;"/>
948 width= "{$BLKD_KEY_W}"
950 style="fill:{$COL_BG}; stroke:none;"/>
952 <xsl:call-template name="F_WriteText">
953 <xsl:with-param name="iX" select="ceiling($BLKD_KEY_W div 2)"/>
954 <xsl:with-param name="iY" select="'14'"/>
955 <xsl:with-param name="iText" select="'KEY'"/>
956 <xsl:with-param name="iClass" select="'key_title'"/>
961 width= "{$BLKD_KEY_W}"
963 style="fill:{$COL_BG_LT}; stroke:none;"/>
965 <xsl:call-template name="F_WriteText">
966 <xsl:with-param name="iX" select="ceiling($BLKD_KEY_W div 2)"/>
967 <xsl:with-param name="iY" select="'30'"/>
968 <xsl:with-param name="iText" select="'SYMBOLS'"/>
969 <xsl:with-param name="iClass" select="'key_header'"/>
972 <use x="32" y="47" xlink:href="#KEY_BifLabel" transform="scale(0.75)"/>
973 <xsl:call-template name="F_WriteText">
974 <xsl:with-param name="iX" select="'12'"/>
975 <xsl:with-param name="iY" select="'60'"/>
976 <xsl:with-param name="iText" select="'bus interface'"/>
977 <xsl:with-param name="iClass" select="'key_label'"/>
980 <use x="20" y="68" xlink:href="#KEY_SharedBus"/>
981 <xsl:call-template name="F_WriteText">
982 <xsl:with-param name="iX" select="'12'"/>
983 <xsl:with-param name="iY" select="'89'"/>
984 <xsl:with-param name="iText" select="'shared bus'"/>
985 <xsl:with-param name="iClass" select="'key_label'"/>
990 ==================================
992 ==================================
995 <xsl:call-template name="F_WriteText">
996 <xsl:with-param name="iX" select="'110'"/>
997 <xsl:with-param name="iY" select="'47'"/>
998 <xsl:with-param name="iText" select="'Bus connections'"/>
999 <xsl:with-param name="iClass" select="'key_label_ul'"/>
1000 </xsl:call-template>
1002 <use x="110" y="58" xlink:href="#KEY_busconn_MASTER"/>
1003 <xsl:call-template name="F_WriteText">
1004 <xsl:with-param name="iX" select="'140'"/>
1005 <xsl:with-param name="iY" select="'72'"/>
1006 <xsl:with-param name="iText" select="'master or initiator'"/>
1007 <xsl:with-param name="iClass" select="'key_label'"/>
1008 </xsl:call-template>
1010 <use x="110" y="{58 + (($BLKD_BIFC_H + 4) * 1)}" xlink:href="#KEY_busconn_SLAVE"/>
1011 <xsl:call-template name="F_WriteText">
1012 <xsl:with-param name="iX" select="'140'"/>
1013 <xsl:with-param name="iY" select="(72 + (($BLKD_BIFC_H + 4) * 1))"/>
1014 <xsl:with-param name="iText" select="'slave or target'"/>
1015 <xsl:with-param name="iClass" select="'key_label'"/>
1016 </xsl:call-template>
1018 <use x="110" y="{58 + (($BLKD_BIFC_H + 4) * 2)}" xlink:href="#KEY_busconn_MASTER_SLAVE"/>
1019 <xsl:call-template name="F_WriteText">
1020 <xsl:with-param name="iX" select="'140'"/>
1021 <xsl:with-param name="iY" select="(72 + (($BLKD_BIFC_H + 4) * 2))"/>
1022 <xsl:with-param name="iText" select="'master slave'"/>
1023 <xsl:with-param name="iClass" select="'key_label'"/>
1024 </xsl:call-template>
1027 <use x="110" y="{58 + (($BLKD_BIFC_H + 4) * 3)}" xlink:href="#KEY_busconn_MONITOR"/>
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) * 3))"/>
1031 <xsl:with-param name="iText" select="'monitor'"/>
1032 <xsl:with-param name="iClass" select="'key_label'"/>
1033 </xsl:call-template>
1036 ==================================
1038 ==================================
1040 <xsl:call-template name="F_WriteText">
1041 <xsl:with-param name="iX" select="'258'"/>
1042 <xsl:with-param name="iY" select="'47'"/>
1043 <xsl:with-param name="iText" select="'External Ports'"/>
1044 <xsl:with-param name="iClass" select="'key_label_ul'"/>
1045 </xsl:call-template>
1047 <use x="258" y="58" xlink:href="#KEY_INPort"/>
1048 <xsl:call-template name="F_WriteText">
1049 <xsl:with-param name="iX" select="'288'"/>
1050 <xsl:with-param name="iY" select="'72'"/>
1051 <xsl:with-param name="iText" select="'input'"/>
1052 <xsl:with-param name="iClass" select="'key_label'"/>
1053 </xsl:call-template>
1055 <use x="258" y="{58 + ($BLKD_IOP_H * 1) + 4}" xlink:href="#KEY_OUTPort"/>
1056 <xsl:call-template name="F_WriteText">
1057 <xsl:with-param name="iX" select="'288'"/>
1058 <xsl:with-param name="iY" select="(72 + ($BLKD_IOP_H * 1) + 4)"/>
1059 <xsl:with-param name="iText" select="'output'"/>
1060 <xsl:with-param name="iClass" select="'key_label'"/>
1061 </xsl:call-template>
1063 <use x="258" y="{58 + ($BLKD_IOP_H * 2) + 8}" xlink:href="#KEY_INOUTPort"/>
1064 <xsl:call-template name="F_WriteText">
1065 <xsl:with-param name="iX" select="'288'"/>
1066 <xsl:with-param name="iY" select="(72 + ($BLKD_IOP_H * 2) + 8)"/>
1067 <xsl:with-param name="iText" select="'inout'"/>
1068 <xsl:with-param name="iClass" select="'key_label'"/>
1069 </xsl:call-template>
1073 ==================================
1075 ==================================
1077 <xsl:call-template name="F_WriteText">
1078 <xsl:with-param name="iX" select="'380'"/>
1079 <xsl:with-param name="iY" select="'47'"/>
1080 <xsl:with-param name="iText" select="'Interrupts'"/>
1081 <xsl:with-param name="iClass" select="'key_label_ul'"/>
1082 </xsl:call-template>
1084 <use x="380" y="58" xlink:href="#KEY_IntrCntrl"/>
1085 <xsl:call-template name="F_WriteText">
1086 <xsl:with-param name="iX" select="'396'"/>
1087 <xsl:with-param name="iY" select="'64'"/>
1088 <xsl:with-param name="iText" select="'Interrupt'"/>
1089 <xsl:with-param name="iClass" select="'key_label_small'"/>
1090 </xsl:call-template>
1091 <xsl:call-template name="F_WriteText">
1092 <xsl:with-param name="iX" select="'396'"/>
1093 <xsl:with-param name="iY" select="'74'"/>
1094 <xsl:with-param name="iText" select="'Controller'"/>
1095 <xsl:with-param name="iClass" select="'key_label_small'"/>
1096 </xsl:call-template>
1099 <use x="380" y="88" xlink:href="#KEY_IntrdProc"/>
1100 <xsl:call-template name="F_WriteText">
1101 <xsl:with-param name="iX" select="'396'"/>
1102 <xsl:with-param name="iY" select="'94'"/>
1103 <xsl:with-param name="iText" select="'Interrupt'"/>
1104 <xsl:with-param name="iClass" select="'key_label'"/>
1105 </xsl:call-template>
1106 <xsl:call-template name="F_WriteText">
1107 <xsl:with-param name="iX" select="'396'"/>
1108 <xsl:with-param name="iY" select="'104'"/>
1109 <xsl:with-param name="iText" select="'Target'"/>
1110 <xsl:with-param name="iClass" select="'key_label_small'"/>
1111 </xsl:call-template>
1114 <use x="380" y="118" xlink:href="#KEY_IntrSrc"/>
1115 <xsl:call-template name="F_WriteText">
1116 <xsl:with-param name="iX" select="'400'"/>
1117 <xsl:with-param name="iY" select="'124'"/>
1118 <xsl:with-param name="iText" select="'Interrupt'"/>
1119 <xsl:with-param name="iClass" select="'key_label_small'"/>
1120 </xsl:call-template>
1121 <xsl:call-template name="F_WriteText">
1122 <xsl:with-param name="iX" select="'400'"/>
1123 <xsl:with-param name="iY" select="'134'"/>
1124 <xsl:with-param name="iText" select="'Source'"/>
1125 <xsl:with-param name="iClass" select="'key_label_small'"/>
1126 </xsl:call-template>
1128 <xsl:call-template name="F_WriteText">
1129 <xsl:with-param name="iX" select="'360'"/>
1130 <xsl:with-param name="iY" select="'146'"/>
1131 <xsl:with-param name="iText" select="'X = Controller ID'"/>
1132 <xsl:with-param name="iClass" select="'key_label_small'"/>
1133 </xsl:call-template>
1134 <xsl:call-template name="F_WriteText">
1135 <xsl:with-param name="iX" select="'360'"/>
1136 <xsl:with-param name="iY" select="'156'"/>
1137 <xsl:with-param name="iText" select="'Y = Interrupt Priority'"/>
1138 <xsl:with-param name="iClass" select="'key_label_small'"/>
1139 </xsl:call-template>
1142 ==================================
1144 ==================================
1148 width= "{$BLKD_KEY_W}"
1150 style="fill:{$COL_BG_LT}; stroke:none;"/>
1152 <xsl:call-template name="F_WriteText">
1153 <xsl:with-param name="iX" select="ceiling($BLKD_KEY_W div 2)"/>
1154 <xsl:with-param name="iY" select="'172'"/>
1155 <xsl:with-param name="iText" select="'COLORS'"/>
1156 <xsl:with-param name="iClass" select="'key_header'"/>
1157 </xsl:call-template>
1160 <text class="keylblul"
1162 y="190">Bus Standards</text>
1164 <xsl:call-template name="F_WriteText">
1165 <xsl:with-param name="iX" select="'110'"/>
1166 <xsl:with-param name="iY" select="'190'"/>
1167 <xsl:with-param name="iText" select="'Bus Standard'"/>
1168 <xsl:with-param name="iClass" select="'key_label'"/>
1169 </xsl:call-template>
1171 <xsl:variable name="dcr_col_">
1172 <xsl:call-template name="F_BusStd2RGB">
1173 <xsl:with-param name="iBusStd" select="'DCR'"/>
1174 </xsl:call-template>
1177 <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 0)}"
1179 width= "{$BLKD_BIFC_H}"
1180 height="{$BLKD_BIFC_W}"
1181 style="fill:{$dcr_col_}; stroke:none;"/>
1184 <text class="keylabel"
1185 x="{12 + $BLKD_BIFC_W + 4}"
1186 y="{200 + (($BLKD_BIF_H + 4) * 1)}">DCR</text>
1188 <xsl:call-template name="F_WriteText">
1189 <xsl:with-param name="iX" select="(12 + $BLKD_BIFC_W + 4)"/>
1190 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/>
1191 <xsl:with-param name="iText" select="'DCR'"/>
1192 <xsl:with-param name="iClass" select="'key_label'"/>
1193 </xsl:call-template>
1195 <xsl:variable name="fcb_col_">
1196 <xsl:call-template name="F_BusStd2RGB">
1197 <xsl:with-param name="iBusStd" select="'FCB'"/>
1198 </xsl:call-template>
1201 <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 0)}"
1202 y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1203 width= "{$BLKD_BIFC_H}"
1204 height="{$BLKD_BIFC_W}"
1205 style="fill:{$fcb_col_}; stroke:none;"/>
1208 <text class="keylabel"
1209 x="{12 + $BLKD_BIFC_W + 4}"
1210 y="{200 + (($BLKD_BIF_H + 4) * 2)}">FCB</text>
1212 <xsl:call-template name="F_WriteText">
1213 <xsl:with-param name="iX" select="(12 + $BLKD_BIFC_W + 4)"/>
1214 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 2))"/>
1215 <xsl:with-param name="iText" select="'FCB'"/>
1216 <xsl:with-param name="iClass" select="'key_label'"/>
1217 </xsl:call-template>
1219 <xsl:variable name="fsl_col_">
1220 <xsl:call-template name="F_BusStd2RGB">
1221 <xsl:with-param name="iBusStd" select="'FSL'"/>
1222 </xsl:call-template>
1225 <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1227 width= "{$BLKD_BIFC_H}"
1228 height="{$BLKD_BIFC_W}"
1229 style="fill:{$fsl_col_}; stroke:none;"/>
1231 <text class="keylabel"
1232 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1233 y="{200 + (($BLKD_BIF_H + 4) * 1)}">FSL</text>
1236 <xsl:call-template name="F_WriteText">
1237 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1))"/>
1238 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/>
1239 <xsl:with-param name="iText" select="'FSL'"/>
1240 <xsl:with-param name="iClass" select="'key_label'"/>
1241 </xsl:call-template>
1243 <xsl:variable name="col_lmb_">
1244 <xsl:call-template name="F_BusStd2RGB">
1245 <xsl:with-param name="iBusStd" select="'LMB'"/>
1246 </xsl:call-template>
1249 <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1250 y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1251 width= "{$BLKD_BIFC_H}"
1252 height="{$BLKD_BIFC_W}"
1253 style="fill:{$col_lmb_}; stroke:none;"/>
1255 <text class="keylabel"
1256 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1257 y="{200 + (($BLKD_BIF_H + 4) * 2)}">LMB</text>
1260 <xsl:call-template name="F_WriteText">
1261 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1))"/>
1262 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 2))"/>
1263 <xsl:with-param name="iText" select="'LMB'"/>
1264 <xsl:with-param name="iClass" select="'key_label'"/>
1265 </xsl:call-template>
1267 <xsl:variable name="opb_col_">
1268 <xsl:call-template name="F_BusStd2RGB">
1269 <xsl:with-param name="iBusStd" select="'OPB'"/>
1270 </xsl:call-template>
1274 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1276 width= "{$BLKD_BIFC_H}"
1277 height="{$BLKD_BIFC_W}"
1278 style="fill:{$opb_col_}; stroke:none;"/>
1280 <text class="keylabel"
1281 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1282 y="{200 + (($BLKD_BIF_H + 4) * 1)}">OPB</text>
1284 <xsl:call-template name="F_WriteText">
1285 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2))"/>
1286 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/>
1287 <xsl:with-param name="iText" select="'OPB'"/>
1288 <xsl:with-param name="iClass" select="'key_label'"/>
1289 </xsl:call-template>
1291 <xsl:variable name="plb_col_">
1292 <xsl:call-template name="F_BusStd2RGB">
1293 <xsl:with-param name="iBusStd" select="'PLB'"/>
1294 </xsl:call-template>
1297 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1298 y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1299 width= "{$BLKD_BIFC_H}"
1300 height="{$BLKD_BIFC_W}"
1301 style="fill:{$plb_col_}; stroke:none;"/>
1303 <text class="keylabel"
1304 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1305 y="{200 + (($BLKD_BIF_H + 4) * 2)}">PLB</text>
1307 <xsl:call-template name="F_WriteText">
1308 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2))"/>
1309 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 2))"/>
1310 <xsl:with-param name="iText" select="'PLB'"/>
1311 <xsl:with-param name="iClass" select="'key_header'"/>
1312 </xsl:call-template>
1315 <xsl:variable name="ocm_col_">
1316 <xsl:call-template name="F_BusStd2RGB">
1317 <xsl:with-param name="iBusStd" select="'OCM'"/>
1318 </xsl:call-template>
1322 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1324 width= "{$BLKD_BIFC_H}"
1325 height="{$BLKD_BIFC_W}"
1326 style="fill:{$ocm_col_}; stroke:none;"/>
1328 <text class="keylabel"
1329 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1330 y="{200 + (($BLKD_BIF_H + 4) * 1)}">SOCM</text>
1333 <xsl:call-template name="F_WriteText">
1334 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3))"/>
1335 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/>
1336 <xsl:with-param name="iText" select="'SOCM'"/>
1337 <xsl:with-param name="iClass" select="'key_label'"/>
1338 </xsl:call-template>
1341 <xsl:variable name="xil_p2p_col_">
1342 <xsl:call-template name="F_BusStd2RGB">
1343 <xsl:with-param name="iBusStd" select="'XIL'"/>
1344 </xsl:call-template>
1348 x="{12 + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1349 y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1350 width= "{$BLKD_BIFC_H}"
1351 height="{$BLKD_BIFC_W}"
1352 style="fill:{$xil_p2p_col_}; stroke:none;"/>
1354 <text class="keylabel"
1355 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1356 y="{200 + (($BLKD_BIF_H + 4) * 2)}">Xilinx P2P</text>
1358 <xsl:call-template name="F_WriteText">
1359 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3))"/>
1360 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 2))"/>
1361 <xsl:with-param name="iText" select="'Xilinx P2P'"/>
1362 <xsl:with-param name="iClass" select="'key_label'"/>
1363 </xsl:call-template>
1366 <xsl:variable name="user_p2p_col_">
1367 <xsl:call-template name="F_BusStd2RGB">
1368 <xsl:with-param name="iBusStd" select="'USER'"/>
1369 </xsl:call-template>
1372 <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 4)}"
1374 width= "{$BLKD_BIFC_H}"
1375 height="{$BLKD_BIFC_W}"
1376 style="fill:{$user_p2p_col_}; stroke:none;"/>
1378 <text class="keylabel"
1379 x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 4)}"
1380 y="{200 + (($BLKD_BIF_H + 4) * 1)}">USER P2P</text>
1383 <xsl:call-template name="F_WriteText">
1384 <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 4))"/>
1385 <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/>
1386 <xsl:with-param name="iText" select="'USER P2P'"/>
1387 <xsl:with-param name="iClass" select="'key_label'"/>
1388 </xsl:call-template>
1394 <xsl:template name="Define_BlkDiagram_Specs">
1396 <xsl:param name="iArch" select="'NA'"/>
1397 <xsl:param name="iPart" select="'NA'"/>
1398 <xsl:param name="iTimeStamp" select="'NA'"/>
1399 <xsl:param name="iEdkVersion" select="'NA'"/>
1401 <g id="BlkDiagram_Specs">
1405 width= "{$BLKD_SPECS_W}"
1406 height="{$BLKD_SPECS_H}"
1407 style="fill:{$COL_BG}; stroke:none;"/>
1412 width= "{$BLKD_SPECS_W}"
1414 style="fill:{$COL_BG}; stroke:none;"/>
1416 ==================================
1418 ==================================
1420 <xsl:call-template name="F_WriteText">
1421 <xsl:with-param name="iClass" select="'key_title'"/>
1422 <xsl:with-param name="iX" select="ceiling($BLKD_SPECS_W div 2)"/>
1423 <xsl:with-param name="iY" select="'14'"/>
1424 <xsl:with-param name="iText" select="'SPECS'"/>
1425 </xsl:call-template>
1427 <text class="keytitle"
1428 x="{ceiling($BLKD_SPECS_W div 2)} "
1433 ==================================
1435 ==================================
1439 width= "{$BLKD_SPECS_W}"
1441 style="fill:{$COL_BG_LT}; stroke:none;"/>
1442 <xsl:call-template name="F_WriteText">
1443 <xsl:with-param name="iClass" select="'blkd_spec_name'"/>
1444 <xsl:with-param name="iX" select="'4'"/>
1445 <xsl:with-param name="iY" select="'32'"/>
1446 <xsl:with-param name="iText" select="'EDK VERSION'"/>
1447 </xsl:call-template>
1449 <xsl:call-template name="F_WriteText">
1450 <xsl:with-param name="iClass" select="'blkd_spec_value_mid'"/>
1451 <xsl:with-param name="iX" select="($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)"/>
1452 <xsl:with-param name="iY" select="'32'"/>
1453 <xsl:with-param name="iText" select="$iEdkVersion"/>
1454 </xsl:call-template>
1457 ==================================
1459 ==================================
1463 width= "{$BLKD_SPECS_W}"
1465 style="fill:{$COL_BG_LT}; stroke:none;"/>
1467 <xsl:call-template name="F_WriteText">
1468 <xsl:with-param name="iClass" select="'blkd_spec_name'"/>
1469 <xsl:with-param name="iX" select="'4'"/>
1470 <xsl:with-param name="iY" select="'52'"/>
1471 <xsl:with-param name="iText" select="'ARCH'"/>
1472 </xsl:call-template>
1474 <xsl:call-template name="F_WriteText">
1475 <xsl:with-param name="iClass" select="'blkd_spec_value_mid'"/>
1476 <xsl:with-param name="iX" select="($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)"/>
1477 <xsl:with-param name="iY" select="'52'"/>
1478 <xsl:with-param name="iText" select="$iArch"/>
1479 </xsl:call-template>
1482 <text class="specsvalue"
1483 x="{($BLKD_SPECS_W + 1) - (string-length($blkd_arch) * 6.5)}"
1484 y="52"><xsl:value-of select="$blkd_arch"/></text>
1485 <text class="specsvaluemid"
1486 x="{($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)}"
1487 y="52"><xsl:value-of select="$iArch"/></text>
1491 ==================================
1493 ==================================
1497 width= "{$BLKD_SPECS_W}"
1499 style="fill:{$COL_BG_LT}; stroke:none;"/>
1501 <xsl:call-template name="F_WriteText">
1502 <xsl:with-param name="iClass" select="'blkd_spec_name'"/>
1503 <xsl:with-param name="iX" select="'4'"/>
1504 <xsl:with-param name="iY" select="'72'"/>
1505 <xsl:with-param name="iText" select="'PART'"/>
1506 </xsl:call-template>
1508 <xsl:call-template name="F_WriteText">
1509 <xsl:with-param name="iClass" select="'blkd_spec_value_mid'"/>
1510 <xsl:with-param name="iX" select="($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)"/>
1511 <xsl:with-param name="iY" select="'72'"/>
1512 <xsl:with-param name="iText" select="$iPart"/>
1513 </xsl:call-template>
1516 ==================================
1518 ==================================
1523 width= "{$BLKD_SPECS_W}"
1525 style="fill:{$COL_BG_LT}; stroke:none;"/>
1527 <xsl:call-template name="F_WriteText">
1528 <xsl:with-param name="iClass" select="'blkd_spec_name'"/>
1529 <xsl:with-param name="iX" select="'4'"/>
1530 <xsl:with-param name="iY" select="'92'"/>
1531 <xsl:with-param name="iText" select="'GENERATED'"/>
1532 </xsl:call-template>
1534 <xsl:call-template name="F_WriteText">
1535 <xsl:with-param name="iClass" select="'blkd_spec_value_mid'"/>
1536 <xsl:with-param name="iX" select="($BLKD_SPECS_W + 1) - (string-length($iTimeStamp) * 3.5)"/>
1537 <xsl:with-param name="iY" select="'92'"/>
1538 <xsl:with-param name="iText" select="$iTimeStamp"/>
1539 </xsl:call-template>
1546 <!-- =========================================================================== -->
1547 <!-- FUNCTION TEMPLATE -->
1549 <!-- =========================================================================== -->