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">
12 <xsl:output method="xml"
16 doctype-public="-//W3C//DTD SVG 1.0//EN"
17 doctype-system="http://www.w3.org/TR/SVG/DTD/svg10.dtd"/>
21 ===========================================================
22 Handle Bucket connections to the shared busses./
24 ===========================================================
27 <xsl:template name="BCLaneSpace_BucketToSharedBus">
29 <xsl:param name="iBusStd" select="'NONE'"/>
30 <xsl:param name="iBifType" select="'NONE'"/>
31 <xsl:param name="iBusName" select="'NONE'"/>
32 <xsl:param name="iStackToEast" select="'NONE'"/>
33 <xsl:param name="iStackToWest" select="'NONE'"/>
34 <xsl:param name="iStackToEast_W" select="0"/>
35 <xsl:param name="iStackToWest_W" select="0"/>
36 <xsl:param name="iLaneInSpace_X" select="0"/>
37 <xsl:param name="iSpaceSharedBus_Y" select="0"/>
40 <xsl:message>Stack To East <xsl:value-of select="$iStackToEast"/></xsl:message>
41 <xsl:message>Stack to West <xsl:value-of select="$iStackToWest"/></xsl:message>
42 <xsl:message>Stack to East Width <xsl:value-of select="$iStackToEast_W"/></xsl:message>
43 <xsl:message>Stack to West Width <xsl:value-of select="$iStackToWest_W"/></xsl:message>
44 <xsl:message>Shared Bus Y <xsl:value-of select="$iSpaceSharedBus_Y"/></xsl:message>
45 <xsl:message>Lane in space X <xsl:value-of select="$iLaneInSpace_X"/></xsl:message>
48 <xsl:variable name="busColor_">
49 <xsl:call-template name="F_BusStd2RGB">
50 <xsl:with-param name="iBusStd" select="$iBusStd"/>
54 <xsl:variable name="sbs_idx_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE= $iBusName)]/@BUS_INDEX"/>
55 <xsl:variable name="sbs_name_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/SBSBUCKETS/SBSBUCKET[(@BUS_INDEX = $sbs_idx_)]/@BUSNAME"/>
57 <xsl:variable name="sbs_bc_y_" select="($iSpaceSharedBus_Y + ($sbs_idx_ * $BLKD_SBS_LANE_H))"/>
59 <xsl:variable name="bktshp_hori_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/SBSBUCKETS/SBSBUCKET[(@BUS_INDEX = $sbs_idx_)]/@STACK_HORIZ_INDEX"/>
60 <xsl:variable name="bktshp_vert_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/SBSBUCKETS/SBSBUCKET[(@BUS_INDEX = $sbs_idx_)]/@SHAPE_VERTI_INDEX"/>
62 <xsl:variable name="space_W_">
63 <xsl:call-template name="F_Calc_Space_Width">
64 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
65 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
69 <xsl:variable name ="extSpaceWest_W_" select="ceiling($iStackToWest_W div 2)"/>
70 <xsl:variable name ="extSpaceEast_W_" select="ceiling($iStackToEast_W div 2)"/>
73 <xsl:message>Ext Shape to West <xsl:value-of select="$extSpaceWest_W_"/></xsl:message>
74 <xsl:message>Ext Shape to East <xsl:value-of select="$extSpaceEast_W_"/></xsl:message>
76 <xsl:variable name="bktshp_Y_">
77 <xsl:call-template name="F_Calc_Stack_Shape_Y">
78 <xsl:with-param name="iHorizIdx" select="$bktshp_hori_idx_"/>
79 <xsl:with-param name="iVertiIdx" select="$bktshp_vert_idx_"/>
83 <xsl:variable name="sbsStack_H_diff_">
85 <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when>
86 <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">
88 <xsl:variable name="stackToWest_AbvSbs_H_">
89 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
90 <xsl:with-param name="iStackIdx" select="$iStackToWest"/>
94 <xsl:variable name="stackToEast_AbvSbs_H_">
95 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
96 <xsl:with-param name="iStackIdx" select="$iStackToEast"/>
101 <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message>
102 <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>
104 <xsl:if test="($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_)">
105 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
108 <xsl:if test="not($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_)">0</xsl:if>
113 <xsl:variable name="vert_line_x_" select="($iLaneInSpace_X + ceiling($BLKD_BIFC_W div 2))"/>
114 <xsl:variable name="vert_line_y1_" select="($iSpaceSharedBus_Y + ($sbs_idx_ * $BLKD_SBS_LANE_H) + ceiling($BLKD_BIFC_W div 2))"/>
115 <xsl:variable name="vert_line_y2_" select="($bktshp_Y_ + ceiling($BLKD_MOD_W div 2) + $sbsStack_H_diff_)"/>
116 <xsl:variable name="bcInSpace_X_" select="($iLaneInSpace_X + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/>
120 <xsl:message>Shared Bus Y <xsl:value-of select="$G_SharedBus_Y"/></xsl:message>
121 <xsl:message>Vert Bus Y <xsl:value-of select="$vert_line_y1_"/></xsl:message>
122 <xsl:message>vert y1 <xsl:value-of select="$vert_line_y1_"/></xsl:message>
123 <xsl:message>vert y2 <xsl:value-of select="$vert_line_y2_"/></xsl:message>
126 <xsl:variable name="horz_line_y_" select="$vert_line_y2_"/>
127 <xsl:variable name="horz_line_x1_" select="$vert_line_x_"/>
128 <xsl:variable name="horz_line_x2_" select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_)"/>
130 <xsl:variable name="v_bus_ul_x_" select="$vert_line_x_"/>
131 <xsl:variable name="v_bus_ul_y_" select="$vert_line_y1_"/>
132 <xsl:variable name="v_bus_width_" select="$BLKD_P2P_BUS_W"/>
134 <xsl:variable name="v_bus_height_" select="(($vert_line_y2_ - $vert_line_y1_) - ceiling($BLKD_BIFC_H div 2))"/>
136 <xsl:variable name="h_bus_ul_x_" select="$v_bus_ul_x_"/>
137 <xsl:variable name="h_bus_ul_y_" select="$vert_line_y2_ - $BLKD_BIFC_H + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
138 <xsl:variable name="h_bus_width_" select="ceiling($space_W_ div 2) + $extSpaceEast_W_"/>
139 <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/>
142 <xsl:variable name="h_bus_width_" select="($space_W_ + ceiling(($extSpaceWest_W_ + $extSpaceEast_W_) div 2) - $BLKD_BIFC_W)"/>
143 <xsl:message>v bus x <xsl:value-of select="$v_bus_ul_x_"/></xsl:message>
144 <xsl:message>v bus y <xsl:value-of select="$v_bus_ul_y_"/></xsl:message>
145 <xsl:message>v bus w <xsl:value-of select="$v_bus_width_"/></xsl:message>
146 <xsl:message>v bus y1 <xsl:value-of select="$vert_line_y1_"/></xsl:message>
147 <xsl:message>v bus y2 <xsl:value-of select="$vert_line_y2_"/></xsl:message>
148 <xsl:message>v bus h <xsl:value-of select="$v_bus_height_"/></xsl:message>
149 <xsl:message>h bus w <xsl:value-of select="$h_bus_width_"/></xsl:message>
153 <!-- Draw rectangular parts of the bus -->
154 <rect x="{$v_bus_ul_x_}"
155 y="{$v_bus_ul_y_ - 2}"
156 width= "{$v_bus_width_}"
157 height="{$v_bus_height_}"
158 style="stroke:none; fill:{$busColor_}"/>
160 <rect x="{$h_bus_ul_x_}"
161 y="{$h_bus_ul_y_ - 5}"
162 width= "{$h_bus_width_}"
163 height="{$h_bus_height_}"
164 style="stroke:none; fill:{$busColor_}"/>
171 ===========================================================
172 Handle Processor's Shared bus connections.
173 ===========================================================
176 <xsl:template name="BCLaneSpace_ProcBifToSharedBus">
178 <xsl:param name="iBusStd" select="'NONE'"/>
179 <xsl:param name="iBusName" select="'NONE'"/>
180 <xsl:param name="iBifType" select="'NONE'"/>
181 <xsl:param name="iStackToEast" select="'NONE'"/>
182 <xsl:param name="iStackToWest" select="'NONE'"/>
183 <xsl:param name="iStackToEast_W" select="0"/>
184 <xsl:param name="iStackToWest_W" select="0"/>
185 <xsl:param name="iLaneInSpace_X" select="0"/>
186 <xsl:param name="iSpaceSharedBus_Y" select="0"/>
189 <xsl:message>Proc Bus Std <xsl:value-of select="$iBusStd"/></xsl:message>
190 <xsl:message>Proc Bus Name <xsl:value-of select="$iBusName"/></xsl:message>
191 <xsl:message>Proc Bif Type <xsl:value-of select="$iBifType"/></xsl:message>
194 <xsl:variable name="busColor_">
195 <xsl:call-template name="F_BusStd2RGB">
196 <xsl:with-param name="iBusStd" select="$iBusStd"/>
200 <xsl:variable name="sbs_idx_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE= $iBusName)]/@BUS_INDEX"/>
201 <xsl:variable name="sbs_bc_y_" select="($iSpaceSharedBus_Y + ($sbs_idx_ * $BLKD_SBS_LANE_H))"/>
202 <xsl:variable name="procInst_" select="BUSCONN/@INSTANCE"/>
206 <xsl:message>Shared Bus Idx <xsl:value-of select="$sbs_idx_"/></xsl:message>
207 <xsl:message>Proc inst <xsl:value-of select="$procInst_"/></xsl:message>
210 <xsl:variable name="procBif_Y_" select="((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * BUSCONN/@BIF_Y) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V))"/>
211 <xsl:variable name="procBifName_" select="BUSCONN/@BUSINTERFACE"/>
212 <xsl:variable name="procBifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $procInst_)]/BUSINTERFACE[(@NAME = $procBifName_)]/@BIF_X"/>
213 <xsl:variable name="procBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $procInst_)]/BUSINTERFACE[(@NAME = $procBifName_)]/@TYPE"/>
215 <xsl:variable name="procshp_hori_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $procInst_)]/@STACK_HORIZ_INDEX"/>
216 <xsl:variable name="procshp_vert_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $procInst_)]/@SHAPE_VERTI_INDEX"/>
218 <xsl:variable name="space_W_">
219 <xsl:call-template name="F_Calc_Space_Width">
220 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
221 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
225 <xsl:variable name ="extSpaceWest_W_" select="ceiling($iStackToWest_W div 2)"/>
226 <xsl:variable name ="extSpaceEast_W_" select="ceiling($iStackToEast_W div 2)"/>
230 <xsl:message>Ext Space to West <xsl:value-of select="$extSpaceWest_W_"/></xsl:message>
231 <xsl:message>Ext Space to East <xsl:value-of select="$extSpaceEast_W_"/></xsl:message>
233 <xsl:message>Ext Space to East <xsl:value-of select="$extSpaceEast_W_"/></xsl:message>
234 <xsl:message>Stack horiz <xsl:value-of select="$procshp_hori_idx_"/></xsl:message>
235 <xsl:message>Stack verti <xsl:value-of select="$procshp_vert_idx_"/></xsl:message>
236 <xsl:message>Proc Bif Y <xsl:value-of select="$procBif_Y_"/></xsl:message>
239 <xsl:variable name="procshp_Y_">
240 <xsl:call-template name="F_Calc_Stack_Shape_Y">
241 <xsl:with-param name="iHorizIdx" select="$procshp_hori_idx_"/>
242 <xsl:with-param name="iVertiIdx" select="$procshp_vert_idx_"/>
247 <xsl:variable name="procStack_H_diff_">
249 <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when>
250 <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">
252 <xsl:variable name="stackToWest_AbvSbs_H_">
253 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
254 <xsl:with-param name="iStackIdx" select="$iStackToWest"/>
258 <xsl:variable name="stackToEast_AbvSbs_H_">
259 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
260 <xsl:with-param name="iStackIdx" select="$iStackToEast"/>
265 <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message>
266 <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>
269 <xsl:when test="(($procshp_hori_idx_ = $iStackToEast) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))">
270 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
272 <xsl:when test="(($procshp_hori_idx_ = $iStackToWest) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))">
273 <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/>
275 <xsl:otherwise>0</xsl:otherwise>
281 <xsl:variable name="bc_Y_" select="($procshp_Y_ + $procBif_Y_ + ceiling($BIF_H div 2) + $procStack_H_diff_) - ceiling($BLKD_BIFC_H div 2)"/>
283 <xsl:variable name="bc_x_" select="($laneInSpace_X + ceiling($BLKD_BIFC_W div 2))"/>
284 <xsl:variable name="bc_x_" select="0"/>
285 <xsl:message>Test</xsl:message>
288 <xsl:variable name="bc_X_">
290 <xsl:when test="$procBifSide_ = '0'">
291 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - (ceiling($BLKD_MOD_W div 2) + $BLKD_BIFC_W))"/>
293 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_)"/>
294 <xsl:value-of select="($space_W_ - ceiling($BLKD_MOD_W div 2))"/>
295 <xsl:value-of select="$space_W_ + $extSpaceEast_W_"/>
296 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - (ceiling($BLKD_MOD_W div 2) + $BLKD_BIFC_W))"/>
299 <xsl:when test="$procBifSide_ = '1'">
300 <xsl:value-of select="ceiling($BLKD_MOD_W div 2)"/>
302 <xsl:otherwise>0</xsl:otherwise>
306 <!-- Place the bus connectijon -->
307 <use x="{$bc_X_}" y="{$bc_Y_}" xlink:href="#{$iBusStd}_busconn_{$procBifType_}"/>
310 <xsl:variable name="vert_line_x_" select="($iLaneInSpace_X + ceiling($BLKD_BIFC_W div 2))"/>
311 <xsl:variable name="vert_line_y1_" select="($procshp_Y_ + $procBif_Y_ + ceiling($BLKD_BIF_H div 2) + $procStack_H_diff_)"/>
312 <xsl:variable name="vert_line_y2_" select="($iSpaceSharedBus_Y + ($sbs_idx_ * $BLKD_SBS_LANE_H) + ceiling($BLKD_BIFC_W div 2))"/>
315 <xsl:message>Vert line Y1 <xsl:value-of select="$vert_line_y1_"/></xsl:message>
316 <xsl:message>Vert line Y2 <xsl:value-of select="$vert_line_y2_"/></xsl:message>
319 <xsl:variable name="v_bus_ul_y_">
321 <xsl:when test="$vert_line_y1_ > $vert_line_y2_">
322 <xsl:value-of select="$vert_line_y2_"/>
324 <xsl:when test="$vert_line_y2_ > $vert_line_y1_">
325 <xsl:value-of select="$vert_line_y1_"/>
330 <xsl:variable name="v_bus_ul_x_">
332 <xsl:when test="@ORIENTED='WEST'">
333 <xsl:value-of select="($vert_line_x_ + $BLKD_MOD_BIF_GAP_H)"/>
335 <xsl:when test="@ORIENTED='EAST'">
336 <xsl:value-of select="($vert_line_x_ - $BLKD_MOD_BIF_GAP_H)"/>
342 <xsl:variable name="v_bus_width_" select="$BLKD_P2P_BUS_W"/>
343 <xsl:variable name="v_bus_height_">
345 <xsl:when test="$vert_line_y1_ > $vert_line_y2_">
346 <xsl:value-of select="($vert_line_y1_ - $vert_line_y2_) - $BLKD_P2P_BUS_W"/>
348 <xsl:when test="$vert_line_y2_ > $vert_line_y1_">
349 <xsl:value-of select="($vert_line_y2_ - $vert_line_y1_) - $BLKD_P2P_BUS_W"/>
354 <xsl:variable name="h_bus_ul_x_">
356 <xsl:when test="@ORIENTED='WEST'">
357 <xsl:value-of select="($bc_X_ + $BLKD_BIFC_W - ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2))"/>
359 <xsl:value-of select="$v_bus_ul_x_"/>
362 <xsl:when test="@ORIENTED='EAST'">
363 <xsl:value-of select="$v_bus_ul_x_"/>
368 <xsl:variable name="h_bus_ul_y_">
370 <xsl:when test="$vert_line_y1_ > $vert_line_y2_">
371 <xsl:value-of select="$vert_line_y2_ - ceiling($BLKD_P2P_BUS_W div 2)"/>
373 <xsl:when test="$vert_line_y2_ > $vert_line_y1_">
374 <xsl:value-of select="$vert_line_y1_ - ceiling($BLKD_P2P_BUS_W div 2)"/>
380 <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/>
381 <xsl:variable name="h_bus_width_">
383 <xsl:when test="@ORIENTED='WEST'">
384 <xsl:value-of select="$v_bus_ul_x_ - $h_bus_ul_x_ + $BLKD_P2P_BUS_W"/>
386 <xsl:when test="@ORIENTED='EAST'">
387 <xsl:value-of select="($bc_X_ - $v_bus_ul_x_) + ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2) + 1"/>
393 <xsl:if test="(@ORIENTED = 'WEST')">
396 <xsl:message>bc_X_ <xsl:value-of select="$bc_X_"/></xsl:message>
397 <xsl:message>v_bus_ul_x <xsl:value-of select="$v_bus_ul_x_"/></xsl:message>
398 <xsl:message>h_bus_width <xsl:value-of select="$h_bus_width_"/></xsl:message>
399 <xsl:message>h_bus_ul_y <xsl:value-of select="$h_bus_ul_y_"/></xsl:message>
402 <rect x="{$v_bus_ul_x_}"
403 y="{$v_bus_ul_y_ + 2}"
404 width= "{$v_bus_width_}"
405 height="{$v_bus_height_}"
406 style="stroke:none; fill:{$busColor_}"/>
408 <rect x="{$h_bus_ul_x_}"
410 width= "{$h_bus_width_}"
411 height="{$h_bus_height_}"
412 style="stroke:none; fill:{$busColor_}"/>
416 ===========================================================
417 Handle non Processor Sharedebus connections.
418 ===========================================================
421 <xsl:template name="BCLaneSpace_NonProcBifToSharedBus">
423 <xsl:param name="iBusStd" select="'NONE'"/>
424 <xsl:param name="iBifType" select="'NONE'"/>
425 <xsl:param name="iBusName" select="'NONE'"/>
426 <xsl:param name="iStackToEast" select="'NONE'"/>
427 <xsl:param name="iStackToWest" select="'NONE'"/>
428 <xsl:param name="iStackToEast_W" select="0"/>
429 <xsl:param name="iStackToWest_W" select="0"/>
430 <xsl:param name="iLaneInSpace_X" select="0"/>
431 <xsl:param name="iSpaceSharedBus_Y" select="0"/>
434 <xsl:variable name="sbs_idx_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE= $iBusName)]/@BUS_INDEX"/>
435 <xsl:variable name="sbs_bc_y_" select="($iSpaceSharedBus_Y + ($sbs_idx_ * $BLKD_SBS_LANE_H))"/>
437 <xsl:variable name="sbs_bc_y_" select="($G_SharedBus_Y + ($sbs_idx_ * $BLKD_SBS_LANE_H))"/>
440 <xsl:variable name="cmplxInst_" select="BUSCONN/@INSTANCE"/>
442 <xsl:variable name="cmplxBif_Y_" select="((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * BUSCONN/@BIF_Y) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V))"/>
443 <xsl:variable name="cmplxBifName_" select="BUSCONN/@BUSINTERFACE"/>
444 <xsl:variable name="cmplxBifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $cmplxInst_)]/BUSINTERFACE[(@NAME = $cmplxBifName_)]/@BIF_X"/>
445 <xsl:variable name="cmplxBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $cmplxInst_)]/BUSINTERFACE[(@NAME = $cmplxBifName_)]/@TYPE"/>
447 <xsl:variable name="cmplxshp_hori_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $cmplxInst_)])]/@STACK_HORIZ_INDEX"/>
448 <xsl:variable name="cmplxshp_vert_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $cmplxInst_)])]/@SHAPE_VERTI_INDEX"/>
450 <xsl:variable name="is_abvSbs_" select="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[MODULE[(@INSTANCE = $cmplxInst_)]]/@IS_ABVSBS)"/>
451 <xsl:variable name="is_blwSbs_" select="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[MODULE[(@INSTANCE = $cmplxInst_)]]/@IS_BLWSBS)"/>
454 <xsl:message>iStackToEast <xsl:value-of select="$iStackToEast"/></xsl:message>
455 <xsl:message>iStackToWest <xsl:value-of select="$iStackToWest"/></xsl:message>
456 <xsl:message><xsl:value-of select="$cmplxInst_"/> : <xsl:value-of select="$is_blwSbs_"/></xsl:message>
457 <xsl:message><xsl:value-of select="$cmplxInst_"/> : <xsl:value-of select="$is_abvSbs_"/></xsl:message>
458 <xsl:message><xsl:value-of select="$cmplxInst_"/> : <xsl:value-of select="$is_blwSbs_"/></xsl:message>
459 <xsl:message><xsl:value-of select="$cmplxInst_"/> : <xsl:value-of select="$is_abvSbs_"/></xsl:message>
460 <xsl:message>Stack horiz <xsl:value-of select="$cmplxshp_hori_idx_"/></xsl:message>
461 <xsl:message>Stack verti <xsl:value-of select="$cmplxshp_vert_idx_"/></xsl:message>
462 <xsl:message>Proc Bif Y <xsl:value-of select="$procBif_Y_"/></xsl:message>
466 <xsl:variable name="busColor_">
467 <xsl:call-template name="F_BusStd2RGB">
468 <xsl:with-param name="iBusStd" select="$iBusStd"/>
472 <xsl:variable name="space_W_">
473 <xsl:call-template name="F_Calc_Space_Width">
474 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
475 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
479 <xsl:variable name ="extSpaceWest_W_" select="ceiling($iStackToWest_W div 2)"/>
480 <xsl:variable name ="extSpaceEast_W_" select="ceiling($iStackToEast_W div 2)"/>
482 <xsl:variable name="cmplxshp_Y_">
483 <xsl:call-template name="F_Calc_Stack_Shape_Y">
484 <xsl:with-param name="iHorizIdx" select="$cmplxshp_hori_idx_"/>
485 <xsl:with-param name="iVertiIdx" select="$cmplxshp_vert_idx_"/>
490 <xsl:message>Complex shape Y <xsl:value-of select="$cmplxshp_Y_"/></xsl:message>
493 <xsl:variable name="stackToEast_">
495 <xsl:when test="not($iStackToEast = 'NONE')"><xsl:value-of select="$iStackToEast"/></xsl:when>
496 <xsl:otherwise>NONE</xsl:otherwise>
500 <xsl:variable name="stackToWest_">
502 <xsl:when test=" not($iStackToWest = 'NONE')"><xsl:value-of select="$iStackToWest"/></xsl:when>
503 <xsl:when test="(not($iStackToEast = 'NONE') and not($iStackToEast = '0'))"><xsl:value-of select="($iStackToEast - 1)"/></xsl:when>
504 <xsl:otherwise>NONE</xsl:otherwise>
509 <xsl:variable name="cmplxStack_H_diff_">
511 <xsl:when test=" (($stackToEast_ = 'NONE') or ($stackToWest_ = 'NONE'))">0</xsl:when>
512 <xsl:when test="not(($stackToEast_ = 'NONE') or ($stackToWest_ = 'NONE'))">
514 <xsl:variable name="stackToWest_AbvSbs_H_">
515 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
516 <xsl:with-param name="iStackIdx" select="$stackToWest_"/>
520 <xsl:variable name="stackToEast_AbvSbs_H_">
521 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
522 <xsl:with-param name="iStackIdx" select="$stackToEast_"/>
527 <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message>
528 <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>
531 <xsl:when test="(($cmplxshp_hori_idx_ = $stackToEast_) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))">
532 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
534 <xsl:when test="(($cmplxshp_hori_idx_ = $stackToWest_) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))">
535 <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/>
537 <xsl:otherwise>0</xsl:otherwise>
545 <xsl:variable name="bc_Y_" select="($cmplxshp_Y_ + $cmplxBif_Y_ + ceiling($BIF_H div 2) + $cmplxStack_H_diff_) - ceiling($BLKD_BIFC_H div 2)"/>
549 <xsl:message>Sstack H Diff <xsl:value-of select="$cmplxStack_H_diff_"/></xsl:message>
550 <xsl:message>BC Y <xsl:value-of select="$bc_Y_"/></xsl:message>
551 <xsl:variable name="bc_x_" select="($laneInSpace_X + ceiling($BLKD_BIFC_W div 2))"/>
552 <xsl:variable name="bc_x_" select="0"/>
554 <xsl:variable name="bc_X_">
556 <xsl:when test="$cmplxBifSide_ = '0'">
557 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - (ceiling($BLKD_MOD_W div 2) + $BLKD_BIFC_W))"/>
559 <xsl:when test="$cmplxBifSide_ = '1'">
560 <xsl:value-of select="ceiling($BLKD_MOD_W div 2)"/>
562 <xsl:otherwise>0</xsl:otherwise>
566 <use x="{$bc_X_}" y="{$bc_Y_}" xlink:href="#{$iBusStd}_busconn_{$cmplxBifType_}"/>
568 <xsl:variable name="vert_line_x_" select="($iLaneInSpace_X + ceiling($BLKD_BIFC_W div 2))"/>
569 <xsl:variable name="vert_line_y1_" select="($cmplxshp_Y_ + $cmplxBif_Y_ + ceiling($BLKD_BIF_H div 2) + $cmplxStack_H_diff_)"/>
570 <xsl:variable name="vert_line_y2_" select="($iSpaceSharedBus_Y + ($sbs_idx_ * $BLKD_SBS_LANE_H) + ceiling($BLKD_BIFC_W div 2))"/>
572 <xsl:variable name="v_bus_ul_y_">
574 <xsl:when test="$vert_line_y1_ > $vert_line_y2_">
575 <xsl:value-of select="$vert_line_y2_"/>
577 <xsl:when test="$vert_line_y2_ > $vert_line_y1_">
578 <xsl:value-of select="$vert_line_y1_"/>
583 <xsl:variable name="v_bus_ul_x_">
585 <xsl:when test="@ORIENTED='WEST'">
586 <xsl:value-of select="($vert_line_x_ + $BLKD_MOD_BIF_GAP_H)"/>
588 <xsl:when test="@ORIENTED='EAST'">
589 <xsl:value-of select="($vert_line_x_ - $BLKD_MOD_BIF_GAP_H)"/>
594 <xsl:variable name="v_bus_width_" select="$BLKD_P2P_BUS_W"/>
595 <xsl:variable name="v_bus_height_">
597 <xsl:when test="$vert_line_y1_ > $vert_line_y2_">
598 <xsl:value-of select="($vert_line_y1_ - $vert_line_y2_) - $BLKD_P2P_BUS_W + 8"/>
600 <xsl:when test="$vert_line_y2_ > $vert_line_y1_">
601 <xsl:value-of select="($vert_line_y2_ - $vert_line_y1_) - $BLKD_P2P_BUS_W + 8"/>
606 <xsl:variable name="h_bus_ul_x_">
608 <xsl:when test="@ORIENTED='WEST'">
609 <xsl:value-of select="($bc_X_ + $BLKD_BIFC_W - ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2))"/>
611 <xsl:when test="@ORIENTED='EAST'">
612 <xsl:value-of select="$v_bus_ul_x_"/>
617 <xsl:variable name="h_bus_ul_y_">
620 <xsl:when test="($is_blwSbs_ = 'TRUE') and ($vert_line_y1_ > $vert_line_y2_)">
621 <xsl:value-of select="$vert_line_y1_ - ceiling($BLKD_P2P_BUS_W div 2)"/>
623 <xsl:when test="($is_blwSbs_ = 'TRUE') and ($vert_line_y2_ > $vert_line_y1_)">
624 <xsl:value-of select="$vert_line_y2_ - ceiling($BLKD_P2P_BUS_W div 2)"/>
627 <xsl:when test="($is_abvSbs_ = 'TRUE') and ($vert_line_y1_ > $vert_line_y2_)">
628 <xsl:value-of select="$vert_line_y2_ - ceiling($BLKD_P2P_BUS_W div 2)"/>
630 <xsl:when test="($is_abvSbs_ = 'TRUE') and ($vert_line_y2_ > $vert_line_y1_)">
631 <xsl:value-of select="$vert_line_y1_ - ceiling($BLKD_P2P_BUS_W div 2)"/>
638 <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/>
639 <xsl:variable name="h_bus_width_">
641 <xsl:when test="@ORIENTED='WEST'">
642 <xsl:value-of select="$v_bus_ul_x_ - $h_bus_ul_x_ + $BLKD_P2P_BUS_W"/>
644 <xsl:when test="@ORIENTED='EAST'">
645 <xsl:value-of select="($bc_X_ - $v_bus_ul_x_) + ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2) + 1"/>
651 <rect x="{$v_bus_ul_x_}"
652 y="{$v_bus_ul_y_ - 2}"
653 width= "{$v_bus_width_}"
654 height="{$v_bus_height_}"
655 style="stroke:none; fill:{$busColor_}"/>
657 <rect x="{$h_bus_ul_x_}"
659 width= "{$h_bus_width_}"
660 height="{$h_bus_height_}"
661 style="stroke:none; fill:{$busColor_}"/>
666 ===========================================================
667 Handle connections from processors to Memory UNITs
668 ===========================================================
672 <xsl:template name="BCLaneSpace_ProcBifToMemoryUnit">
674 <xsl:param name="iBusStd" select="'NONE'"/>
675 <xsl:param name="iBusName" select="'NONE'"/>
676 <xsl:param name="iBifType" select="'NONE'"/>
677 <xsl:param name="iStackToEast" select="'NONE'"/>
678 <xsl:param name="iStackToWest" select="'NONE'"/>
679 <xsl:param name="iStackToEast_W" select="0"/>
680 <xsl:param name="iStackToWest_W" select="0"/>
681 <xsl:param name="iLaneInSpace_X" select="0"/>
683 <xsl:variable name="bcInSpace_X_" select="$iLaneInSpace_X"/>
684 <xsl:variable name="procInstance_" select="BUSCONN[@IS_PROCCONN]/@INSTANCE"/>
685 <xsl:variable name="mem_procshp_hori_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $procInstance_)]/@STACK_HORIZ_INDEX"/>
686 <xsl:variable name="mem_procshp_vert_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $procInstance_)]/@SHAPE_VERTI_INDEX"/>
688 <xsl:variable name="mem_procshp_Y_">
689 <xsl:call-template name="F_Calc_Stack_Shape_Y">
690 <xsl:with-param name="iHorizIdx" select="$mem_procshp_hori_idx_"/>
691 <xsl:with-param name="iVertiIdx" select="$mem_procshp_vert_idx_"/>
695 <xsl:variable name="busColor_">
696 <xsl:call-template name="F_BusStd2RGB">
697 <xsl:with-param name="iBusStd" select="$iBusStd"/>
701 <xsl:variable name="space_W_">
702 <xsl:call-template name="F_Calc_Space_Width">
703 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
704 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
708 <xsl:variable name ="extSpaceWest_W_" select="ceiling($iStackToWest_W div 2)"/>
709 <xsl:variable name ="extSpaceEast_W_" select="ceiling($iStackToEast_W div 2)"/>
711 <xsl:variable name="cmplxStack_H_diff_">
713 <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when>
714 <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">
716 <xsl:variable name="stackToWest_AbvSbs_H_">
717 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
718 <xsl:with-param name="iStackIdx" select="$iStackToWest"/>
722 <xsl:variable name="stackToEast_AbvSbs_H_">
723 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
724 <xsl:with-param name="iStackIdx" select="$iStackToEast"/>
729 <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message>
730 <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>
733 <xsl:when test="(($mem_procshp_hori_idx_ = $iStackToEast) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))">
734 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
736 <xsl:when test="(($mem_procshp_hori_idx_ = $iStackToWest) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))">
737 <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/>
739 <xsl:otherwise>0</xsl:otherwise>
746 <xsl:variable name="mem_procStack_H_diff_">
748 <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when>
749 <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">
751 <xsl:variable name="stackToWest_AbvSbs_H_">
752 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
753 <xsl:with-param name="iStackIdx" select="$iStackToWest"/>
757 <xsl:variable name="stackToEast_AbvSbs_H_">
758 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
759 <xsl:with-param name="iStackIdx" select="$iStackToEast"/>
764 <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message>
765 <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>
768 <xsl:when test="(($mem_procshp_hori_idx_ = $iStackToEast) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))">
769 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
771 <xsl:when test="(($mem_procshp_hori_idx_ = $iStackToWest) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))">
772 <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/>
774 <xsl:otherwise>0</xsl:otherwise>
781 <!-- Store the conns in a variable -->
782 <xsl:variable name="memConn_heights_">
784 <xsl:for-each select="BUSCONN">
786 <xsl:variable name="bifName_" select="@BUSINTERFACE"/>
790 <xsl:when test="@IS_PROCCONN and @BIF_Y">
792 <xsl:variable name="procBif_Y_" select="((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * @BIF_Y) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V))"/>
793 <xsl:variable name="procBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $procInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@TYPE"/>
794 <xsl:variable name="procBusName_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $procInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BUSNAME"/>
795 <xsl:variable name="procBifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $procInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_X"/>
796 <xsl:variable name="bcProc_Y_" select="($mem_procshp_Y_ + $procBif_Y_ + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2) + $mem_procStack_H_diff_)"/>
797 <xsl:variable name="bcProc_X_">
799 <xsl:when test="$procBifSide_ = '0'">
800 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - (ceiling($BLKD_MOD_W div 2) + $BLKD_BIFC_W))"/>
802 <xsl:when test="$procBifSide_ = '1'">
803 <xsl:value-of select="ceiling($BLKD_MOD_W div 2)"/>
805 <xsl:otherwise>0</xsl:otherwise>
809 <MEMCONN X="{$bcProc_X_}" Y="{$bcProc_Y_}" BUSNAME="{$procBusName_}" BUSSTD="{$iBusStd}" TYPE="{$procBifType_}" BIFSIDE="{$procBifSide_}"/>
815 <xsl:variable name="memcInstance_" select="@INSTANCE"/>
816 <xsl:variable name="memcshp_vert_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[MODULE[(@INSTANCE = $memcInstance_)]]/@SHAPE_VERTI_INDEX"/>
817 <xsl:variable name="memcBifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $memcInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_X"/>
818 <xsl:variable name="memcBif_Y_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $memcInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_Y"/>
820 <xsl:variable name="memshp_Y_">
821 <xsl:call-template name="F_Calc_Stack_Shape_Y">
822 <xsl:with-param name="iHorizIdx" select="$mem_procshp_hori_idx_"/>
823 <xsl:with-param name="iVertiIdx" select="$memcshp_vert_idx_"/>
827 <xsl:variable name="memcMOD_W_" select="(($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[MODULE[(@INSTANCE = $memcInstance_)]]/@MODS_W) * $BLKD_MOD_W)"/>
829 <xsl:variable name="procBif_Y_" select="((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * @BIF_Y) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V))"/>
831 <xsl:variable name="memcConn_Y_">
833 <xsl:when test="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[MODULE[(@INSTANCE = $memcInstance_)]]/@MODS_H = 1)">
834 <xsl:value-of select="($memshp_Y_ + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V) + ($memcBif_Y_ * ($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V)) + ceiling($BIF_H div 2) - ceiling($BLKD_BIFC_H div 2) + $cmplxStack_H_diff_)"/>
837 <xsl:value-of select="($memshp_Y_ + $BLKD_MOD_H + $BLKD_MOD_LANE_H + ($memcBif_Y_ * ($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V)) + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2) + $cmplxStack_H_diff_)"/>
842 <xsl:variable name="memcConn_X_">
844 <xsl:when test="$memcBifSide_ = '0'">
845 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - (ceiling($memcMOD_W_ div 2) + $BLKD_BIFC_W))"/>
847 <xsl:when test="$memcBifSide_ = '1'">
848 <xsl:value-of select="ceiling($memcMOD_W_ div 2)"/>
853 <xsl:variable name="memcBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $memcInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@TYPE"/>
854 <xsl:variable name="memcBusName_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $memcInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BUSNAME"/>
856 <MEMCONN X="{$memcConn_X_}" Y="{$memcConn_Y_}" BUSNAME="{$memcBusName_}" BUSSTD="{$iBusStd}" TYPE="{$memcBifType_}" BIFSIDE="{$memcBifSide_}"/>
864 <!-- Draw the busconnection and horizontal lines.-->
865 <xsl:for-each select="exsl:node-set($memConn_heights_)/MEMCONN">
867 <xsl:variable name="bus_x_" select="($bcInSpace_X_ + ceiling($BLKD_BIFC_W div 2))"/>
868 <xsl:variable name="bus_y_" select="@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
870 <xsl:variable name="adjusted_X_">
872 <xsl:when test="((@X < ($bus_x_ + $BLKD_BUS_ARROW_W)) and (@BIFSIDE ='0'))">
873 <xsl:value-of select="(@X + $BLKD_P2P_BUS_W)"/>
876 <xsl:value-of select="@X"/>
881 <xsl:variable name="h_bus_ul_x_dx_">
883 <xsl:when test="((@X < ($bus_x_ + $BLKD_BUS_ARROW_W)) and (@BIFSIDE='0'))">
884 <xsl:value-of select="$BLKD_P2P_BUS_W"/>
886 <xsl:otherwise>0</xsl:otherwise>
890 <xsl:variable name="h_bus_ul_x_">
892 <xsl:when test="@BIFSIDE='0'">
893 <xsl:value-of select="($bus_x_ - $h_bus_ul_x_dx_)"/>
895 <xsl:when test="@BIFSIDE='1'">
896 <xsl:value-of select="(@X + $BLKD_BIFC_W + $BLKD_BUS_ARROW_W)"/>
901 <xsl:variable name="h_bus_ul_y_" select="$bus_y_"/>
903 <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/>
904 <xsl:variable name="h_bus_width_">
906 <xsl:when test="@BIFSIDE='0'">
907 <xsl:value-of select="($adjusted_X_ - $bus_x_ - $BLKD_BUS_ARROW_W)"/>
909 <xsl:when test="@BIFSIDE='1'">
910 <xsl:value-of select="$bus_x_ - $h_bus_ul_x_"/>
915 <!-- Place the bus connection -->
916 <use x="{@X}" y="{@Y}" xlink:href="#{@BUSSTD}_busconn_{@TYPE}"/>
918 <!-- Draw the arrow -->
920 <xsl:when test="@BIFSIDE='0'">
921 <use x="{@X - $BLKD_BUS_ARROW_W}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowEast"/>
923 <xsl:when test="@BIFSIDE='1'">
924 <use x="{(@X + $BLKD_BIFC_W)}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowWest"/>
929 <!-- Draw the horizontal part of the bus -->
930 <rect x="{$h_bus_ul_x_}"
932 width= "{$h_bus_width_}"
933 height="{$h_bus_height_}"
934 style="stroke:none; fill:{$busColor_}"/>
937 <xsl:variable name="busTop_" select="math:min(exsl:node-set($memConn_heights_)/MEMCONN/@Y)"/>
938 <xsl:variable name="busBot_" select="math:max(exsl:node-set($memConn_heights_)/MEMCONN/@Y)"/>
939 <xsl:variable name="busName_" select="exsl:node-set($memConn_heights_)/MEMCONN/@BUSNAME"/>
940 <xsl:variable name="busSide_" select="exsl:node-set($memConn_heights_)/MEMCONN/@BIFSIDE"/>
941 <xsl:variable name="leftmost_x_" select="math:min(exsl:node-set($memConn_heights_)/MEMCONN/@X)"/>
943 <!-- Hack to fix CR473515 -->
944 <xsl:variable name="v_bus_x_dx_">
946 <xsl:when test="(($busSide_ = '0') and (($leftmost_x_ - ($bcInSpace_X_ + $BLKD_P2P_BUS_W)) <= $BLKD_P2P_BUS_W))">-4</xsl:when>
947 <xsl:otherwise><xsl:value-of select="$BLKD_P2P_BUS_W"/></xsl:otherwise>
952 <xsl:variable name="v_bus_y_" select="$busTop_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
953 <xsl:variable name="v_bus_x_">
955 <xsl:when test="$busSide_ ='0'">
956 <xsl:value-of select="($bcInSpace_X_ + $v_bus_x_dx_)"/>
958 <xsl:when test="$busSide_ ='1'">
959 <xsl:value-of select="($bcInSpace_X_ + $BLKD_P2P_BUS_W)"/>
964 <!-- Draw the vertical part of the bus -->
965 <rect x="{$v_bus_x_}"
967 width= "{$BLKD_P2P_BUS_W}"
968 height="{($busBot_ - $busTop_) + $BLKD_P2P_BUS_W}"
969 style="stroke:none; fill:{$busColor_}"/>
971 <!-- Hack to fix CR473515 -->
972 <xsl:if test="($busSide_ ='0')">
973 <rect x="{$v_bus_x_}"
974 y="{$v_bus_y_ + ($busBot_ - $busTop_)}"
975 width= "{$BLKD_P2P_BUS_W * 2}"
976 height="{$BLKD_P2P_BUS_W}"
977 style="stroke:none; fill:{$busColor_}"/>
981 <xsl:message>v_bus_x <xsl:value-of select="$v_bus_x_"/></xsl:message>
984 <!-- Place the bus label.-->
986 <text class="p2pbuslabel"
987 x="{$bcInSpace_X_ + $BLKD_BUS_ARROW_W + ceiling($BLKD_BUS_ARROW_W div 2) + ceiling($BLKD_BUS_ARROW_W div 4) + 6}"
988 y="{$busTop_ + ($BLKD_BUS_ARROW_H * 3)}">
989 <xsl:value-of select="$busName_"/>
993 <xsl:call-template name="F_WriteText">
994 <xsl:with-param name="iX" select="($bcInSpace_X_ + $BLKD_BUS_ARROW_W + ceiling($BLKD_BUS_ARROW_W div 2) + ceiling($BLKD_BUS_ARROW_W div 4) + 6)"/>
995 <xsl:with-param name="iY" select="($busTop_ + ($BLKD_BUS_ARROW_H * 3))"/>
996 <xsl:with-param name="iText" select="$busName_"/>
997 <xsl:with-param name="iClass" select="'p2pbus_label'"/>
1004 ===========================================================
1005 Handle generic Point to Point connections
1006 ===========================================================
1009 <xsl:template name="BCLaneSpace_PointToPoint">
1011 <xsl:param name="iBusStd" select="'NONE'"/>
1012 <xsl:param name="iBifType" select="'NONE'"/>
1013 <xsl:param name="iBusName" select="'NONE'"/>
1014 <xsl:param name="iStackToEast" select="'NONE'"/>
1015 <xsl:param name="iStackToWest" select="'NONE'"/>
1016 <xsl:param name="iStackToEast_W" select="0"/>
1017 <xsl:param name="iStackToWest_W" select="0"/>
1018 <xsl:param name="iLaneInSpace_X" select="0"/>
1020 <xsl:variable name="busColor_">
1021 <xsl:call-template name="F_BusStd2RGB">
1022 <xsl:with-param name="iBusStd" select="$iBusStd"/>
1023 </xsl:call-template>
1026 <xsl:variable name="busColor_lt_">
1027 <xsl:call-template name="F_BusStd2RGB_LT">
1028 <xsl:with-param name="iBusStd" select="$iBusStd"/>
1029 </xsl:call-template>
1033 <xsl:variable name="space_W_">
1034 <xsl:call-template name="F_Calc_Space_Width">
1035 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
1036 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
1037 </xsl:call-template>
1040 <xsl:variable name ="extSpaceWest_W_" select="ceiling($iStackToWest_W div 2)"/>
1041 <xsl:variable name ="extSpaceEast_W_" select="ceiling($iStackToEast_W div 2)"/>
1043 <xsl:variable name="bcInSpace_X_" select="($iLaneInSpace_X + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/>
1044 <xsl:variable name="p2pInstance_" select="BUSCONN[(@BIF_Y)]/@INSTANCE"/>
1046 <xsl:variable name="p2pshp_hori_idx_">
1048 <xsl:when test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $p2pInstance_)]">
1049 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $p2pInstance_)]/@STACK_HORIZ_INDEX"/>
1052 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $p2pInstance_)])]/@STACK_HORIZ_INDEX"/>
1057 <xsl:variable name="p2pshp_vert_idx_">
1059 <xsl:when test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $p2pInstance_)]">
1060 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $p2pInstance_)]/@SHAPE_VERTI_INDEX"/>
1063 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $p2pInstance_)])]/@SHAPE_VERTI_INDEX"/>
1069 <xsl:variable name="p2pshp_hori_idx_" select="/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $procInstance_)]/@STACK_HORIZ_INDEX"/>
1070 <xsl:variable name="p2pshp_vert_idx_" select="/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $procInstance_)]/@SHAPE_VERTI_INDEX"/>
1073 <xsl:variable name="p2pshp_Y_">
1074 <xsl:call-template name="F_Calc_Stack_Shape_Y">
1075 <xsl:with-param name="iHorizIdx" select="$p2pshp_hori_idx_"/>
1076 <xsl:with-param name="iVertiIdx" select="$p2pshp_vert_idx_"/>
1077 </xsl:call-template>
1080 <xsl:variable name="cmplxStack_H_diff_">
1082 <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when>
1083 <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">
1085 <xsl:variable name="stackToWest_AbvSbs_H_">
1086 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
1087 <xsl:with-param name="iStackIdx" select="$iStackToWest"/>
1088 </xsl:call-template>
1091 <xsl:variable name="stackToEast_AbvSbs_H_">
1092 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
1093 <xsl:with-param name="iStackIdx" select="$iStackToEast"/>
1094 </xsl:call-template>
1098 <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message>
1099 <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>
1102 <xsl:when test="(($p2pshp_hori_idx_ = $iStackToEast) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))">
1103 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
1105 <xsl:when test="(($p2pshp_hori_idx_ = $iStackToWest) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))">
1106 <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/>
1108 <xsl:otherwise>0</xsl:otherwise>
1116 <xsl:variable name="procStack_H_diff_">
1118 <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when>
1119 <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">
1121 <xsl:variable name="stackToWest_AbvSbs_H_">
1122 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
1123 <xsl:with-param name="iStackIdx" select="$iStackToWest"/>
1124 </xsl:call-template>
1127 <xsl:variable name="stackToEast_AbvSbs_H_">
1128 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
1129 <xsl:with-param name="iStackIdx" select="$iStackToEast"/>
1130 </xsl:call-template>
1134 <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message>
1135 <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>
1138 <xsl:when test="(($p2pshp_hori_idx_ = $iStackToEast) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))">
1139 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
1141 <xsl:when test="(($p2pshp_hori_idx_ = $iStackToWest) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))">
1142 <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/>
1144 <xsl:otherwise>0</xsl:otherwise>
1153 <!-- Store the conns in a variable -->
1154 <xsl:variable name="p2pConn_heights_">
1156 <xsl:for-each select="BUSCONN">
1158 <xsl:variable name="bifName_" select="@BUSINTERFACE"/>
1161 <xsl:when test="@IS_PROCCONN and @BIF_Y">
1164 <xsl:message>Proc <xsl:value-of select="$procInstance_"/></xsl:message>
1166 <xsl:variable name="procBif_Y_" select="((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * @BIF_Y) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V))"/>
1167 <xsl:variable name="procBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $p2pInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@TYPE"/>
1168 <xsl:variable name="procBusName_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $p2pInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BUSNAME"/>
1169 <xsl:variable name="procBifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $p2pInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_X"/>
1171 <xsl:variable name="bcProc_Y_" select="($p2pshp_Y_ + $procBif_Y_ + ceiling($BIF_H div 2) - ceiling($BLKD_BIFC_H div 2) + $procStack_H_diff_)"/>
1172 <xsl:variable name="bcProc_X_">
1174 <xsl:when test="$procBifSide_ = '0'">
1175 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - (ceiling($BLKD_MOD_W div 2) + $BLKD_BIFC_W))"/>
1177 <xsl:when test="$procBifSide_ = '1'">
1178 <xsl:value-of select="ceiling($BLKD_MOD_W div 2)"/>
1180 <xsl:otherwise>0</xsl:otherwise>
1184 <P2PCONN X="{$bcProc_X_}" Y="{$bcProc_Y_}" BUSNAME= "{$procBusName_}" BUSSTD="{$iBusStd}" TYPE="{$procBifType_}" BIFSIDE="{$procBifSide_}"/>
1187 <xsl:message>bcProc_X_ <xsl:value-of select="$bcProc_X_"/></xsl:message>
1188 <xsl:message>bcProc_Y_ <xsl:value-of select="$bcProc_Y_"/></xsl:message>
1189 <P2PCONN X="{$bcInSpace_X_}" Y="{$bcProc_Y_}" BUSSTD="{$busStd}" TYPE="{$procBifType_}" BIFSIDE="{$procBifSide_}" STACK_ID=""/>
1195 <xsl:variable name="modInstance_" select="@INSTANCE"/>
1196 <xsl:variable name="modshp_vert_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[MODULE[(@INSTANCE = $modInstance_)]]/@SHAPE_VERTI_INDEX"/>
1197 <xsl:variable name="modBifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_X"/>
1198 <xsl:variable name="modBif_Y_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_Y"/>
1199 <xsl:variable name="modBc_Y_" select="((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * $modBif_Y_) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V))"/>
1202 <xsl:message>Memory Instance <xsl:value-of select="$procInstance_"/></xsl:message>
1205 <xsl:variable name="modshp_Y_">
1206 <xsl:call-template name="F_Calc_Stack_Shape_Y">
1207 <xsl:with-param name="iHorizIdx" select="$p2pshp_hori_idx_"/>
1208 <xsl:with-param name="iVertiIdx" select="$modshp_vert_idx_"/>
1209 </xsl:call-template>
1212 <xsl:variable name="modBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@TYPE"/>
1213 <xsl:variable name="modBusName_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BUSNAME"/>
1214 <xsl:variable name="bcMod_Y_" select="($modshp_Y_ + $modBc_Y_ + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2) + $cmplxStack_H_diff_)"/>
1215 <xsl:variable name="bcMod_X_">
1217 <xsl:when test="$modBifSide_ = '0'">
1218 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - (ceiling($BLKD_MOD_W div 2) + $BLKD_BIFC_W))"/>
1220 <xsl:when test="$modBifSide_ = '1'">
1221 <xsl:value-of select="ceiling($BLKD_MOD_W div 2)"/>
1223 <xsl:otherwise>0</xsl:otherwise>
1228 <xsl:message>Bc Bif Y <xsl:value-of select="$modBif_Y_"/></xsl:message>
1229 <xsl:message>Bc Mod Y <xsl:value-of select="$modBc_Y_"/></xsl:message>
1230 <xsl:message>Bc Mod X <xsl:value-of select="$bcMod_X_"/></xsl:message>
1231 <P2PCONN X="{$bcInSpace_X_}" Y="{$bcMod_Y_}" BUSSTD="{$busStd}" TYPE="{$modBifType_}" BIFSIDE="{$modBifSide_}"/>
1233 <P2PCONN X="{$bcMod_X_}" Y="{$bcMod_Y_}" BUSNAME="{$modBusName_}" BUSSTD="{$iBusStd}" TYPE="{$modBifType_}" BIFSIDE="{$modBifSide_}"/>
1242 <xsl:variable name="busTop_" select="math:min(exsl:node-set($p2pConn_heights_)/P2PCONN/@Y)"/>
1243 <xsl:variable name="busBot_" select="math:max(exsl:node-set($p2pConn_heights_)/P2PCONN/@Y)"/>
1244 <xsl:variable name="v_bus_y_" select="$busTop_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
1245 <xsl:variable name="busName_" select="exsl:node-set($p2pConn_heights_)/P2PCONN/@BUSNAME"/>
1246 <xsl:variable name="busStd_" select="exsl:node-set($p2pConn_heights_)/P2PCONN/@BUSSTD"/>
1249 <!-- Draw the vertical part of the bus -->
1250 <xsl:if test="$busStd_ = 'PLBV46_P2P'">
1251 <rect x="{$bcInSpace_X_ + $BLKD_P2P_BUS_W}"
1253 width= "{$BLKD_P2P_BUS_W}"
1254 height="{($busBot_ - $busTop_) + $BLKD_P2P_BUS_W}"
1255 style="stroke:{$COL_WHITE};stroke-width:1.5;fill:{$busColor_}"/>
1258 <xsl:if test="not($busStd_ = 'PLBV46_P2P')">
1259 <rect x="{$bcInSpace_X_ + $BLKD_P2P_BUS_W}"
1261 width= "{$BLKD_P2P_BUS_W}"
1262 height="{($busBot_ - $busTop_) + $BLKD_P2P_BUS_W}"
1263 style="stroke:none;fill:{$busColor_}"/>
1269 style="stroke:{$busColor_lt_};stroke-width:1;stroke-opacity:0.9;fill-opacity:2.0;fill:{$busColor_}"/>
1272 <!-- Place the bus label.-->
1274 <text class="p2pbuslabel"
1275 x="{$bcInSpace_X_ + $BLKD_BUS_ARROW_W + ceiling($BLKD_BUS_ARROW_W div 2) + ceiling($BLKD_BUS_ARROW_W div 4) + 6}"
1276 y="{$busTop_ + ($BLKD_BUS_ARROW_H * 3)}">
1277 <xsl:value-of select="$busName_"/>
1280 <xsl:call-template name="F_WriteText">
1281 <xsl:with-param name="iX" select="($bcInSpace_X_ + $BLKD_BUS_ARROW_W + ceiling($BLKD_BUS_ARROW_W div 2) + ceiling($BLKD_BUS_ARROW_W div 4) + 6)"/>
1282 <xsl:with-param name="iY" select="($busTop_ + ($BLKD_BUS_ARROW_H * 3))"/>
1283 <xsl:with-param name="iText" select="$busName_"/>
1284 <xsl:with-param name="iClass" select="'p2pbus_label'"/>
1285 </xsl:call-template>
1287 <!-- Draw the busconnection and horizontal lines.-->
1288 <xsl:for-each select="exsl:node-set($p2pConn_heights_)/P2PCONN">
1290 <xsl:variable name="bus_x_" select="($bcInSpace_X_ + ceiling($BLKD_BIFC_W div 2))"/>
1291 <xsl:variable name="bus_y_" select="@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
1293 <xsl:variable name="h_bus_ul_x_">
1295 <xsl:when test="@BIFSIDE='0'">
1296 <xsl:value-of select="$bus_x_"/>
1298 <xsl:when test="@BIFSIDE='1'">
1299 <xsl:value-of select="(@X + $BLKD_BIFC_W + $BLKD_BUS_ARROW_W) - 1"/>
1304 <xsl:variable name="h_bus_ul_y_" select="$bus_y_"/>
1306 <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/>
1307 <xsl:variable name="h_bus_width_">
1309 <xsl:message>BIFSIDE <xsl:value-of select="@BIFSIDE"/></xsl:message>
1310 <xsl:message>BUSSTD <xsl:value-of select="@BUSSTD"/></xsl:message>
1311 <xsl:message>TYPE <xsl:value-of select="@TYPE"/></xsl:message>
1314 <xsl:when test="@BIFSIDE='0'">
1315 <xsl:value-of select="(@X - $bus_x_ - $BLKD_BUS_ARROW_W)"/>
1317 <xsl:when test="@BIFSIDE='1'">
1318 <xsl:value-of select="$bus_x_ - $h_bus_ul_x_ + 1"/>
1324 <!-- Draw Bus connection-->
1325 <use x="{@X}" y="{@Y}" xlink:href="#{@BUSSTD}_busconn_{@TYPE}"/>
1327 <!-- Draw the arrow -->
1329 <xsl:when test="((@BIFSIDE='0') and not((@BUSSTD = 'FSL') and ((@TYPE = 'INITIATOR') or (@TYPE = 'MASTER'))))">
1330 <use x="{@X - $BLKD_BUS_ARROW_W}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowEast"/>
1332 <xsl:when test="((@BIFSIDE='1') and not((@BUSSTD = 'FSL') and ((@TYPE = 'INITIATOR') or (@TYPE = 'MASTER'))))">
1333 <use x="{(@X + $BLKD_BIFC_W)}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowWest"/>
1336 <xsl:when test="((@BIFSIDE='0') and ((@BUSSTD = 'FSL') and ((@TYPE = 'INITIATOR') or (@TYPE = 'MASTER'))))">
1337 <use x="{@X - $BLKD_BUS_ARROW_W}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowHInitiator"/>
1340 <xsl:when test="((@BIFSIDE='1') and ((@BUSSTD = 'FSL') and ((@TYPE = 'INITIATOR') or (@TYPE = 'MASTER'))))">
1341 <use x="{(@X + $BLKD_BIFC_W)}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowHInitiator"/>
1346 <!-- Draw the horizontal part of the bus -->
1347 <rect x="{$h_bus_ul_x_}"
1349 width= "{$h_bus_width_}"
1350 height="{$h_bus_height_}"
1351 style="stroke:none; fill:{$busColor_}"/>
1356 <xsl:variable name="busTop_" select="math:min(exsl:node-set($p2pConn_heights_)/P2PCONN/@Y)"/>
1357 <xsl:variable name="busBot_" select="math:max(exsl:node-set($p2pConn_heights_)/P2PCONN/@Y)"/>
1358 <xsl:variable name="v_bus_y_" select="$busTop_ + ceiling($BLKD_BIFC_H div 2) - ceiling($P2P_BUS_W div 2)"/>
1359 <xsl:variable name="busName_" select="exsl:node-set($p2pConn_heights_)/P2PCONN/@BUSNAME"/>
1361 <!-- Draw the vertical part of the bus -->
1363 <rect x="{$bcInSpace_X_ + $P2P_BUS_W}"
1365 width= "{$P2P_BUS_W}"
1366 height="{($busBot_ - $busTop_) + $P2P_BUS_W}"
1367 style="stroke:{$COL_WHITE};stroke-width:1;stroke-opacity:0.9;fill-opacity:2.0;fill:{$busColor_}"/>
1371 style="stroke:{$busColor_lt_};stroke-width:1;stroke-opacity:0.9;fill-opacity:2.0;fill:{$busColor_}"/>
1373 <!-- Place the bus label.-->
1375 <text class="p2pbuslabel"
1376 x="{$bcInSpace_X_ + $BLKD_BUS_ARROW_W + ceiling($BLKD_BUS_ARROW_W div 2) + ceiling($BLKD_BUS_ARROW_W div 4) + 6}"
1377 y="{$busTop_ + ($BLKD_BUS_ARROW_H * 3)}">
1378 <xsl:value-of select="$busName_"/>
1388 ===========================================================
1389 Handle MultiStack Point to Point connections
1390 ===========================================================
1393 <xsl:template name="BCLaneSpace_MultiStack_PointToPoint">
1395 <xsl:param name="iBusStd" select="'NONE'"/>
1396 <xsl:param name="iBusName" select="'NONE'"/>
1397 <xsl:param name="iBifType" select="'NONE'"/>
1398 <xsl:param name="iStackToEast" select="'NONE'"/>
1399 <xsl:param name="iStackToWest" select="'NONE'"/>
1400 <xsl:param name="iStackToEast_W" select="0"/>
1401 <xsl:param name="iStackToWest_W" select="0"/>
1402 <xsl:param name="iLaneInSpace_X" select="0"/>
1405 <xsl:message>Stack To East <xsl:value-of select="$iStackToEast"/></xsl:message>
1406 <xsl:message>Stack to West <xsl:value-of select="$iStackToWest"/></xsl:message>
1407 <xsl:message>Stack to East Width <xsl:value-of select="$iStackToEast_W"/></xsl:message>
1408 <xsl:message>Stack to West Width <xsl:value-of select="$iStackToWest_W"/></xsl:message>
1409 <xsl:message>Lane in space X <xsl:value-of select="$iLaneInSpace_X"/></xsl:message>
1410 <xsl:message>Shared Bus Y <xsl:value-of select="$iSpaceSharedBus_Y"/></xsl:message>
1413 <xsl:variable name="busColor_">
1414 <xsl:call-template name="F_BusStd2RGB">
1415 <xsl:with-param name="iBusStd" select="$iBusStd"/>
1416 </xsl:call-template>
1419 <xsl:variable name="space_W_">
1420 <xsl:call-template name="F_Calc_Space_Width">
1421 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
1422 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
1423 </xsl:call-template>
1426 <xsl:variable name ="extSpaceWest_W_" select="ceiling($iStackToWest_W div 2)"/>
1427 <xsl:variable name ="extSpaceEast_W_" select="ceiling($iStackToEast_W div 2)"/>
1429 <!-- Store the connections in a variable -->
1430 <xsl:variable name="bcInSpace_X_" select="($iLaneInSpace_X + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/>
1432 <xsl:variable name="multiConns_">
1434 <xsl:for-each select="BUSCONN">
1436 <xsl:variable name="bifName_" select="@BUSINTERFACE"/>
1437 <xsl:variable name="multiInstance_" select="@INSTANCE"/>
1438 <xsl:variable name="mulshp_hori_idx_">
1440 <xsl:when test="@IS_PROCCONN">
1441 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $multiInstance_)]/@STACK_HORIZ_INDEX"/>
1444 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $multiInstance_)])]/@STACK_HORIZ_INDEX"/>
1449 <xsl:variable name="mulshp_vert_idx_">
1451 <xsl:when test="@IS_PROCCONN">
1452 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $multiInstance_)]/@SHAPE_VERTI_INDEX"/>
1455 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $multiInstance_)])]/@SHAPE_VERTI_INDEX"/>
1461 <xsl:message>Shape Horiz <xsl:value-of select="$mulshp_hori_idx_"/></xsl:message>
1462 <xsl:message>Shape Verti <xsl:value-of select="$mulshp_vert_idx_"/></xsl:message>
1465 <xsl:variable name="mulshp_Y_">
1466 <xsl:call-template name="F_Calc_Stack_Shape_Y">
1467 <xsl:with-param name="iHorizIdx" select="$mulshp_hori_idx_"/>
1468 <xsl:with-param name="iVertiIdx" select="$mulshp_vert_idx_"/>
1469 </xsl:call-template>
1472 <xsl:variable name="cmplxStack_H_diff_">
1474 <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when>
1475 <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">
1477 <xsl:variable name="stackToWest_AbvSbs_H_">
1478 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
1479 <xsl:with-param name="iStackIdx" select="$iStackToWest"/>
1480 </xsl:call-template>
1483 <xsl:variable name="stackToEast_AbvSbs_H_">
1484 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
1485 <xsl:with-param name="iStackIdx" select="$iStackToEast"/>
1486 </xsl:call-template>
1490 <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message>
1491 <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>
1494 <xsl:when test="(($mulshp_hori_idx_ = $iStackToEast) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))">
1495 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
1497 <xsl:when test="(($mulshp_hori_idx_ = $iStackToWest) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))">
1498 <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/>
1500 <xsl:otherwise>0</xsl:otherwise>
1508 <xsl:variable name="procStack_H_diff_">
1510 <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when>
1511 <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">
1513 <xsl:variable name="stackToWest_AbvSbs_H_">
1514 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
1515 <xsl:with-param name="iStackIdx" select="$iStackToWest"/>
1516 </xsl:call-template>
1519 <xsl:variable name="stackToEast_AbvSbs_H_">
1520 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
1521 <xsl:with-param name="iStackIdx" select="$iStackToEast"/>
1522 </xsl:call-template>
1526 <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message>
1527 <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>
1530 <xsl:when test="(($mulshp_hori_idx_ = $iStackToEast) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))">
1531 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
1533 <xsl:when test="(($mulshp_hori_idx_ = $iStackToWest) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))">
1534 <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/>
1536 <xsl:otherwise>0</xsl:otherwise>
1545 <xsl:when test="@IS_PROCCONN and @BIF_Y">
1547 <xsl:variable name="procBif_Y_" select="((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * @BIF_Y) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V))"/>
1549 <xsl:variable name="procBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $multiInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@TYPE"/>
1550 <xsl:variable name="procBusName_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $multiInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BUSNAME"/>
1551 <xsl:variable name="procBifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $multiInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_X"/>
1553 <xsl:variable name="bcProc_Y_" select="($mulshp_Y_ + $procBif_Y_ + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2) + $procStack_H_diff_)"/>
1555 <xsl:variable name="bcProc_X_">
1557 <xsl:when test="$procBifSide_ = '0'">
1558 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - (ceiling($BLKD_MOD_W div 2) + $BLKD_BIFC_W))"/>
1560 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - ceiling($BLKD_MOD_W div 2))"/>
1563 <xsl:when test="$procBifSide_ = '1'">
1564 <xsl:value-of select="ceiling($BLKD_MOD_W div 2)"/>
1566 <xsl:otherwise>0</xsl:otherwise>
1570 <MULTICONN X="{$bcProc_X_}" Y="{$bcProc_Y_}" BUSNAME="{$procBusName_}" BUSSTD="{$iBusStd}" TYPE="{$procBifType_}" BIFSIDE="{$procBifSide_}" IS_PROC="TRUE"/>
1575 <xsl:variable name="modType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $multiInstance_)]/@MODCLASS"/>
1576 <xsl:variable name="modBif_Y_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $multiInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_Y"/>
1577 <xsl:variable name="modBifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $multiInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_X"/>
1578 <xsl:variable name="modBusStd_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $multiInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BUSSTD"/>
1579 <xsl:variable name="memcMOD_W_" select="(($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[MODULE[(@INSTANCE = $multiInstance_)]]/@MODS_W) * $BLKD_MOD_W)"/>
1581 <xsl:variable name="modBc_Y_">
1583 <xsl:when test="($modType_ = 'MEMORY_CNTLR') and (($modBusStd_ = 'LMB') or ($modBusStd_= 'OCM'))">
1584 <xsl:value-of select="$BLKD_MOD_H + $BLKD_MOD_LANE_H + ((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * $modBif_Y_))"/>
1587 <xsl:value-of select="((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * $modBif_Y_) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V))"/>
1592 <xsl:message><xsl:value-of select="$multiInstance_"/>.<xsl:value-of select="$bifName_"/>:Y = <xsl:value-of select="$modBif_Y_"/></xsl:message>
1593 <xsl:message><xsl:value-of select="$multiInstance_"/>.<xsl:value-of select="$bifName_"/>:BcY = <xsl:value-of select="$modBc_Y_"/></xsl:message>
1594 <xsl:message><xsl:value-of select="$multiInstance_"/>.<xsl:value-of select="$bifName_"/>:TcY = <xsl:value-of select="($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V)"/></xsl:message>
1597 <xsl:variable name="modBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $multiInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@TYPE"/>
1598 <xsl:variable name="modBusName_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $multiInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BUSNAME"/>
1601 <xsl:variable name="bcMod_Y_" select="($mulshp_Y_ + $modBc_Y_ + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2))"/>
1603 <xsl:variable name="bcMod_Y_" select="($mulshp_Y_ + $modBc_Y_ + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2) + $cmplxStack_H_diff_)"/>
1605 <xsl:variable name="bcMod_X_">
1607 <xsl:when test="$modBifSide_ = '0'">
1608 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - (ceiling($memcMOD_W_ div 2) + $BLKD_BIFC_W))"/>
1612 <xsl:when test="$modBifSide_ = '1'">
1613 <xsl:value-of select="ceiling($memcMOD_W_ div 2)"/>
1615 <xsl:otherwise>0</xsl:otherwise>
1620 <MULTICONN X="{$bcMod_X_}" Y="{$bcMod_Y_}" BUSNAME="{$modBusName_}" BUSSTD="{$iBusStd}" TYPE="{$modBifType_}" BIFSIDE="{$modBifSide_}" IS_MOD="TRUE"/>
1622 <MULTICONN X="{$bcInSpace_X_}" Y="{$bcMod_Y_}" BUSSTD="{$busStd}" TYPE="{$modBifType_}" BIFSIDE="{$modBifSide_}"/>
1630 <!-- Draw the busconnection and horizontal lines.-->
1631 <xsl:for-each select="exsl:node-set($multiConns_)/MULTICONN">
1633 <xsl:variable name="bus_x_" select="($bcInSpace_X_ + ceiling($BLKD_BIFC_W div 2))"/>
1634 <xsl:variable name="bus_y_" select="@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
1637 <xsl:value-of select="$bus_x_"/>
1639 <xsl:variable name="h_bus_ul_x_">
1641 <xsl:when test="@BIFSIDE='0' and (@IS_PROC)">
1642 <xsl:value-of select="$bus_x_ - $BLKD_P2P_BUS_W"/>
1644 <xsl:when test="@BIFSIDE='0' and (@IS_MOD)">
1645 <xsl:value-of select="$bus_x_ - $BLKD_P2P_BUS_W"/>
1647 <xsl:when test="@BIFSIDE='1' and (@IS_PROC)">
1648 <xsl:value-of select="(@X + $BLKD_BIFC_W + $BLKD_BUS_ARROW_W)"/>
1650 <xsl:when test="@BIFSIDE='1' and (@IS_MOD)">
1651 <xsl:value-of select="(@X + $BLKD_BIFC_W + $BLKD_BUS_ARROW_W)"/>
1656 <xsl:variable name="h_bus_ul_y_" select="$bus_y_"/>
1657 <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/>
1658 <xsl:variable name="h_bus_width_">
1660 <xsl:message>BUSSTD <xsl:value-of select="@BUSSTD"/></xsl:message>
1661 <xsl:message>BIFSIDE <xsl:value-of select="@BIFSIDE"/></xsl:message>
1662 <xsl:message>TYPE <xsl:value-of select="@TYPE"/></xsl:message>
1665 <xsl:when test="@BIFSIDE='0' and (@IS_PROC)">
1666 <xsl:value-of select="(@X - $bus_x_ - $BLKD_P2P_BUS_W)"/>
1668 <xsl:when test="@BIFSIDE='0' and (@IS_MOD)">
1669 <xsl:value-of select="(@X - $bus_x_ - $BLKD_BUS_ARROW_W)"/>
1671 <xsl:when test="@BIFSIDE='1' and (@IS_PROC)">
1672 <xsl:value-of select="$bus_x_ - $h_bus_ul_x_ - $BLKD_BUS_ARROW_W - $BLKD_P2P_BUS_W"/>
1674 <xsl:when test="@BIFSIDE='1' and (@IS_MOD)">
1675 <xsl:value-of select="$BLKD_P2P_BUS_W + $BLKD_BUS_ARROW_W "/>
1677 <xsl:value-of select="$bus_x_ - $h_bus_ul_x_"/>
1685 <xsl:message>h_bus_x_ <xsl:value-of select="$h_bus_ul_x_"/></xsl:message>
1686 <xsl:message>BIFSIDE <xsl:value-of select="@BIFSIDE"/></xsl:message>
1687 <xsl:message>h_bus_width_ <xsl:value-of select="$h_bus_width_"/></xsl:message>
1690 <!-- Draw the horizontal part of the bus -->
1691 <xsl:if test="($h_bus_width_ > 0)">
1692 <rect x="{$h_bus_ul_x_}"
1694 width= "{$h_bus_width_}"
1695 height="{$h_bus_height_}"
1696 style="stroke:none; fill:{$busColor_}"/>
1700 <!-- Draw the arrow -->
1702 <xsl:when test="((@BIFSIDE='0') and not((@BUSSTD = 'FSL') and ((@TYPE = 'INITIATOR') or (@TYPE = 'MASTER'))))">
1703 <use x="{@X - $BLKD_BUS_ARROW_W}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowEast"/>
1705 <xsl:when test="((@BIFSIDE='1') and not((@BUSSTD = 'FSL') and ((@TYPE = 'INITIATOR') or (@TYPE = 'MASTER'))))">
1706 <use x="{(@X + $BLKD_BIFC_W)}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowWest"/>
1709 <xsl:when test="((@BIFSIDE='0') and ((@BUSSTD = 'FSL') and ((@TYPE = 'INITIATOR') or (@TYPE = 'MASTER'))))">
1710 <use x="{@X - $BLKD_BUS_ARROW_W}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowHInitiator"/>
1713 <xsl:when test="((@BIFSIDE='1') and ((@BUSSTD = 'FSL') and ((@TYPE = 'INITIATOR') or (@TYPE = 'MASTER'))))">
1714 <use x="{(@X + $BLKD_BIFC_W)}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowHInitiator"/>
1719 <use x="{@X}" y="{@Y}" xlink:href="#{@BUSSTD}_busconn_{@TYPE}"/>
1722 <xsl:variable name="busTop_" select="math:min(exsl:node-set($multiConns_)/MULTICONN/@Y)"/>
1723 <xsl:variable name="busBot_" select="math:max(exsl:node-set($multiConns_)/MULTICONN/@Y)"/>
1724 <xsl:variable name="v_bus_y_" select="$busTop_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
1725 <xsl:variable name="busName_" select="exsl:node-set($multiConns_)/MULTICONN/@BUSNAME"/>
1729 <!-- Draw the vertical part of the bus -->
1730 <rect x="{$bcInSpace_X_ - $BLKD_P2P_BUS_W}"
1732 width= "{$BLKD_P2P_BUS_W}"
1733 height="{($busBot_ - $busTop_) + $BLKD_P2P_BUS_W}"
1734 style="stroke:none; fill:{$busColor_}"/>
1736 <xsl:message>v_bus_x_ <xsl:value-of select="($bcInSpace_X_ + $BLKD_P2P_BUS_W)"/></xsl:message>
1739 <!-- Place the bus label.-->
1740 <xsl:call-template name="F_WriteText">
1741 <xsl:with-param name="iX" select="($bcInSpace_X_ + $BLKD_BUS_ARROW_W + ceiling($BLKD_BUS_ARROW_W div 2) + ceiling($BLKD_BUS_ARROW_W div 4) + 6)"/>
1742 <xsl:with-param name="iY" select="($busTop_ + ($BLKD_BUS_ARROW_H * 3))"/>
1743 <xsl:with-param name="iText" select="$busName_"/>
1744 <xsl:with-param name="iClass" select="'p2pbus_label'"/>
1745 </xsl:call-template>
1751 ===========================================================
1752 Handle Processor to processor connections
1753 ===========================================================
1755 <xsl:template name="BCLaneSpace_ProcToProc">
1757 <xsl:param name="iBusStd" select="'NONE'"/>
1758 <xsl:param name="iBusName" select="'NONE'"/>
1759 <xsl:param name="iBifType" select="'NONE'"/>
1760 <xsl:param name="iStackToEast" select="'NONE'"/>
1761 <xsl:param name="iStackToWest" select="'NONE'"/>
1762 <xsl:param name="iStackToEast_W" select="0"/>
1763 <xsl:param name="iStackToWest_W" select="0"/>
1764 <xsl:param name="iLaneInSpace_X" select="0"/>
1766 <xsl:variable name="busColor_">
1767 <xsl:call-template name="F_BusStd2RGB">
1768 <xsl:with-param name="iBusStd" select="$iBusStd"/>
1769 </xsl:call-template>
1772 <xsl:variable name="space_W_">
1773 <xsl:call-template name="F_Calc_Space_Width">
1774 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
1775 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
1776 </xsl:call-template>
1779 <xsl:variable name ="extSpaceWest_W_" select="ceiling($iStackToWest_W div 2)"/>
1780 <xsl:variable name ="extSpaceEast_W_" select="ceiling($iStackToEast_W div 2)"/>
1782 <xsl:variable name="pr2pr_StackToWest_" select="math:min(BUSCONN/@STACK_HORIZ_INDEX)"/>
1783 <xsl:variable name="pr2pr_StackToEast_" select="math:max(BUSCONN/@STACK_HORIZ_INDEX)"/>
1784 <xsl:variable name="proc2procConn_heights_">
1786 <xsl:for-each select="BUSCONN">
1788 <xsl:variable name="procInstance_" select="@INSTANCE"/>
1789 <xsl:variable name="bifName_" select="@BUSINTERFACE"/>
1790 <xsl:variable name="procshp_hori_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $procInstance_)]/@STACK_HORIZ_INDEX"/>
1791 <xsl:variable name="procshp_vert_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $procInstance_)]/@SHAPE_VERTI_INDEX"/>
1792 <xsl:variable name="procshp_Y_">
1793 <xsl:call-template name="F_Calc_Stack_Shape_Y">
1794 <xsl:with-param name="iHorizIdx" select="$procshp_hori_idx_"/>
1795 <xsl:with-param name="iVertiIdx" select="$procshp_vert_idx_"/>
1796 </xsl:call-template>
1799 <xsl:variable name="procStack_H_diff_">
1801 <xsl:when test=" (($pr2pr_StackToEast_ = 'NONE') or ($pr2pr_StackToWest_ = 'NONE'))">0</xsl:when>
1802 <xsl:when test="not(($pr2pr_StackToEast_ = 'NONE') or ($pr2pr_StackToWest_ = 'NONE'))">
1804 <xsl:variable name="stackToWest_AbvSbs_H_">
1805 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
1806 <xsl:with-param name="iStackIdx" select="$pr2pr_StackToWest_"/>
1807 </xsl:call-template>
1810 <xsl:variable name="stackToEast_AbvSbs_H_">
1811 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
1812 <xsl:with-param name="iStackIdx" select="$pr2pr_StackToEast_"/>
1813 </xsl:call-template>
1816 <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message>
1817 <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>
1820 <xsl:when test="(($procshp_hori_idx_ = $pr2pr_StackToEast_) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))">
1821 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
1823 <xsl:when test="(($procshp_hori_idx_ = $pr2pr_StackToWest_) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))">
1824 <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/>
1826 <xsl:otherwise>0</xsl:otherwise>
1833 <!-- Store the conns in a variable -->
1834 <xsl:variable name="procBif_Y_" select="((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * @BIF_Y) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V))"/>
1836 <xsl:variable name="procBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $procInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@TYPE"/>
1837 <xsl:variable name="procBifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $procInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_X"/>
1839 <xsl:variable name="bcInSpace_X_">
1841 <xsl:when test="$procBifSide_ = '1'"><xsl:value-of select="ceiling($BLKD_MOD_W div 2)"/></xsl:when>
1842 <xsl:when test="$procBifSide_ = '0'"><xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - ceiling($BLKD_MOD_W div 2) - $BLKD_BIFC_W)"/></xsl:when>
1846 <xsl:variable name="bcProc_Y_" select="($procshp_Y_ + $procBif_Y_ + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2) + $procStack_H_diff_)"/>
1848 <xsl:message>Conn X <xsl:value-of select="$bcInSpace_X_"/></xsl:message>
1849 <xsl:message>Conn Y <xsl:value-of select="$bcProc_Y_"/></xsl:message>
1852 <PR2PRCONN X="{$bcInSpace_X_}" Y="{$bcProc_Y_}" BUSSTD="{$iBusStd}" TYPE="{$procBifType_}" BIFSIDE="{$procBifSide_}" SHAPE_ID="{$procshp_hori_idx_}"/>
1856 <xsl:variable name="pr2prLeft_" select="math:min(exsl:node-set($proc2procConn_heights_)/PR2PRCONN/@SHAPE_ID)"/>
1857 <xsl:variable name="pr2prRght_" select="math:max(exsl:node-set($proc2procConn_heights_)/PR2PRCONN/@SHAPE_ID)"/>
1859 <xsl:variable name="pr2pr_stack_Left_X_">
1860 <xsl:call-template name="F_Calc_Stack_X">
1861 <xsl:with-param name="iStackIdx" select="$pr2prLeft_"/>
1862 </xsl:call-template>
1865 <xsl:variable name="pr2pr_stack_Rght_X_">
1866 <xsl:call-template name="F_Calc_Stack_X">
1867 <xsl:with-param name="iStackIdx" select="$pr2prRght_"/>
1868 </xsl:call-template>
1872 <xsl:message>Left stack X <xsl:value-of select="$pr2pr_stack_Left_X_"/></xsl:message>
1873 <xsl:message>Rght stack X <xsl:value-of select="$pr2pr_stack_Rght_X_"/></xsl:message>
1875 <xsl:variable name="pr2pr_space_W_" select="($pr2pr_stack_Rght_X_ - $pr2pr_stack_Left_X_)"/>
1878 <xsl:variable name="pr2pr_extStackEast_W_">
1879 <xsl:call-template name="F_Calc_Stack_Width">
1880 <xsl:with-param name="iStackIdx" select="$pr2prRght_"/>
1881 </xsl:call-template>
1884 <xsl:variable name="pr2pr_extStackWest_W_">
1885 <xsl:call-template name="F_Calc_Stack_Width">
1886 <xsl:with-param name="iStackIdx" select="$pr2prLeft_"/>
1887 </xsl:call-template>
1891 <xsl:message>Space W <xsl:value-of select="$pr2pr_space_W_"/></xsl:message>
1892 <xsl:message>Rght stack <xsl:value-of select="$pr2pr_extStackEast_W_"/></xsl:message>
1893 <xsl:message>Left stack <xsl:value-of select="$pr2pr_extStackWest_W_"/></xsl:message>
1896 <xsl:variable name="connLeft_X_" select="ceiling($BLKD_MOD_W div 2)"/>
1897 <xsl:variable name="connRght_X_" select="($pr2pr_space_W_ - ceiling($pr2pr_extStackWest_W_ div 2) + ceiling($pr2pr_extStackEast_W_ div 2) - ceiling($BLKD_MOD_W div 2) - $BLKD_BIFC_W)"/>
1899 <!-- Draw the busconnections .-->
1900 <xsl:for-each select="exsl:node-set($proc2procConn_heights_)/PR2PRCONN">
1901 <xsl:variable name="conn_X_">
1903 <xsl:when test="@BIFSIDE = '1'"><xsl:value-of select="ceiling($BLKD_MOD_W div 2)"/></xsl:when>
1904 <xsl:when test="@BIFSIDE = '0'"><xsl:value-of select="($pr2pr_space_W_ - ceiling($pr2pr_extStackWest_W_ div 2) + ceiling($pr2pr_extStackEast_W_ div 2) - ceiling($BLKD_MOD_W div 2) - $BLKD_BIFC_W)"/></xsl:when>
1906 <xsl:when test="@BIFSIDE = '0'"><xsl:value-of select="($pr2pr_space_W_ + $pr2pr_extStackWest_W_ + $pr2pr_extStackEast_W_ - ceiling($BLKD_MOD_W div 2) - $BLKD_BIFC_W)"/></xsl:when>
1911 <use x="{$conn_X_}" y="{@Y}" xlink:href="#{@BUSSTD}_busconn_{@TYPE}"/>
1914 <xsl:variable name="bc_Y_" select="math:min(exsl:node-set($proc2procConn_heights_)/PR2PRCONN/@Y)"/>
1915 <xsl:variable name="bcLeft_" select="math:min(exsl:node-set($proc2procConn_heights_)/PR2PRCONN/@X)"/>
1916 <xsl:variable name="bcRght_" select="math:max(exsl:node-set($proc2procConn_heights_)/PR2PRCONN/@X)"/>
1918 <xsl:variable name="leftType_" select="(exsl:node-set($proc2procConn_heights_)/PR2PRCONN[(@X = $bcLeft_)]/@TYPE)"/>
1919 <xsl:variable name="rghtType_" select="(exsl:node-set($proc2procConn_heights_)/PR2PRCONN[(@X = $bcRght_)]/@TYPE)"/>
1921 <xsl:call-template name="Draw_Proc2ProcBus">
1922 <xsl:with-param name="iBc_Y" select="$bc_Y_"/>
1923 <xsl:with-param name="iBusStd" select="$iBusStd"/>
1924 <xsl:with-param name="iBusName" select="$iBusName"/>
1925 <xsl:with-param name="iLeftType" select="$leftType_"/>
1926 <xsl:with-param name="iRghtType" select="$rghtType_"/>
1927 <xsl:with-param name="iBcLeft_X" select="$connLeft_X_ + $BLKD_BIFC_W"/>
1928 <xsl:with-param name="iBcRght_X" select="$connRght_X_"/>
1929 </xsl:call-template>
1934 ===========================================================
1935 Handle connections to the MPMC
1936 ===========================================================
1938 <xsl:template name="BCLaneSpace_ToStandAloneMPMC">
1940 <xsl:param name="iBusStd" select="'NONE'"/>
1941 <xsl:param name="iBusName" select="'NONE'"/>
1942 <xsl:param name="iBifType" select="'NONE'"/>
1943 <xsl:param name="iStackToEast" select="'NONE'"/>
1944 <xsl:param name="iStackToWest" select="'NONE'"/>
1945 <xsl:param name="iStackToEast_W" select="0"/>
1946 <xsl:param name="iStackToWest_W" select="0"/>
1947 <xsl:param name="iLaneInSpace_X" select="0"/>
1949 <xsl:variable name="busColor_">
1950 <xsl:call-template name="F_BusStd2RGB">
1951 <xsl:with-param name="iBusStd" select="$iBusStd"/>
1952 </xsl:call-template>
1955 <xsl:variable name="busColor_lt_">
1956 <xsl:call-template name="F_BusStd2RGB_LT">
1957 <xsl:with-param name="iBusStd" select="$iBusStd"/>
1958 </xsl:call-template>
1961 <xsl:variable name="space_W_">
1962 <xsl:call-template name="F_Calc_Space_Width">
1963 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
1964 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
1965 </xsl:call-template>
1968 <xsl:variable name ="extSpaceWest_W_" select="ceiling($iStackToWest_W div 2)"/>
1969 <xsl:variable name ="extSpaceEast_W_" select="ceiling($iStackToEast_W div 2)"/>
1971 <xsl:variable name="bcInSpace_X_" select="($iLaneInSpace_X + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/>
1972 <xsl:variable name="p2pInstance_" select="BUSCONN[(@BIF_Y)]/@INSTANCE"/>
1974 <xsl:variable name="p2pshp_hori_idx_">
1976 <xsl:when test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $p2pInstance_)]">
1977 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $p2pInstance_)]/@STACK_HORIZ_INDEX"/>
1980 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $p2pInstance_)])]/@STACK_HORIZ_INDEX"/>
1985 <xsl:variable name="p2pshp_vert_idx_">
1987 <xsl:when test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $p2pInstance_)]">
1988 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $p2pInstance_)]/@SHAPE_VERTI_INDEX"/>
1991 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $p2pInstance_)])]/@SHAPE_VERTI_INDEX"/>
1996 <xsl:variable name="p2pshp_Y_">
1997 <xsl:call-template name="F_Calc_Stack_Shape_Y">
1998 <xsl:with-param name="iHorizIdx" select="$p2pshp_hori_idx_"/>
1999 <xsl:with-param name="iVertiIdx" select="$p2pshp_vert_idx_"/>
2000 </xsl:call-template>
2003 <xsl:variable name="cmplxStack_H_diff_">
2005 <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when>
2006 <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">
2008 <xsl:variable name="stackToWest_AbvSbs_H_">
2009 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
2010 <xsl:with-param name="iStackIdx" select="$iStackToWest"/>
2011 </xsl:call-template>
2014 <xsl:variable name="stackToEast_AbvSbs_H_">
2015 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
2016 <xsl:with-param name="iStackIdx" select="$iStackToEast"/>
2017 </xsl:call-template>
2021 <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message>
2022 <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>
2026 <xsl:when test="(($p2pshp_hori_idx_ = $iStackToEast) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))">
2027 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
2029 <xsl:when test="(($p2pshp_hori_idx_ = $iStackToWest) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))">
2030 <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/>
2032 <xsl:otherwise>0</xsl:otherwise>
2039 <xsl:variable name="procStack_H_diff_">
2041 <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when>
2042 <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">
2044 <xsl:variable name="stackToWest_AbvSbs_H_">
2045 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
2046 <xsl:with-param name="iStackIdx" select="$iStackToWest"/>
2047 </xsl:call-template>
2050 <xsl:variable name="stackToEast_AbvSbs_H_">
2051 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
2052 <xsl:with-param name="iStackIdx" select="$iStackToEast"/>
2053 </xsl:call-template>
2057 <xsl:message>stack to west H <xsl:value-of select="$stackToWest_AbvSbs_H_"/></xsl:message>
2058 <xsl:message>stack to east H <xsl:value-of select="$stackToEast_AbvSbs_H_"/></xsl:message>
2061 <xsl:when test="(($p2pshp_hori_idx_ = $iStackToEast) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))">
2062 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
2064 <xsl:when test="(($p2pshp_hori_idx_ = $iStackToWest) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))">
2065 <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/>
2067 <xsl:otherwise>0</xsl:otherwise>
2076 <!-- Store the conns in a variable -->
2077 <xsl:variable name="p2pConn_heights_">
2079 <xsl:for-each select="BUSCONN">
2081 <xsl:variable name="bifName_" select="@BUSINTERFACE"/>
2084 <xsl:when test="@IS_PROCCONN and @BIF_Y">
2087 <xsl:message>Proc <xsl:value-of select="$procInstance_"/></xsl:message>
2089 <xsl:variable name="procBif_Y_" select="((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * @BIF_Y) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V))"/>
2090 <xsl:variable name="procBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $p2pInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@TYPE"/>
2091 <xsl:variable name="procBusName_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $p2pInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BUSNAME"/>
2092 <xsl:variable name="procBifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $p2pInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_X"/>
2094 <xsl:variable name="bcProc_Y_" select="($p2pshp_Y_ + $procBif_Y_ + ceiling($BIF_H div 2) - ceiling($BLKD_BIFC_H div 2) + $procStack_H_diff_)"/>
2095 <xsl:variable name="bcProc_X_">
2097 <xsl:when test="$procBifSide_ = '0'">
2098 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - (ceiling($BLKD_MOD_W div 2) + $BLKD_BIFC_W))"/>
2100 <xsl:when test="$procBifSide_ = '1'">
2101 <xsl:value-of select="ceiling($BLKD_MOD_W div 2)"/>
2103 <xsl:otherwise>0</xsl:otherwise>
2107 <P2PCONN X="{$bcProc_X_}" Y="{$bcProc_Y_}" BUSNAME= "{$procBusName_}" BUSSTD="{$iBusStd}" TYPE="{$procBifType_}" BIFSIDE="{$procBifSide_}"/>
2113 <xsl:variable name="modInstance_" select="@INSTANCE"/>
2114 <xsl:variable name="modshp_vert_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[MODULE[(@INSTANCE = $modInstance_)]]/@SHAPE_VERTI_INDEX"/>
2115 <xsl:variable name="modBifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_X"/>
2116 <xsl:variable name="modBif_Y_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_Y"/>
2117 <xsl:variable name="modBc_Y_" select="((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * $modBif_Y_) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V))"/>
2120 <xsl:message>Memory Instance <xsl:value-of select="$procInstance_"/></xsl:message>
2123 <xsl:variable name="modshp_Y_">
2124 <xsl:call-template name="F_Calc_Stack_Shape_Y">
2125 <xsl:with-param name="iHorizIdx" select="$p2pshp_hori_idx_"/>
2126 <xsl:with-param name="iVertiIdx" select="$modshp_vert_idx_"/>
2127 </xsl:call-template>
2130 <xsl:variable name="modBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@TYPE"/>
2131 <xsl:variable name="modBusName_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BUSNAME"/>
2132 <xsl:variable name="bcMod_Y_" select="($modshp_Y_ + $modBc_Y_ + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2) + $cmplxStack_H_diff_)"/>
2133 <xsl:variable name="bcMod_X_">
2135 <xsl:when test="$modBifSide_ = '0'">
2136 <xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - (ceiling($BLKD_MOD_W div 2) + $BLKD_BIFC_W))"/>
2138 <xsl:when test="$modBifSide_ = '1'">
2139 <xsl:value-of select="ceiling($BLKD_MOD_W div 2)"/>
2141 <xsl:otherwise>0</xsl:otherwise>
2145 <P2PCONN X="{$bcMod_X_}" Y="{$bcMod_Y_}" BUSNAME="{$modBusName_}" BUSSTD="{$iBusStd}" TYPE="{$modBifType_}" BIFSIDE="{$modBifSide_}"/>
2154 <xsl:variable name="busTop_" select="math:min(exsl:node-set($p2pConn_heights_)/P2PCONN/@Y)"/>
2155 <xsl:variable name="busBot_" select="math:max(exsl:node-set($p2pConn_heights_)/P2PCONN/@Y)"/>
2156 <xsl:variable name="v_bus_y_" select="$busTop_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
2158 <xsl:variable name="busName_" select="exsl:node-set($p2pConn_heights_)/P2PCONN/@BUSNAME"/>
2159 <xsl:variable name="busStd_" select="exsl:node-set($p2pConn_heights_)/P2PCONN/@BUSSTD"/>
2161 <!-- Draw the vertical part of the bus -->
2162 <!-- Place the bus label.-->
2163 <!-- Draw the busconnection and horizontal lines.-->
2164 <xsl:for-each select="exsl:node-set($p2pConn_heights_)/P2PCONN">
2166 <xsl:variable name="bus_x_" select="($bcInSpace_X_ + ceiling($BLKD_BIFC_W div 2))"/>
2167 <xsl:variable name="bus_y_" select="@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
2169 <xsl:variable name="h_bus_ul_x_">
2171 <xsl:when test="@BIFSIDE='0'">
2172 <xsl:value-of select="$bus_x_"/>
2174 <xsl:when test="@BIFSIDE='1'">
2175 <xsl:value-of select="(@X + $BLKD_BIFC_W + $BLKD_BUS_ARROW_W) - 1"/>
2180 <xsl:variable name="h_bus_ul_y_" select="$bus_y_"/>
2182 <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/>
2183 <xsl:variable name="h_bus_width_">
2185 <xsl:when test="@BIFSIDE='0'">
2186 <xsl:value-of select="(@X - $bus_x_ - $BLKD_BUS_ARROW_W)"/>
2188 <xsl:when test="@BIFSIDE='1'">
2189 <xsl:value-of select="$bus_x_ - $h_bus_ul_x_ + 1"/>
2195 <!-- Draw Bus connection-->
2196 <use x="{@X}" y="{@Y}" xlink:href="#{@BUSSTD}_busconn_{@TYPE}"/>
2198 <!-- Draw the arrow -->
2200 <xsl:when test="((@BIFSIDE='0') and not((@BUSSTD = 'FSL') and ((@TYPE = 'INITIATOR') or (@TYPE = 'MASTER'))))">
2201 <use x="{@X - $BLKD_BUS_ARROW_W}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowEast"/>
2203 <xsl:when test="((@BIFSIDE='1') and not((@BUSSTD = 'FSL') and ((@TYPE = 'INITIATOR') or (@TYPE = 'MASTER'))))">
2204 <use x="{(@X + $BLKD_BIFC_W)}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowWest"/>
2207 <xsl:when test="((@BIFSIDE='0') and ((@BUSSTD = 'FSL') and ((@TYPE = 'INITIATOR') or (@TYPE = 'MASTER'))))">
2208 <use x="{@X - $BLKD_BUS_ARROW_W}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowHInitiator"/>
2211 <xsl:when test="((@BIFSIDE='1') and ((@BUSSTD = 'FSL') and ((@TYPE = 'INITIATOR') or (@TYPE = 'MASTER'))))">
2212 <use x="{(@X + $BLKD_BIFC_W)}" y="{@Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2)}" xlink:href="#{@BUSSTD}_BusArrowHInitiator"/>
2217 <!-- Draw the horizontal part of the bus -->
2218 <rect x="{$h_bus_ul_x_}"
2220 width= "{$h_bus_width_}"
2221 height="{$h_bus_height_}"
2223 style="stroke:none; fill:{$busColor_}"/>
2226 Draw the vertical part of the bus. The MPMC BIF and the top arrow will
2227 be added later when the main drawing happens.
2229 <xsl:variable name="v_bus_ul_x_">
2231 <xsl:when test="@BIFSIDE='0'"><xsl:value-of select="($h_bus_ul_x_)"/></xsl:when>
2232 <xsl:when test="@BIFSIDE='1'"><xsl:value-of select="($h_bus_ul_x_ + $h_bus_width_ - $BLKD_P2P_BUS_W)"/></xsl:when>
2236 <rect x="{$v_bus_ul_x_}"
2238 width= "{$BLKD_P2P_BUS_W}"
2239 height="{$h_bus_ul_y_}"
2240 style="stroke:none; fill:{$busColor_}"/>
2248 ======================================================================
2249 Handle Split connections, (connections that go between adjacent stacks)
2250 ======================================================================
2253 <xsl:template name="BCLaneSpace_SplitConn">
2255 <xsl:param name="iBusStd" select="'NONE'"/>
2256 <xsl:param name="iBusName" select="'NONE'"/>
2257 <xsl:param name="iBifType" select="'NONE'"/>
2258 <xsl:param name="iStackToEast" select="'NONE'"/>
2259 <xsl:param name="iStackToWest" select="'NONE'"/>
2260 <xsl:param name="iStackToEast_W" select="0"/>
2261 <xsl:param name="iStackToWest_W" select="0"/>
2262 <xsl:param name="iLaneInSpace_X" select="0"/>
2264 <xsl:variable name="busColor_">
2265 <xsl:call-template name="F_BusStd2RGB">
2266 <xsl:with-param name="iBusStd" select="$iBusStd"/>
2267 </xsl:call-template>
2270 <xsl:variable name="space_W_">
2271 <xsl:call-template name="F_Calc_Space_Width">
2272 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
2273 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
2274 </xsl:call-template>
2277 <xsl:variable name ="extSpaceWest_W_" select="ceiling($iStackToWest_W div 2)"/>
2278 <xsl:variable name ="extSpaceEast_W_" select="ceiling($iStackToEast_W div 2)"/>
2281 <xsl:variable name="bifName_" select="BUSCONN/@BUSINTERFACE"/>
2282 <xsl:variable name="shpInstance_" select="BUSCONN/@INSTANCE"/>
2285 <xsl:message>Found a split connection on <xsl:value-of select="$shpInstance_"/></xsl:message>
2289 <xsl:variable name="shp_hori_idx_">
2292 <xsl:when test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $shpInstance_)]">
2293 <xsl:value-of select="/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $shpInstance_)]/@STACK_HORIZ_INDEX"/>
2296 <xsl:when test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $shpInstance_)])]">
2297 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $shpInstance_)])]/@STACK_HORIZ_INDEX"/>
2299 <xsl:otherwise>_unknown_</xsl:otherwise>
2304 <xsl:variable name="shp_vert_idx_">
2307 <xsl:when test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $shpInstance_)]">
2308 <xsl:value-of select="/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $shpInstance_)]/@SHAPE_VERTI_INDEX"/>
2311 <xsl:when test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $shpInstance_)])]">
2312 <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $shpInstance_)])]/@SHAPE_VERTI_INDEX"/>
2314 <xsl:otherwise>_unknown_</xsl:otherwise>
2319 <xsl:variable name="splitshp_Width_">
2322 <xsl:when test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $shpInstance_)]">
2323 <xsl:value-of select="$BLKD_MOD_W"/>
2326 <xsl:when test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $shpInstance_)])]/@MODS_W">
2328 <xsl:message>Using mods width on <xsl:value-of select="$shpInstance_"/></xsl:message>
2330 <xsl:value-of select="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(MODULE[(@INSTANCE = $shpInstance_)])]/@MODS_W * $BLKD_MOD_W)"/>
2333 <xsl:value-of select="$BLKD_MOD_W"/>
2340 <xsl:message>Found width of <xsl:value-of select="$splitshp_Width_"/></xsl:message>
2344 <xsl:variable name="splitshp_Y_">
2345 <xsl:call-template name="F_Calc_Stack_Shape_Y">
2346 <xsl:with-param name="iHorizIdx" select="$shp_hori_idx_"/>
2347 <xsl:with-param name="iVertiIdx" select="$shp_vert_idx_"/>
2348 </xsl:call-template>
2352 <xsl:variable name="splitStack_H_diff_">
2354 <xsl:when test=" (($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">0</xsl:when>
2355 <xsl:when test="not(($iStackToEast = 'NONE') or ($iStackToWest = 'NONE'))">
2357 <xsl:variable name="stackToWest_AbvSbs_H_">
2358 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
2359 <xsl:with-param name="iStackIdx" select="$iStackToWest"/>
2360 </xsl:call-template>
2363 <xsl:variable name="stackToEast_AbvSbs_H_">
2364 <xsl:call-template name="F_Calc_Stack_AbvSbs_Height">
2365 <xsl:with-param name="iStackIdx" select="$iStackToEast"/>
2366 </xsl:call-template>
2370 <xsl:when test="(($shp_hori_idx_ = $iStackToEast) and ($stackToWest_AbvSbs_H_ > $stackToEast_AbvSbs_H_))">
2371 <xsl:value-of select="($stackToWest_AbvSbs_H_ - $stackToEast_AbvSbs_H_)"/>
2373 <xsl:when test="(($shp_hori_idx_ = $iStackToWest) and ($stackToEast_AbvSbs_H_ > $stackToWest_AbvSbs_H_))">
2374 <xsl:value-of select="($stackToEast_AbvSbs_H_ - $stackToWest_AbvSbs_H_)"/>
2376 <xsl:otherwise>0</xsl:otherwise>
2384 <xsl:variable name="splitBif_Y_" select="((($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * BUSCONN/@BIF_Y) + ($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V))"/>
2385 <xsl:variable name="splitBusStd_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $shpInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BUSSTD"/>
2386 <xsl:variable name="splitBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $shpInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@TYPE"/>
2387 <xsl:variable name="splitBifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $shpInstance_)]/BUSINTERFACE[(@NAME = $bifName_)]/@BIF_X"/>
2389 <xsl:variable name="bcInSpace_X_">
2391 <xsl:when test="$splitBifSide_ = '1'"><xsl:value-of select="ceiling($splitshp_Width_ div 2)"/></xsl:when>
2392 <xsl:when test="$splitBifSide_ = '0'"><xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - ceiling($splitshp_Width_ div 2) - $BLKD_BIFC_W)"/></xsl:when>
2397 <xsl:variable name="bcBus_X_">
2399 <xsl:when test="$splitBifSide_ = '1'"><xsl:value-of select="$bcInSpace_X_"/></xsl:when>
2400 <xsl:when test="$splitBifSide_ = '0'"><xsl:value-of select="($space_W_ + $extSpaceWest_W_ + $extSpaceEast_W_ - ceiling($BLKD_MOD_W div 2) - $BLKD_BIFC_W)"/></xsl:when>
2404 <xsl:variable name="bcSplit_Y_">
2406 <xsl:when test="(BUSCONN/@IS_MEMCONN) and (($splitBusStd_ = 'LMB') or ($splitBusStd_ = 'OCM'))">
2408 <xsl:message>Found memory conn split connection on <xsl:value-of select="$shpInstance_"/> </xsl:message>
2410 <xsl:value-of select="($splitshp_Y_ + $BLKD_MOD_H + $BLKD_MOD_BIF_GAP_V + (BUSCONN/@BIF_Y * ($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V)) + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2) + $splitStack_H_diff_)"/>
2413 <xsl:value-of select="($splitshp_Y_ + $splitBif_Y_ + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2) + $splitStack_H_diff_)"/>
2418 <use x="{$bcInSpace_X_}" y="{$bcSplit_Y_}" xlink:href="#{@BUSSTD}_busconn_{$splitBifType_}"/>
2421 <xsl:call-template name="Draw_SplitConnBus">
2422 <xsl:with-param name="iBc_Y" select="$bcSplit_Y_"/>
2423 <xsl:with-param name="iBc_X" select="$bcInSpace_X_"/>
2424 <xsl:with-param name="iBusStd" select="$iBusStd"/>
2425 <xsl:with-param name="iBc_Type" select="$splitBifType_"/>
2426 <xsl:with-param name="iBc_Side" select="$splitBifSide_"/>
2427 <xsl:with-param name="iBusName" select="$iBusName"/>
2428 </xsl:call-template>
2434 <xsl:template name="Define_BusLaneSpace">
2436 <xsl:param name="iStackToEast" select="'NONE'"/>
2437 <xsl:param name="iStackToWest" select="'NONE'"/>
2440 <xsl:message>Input Stack to West <xsl:value-of select="$iStackToWest"/></xsl:message>
2441 <xsl:message>Input Stack to East <xsl:value-of select="$iStackToEast"/></xsl:message>
2444 <xsl:variable name="stackToEast_">
2446 <xsl:when test="not($iStackToEast = 'NONE')"><xsl:value-of select="$iStackToEast"/></xsl:when>
2447 <xsl:otherwise>NONE</xsl:otherwise>
2451 <xsl:variable name="stackToWest_">
2453 <xsl:when test=" not($iStackToWest = 'NONE')"><xsl:value-of select="$iStackToWest"/></xsl:when>
2454 <xsl:when test="(not($iStackToEast = 'NONE') and not($iStackToEast = '0'))"><xsl:value-of select="($iStackToEast - 1)"/></xsl:when>
2455 <xsl:otherwise>NONE</xsl:otherwise>
2459 <xsl:variable name="spaceAbvSbs_H_">
2460 <xsl:call-template name="F_Calc_Space_AbvSbs_Height">
2461 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
2462 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
2463 </xsl:call-template>
2466 <xsl:variable name="spaceBlwSbs_H_">
2467 <xsl:call-template name="F_Calc_Space_BlwSbs_Height">
2468 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
2469 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
2470 </xsl:call-template>
2474 <xsl:variable name="space_H_" select="($spaceAbvSbs_H_ + $BLKD_PROC2SBS_GAP + $G_Total_SharedBus_H + $spaceBlwSbs_H_)"/>
2475 <xsl:variable name="space_W_">
2476 <xsl:call-template name="F_Calc_Space_Width">
2477 <xsl:with-param name="iStackToEast" select="$iStackToEast"/>
2478 <xsl:with-param name="iStackToWest" select="$iStackToWest"/>
2479 </xsl:call-template>
2482 <xsl:variable name="spaceSharedBus_Y_" select="$spaceAbvSbs_H_ + $BLKD_PROC2SBS_GAP"/>
2484 <xsl:variable name="space_name_">
2485 <xsl:call-template name="F_generate_Space_Name">
2486 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
2487 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
2488 </xsl:call-template>
2491 <xsl:variable name = "stackToWest_W_">
2493 <xsl:when test="(($iStackToEast = '0') and ($iStackToWest = 'NONE'))">0</xsl:when>
2494 <xsl:when test="(($iStackToEast = 'NONE') and not($iStackToWest = 'NONE'))">
2495 <xsl:call-template name="F_Calc_Stack_Width">
2496 <xsl:with-param name="iStackIdx" select="$iStackToWest"/>
2497 </xsl:call-template>
2499 <xsl:when test="(not($iStackToEast = '0') and not($iStackToEast = 'NONE') and ($iStackToWest = 'NONE'))">
2500 <xsl:call-template name="F_Calc_Stack_Width">
2501 <xsl:with-param name="iStackIdx" select="($iStackToEast - 1)"/>
2502 </xsl:call-template>
2504 <xsl:otherwise>0</xsl:otherwise>
2508 <xsl:variable name = "stackToEast_W_">
2509 <xsl:call-template name="F_Calc_Stack_Width">
2510 <xsl:with-param name="iStackIdx" select="$iStackToEast"/>
2511 </xsl:call-template>
2514 <xsl:variable name ="extSpaceWest_W_" select="ceiling($stackToWest_W_ div 2)"/>
2515 <xsl:variable name ="extSpaceEast_W_" select="ceiling($stackToEast_W_ div 2)"/>
2517 <g id="{$space_name_}">
2518 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE[((@EAST = $iStackToEast) or (($iStackToEast = 'NONE') and (@WEST = $iStackToWest)))]/BUSCONNLANE[@BUSSTD and @BUSNAME]">
2520 <xsl:variable name="busStd_" select="@BUSSTD"/>
2521 <xsl:variable name="busName_" select="@BUSNAME"/>
2522 <xsl:variable name="busLane_X_" select="@BUSLANE_X"/>
2525 <xsl:variable name="eastBusLane_X_">
2527 <xsl:when test="(@BUSLANE_X = 0)"><xsl:value-of select="@BUSLANE_X"/></xsl:when>
2528 <xsl:otherwise><xsl:value-of select="(@BUSLANE_X - 1)"/></xsl:otherwise>
2532 <xsl:variable name="eastBusLane_X_" select="@BUSLANE_X"/>
2533 <xsl:variable name="laneInSpace_X_">
2535 <xsl:when test="(@ORIENTED = 'EAST')">
2536 <xsl:value-of select="($extSpaceWest_W_ + ($eastBusLane_X_ * $BLKD_BUS_LANE_W) - $BLKD_BUS_ARROW_W - $BLKD_P2P_BUS_W)"/>
2538 <xsl:otherwise><xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W))"/></xsl:otherwise>
2543 <xsl:variable name="busColor_">
2544 <xsl:call-template name="F_BusStd2RGB">
2545 <xsl:with-param name="iBusStd" select="@BUSSTD"/>
2546 </xsl:call-template>
2551 ===========================================================
2552 Handle Bucket connections to the shared busses.
2553 ===========================================================
2555 <xsl:when test="@BUSLANE_X and @IS_BKTCONN and BUSCONN[@TYPE] and $G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $busName_)]/@BUS_INDEX">
2556 <xsl:call-template name="BCLaneSpace_BucketToSharedBus">
2557 <xsl:with-param name="iBusName" select="$busName_"/>
2558 <xsl:with-param name="iBusStd" select="$busStd_"/>
2559 <xsl:with-param name="iBifType" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $busName_)]/BUSINTERFACE/@TYPE"/>
2560 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
2561 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
2562 <xsl:with-param name="iStackToEast_W" select="$stackToEast_W_"/>
2563 <xsl:with-param name="iStackToWest_W" select="$stackToWest_W_"/>
2564 <xsl:with-param name="iLaneInSpace_X" select="$laneInSpace_X_"/>
2565 <xsl:with-param name="iSpaceSharedBus_Y" select="$spaceSharedBus_Y_"/>
2566 </xsl:call-template>
2570 ===========================================================
2571 Handle Processor's Shared bus connections.
2572 ===========================================================
2574 <xsl:when test="@BUSLANE_X and @IS_SBSCONN and not(@IS_MPMCCONN) and BUSCONN[@BIF_Y and @IS_PROCCONN and @INSTANCE and @BUSINTERFACE] and $G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $busName_)]/@BUS_INDEX">
2575 <xsl:call-template name="BCLaneSpace_ProcBifToSharedBus">
2576 <xsl:with-param name="iBusStd" select="$busStd_"/>
2577 <xsl:with-param name="iBusName" select="$busName_"/>
2578 <xsl:with-param name="iBifType" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $busName_)]/BUSINTERFACE/@TYPE"/>
2579 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
2580 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
2581 <xsl:with-param name="iStackToEast_W" select="$stackToEast_W_"/>
2582 <xsl:with-param name="iStackToWest_W" select="$stackToWest_W_"/>
2583 <xsl:with-param name="iLaneInSpace_X" select="$laneInSpace_X_"/>
2584 <xsl:with-param name="iSpaceSharedBus_Y" select="$spaceSharedBus_Y_"/>
2585 </xsl:call-template>
2591 ===========================================================
2592 Handle non Processor Shared Bus connections.
2593 ===========================================================
2595 <xsl:when test="@BUSLANE_X and @IS_SBSCONN and not(@IS_MPMCCONN) and BUSCONN[@BIF_Y and not(@IS_PROCCONN) and @INSTANCE and @BUSINTERFACE] and /EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $busName_)]/@BUS_INDEX">
2596 <xsl:call-template name="BCLaneSpace_NonProcBifToSharedBus">
2597 <xsl:with-param name="iBusStd" select="$busStd_"/>
2598 <xsl:with-param name="iBusName" select="$busName_"/>
2599 <xsl:with-param name="iBifType" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $busName_)]/BUSINTERFACE/@TYPE"/>
2600 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
2601 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
2602 <xsl:with-param name="iStackToEast_W" select="$stackToEast_W_"/>
2603 <xsl:with-param name="iStackToWest_W" select="$stackToWest_W_"/>
2604 <xsl:with-param name="iLaneInSpace_X" select="$laneInSpace_X_"/>
2605 <xsl:with-param name="iSpaceSharedBus_Y" select="$spaceSharedBus_Y_"/>
2606 </xsl:call-template>
2612 ===========================================================
2613 Handle connections from processors to Memory UNITs
2614 ===========================================================
2616 <xsl:when test="@BUSLANE_X and @IS_MEMCONN and not(@IS_MULTISTK) and BUSCONN[@BIF_Y and @IS_PROCCONN and not(@IS_SPLITCONN) and @INSTANCE and @BUSINTERFACE]">
2617 <xsl:call-template name="BCLaneSpace_ProcBifToMemoryUnit">
2618 <xsl:with-param name="iBusStd" select="$busStd_"/>
2619 <xsl:with-param name="iBusName" select="$busName_"/>
2620 <xsl:with-param name="iBifType" select="BUSCONN/@TYPE"/>
2621 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
2622 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
2623 <xsl:with-param name="iStackToEast_W" select="$stackToEast_W_"/>
2624 <xsl:with-param name="iStackToWest_W" select="$stackToWest_W_"/>
2625 <xsl:with-param name="iLaneInSpace_X" select="$laneInSpace_X_"/>
2626 </xsl:call-template>
2633 ===========================================================
2634 Handle generic Point to Point connections
2635 ===========================================================
2637 <xsl:when test="@BUSLANE_X and not(@IS_MULTISTK) and not(@IS_MPMCCONN) and not(@IS_MEMCONN) and not(@IS_SBSCONN) and BUSCONN[@BIF_Y and @INSTANCE and @BUSINTERFACE and not(@IS_SPLITCONN)]">
2638 <xsl:call-template name="BCLaneSpace_PointToPoint">
2639 <xsl:with-param name="iBusStd" select="$busStd_"/>
2640 <xsl:with-param name="iBusName" select="$busName_"/>
2641 <xsl:with-param name="iBifType" select="BUSCONN/@TYPE"/>
2642 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
2643 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
2644 <xsl:with-param name="iStackToEast_W" select="$stackToEast_W_"/>
2645 <xsl:with-param name="iStackToWest_W" select="$stackToWest_W_"/>
2646 <xsl:with-param name="iLaneInSpace_X" select="$laneInSpace_X_"/>
2647 </xsl:call-template>
2653 ===========================================================
2654 Handle MultiStack Point to Point connections
2655 ===========================================================
2657 <xsl:when test="@BUSLANE_X and (@IS_MULTISTK) and not(@IS_SBSCONN) and BUSCONN[@BIF_Y and @IS_PROCCONN and @INSTANCE and @BUSINTERFACE]">
2658 <xsl:call-template name="BCLaneSpace_MultiStack_PointToPoint">
2659 <xsl:with-param name="iBusStd" select="$busStd_"/>
2660 <xsl:with-param name="iBusName" select="$busName_"/>
2661 <xsl:with-param name="iBifType" select="BUSCONN/@TYPE"/>
2662 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
2663 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
2664 <xsl:with-param name="iStackToEast_W" select="$stackToEast_W_"/>
2665 <xsl:with-param name="iStackToWest_W" select="$stackToWest_W_"/>
2666 <xsl:with-param name="iLaneInSpace_X" select="$laneInSpace_X_"/>
2667 </xsl:call-template>
2671 ===========================================================
2672 Handle Processor to processor connections
2673 ===========================================================
2675 <xsl:when test="(@IS_PROC2PROC and (count(BUSCONN[@BIF_Y and @INSTANCE and @BUSINTERFACE]) = 2))">
2676 <xsl:call-template name="BCLaneSpace_ProcToProc">
2677 <xsl:with-param name="iBusStd" select="$busStd_"/>
2678 <xsl:with-param name="iBusName" select="$busName_"/>
2679 <xsl:with-param name="iBifType" select="BUSCONN/@TYPE"/>
2680 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
2681 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
2682 <xsl:with-param name="iStackToEast_W" select="$stackToEast_W_"/>
2683 <xsl:with-param name="iStackToWest_W" select="$stackToWest_W_"/>
2684 <xsl:with-param name="iLaneInSpace_X" select="$laneInSpace_X_"/>
2685 </xsl:call-template>
2688 ===========================================================
2689 Handle connections to the StandAlone MPMC
2690 ===========================================================
2692 <xsl:when test="@BUSLANE_X and (@IS_MPMCCONN) and not(@IS_SBSCONN) and BUSCONN[(@BIF_Y and @INSTANCE and @BUSINTERFACE)]">
2695 <xsl:call-template name="BCLaneSpace_ToStandAloneMPMC">
2696 <xsl:with-param name="iBusStd" select="$busStd_"/>
2697 <xsl:with-param name="iBusName" select="$busName_"/>
2698 <xsl:with-param name="iBifType" select="BUSCONN/@TYPE"/>
2699 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
2700 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
2701 <xsl:with-param name="iStackToEast_W" select="$stackToEast_W_"/>
2702 <xsl:with-param name="iStackToWest_W" select="$stackToWest_W_"/>
2703 <xsl:with-param name="iLaneInSpace_X" select="$laneInSpace_X_"/>
2704 </xsl:call-template>
2708 ===========================================================
2709 Handle Split connections, (connections that go between non adjacent stacks)
2710 ===========================================================
2712 <xsl:when test="(BUSCONN[@BIF_Y and @INSTANCE and @BUSINTERFACE and @IS_SPLITCONN])">
2713 <xsl:call-template name="BCLaneSpace_SplitConn">
2714 <xsl:with-param name="iBusStd" select="$busStd_"/>
2715 <xsl:with-param name="iBusName" select="$busName_"/>
2716 <xsl:with-param name="iBifType" select="BUSCONN/@TYPE"/>
2717 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
2718 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
2719 <xsl:with-param name="iStackToEast_W" select="$stackToEast_W_"/>
2720 <xsl:with-param name="iStackToWest_W" select="$stackToWest_W_"/>
2721 <xsl:with-param name="iLaneInSpace_X" select="$laneInSpace_X_"/>
2722 </xsl:call-template>
2734 <xsl:template name="Define_BusLaneSpaces">
2736 <xsl:variable name="lastStack_" select="(/EDKSYSTEM/BLKDIAGRAM/@STACK_HORIZ_WIDTH) - 1"/>
2738 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE[@EAST]">
2739 <xsl:sort select="@EAST" data-type="number"/>
2741 <xsl:call-template name="Define_BusLaneSpace">
2742 <xsl:with-param name="iStackToEast" select="@EAST"/>
2743 </xsl:call-template>
2747 <xsl:message>Last Stack <xsl:value-of select="$lastStack_"/></xsl:message>
2750 <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE[(@WEST = $lastStack_)]">
2751 <xsl:call-template name="Define_BusLaneSpace">
2752 <xsl:with-param name="iStackToWest" select="$lastStack_"/>
2753 </xsl:call-template>