]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/__xps/.dswkshop/MdtSvgBLKD_Main.xsl
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / PPC405_FPU_Xilinx_Virtex4_GCC / __xps / .dswkshop / MdtSvgBLKD_Main.xsl
1 <?xml version="1.0" standalone="no"?>
2 <xsl:stylesheet version="1.0"
3            xmlns:svg="http://www.w3.org/2000/svg"
4            xmlns:exsl="http://exslt.org/common"
5            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6            xmlns:math="http://exslt.org/math"
7                xmlns:xlink="http://www.w3.org/1999/xlink"
8            extension-element-prefixes="math">
9                    
10 <xsl:include href="MdtSVG_Colors.xsl"/>
11 <xsl:include href="MdtSVG_BifShapes.xsl"/>
12         
13 <xsl:include href="MdtSvgBLKD_Busses.xsl"/>
14 <xsl:include href="MdtSvgBLKD_IOPorts.xsl"/>
15 <xsl:include href="MdtSvgBLKD_Dimensions.xsl"/>
16 <xsl:include href="MdtSvgBLKD_Processors.xsl"/>
17 <xsl:include href="MdtSvgBLKD_Peripherals.xsl"/>
18 <xsl:include href="MdtSvgBLKD_Calculations.xsl"/>
19 <xsl:include href="MdtSvgBLKD_BusLaneSpaces.xsl"/>
20         
21 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"
22                doctype-public="-//W3C//DTD SVG 1.0//EN"
23                    doctype-system="svg10.dtd"/>
24         
25 <xsl:param    name="ADD_VIEWBOX"        select="'FALSE'"/>                 
26 <xsl:param    name="IN_TESTMODE"        select="'FALSE'"/>
27
28 <xsl:param    name="CSS_SVG_DIAGRAMS"   select="'MdtSVG_Diagrams.css'"/>
29         
30 <!-- 
31    ===========================================================================
32                         CALCULATE GLOBAL DIMENSIONS BASED ON BLKDSHAPES DEF IN INPUT XML        
33    ===========================================================================
34 -->
35         
36 <xsl:variable name="G_total_StandAloneMpmc_H">
37         <xsl:if test="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/MPMCSHAPE">
38                 <xsl:value-of select="($BLKD_MPMC_MOD_H + $BLKD_MPMC2PROC_GAP)"/>       
39         </xsl:if>
40         <xsl:if test="not(/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/MPMCSHAPE)">0</xsl:if>
41 </xsl:variable>
42         
43 <xsl:variable name="G_max_Stack_BlwSbs_H">
44         <xsl:call-template name="_calc_Max_Stack_BlwSbs_Height"/>
45 </xsl:variable>
46
47 <xsl:variable name="G_max_Stack_AbvSbs_H">
48         <xsl:call-template name="_calc_Max_Stack_AbvSbs_Height"/>
49 </xsl:variable>
50         
51 <xsl:variable name="G_total_Stacks_W">
52         <xsl:call-template name="_calc_Stack_X">
53                 <xsl:with-param name="iStackIdx"    select="(/EDKSYSTEM/BLKDSHAPES/@STACK_HORIZ_WIDTH)"/>
54         </xsl:call-template>
55 </xsl:variable>
56         
57 <xsl:variable name="G_NumOfSharedBusses"   select="count(/EDKSYSTEM/BLKDSHAPES/SBSSHAPES/MODULE)"/>
58 <xsl:variable name="G_total_SharedBus_H"   select="($G_NumOfSharedBusses * $BLKD_SBS_LANE_H)"/>
59
60 <xsl:variable name="G_NumOfBridges"        select="count(/EDKSYSTEM/BLKDSHAPES/BRIDGESHAPES/MODULE)"/>
61 <xsl:variable name="G_total_Bridges_W"     select="(($G_NumOfBridges * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))) + $BLKD_BRIDGE_GAP)"/>
62         
63 <xsl:variable name="G_total_drawarea_CLC"  select="($G_total_Stacks_W + $G_total_Bridges_W + ($BLKD_INNER_GAP * 2))"/>
64         
65 <xsl:variable name="G_total_drawarea_W">
66         <xsl:if test="$G_total_drawarea_CLC &gt; ($BLKD_KEY_W + $BLKD_SPECS_W + $BLKD_SPECS2KEY_GAP)">
67                 <xsl:value-of select="$G_total_drawarea_CLC"/>
68         </xsl:if>
69         <xsl:if test="not($G_total_drawarea_CLC &gt; ($BLKD_KEY_W + $BLKD_SPECS2KEY_GAP + $BLKD_SPECS_W))">
70                 <xsl:value-of select="($BLKD_KEY_W + $BLKD_SPECS_W + $BLKD_SPECS2KEY_GAP)"/>
71         </xsl:if>
72 </xsl:variable>
73         
74 <xsl:variable name="G_IpBucketMods_H">
75         <xsl:if test="/EDKSYSTEM/BLKDSHAPES/IPBUCKET/@MODS_H"><xsl:value-of select="/EDKSYSTEM/BLKDSHAPES/IPBUCKET/@MODS_H"/></xsl:if>
76         <xsl:if test="not(/EDKSYSTEM/BLKDSHAPES/IPBUCKET/@MODS_H)">0</xsl:if>
77 </xsl:variable>
78 <xsl:variable name="G_total_IpBucket_H"   select="($G_IpBucketMods_H * ($BLKD_MOD_H + $BLKD_BIF_H))"/>
79         
80 <xsl:variable name="G_total_UnkBucket_H">
81         <xsl:if test="/EDKSYSTEM/BLKDSHAPES/UNKBUCKET">
82         
83                 <xsl:variable name="unkBucketMods_H_">
84                         <xsl:if test="/EDKSYSTEM/BLKDSHAPES/UNKBUCKET/@MODS_H"><xsl:value-of select="/EDKSYSTEM/BLKDSHAPES/UNKBUCKET/@MODS_H"/></xsl:if>
85                         <xsl:if test="not(/EDKSYSTEM/BLKDSHAPES/UNKBUCKET/@MODS_H)">0</xsl:if>
86                 </xsl:variable>
87                 
88                 <xsl:variable name="total_UnkMod_H_"       select="($unkBucketMods_H_ * ($BLKD_MOD_H + $BLKD_BIF_H))"/>                 <xsl:variable name="unkBucketBifs_H_"> <xsl:if test="/EDKSYSTEM/BLKDSHAPES/UNKBUCKET/@BIFS_H"><xsl:value-of select="/EDKSYSTEM/BLKDSHAPES/UNKBUCKET/@BIFS_H"/></xsl:if>
89                         <xsl:if test="not(/EDKSYSTEM/BLKDSHAPES/UNKBUCKET/@BIFS_H)">0</xsl:if>
90                 </xsl:variable>
91                 <xsl:variable name="total_UnkBif_H_"       select="($unkBucktBifs_H_ * ($BLKD_MOD_H + $BLKD_BIF_H))"/>
92                 
93                 <xsl:value-of select="($total_UnkBif_H_ + $G_totalUnkMod_H_)"/> 
94         </xsl:if>
95         
96         <xsl:if test="not(/EDKSYSTEM/BLKDSHAPES/UNKBUCKET)">0</xsl:if>
97 </xsl:variable>
98         
99 <xsl:variable name="G_SharedBus_Y"    select="($BLKD_INNER_Y + $G_total_StandAloneMpmc_H + $G_max_Stack_AbvSbs_H + $BLKD_PROC2SBS_GAP)"/>
100         
101 <!-- ===========================================================================
102     Calculate the width of the Block Diagram based on the total number of      
103     buslanes and modules in the design. If there are no buslanes or modules,
104         a default width, just wide enough to display the KEY and SPECS is used
105    =========================================================================== -->
106 <xsl:variable name="G_total_blkd_W"  select="($G_total_drawarea_W + (($BLKD_PRTCHAN_W  + $BLKD_IORCHAN_W)* 2))"/>
107 <xsl:variable name="G_total_diag_W"    select="$G_total_blkd_W"/>
108         
109 <!-- =========================================================================== -->
110 <!-- Calculate the height of the Block Diagram based on the total number of      -->
111 <!-- buslanes and modules in the design. Take into account special shapes such   -->
112 <!-- as MultiProc shapes.                                                                                                            -->
113 <!-- =========================================================================== -->
114         
115         
116 <xsl:variable name="G_total_drawarea_H"  select="($G_total_StandAloneMpmc_H + $G_max_Stack_AbvSbs_H + $BLKD_PROC2SBS_GAP + $G_total_SharedBus_H + $G_max_Stack_BlwSbs_H + $BLKD_SBS2IP_GAP + $G_total_IpBucket_H + $BLKD_IP2UNK_GAP + $G_total_UnkBucket_H + ($BLKD_INNER_GAP * 2))"/>
117 <xsl:variable name="G_total_blkd_H"      select="($G_total_drawarea_H + (($BLKD_PRTCHAN_H  + $BLKD_IORCHAN_H)* 2))"/>
118         
119 <xsl:variable name="G_total_diag_H">
120         <xsl:if test="($IN_TESTMODE = 'TRUE')">
121                 <xsl:message>Generating Blkdiagram in TestMode </xsl:message>
122        <xsl:value-of select="$G_total_blkd_H"/>
123         </xsl:if>
124         <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
125        <xsl:value-of select="($G_total_blkd_H + $BLKD_DRAWAREA2KEY_GAP + $BLKD_KEY_H)"/>
126         </xsl:if>
127 </xsl:variable>
128                 
129 <!-- ======================= MAIN SVG BLOCK =============================== -->
130 <xsl:template match="EDKSYSTEM">
131         
132 <!--
133 <xsl:message>STCK_W is <xsl:value-of select="$G_total_Stacks_W"/></xsl:message>
134 <xsl:message>BRDG_W is <xsl:value-of select="$G_total_Bridges_W"/></xsl:message>
135 <xsl:message>MPMC is <xsl:value-of select="$G_total_StandAloneMpmc_H"/></xsl:message>
136 <xsl:message>MPMC is <xsl:value-of select="$G_total_StandAloneMpmc_H"/></xsl:message>
137 <xsl:message>MABV is <xsl:value-of select="$G_max_Stack_AbvSbs_H"/></xsl:message>
138 <xsl:message>MBLW is <xsl:value-of select="$G_max_Stack_BlwSbs_H"/></xsl:message>
139 <xsl:message>IPBK is <xsl:value-of select="$G_total_IpBucket_H"/></xsl:message>
140 <xsl:message>Blkd Total is <xsl:value-of select="$blkd_H_"/></xsl:message>
141 <xsl:message>max abv is <xsl:value-of select="$max_Stack_AbvSbs_H_"/></xsl:message>
142 <xsl:message>max blw is <xsl:value-of select="$max_Stack_BlwSbs_H_"/></xsl:message>
143 <xsl:message>Ip Bkt is <xsl:value-of select="$totalIpBkt_H_"/></xsl:message>
144 <xsl:message>Sbs is <xsl:value-of select="$totalSbs_H_"/></xsl:message>
145 <xsl:message>Unk Bkt is <xsl:value-of select="$totalUnkBkt_H_"/></xsl:message>
146 <xsl:message>Blkd DrawArea height as <xsl:value-of select="$total_drawarea_H_"/></xsl:message>
147 -->
148
149 <!--specify a css for the file -->
150 <xsl:processing-instruction name="xml-stylesheet">href="<xsl:value-of select="$CSS_SVG_DIAGRAMS"/>" type="text/css"</xsl:processing-instruction>
151
152 <xsl:variable name="BLKD_ZOOM_Y">
153         <xsl:choose>
154                 <xsl:when test="($ADD_VIEWBOX = 'TRUE')">
155                         <xsl:value-of select="($G_total_diag_H * 2)"/>
156                 </xsl:when>
157                 <xsl:otherwise>0</xsl:otherwise>                
158         </xsl:choose>
159 </xsl:variable>
160         
161 <xsl:text>&#10;</xsl:text>
162 <svg width="{$G_total_diag_W}" height="{$G_total_diag_H}" viewBox="0 0 0 {$BLKD_ZOOM_Y}">       
163 <!-- 
164          =============================================== 
165                Layout All the various definitions       
166          =============================================== 
167 -->
168         <defs>
169                 <!-- Diagram Key Definition -->
170                 <xsl:call-template name="Define_BlkDiagram_Key"/>               
171                 
172                 <!-- Diagram Specs Definition -->
173                 <xsl:call-template name="Define_BlkDiagram_Specs">              
174                         <xsl:with-param name="iArch"       select="@ARCH"/>
175                         <xsl:with-param name="iPart"       select="@PART"/>
176                         <xsl:with-param name="iTimeStamp"  select="@TIMESTAMP"/>
177                         <xsl:with-param name="iEdkVersion" select="@EDKVERSION"/>
178                 </xsl:call-template>            
179                 
180                 <!-- IO Port Defs -->
181                 <xsl:call-template name="Define_IOPorts"/>              
182                 
183                 <!-- BIF Defs -->
184                 <xsl:call-template name="Define_BifTypes"/>             
185                 
186                 <!-- Bus Defs -->
187                 <xsl:call-template name="Define_Busses"/>               
188                 
189                 <!-- Shared Bus Buckets Defs -->
190                 <xsl:call-template name="Define_SBSBuckets"/>           
191                 
192                 <!-- IP Bucket Defs -->
193                 <xsl:call-template name="Define_IPBucket"/>             
194                 
195                 <!-- Stack Defs -->
196                 <xsl:call-template name="Define_AllStacks"/>            
197                 
198                 <!-- Space Defs -->
199                 <xsl:call-template name="Define_BusLaneSpaces"/>                
200                 
201                 <!-- Main MPMC Defs -->
202                 <xsl:if test="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/MPMCSHAPE">
203                         <xsl:call-template name="Define_StandAlone_MPMC"/>      
204                 </xsl:if>
205         </defs>
206         
207 <!-- =============================================== -->
208 <!--             Draw Outlines                       -->
209 <!-- =============================================== -->
210         
211          <!-- The surrounding black liner -->
212      <rect x="0"  
213                    y="0" 
214                    width ="{$G_total_diag_W}"
215                    height="{$G_total_diag_H}" style="fill:{$COL_WHITE}; stroke:{$COL_BLACK};stroke-width:4"/>
216                    
217          <!-- The outer IO channel -->
218      <rect x="{$BLKD_PRTCHAN_W}"  
219                    y="{$BLKD_PRTCHAN_H}" 
220                    width= "{$G_total_blkd_W - ($BLKD_PRTCHAN_W * 2)}" 
221                    height="{$G_total_blkd_H - ($BLKD_PRTCHAN_H * 2)}" style="fill:{$COL_IORING}"/>
222                    
223          <!-- The Diagram's drawing area -->
224      <rect x="{$BLKD_PRTCHAN_W + $BLKD_IORCHAN_W}"  
225                    y="{$BLKD_PRTCHAN_H + $BLKD_IORCHAN_H}" 
226                    width= "{$G_total_drawarea_W}"
227                    height="{$G_total_drawarea_H}" rx="8" ry="8" style="fill:{$COL_BG}"/>
228                    
229 <!-- =============================================== -->
230 <!--        Draw All the various components          -->
231 <!-- =============================================== -->
232         
233         <!--   Layout the IO Ports    -->       
234         <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
235                 <xsl:call-template name="Draw_IOPorts"/>        
236         </xsl:if>
237         
238         <!--   Layout the Shapes      -->       
239         <xsl:call-template name="Draw_BlkDiagram_Shapes"/>              
240         
241 </svg>
242         
243 <!-- ======================= END MAIN SVG BLOCK =============================== -->
244 </xsl:template>
245         
246 <xsl:template name="Draw_BlkDiagram_Shapes">
247         
248         <!-- 
249                  ===========================================================
250                                                 Draw the shared busses 
251                  ===========================================================
252         -->
253         <use   x="{$BLKD_INNER_X}"      y="{$G_SharedBus_Y}"  xlink:href="#group_sharedBusses"/> 
254         
255         
256         <!-- 
257                  ===========================================================
258                                                 Draw the Bus Lane Spaces 
259                  ===========================================================
260         -->
261         <xsl:call-template name="Draw_BlkDiagram_BusLaneSpaces"/>       
262         
263         <!-- 
264                  ===========================================================
265                                                 Draw the Bridges
266                  ===========================================================
267         -->
268         <xsl:call-template name="Draw_BlkDiagram_Bridges"/>     
269         
270         
271         <!-- 
272                  ===========================================================
273                                                 Draw the Stacks
274                  ===========================================================
275         -->
276         <xsl:call-template name="Draw_BlkDiagram_Stacks"/>      
277         
278         <!-- 
279                  ===========================================================
280                                                 Draw the Stand Alone MPMC, (if any)
281                  ===========================================================
282         -->
283         <xsl:if test="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/MPMCSHAPE">
284                 <xsl:variable name="mpmc_inst_" select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/MPMCSHAPE/@INSTANCE"/>
285                 <use   x="{$BLKD_INNER_X}"  y="{$BLKD_INNER_Y}"  xlink:href="#mpmcmodule_{$mpmc_inst_}"/> 
286         
287         <!-- 
288                  ===========================================================
289                                                 Draw the connections to the Stand Alone MPMC
290                  ===========================================================
291         -->
292                 <xsl:call-template name="Draw_BlkDiagram_StandAloneMpmcConnections"/>   
293         </xsl:if>       
294         
295         <!-- 
296                  ===========================================================
297                                                 Draw the Ip Bucket
298                  ===========================================================
299         -->
300         
301         <xsl:call-template name="Draw_BlkDiagram_IPBucket"/>
302         
303         
304         <!-- 
305                  ===========================================================
306                                                 Draw the Key
307                  ===========================================================
308         -->
309         <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
310                 <use   x="{$G_total_blkd_W - $BLKD_KEY_W - $BLKD_PRTCHAN_W}" y="{$G_total_blkd_H + $BLKD_DRAWAREA2KEY_GAP - 8}"  xlink:href="#BlkDiagram_Key"/> 
311         </xsl:if>
312         
313         <!-- 
314                  ===========================================================
315                                                 Draw the Specs
316                  ===========================================================
317         -->
318         <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
319                 <use   x="{$BLKD_PRTCHAN_W}"  y="{$G_total_blkd_H + $BLKD_DRAWAREA2KEY_GAP - 8}"  xlink:href="#BlkDiagram_Specs"/> 
320         </xsl:if>
321         
322         <!-- 
323                 ************************************************************ 
324                 ***************  DONE DRAWING BLOCK DIAGRAM   ************** 
325                 ************************************************************ 
326         -->     
327         
328 </xsl:template> 
329         
330         
331 <!-- ======================================================================= -->
332 <!--                         FUNCTION TEMPLATE                               -->
333 <!--                                                                                                                                             -->
334 <!--  Draw stacks on the Block Diagram                                                                           -->
335 <!-- ======================================================================= -->
336 <xsl:template name="Draw_BlkDiagram_Stacks">
337         
338         <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/BCLANESPACES/BCLANESPACE[(@EAST &lt; /EDKSYSTEM/BLKDSHAPES/@STACK_HORIZ_WIDTH)]">
339                         
340                 <xsl:variable name="stack_line_x_">
341                         <xsl:call-template name="_calc_Stack_X">
342                                 <xsl:with-param name="iStackIdx"  select="@EAST"/>
343                         </xsl:call-template>
344                 </xsl:variable>
345                 
346                 <xsl:variable name="stack_abv_sbs_">
347                         <xsl:call-template name="_calc_Stack_AbvSbs_Height">
348                                 <xsl:with-param name="iStackIdx"  select="@EAST"/>
349                         </xsl:call-template>
350                 </xsl:variable>
351                 
352                 <xsl:variable name="bridges_w_"    select="(($G_NumOfBridges * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))) + $BLKD_BRIDGE_GAP)"/>
353                 
354                 <xsl:variable name="stack_y_" select="($G_SharedBus_Y - $stack_abv_sbs_ - $BLKD_PROC2SBS_GAP)"/>
355                 <xsl:variable name="stack_x_" select="($BLKD_INNER_X + $stack_line_x_ + $bridges_w_)"/>
356                 
357                 <xsl:variable name="stack_name_">
358                         <xsl:call-template name="_gen_Stack_Name"> 
359                                 <xsl:with-param name="iHorizIdx" select="@EAST"/>
360                         </xsl:call-template>            
361                 </xsl:variable> 
362                 
363                 <use   x="{$stack_x_}"    y="{$stack_y_}"  xlink:href="#{$stack_name_}"/> 
364         
365         </xsl:for-each> 
366                         
367 </xsl:template>
368         
369 <xsl:template name="Draw_BlkDiagram_StandAloneMpmcConnections">
370         
371         <xsl:variable name="mpmcInst_" select="/EDKSYSTEM/BLKDSHAPES/CMPLXSHAPES/MPMCSHAPE/@INSTANCE"/>
372         <xsl:variable name="lastStack_" select="(/EDKSYSTEM/BLKDSHAPES/@STACK_HORIZ_WIDTH) - 1"/>
373         
374         
375         <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/BCLANESPACES/BCLANESPACE">
376                 <xsl:variable name="currentLane_" select="position()"/>
377 <!--            
378                 <xsl:message>Looking in space <xsl:value-of select="$currentLane_"/></xsl:message>
379 -->     
380                 <xsl:variable name="stackToEast_">
381                         <xsl:choose>
382                                 <xsl:when test="not(@WEST = $lastStack_)"><xsl:value-of select="@EAST"/></xsl:when>
383                                 <xsl:when test="   (@WEST = $lastStack_)"><xsl:value-of select="'NONE'"/></xsl:when>
384                         </xsl:choose>
385                 </xsl:variable>
386                 
387                 <xsl:variable name="stackToWest_">
388                         <xsl:choose>
389                                 <xsl:when test="not(@WEST = $lastStack_)"><xsl:value-of select="'NONE'"/></xsl:when>
390                                 <xsl:when test="   (@WEST = $lastStack_)"><xsl:value-of select="@WEST"/></xsl:when>
391                         </xsl:choose>
392                 </xsl:variable>
393                 
394                 <xsl:variable name="spaceAbvSbs_H_">
395                         <xsl:call-template name="_calc_Space_AbvSbs_Height">
396                                 <xsl:with-param name="iStackToEast"  select="$stackToEast_"/>
397                                 <xsl:with-param name="iStackToWest"  select="$stackToWest_"/>
398                         </xsl:call-template>
399                 </xsl:variable> 
400                 
401                 <xsl:variable name="space_y_"   select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/>
402         
403 <!--            
404                 <xsl:message>Stack To East <xsl:value-of select="$stackToEast_"/></xsl:message>
405                 <xsl:message>Stack To West <xsl:value-of select="$stackToWest_"/></xsl:message>
406                 <xsl:variable name="space_X_">
407                         <xsl:call-template name="_calc_Space_X"> 
408                                 <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
409                                 <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
410                         </xsl:call-template>            
411                 </xsl:variable>
412                 <xsl:variable name="space_y_"   select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/>
413                 <xsl:variable name="space_x_"   select="($BLKD_INNER_X + $G_total_Bridges_W + $space_line_x_)"/>
414 -->             
415                 
416         
417                 <xsl:for-each select="BUSCONNLANE[@IS_MPMCCONN]">
418                         
419 <!--                    
420                         <xsl:variable name="bifSide_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = BUSCONN/@INSTANCE)]/BUSINTERFACE[(@BUSNAME = @BUSNAME)]/@BIF_X"/>
421 -->     
422                         <xsl:variable name="bifInst_"     select="BUSCONN/@INSTANCE"/>
423                         <xsl:variable name="busName_"     select="@BUSNAME"/>
424                         <xsl:variable name="bifSide_"     select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $bifInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@BIF_X"/>
425                         
426                         <xsl:variable name="mpmcBifName_">
427                                 <xsl:choose>
428                                         <xsl:when test="   (@IS_SBSCONN)"><xsl:value-of select="BUSCONN/@BUSINTERFACE"/></xsl:when>
429                                         <xsl:when test="not(@IS_SBSCONN)"><xsl:value-of select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@NAME"/></xsl:when>
430                                         <xsl:otherwise><xsl:value-of select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@NAME"/></xsl:otherwise>
431                                 </xsl:choose>
432                         </xsl:variable>
433 <!--                    
434                         <xsl:message>MPMC Bif Name <xsl:value-of select="$mpmcBifName_"/></xsl:message>
435                         <xsl:message>Bif Side <xsl:value-of select="$bifSide_"/></xsl:message>
436                         <xsl:message>Bus Name <xsl:value-of select="@BUSNAME"/></xsl:message>
437                         <xsl:message>Instance <xsl:value-of select="$bifInst_"/></xsl:message>
438 -->     
439                         
440                         <xsl:variable name="space_line_X_">
441                                 <xsl:call-template name="_calc_Space_X">
442                                         <xsl:with-param name="iStackToEast"  select="$stackToEast_"/>
443                                         <xsl:with-param name="iStackToWest"  select="$stackToWest_"/>
444                                 </xsl:call-template>
445                         </xsl:variable>
446                         
447                         <xsl:variable name="space_X_"   select="($BLKD_INNER_X + $G_total_Bridges_W + $space_line_X_)"/>
448                         
449                         <xsl:variable name = "stackToWest_W_">
450                                 <xsl:choose>
451                                         <xsl:when test="(($stackToEast_ = '0')   and     ($stackToWest_ = 'NONE'))">0</xsl:when>
452                                         <xsl:when test="(($stackToEast_ = 'NONE') and not($stackToWest_ = 'NONE'))">
453                                                 <xsl:call-template name="_calc_Stack_Width">
454                                                         <xsl:with-param name="iStackIdx"  select="$stackToWest_"/>
455                                                 </xsl:call-template>
456                                         </xsl:when>
457                                         <xsl:when test="(not($stackToEast_ = '0') and not($stackToEast_ = 'NONE') and ($stackToWest_ = 'NONE'))">
458                                                 <xsl:call-template name="_calc_Stack_Width">
459                                                         <xsl:with-param name="iStackIdx"  select="($stackToEast_ - 1)"/>
460                                                 </xsl:call-template>
461                                         </xsl:when>
462                                         <xsl:otherwise>0</xsl:otherwise>
463                                 </xsl:choose>
464                         </xsl:variable>
465         
466                         <xsl:variable name = "stackToEast_W_">
467                                 <xsl:call-template name="_calc_Stack_Width">
468                                         <xsl:with-param name="iStackIdx"  select="$stackToEast_"/>
469                                 </xsl:call-template>
470                         </xsl:variable>
471         
472                         <xsl:variable name ="extSpaceWest_W_" select="ceiling($stackToWest_W_ div 2)"/>
473                         <xsl:variable name ="extSpaceEast_W_" select="ceiling($stackToEast_W_ div 2)"/>
474 <!--                    
475                         <xsl:message>extSpaceWest_W_ <xsl:value-of select="$extSpaceWest_W_"/></xsl:message>
476                         <xsl:message>extSpaceEast_W_ <xsl:value-of select="$extSpaceEast_W_"/></xsl:message>
477                         <xsl:message>Found a MPMC lane in space <xsl:value-of select="$currentLane_"/> at X <xsl:value-of select="$lane_X_"/></xsl:message>
478                         <xsl:message>mpmcBifRank <xsl:value-of select="$mpmcBifRank_"/></xsl:message>
479 -->                     
480                         
481 <!--                    
482                         <xsl:variable name="laneInSpace_X_" select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W))"/>
483 -->                     
484                         <xsl:variable name="laneInSpace_X_">
485                                 <xsl:choose>
486                                    <xsl:when test="(@ORIENTED = 'EAST')">
487                                            <xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W) - $BLKD_BUS_ARROW_W - $BLKD_P2P_BUS_W)"/>
488                                    </xsl:when>
489                                    <xsl:otherwise><xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W))"/></xsl:otherwise>
490                                 </xsl:choose>
491                         </xsl:variable> 
492                                                 
493                         
494                         
495                         <xsl:variable name="lane_X_"        select="($space_X_ + $laneInSpace_X_)"/>
496                         
497                         <xsl:variable name="mpmcBifRank_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@BUSNAME = @BUSNAME)]/@BIFRANK"/>
498                         
499                 <!--    
500                         <xsl:variable name="bc_X_" select="($lane_X_ +  ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/>
501                         <xsl:variable name="bc_X_" select="($lane_X_ +  ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/>
502                         <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/>
503                 -->     
504                         
505                         <xsl:variable name="bc_Y_" select="($BLKD_INNER_Y + $BLKD_MPMC_MOD_H)"/>
506                         <xsl:variable name="bc_X_" >
507                                 <xsl:choose>
508                                         <xsl:when test="($bifSide_ = '0')"><xsl:value-of select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/></xsl:when>
509                                         <xsl:when test="($bifSide_ = '1')"><xsl:value-of select="($lane_X_ + $BLKD_BIFC_dx)"/></xsl:when>
510                                         <xsl:otherwise>                    <xsl:value-of select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/></xsl:otherwise>
511                                 </xsl:choose>
512                         </xsl:variable>
513                         
514                         <xsl:variable name="busColor_">
515                                 <xsl:call-template name="BusType2Color">
516                                         <xsl:with-param name="iBusType" select="@BUSSTD"/>
517                                 </xsl:call-template>    
518                         </xsl:variable>
519                 
520                         <!-- Place the MPMC bif label -->
521                         <xsl:variable name="bcl_X_" select="($bc_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BIF_W div 2))"/>
522                         <xsl:variable name="bcl_Y_" select="($bc_Y_ - $BLKD_BIF_H - $BLKD_MOD_BIF_GAP_H)"/>
523                         <use  x="{$bcl_X_}"   y="{$bcl_Y_}"  xlink:href="#{@BUSSTD}_Bif"/>
524                         <text class="mpmcbiflabel" 
525                                   x="{$bcl_X_ + ceiling($BLKD_BIF_W div 2)}"
526                                   y="{$bcl_Y_ + ceiling($BLKD_BIF_H div 2) + 3}"><xsl:value-of select="$mpmcBifName_"/></text>
527                         
528                         <!-- Place the MPMC bif -->
529                         <use   x="{$bc_X_}"   y="{$bc_Y_}"  xlink:href="#{@BUSSTD}_busconn_{$mpmcBifRank_}"/>
530                         
531                         <xsl:variable name="bcArrow_X_" select="($bc_X_ +  ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_H div 2))"/>
532                         <xsl:variable name="bcArrow_Y_" select="($bc_Y_ + $BLKD_BIFC_H - 3)"/>
533                         
534                         <!-- Place the MPMC Arrow -->
535                         <use   x="{$bcArrow_X_}"   y="{$bcArrow_Y_}"  xlink:href="#{@BUSSTD}_BusArrowNorth"/>
536                         
537                         <!-- 
538                                 Place a block to cover the gap btw MPMC and top of Bus Lane Space, or to the correct SBS 
539                                 For non SBS connections a vertical block will already have been drawn to the top of the
540                                 space.
541                         -->
542                         
543                         <xsl:variable name="sbsDy_">
544                                 <xsl:choose>
545                                         <xsl:when test="@IS_SBSCONN"><xsl:value-of select="2 + (/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $busName_)]/@BUSINDEX * $BLKD_SBS_LANE_H)"/></xsl:when>
546                                         <xsl:when test="not(@IS_SBSCONN)">0</xsl:when>
547                                         <xsl:otherwise>0></xsl:otherwise>
548                                 </xsl:choose>
549                         </xsl:variable>
550                         
551                         <xsl:variable name="mpmcBusHeight_">
552                                 <xsl:choose>
553                                         <xsl:when    test="(@IS_SBSCONN)"><xsl:value-of select="($G_SharedBus_Y - ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4) + $sbsDy_)"/></xsl:when>
554                                         <xsl:when test="not(@IS_SBSCONN)">
555                                                 <xsl:choose>
556                                                         <xsl:when test="($space_y_ &gt;= ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))">
557                                                                 <xsl:value-of select="($space_y_ - ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))"/>
558                                                         </xsl:when>
559                                                         <xsl:when test="($space_y_ &lt; ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))">
560                                                                 <xsl:value-of select="(($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_) - $space_y_)"/>
561                                                         </xsl:when>
562                                                 </xsl:choose>
563                                         </xsl:when>
564                                         <xsl:otherwise><xsl:value-of select="$BLKD_BIFC_H"/></xsl:otherwise>
565                                 </xsl:choose>
566                         </xsl:variable>
567                         
568                         <rect x="{$bcArrow_X_ + $BLKD_BUS_ARROW_G}" 
569                                   y="{$bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4}"  
570                                   width= "{$BLKD_P2P_BUS_W}" 
571                                   height="{$mpmcBusHeight_}"  
572                               style="stroke:none; fill:{$busColor_}"/>  
573                         
574                         <!-- place the bus label here -->
575                         <text class="p2pbuslabel" 
576                                   x="{$bcArrow_X_ + $BLKD_BUS_ARROW_W + 6}"
577                                   y="{$bcArrow_Y_ + ceiling($mpmcBusHeight_ div 2) + 6}"><xsl:value-of select="$busName_"/></text>      
578                         
579                         
580                 </xsl:for-each>                         
581         </xsl:for-each> 
582         
583 </xsl:template>
584         
585         
586 <!-- ======================================================================= -->
587 <!--                         FUNCTION TEMPLATE                               -->
588 <!--                                                                                                                                             -->
589 <!--  Draw bus lane spaces on the Block Diagram                                                          -->
590 <!-- ======================================================================= -->
591 <xsl:template name="Draw_BlkDiagram_BusLaneSpaces">
592         
593         <xsl:variable name="lastStack_" select="(/EDKSYSTEM/BLKDSHAPES/@STACK_HORIZ_WIDTH) - 1"/>
594         
595         <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/BCLANESPACES/BCLANESPACE[@EAST]">
596                 <xsl:sort select="@EAST" data-type="number"/>
597                         
598                 <xsl:call-template name="Draw_BlkDiagram_BusLaneSpace">
599                         <xsl:with-param name="iStackToEast"  select="@EAST"/>
600                 </xsl:call-template>
601         </xsl:for-each> 
602         
603         <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/BCLANESPACES/BCLANESPACE[(@WEST = $lastStack_)]">
604                 <xsl:call-template name="Draw_BlkDiagram_BusLaneSpace">
605                         <xsl:with-param name="iStackToWest"  select="$lastStack_"/>
606                 </xsl:call-template>
607         </xsl:for-each> 
608                         
609 </xsl:template>
610         
611 <xsl:template name="Draw_BlkDiagram_BusLaneSpace">
612         
613         <xsl:param name="iStackToEast" select="'NONE'"/>
614         <xsl:param name="iStackToWest" select="'NONE'"/>
615         
616         <xsl:variable name="spaceAbvSbs_H_">
617                 <xsl:call-template name="_calc_Space_AbvSbs_Height">
618                         <xsl:with-param name="iStackToEast"  select="$iStackToEast"/>
619                         <xsl:with-param name="iStackToWest"  select="$iStackToWest"/>
620                 </xsl:call-template>
621         </xsl:variable> 
622         
623         <xsl:variable name="spaceBlwSbs_H_">
624                 <xsl:call-template name="_calc_Space_BlwSbs_Height">
625                         <xsl:with-param name="iStackToEast"  select="$iStackToEast"/>
626                         <xsl:with-param name="iStackToWest"  select="$iStackToWest"/>
627                 </xsl:call-template>
628         </xsl:variable> 
629         
630         <xsl:variable name="space_line_x_">
631                 <xsl:call-template name="_calc_Space_X">
632                         <xsl:with-param name="iStackToEast"  select="$iStackToEast"/>
633                         <xsl:with-param name="iStackToWest"  select="$iStackToWest"/>
634                 </xsl:call-template>
635         </xsl:variable>
636         
637         <xsl:variable name="space_y_"   select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/>
638         <xsl:variable name="space_x_"   select="($BLKD_INNER_X + $G_total_Bridges_W + $space_line_x_)"/>
639         
640         <xsl:variable name="stackToEast_">
641                 <xsl:choose>
642                         <xsl:when test="not($iStackToEast = 'NONE')"><xsl:value-of select="$iStackToEast"/></xsl:when>
643                         <xsl:otherwise>NONE</xsl:otherwise>
644                 </xsl:choose>
645         </xsl:variable> 
646         
647         <xsl:variable name="stackToWest_">
648                 <xsl:choose>
649                         <xsl:when test=" not($iStackToWest = 'NONE')"><xsl:value-of select="$iStackToWest"/></xsl:when>
650                         <xsl:when test="(not($iStackToEast = 'NONE') and not($iStackToEast = '0'))"><xsl:value-of select="($iStackToEast - 1)"/></xsl:when>
651                         <xsl:otherwise>NONE</xsl:otherwise>
652                 </xsl:choose>
653         </xsl:variable> 
654         
655                 
656         <xsl:variable name="space_Name_">
657                 <xsl:call-template name="_gen_Space_Name"> 
658                         <xsl:with-param name="iStackToEast" select="$stackToEast_"/>
659                         <xsl:with-param name="iStackToWest" select="$stackToWest_"/>
660                 </xsl:call-template>            
661         </xsl:variable> 
662         
663 <!--    
664         <xsl:message>StackToEast is <xsl:value-of select="$iStackToEast"/></xsl:message>
665         <xsl:message>StackToWest is <xsl:value-of select="$iStackToWest"/></xsl:message>
666         <xsl:message>SpaceName is <xsl:value-of select="$space_Name_"/></xsl:message>
667 -->     
668                 
669         <use   x="{$space_x_}"    y="{$space_y_}"  xlink:href="#{$space_Name_}"/> 
670         
671 </xsl:template>
672         
673         
674 <!-- =========================================================================== -->
675 <!--                          FUNCTION TEMPLATE                                  -->
676 <!--                                                                                                                                                     -->
677 <!--  Draw Bridges on the Block Diagram                                                                                  -->
678 <!-- =========================================================================== -->
679 <xsl:template name="Draw_BlkDiagram_Bridges">
680         
681         <!-- First save all the bridge indexs in a variable      -->
682         <xsl:variable name="bridgeShapes_">
683                 <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/BRIDGESHAPES/MODULE/BUSCONNS[(@ORIENTED = 'WEST')]/BUSCONN">        
684                         <BRIDGE BUSINDEX="{@BUSINDEX}" INSTANCE="{../../@INSTANCE}" POSITION="{(position() -1)}"/>
685                         <BRIDGECONN BUSINDEX="{@BUSINDEX}" INSTANCE="{../../@INSTANCE}" ORIENTED="{../@ORIENTED}" POSITION="{(position()  - 1)}" BUSSTD="{@BUSSTD}" BIFRANK="{@BIFRANK}"/>
686                         <!-- So both bus conns have same position.... -->
687                         <xsl:if test="../../BUSCONNS[(@ORIENTED = 'EAST')]">
688                                 <BRIDGECONN BUSINDEX="{../../BUSCONNS[(@ORIENTED ='EAST')]/BUSCONN/@BUSINDEX}" INSTANCE="{../../@INSTANCE}" ORIENTED="EAST" POSITION="{(position()  - 1)}"   BUSSTD="{../../BUSCONNS[(@ORIENTED = 'EAST')]/BUSCONN/@BUSSTD}" BIFRANK="{../../BUSCONNS[(@ORIENTED = 'EAST')]/BUSCONN/@BIFRANK}"/>
689                         </xsl:if>
690                 </xsl:for-each>
691         </xsl:variable>
692 <!--                            
693                         <xsl:message>Found an east connection on <xsl:value-of select="../../@INSTANCE"/></xsl:message>
694 -->                             
695         <!-- Now layout the bridge shapes between the shared busses      -->
696         <xsl:for-each select="exsl:node-set($bridgeShapes_)/BRIDGE">
697                 <xsl:sort select="@POSITION" data-type="number"/>
698                 
699                 <xsl:variable name="brdgPosition_"  select="@POSITION"/>
700                 <xsl:variable name="brdgInstance_"  select="@INSTANCE"/>
701                 
702                 <xsl:variable name="min_bus_idx_" select="math:min(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUSINDEX)"/>
703 <!--            
704                 <xsl:variable name="max_bus_idx_" select="math:max(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUSINDEX)"/>
705                 
706         <xsl:message>Maximum index <xsl:value-of select="$max_bus_idx_"/></xsl:message>
707         <xsl:message>Minimum index <xsl:value-of select="$min_bus_idx_"/></xsl:message>
708 -->
709                 
710                 
711                 <xsl:variable name="brdg_X_"  select="($BLKD_INNER_X + $BLKD_BRIDGE_GAP + $BLKD_BUS_LANE_W + (@POSITION * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))))"/>   
712                 <xsl:variable name="brdg_Y_"  select="($G_SharedBus_Y  + ($min_bus_idx_ * $BLKD_SBS_LANE_H) + ceiling($BLKD_SBS_LANE_H div 2) - ceiling($BLKD_MOD_H div 2))"/>
713                 
714                 <use  x="{$brdg_X_}"  y="{$brdg_Y_}"  xlink:href="#symbol_{$brdgInstance_}"/>   
715         </xsl:for-each> 
716         
717                 
718         
719 <!--    
720         <xsl:message>Found <xsl:value-of select="count(exsl:node-set($bridgeShapes_)/BRIDGECONN)"/> busconns </xsl:message>
721                 <xsl:message>Drawing connection for bridge <xsl:value-of select="$brdgInstance_"/> at <xsl:value-of select="@POSITION"/> </xsl:message>
722 -->     
723         
724         <xsl:for-each select="exsl:node-set($bridgeShapes_)/BRIDGECONN">
725                 <xsl:sort select="@POSITION" data-type="number"/>
726                 
727                 <xsl:variable name="brdgInstance_"  select="@INSTANCE"/>
728                 <xsl:variable name="brdgPosition_"  select="@POSITION"/>
729                 
730                 <xsl:variable name="busColor_">
731                         <xsl:call-template name="BusType2Color">
732                                 <xsl:with-param name="iBusType" select="@BUSSTD"/>
733                         </xsl:call-template>    
734                 </xsl:variable>
735                 
736                 <xsl:variable name="min_bus_idx_" select="math:min(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUSINDEX)"/>
737                 <xsl:variable name="brdg_Y1_"     select="($G_SharedBus_Y  + ($min_bus_idx_ * $BLKD_SBS_LANE_H) + ceiling($BLKD_SBS_LANE_H div 2) - ceiling($BLKD_MOD_H div 2))"/>
738                 <xsl:variable name="brdg_X_"      select="($BLKD_INNER_X   + $BLKD_BRIDGE_GAP + $BLKD_BUS_LANE_W + (@POSITION * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))))"/>     
739                 
740                 <xsl:variable name="bc_Y_"        select="$brdg_Y1_ + $BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2)"/>  
741                 <xsl:variable name="bc_X_">
742                         <xsl:choose>
743                                 <xsl:when test="@ORIENTED='WEST'">
744                                         <xsl:value-of select="($brdg_X_ - $BLKD_BIFC_W)"/>
745                                 </xsl:when>
746                                 <xsl:when test="@ORIENTED='EAST'">
747                                         <xsl:value-of select="($brdg_X_ + $BLKD_MOD_W)"/>
748                                 </xsl:when>
749                         </xsl:choose>
750                 </xsl:variable> 
751                 
752                 <!-- Layout the bus conn -->
753                 <use   x="{$bc_X_}"   y="{$bc_Y_}"  xlink:href="#{@BUSSTD}_busconn_{@BIFRANK}"/>
754                 
755                 <!-- Figure out the positions of the lines -->
756                 
757 <!--            
758                 <xsl:variable name="vert_line_x_"  select="$bc_X_    + ceiling($BLKD_BIFC_W div 2)"/>
759                 <xsl:message>vert line x <xsl:value-of select="$vert_line_x_"/></xsl:message>
760                 <xsl:message>bus index <xsl:value-of select="@BUSINDEX"/></xsl:message>
761 -->             
762                 
763                 <xsl:variable name="vert_line_x_">
764                         <xsl:choose>
765                                 <xsl:when test="@ORIENTED='WEST'">
766                                         <xsl:value-of select="($bc_X_ - ($BLKD_BUS_LANE_W - $BLKD_BIFC_W))"/>
767                                 </xsl:when>
768                                 <xsl:when test="@ORIENTED='EAST'">
769                                         <xsl:value-of select="($bc_X_ + ($BLKD_BUS_LANE_W - $BLKD_P2P_BUS_W))"/>
770                                 </xsl:when>
771                         </xsl:choose>
772                 </xsl:variable> 
773                 
774                 <!-- At least one of the points is going to be the bus -->
775 <!--            
776                 <xsl:variable name="vert_line_y1_" select="($G_SharedBus_Y  + $BLKD_PROC2SBS_GAP + (@BUSINDEX * $BLKD_SBS_LANE_H))"/>
777 -->             
778                 <xsl:variable name="vert_line_y1_" select="($G_SharedBus_Y  + (@BUSINDEX * $BLKD_SBS_LANE_H))"/>
779                 <xsl:variable name="vert_line_y2_" select="$bc_Y_ + ceiling($BLKD_BIFC_H div 2)"/>
780                 
781                 <xsl:variable name="v_bus_ul_y_">
782                         <xsl:choose>
783                                 <xsl:when test="$vert_line_y1_ &gt; $vert_line_y2_">
784                                         <xsl:value-of select="$vert_line_y2_"/>
785                                 </xsl:when>
786                                 <xsl:when test="$vert_line_y2_ &gt; $vert_line_y1_">
787                                         <xsl:value-of select="$vert_line_y1_"/>
788                                 </xsl:when>
789                         </xsl:choose>
790                 </xsl:variable> 
791 <!--            
792                 <xsl:variable name="v_bus_ul_x_" select="$vert_line_x_"/>
793 -->     
794                 <xsl:variable name="v_bus_ul_x_">
795                         <xsl:choose>
796                                 <xsl:when test="@ORIENTED='WEST'">
797                                         <xsl:value-of select="($vert_line_x_ + $BLKD_MOD_BIF_GAP_H)"/>
798                                 </xsl:when>
799                                 <xsl:when test="@ORIENTED='EAST'">
800                                         <xsl:value-of select="($vert_line_x_ - $BLKD_MOD_BIF_GAP_H)"/>
801                                 </xsl:when>
802                         </xsl:choose>
803                 </xsl:variable> 
804                 
805                 
806                 <xsl:variable name="v_bus_width_" select="$BLKD_P2P_BUS_W"/>
807                 <xsl:variable name="v_bus_height_">
808                         <xsl:choose>
809                                 <xsl:when test="$vert_line_y1_ &gt; $vert_line_y2_">
810                                         <xsl:value-of select="($vert_line_y1_ - $vert_line_y2_)"/>
811                                 </xsl:when>
812                                 <xsl:when test="$vert_line_y2_ &gt; $vert_line_y1_">
813                                         <xsl:value-of select="($vert_line_y2_ - $vert_line_y1_)"/>
814                                 </xsl:when>
815                         </xsl:choose>
816                 </xsl:variable> 
817                 
818                 <xsl:variable name="h_bus_ul_x_">
819                         <xsl:choose>
820                                 <xsl:when test="@ORIENTED='WEST'">
821                                         <xsl:value-of select="($bc_X_ - ($BLKD_BUS_LANE_W - $BLKD_BIFC_W) + $BLKD_MOD_BIF_GAP_H)"/>
822                                 </xsl:when>
823                                 <xsl:when test="@ORIENTED='EAST'">
824                                         <xsl:value-of select="($bc_X_ + $BLKD_BIFC_W - ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2))"/>
825                                 </xsl:when>
826                         </xsl:choose>
827                 </xsl:variable> 
828                 
829                 <xsl:variable name="h_bus_ul_y_" select="$bc_Y_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/>
830                 <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/>
831                 
832                 <xsl:variable name="h_bus_width_">
833                         <xsl:choose>
834                                 <xsl:when test="@ORIENTED='WEST'">
835                                         <xsl:value-of select="(($bc_X_ + ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2)) - $h_bus_ul_x_ + 1)"/>
836                                 </xsl:when>
837                                 <xsl:when test="@ORIENTED='EAST'">
838                                         <xsl:value-of select="(($v_bus_ul_x_ + $BLKD_P2P_BUS_W) - $h_bus_ul_x_)"/>
839                                 </xsl:when>
840                         </xsl:choose>
841                 </xsl:variable> 
842                 
843                 
844 <!--            
845                 <xsl:message>vert line y1 <xsl:value-of select="$vert_line_y1_"/></xsl:message>
846 -->             
847                 
848                 <rect x="{$v_bus_ul_x_}" 
849                           y="{$v_bus_ul_y_ + 2}"  
850                           width= "{$v_bus_width_}" 
851                           height="{$v_bus_height_}" 
852                           style="stroke:none; fill:{$busColor_}"/>
853                 
854                 <rect x="{$h_bus_ul_x_}" 
855                           y="{$h_bus_ul_y_}"  
856                           width= "{$h_bus_width_}" 
857                           height="{$h_bus_height_}" 
858                           style="stroke:none; fill:{$busColor_}"/>
859                 
860         </xsl:for-each> 
861         
862 </xsl:template>
863         
864         
865         
866         
867 <!-- =========================================================================== -->
868 <!--                          FUNCTION TEMPLATE                                  -->
869 <!--                                                                                                                                                     -->
870 <!-- Draw the IP Bucket                                                                                                          -->
871 <!-- =========================================================================== -->
872 <xsl:template name="Draw_BlkDiagram_IPBucket">
873         
874         <!-- Draw IP Bucket --> 
875         <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/IPBUCKET">
876         
877                 <xsl:variable name="bucket_w_"  select="(($BLKD_MOD_BKTLANE_W * 2) + (($BLKD_MOD_W * @MODS_W) + ($BLKD_MOD_BUCKET_G * (@MODS_W - 1))))"/>
878                 <xsl:variable name="bucket_h_"  select="(($BLKD_MOD_BKTLANE_H * 2) + (($BLKD_MOD_H * @MODS_H) + ($BLKD_MOD_BUCKET_G * (@MODS_H - 1))))"/>
879                 
880                 <xsl:variable name="bucket_x_"  select="(ceiling($G_total_blkd_W div 2) - ceiling($bucket_w_ div 2))"/>
881                 <xsl:variable name="bucket_y_"  select="($G_SharedBus_Y + $G_total_SharedBus_H + $G_max_Stack_BlwSbs_H + $BLKD_SBS2IP_GAP)"/>
882                 
883                 <text class="ipclass"
884                         x="{$bucket_x_}" 
885                         y="{$bucket_y_ - 4}">IP</text>
886                 
887                 <use   x="{$bucket_x_}"   y="{$bucket_y_}"  xlink:href="#ipbucket"/>
888                 
889         </xsl:for-each>
890         
891 </xsl:template>
892         
893         
894 <xsl:template name="Draw_BlkDiagram_Key">
895         <use   x="{ceiling($G_blkd_W div 2) - ceiling($BLKD_KEY_W div 2)}"   y="0"  xlink:href="#BlkDiagram_Key"/> 
896 </xsl:template>
897
898 <xsl:template name="Define_BlkDiagram_Key">
899         
900         <xsl:variable name="key_col_">
901                 <xsl:call-template name="BusType2Color">
902                         <xsl:with-param name="iBusType" select="'KEY'"/>
903                 </xsl:call-template>    
904         </xsl:variable>
905         
906         <xsl:variable name="key_lt_col_">
907                 <xsl:call-template name="BusType2LightColor">
908                         <xsl:with-param name="iBusType" select="'KEY'"/>
909                 </xsl:call-template>    
910         </xsl:variable>
911         
912         <symbol id="KEY_IntrCntrl">
913                 <rect  
914                         x="0"
915                         y="0"
916                         rx="3"
917                         ry="3"
918                         width= "{ceiling($BLKD_INTR_W div 2)}" 
919                         height="{$BLKD_INTR_H}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/> 
920                         
921                 <line x1="0" 
922                           y1="{ceiling($BLKD_INTR_H div 4)}"
923                           x2="{ceiling($BLKD_INTR_W div 2)}" 
924                           y2="{ceiling($BLKD_INTR_H div 4)}" 
925                           style="stroke:{$COL_BLACK};stroke-width:2"/>
926                           
927                 <text class="intrsymbol" 
928                           x="1.5"
929                           y="{7 + ceiling($BLKD_INTR_H div 2)}">x</text>
930                         
931         </symbol>
932                 
933         <symbol id="KEY_IntrdProc">
934                 <rect  
935                         x="0"
936                         y="0"
937                         rx="3"
938                         ry="3"
939                         width= "{ceiling($BLKD_INTR_W div 2)}" 
940                         height="{$BLKD_INTR_H}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/> 
941                         
942                 <line x1="0" 
943                           y1="{ceiling($BLKD_INTR_H div 4) - 2}"
944                           x2="{ceiling($BLKD_INTR_W div 2)}" 
945                           y2="{ceiling($BLKD_INTR_H div 4) - 2}" 
946                           style="stroke:{$COL_BLACK};stroke-width:1"/>
947                           
948                 <line x1="0" 
949                           y1="{ceiling($BLKD_INTR_H div 4) + 2}"
950                           x2="{ceiling($BLKD_INTR_W div 2)}" 
951                           y2="{ceiling($BLKD_INTR_H div 4) + 2}" 
952                           style="stroke:{$COL_BLACK};stroke-width:1"/>
953                           
954                 <text class="intrsymbol" 
955                           x="1.5"
956                           y="{7 + ceiling($BLKD_INTR_H div 2)}">x</text>
957         </symbol>
958         
959         <symbol id="KEY_IntrSrc">
960                 <rect  
961                         x="0"
962                         y="0"
963                         rx="3"
964                         ry="3"
965                         width= "{$BLKD_INTR_W}" 
966                         height="{ceiling($BLKD_INTR_H div 2)}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/> 
967                         
968                 <line x1="{ceiling($BLKD_INTR_W div 2)}" 
969                           y1="0"
970                           x2="{ceiling($BLKD_INTR_W div 2)}" 
971                           y2="{ceiling($BLKD_INTR_H div 2)}" 
972                           style="stroke:{$COL_BLACK};stroke-width:1"/>
973                           
974                 <text class="intrsymbol" 
975                           x="2"
976                           y="7">y</text>
977                         
978                 <text class="intrsymbol" 
979                           x="{2 + ceiling($BLKD_INTR_W div 2)}"
980                           y="7">x</text>
981         </symbol>
982         
983         
984         <symbol id="BlkDiagram_Key">
985                 <rect 
986               x="0"
987                           y="0"
988                       width= "{$BLKD_KEY_W}"
989                       height="{$BLKD_KEY_H}"
990                           style="fill:{$COL_BG}; stroke:none;"/>                
991                           
992                 <rect 
993               x="0"
994                           y="0"
995                       width= "{$BLKD_KEY_W}"
996                       height="16"
997                           style="fill:{$COL_BG}; stroke:none;"/>                
998                           
999                 <text class="keytitle"
1000               x="{ceiling($BLKD_KEY_W div 2)} "
1001                           y="14">KEY</text>               
1002                           
1003                 <rect 
1004               x="0"
1005                           y="16"
1006                       width= "{$BLKD_KEY_W}"
1007                       height="16"
1008                           style="fill:{$COL_BG_LT}; stroke:none;"/>             
1009                           
1010                 <text class="keyheader"
1011               x="{ceiling($BLKD_KEY_W div 2)} "
1012                           y="30">SYMBOLS</text>           
1013                           
1014                 <use  x="32"  y="47"  xlink:href="#KEY_Bif" transform="scale(0.75)"/> 
1015                 <text class="keylabel"
1016               x="12"
1017                           y="60">bus interface</text>             
1018                           
1019                 <use   x="20"  y="68"  xlink:href="#KEY_SharedBus"/> 
1020                 <text class="keylabel"
1021               x="12"
1022                           y="85">shared bus</text>                
1023                           
1024                 <text class="keylblul"
1025               x="110"
1026                           y="47">Bus connections</text>           
1027                           
1028                 <use   x="110"  y="58"  xlink:href="#KEY_busconn_MASTER"/> 
1029                 <text class="keylabel"
1030               x="140"
1031                           y="72">master or initiator</text>               
1032                           
1033                 <use   x="110"  y="{58 + (($BLKD_BIFC_H  + 4) * 1)}"  xlink:href="#KEY_busconn_SLAVE"/> 
1034                 <text class="keylabel"
1035               x="140"
1036                           y="{72 + (($BLKD_BIFC_H + 4) * 1)}">slave or target</text>              
1037                           
1038                 <use   x="110"  y="{58 + (($BLKD_BIFC_H  + 4) * 2)}"  xlink:href="#KEY_busconn_MASTER_SLAVE"/> 
1039                 <text class="keylabel"
1040               x="140"
1041                           y="{72 + (($BLKD_BIFC_H + 4) * 2)}">master slave</text>                 
1042                           
1043                 <use   x="110"  y="{58 + (($BLKD_BIFC_H  + 4) * 3)}"  xlink:href="#KEY_busconn_MONITOR"/>
1044                 <text class="keylabel"
1045               x="140"
1046                           y="{72 + (($BLKD_BIFC_H + 4) * 3)}">monitor</text>              
1047                           
1048                 <text class="keylblul"
1049               x="258"
1050                           y="47">External Ports</text>            
1051                 
1052                 <use   x="258"  y="58"  xlink:href="#KEY_INPort"/> 
1053                 <text class="keylabel"
1054               x="288"
1055                           y="72">input</text>             
1056                           
1057                 <use   x="258"  y="{58 + ($BLKD_IOP_H * 1) + 4}"  xlink:href="#KEY_OUTPort"/> 
1058                 <text class="keylabel"
1059               x="288"
1060                           y="{72 + ($BLKD_IOP_H * 1) + 4}">output</text>                  
1061                           
1062                 <use   x="258" y="{58 + ($BLKD_IOP_H * 2) + 8}"  xlink:href="#KEY_INOUTPort"/> 
1063                 <text class="keylabel"
1064               x="288"
1065                           y="{72 + ($BLKD_IOP_H * 2) + 8}">inout</text>           
1066                 
1067                 
1068                 <text class="keylblul"
1069               x="380"
1070                           y="47">Interrupts</text>
1071                 
1072                 <use   x="380"  y="58"  xlink:href="#KEY_IntrCntrl"/> 
1073                 <text class="keylabel"
1074               x="396"
1075                           y="64">interrupt</text>                 
1076                 <text class="keylabel"
1077               x="396"
1078                           y="74">controller</text>                
1079                           
1080                 
1081                 <use   x="380"  y="88"  xlink:href="#KEY_IntrdProc"/> 
1082                 <text class="keylabel"
1083               x="396"
1084                           y="94">interrupted</text>               
1085                 <text class="keylabel"
1086               x="396"
1087                           y="104">processor</text>                
1088                           
1089                 
1090                 <use   x="380"  y="118"  xlink:href="#KEY_IntrSrc"/> 
1091                 <text class="keylabel"
1092               x="400"
1093                           y="124">interrupt</text>                
1094                 <text class="keylabel"
1095               x="400"
1096                           y="134">source</text>           
1097                 
1098                 <text class="keylabel"
1099               x="360"
1100                           y="146">x = controller ID</text>                
1101                 
1102                 <text class="keylabel"
1103               x="360"
1104                           y="156">y = priority</text>             
1105 <!--            
1106                 <text class="keylabel"
1107               x="400"
1108                           y="134">source</text>           
1109         
1110 -->
1111                 <rect 
1112               x="0"
1113                           y="160"
1114                       width= "{$BLKD_KEY_W}"
1115                       height="16"
1116                           style="fill:{$COL_BG_LT}; stroke:none;"/>             
1117                           
1118                 <text class="keyheader"
1119               x="{ceiling($BLKD_KEY_W div 2)} "
1120                           y="172">COLORS</text>           
1121                 
1122                           
1123                 <text class="keylblul"
1124               x="110"
1125                           y="190">Bus Standards</text>            
1126                           
1127                 <xsl:variable name="dcr_col_">
1128                         <xsl:call-template name="BusType2Color">
1129                                 <xsl:with-param name="iBusType" select="'DCR'"/>
1130                         </xsl:call-template>    
1131                 </xsl:variable>
1132                 
1133                 <rect 
1134               x="{12 + ((12 + $BLKD_BIFC_W + 36) * 0)}"
1135                           y="200"
1136                       width= "{$BLKD_BIFC_H}"
1137                       height="{$BLKD_BIFC_W}"
1138                           style="fill:{$dcr_col_}; stroke:none;"/>              
1139                 <text class="keylabel"
1140               x="{12  + $BLKD_BIFC_W + 4}"
1141                           y="{200 + (($BLKD_BIF_H + 4) * 1)}">DCR</text>                  
1142                           
1143                 <xsl:variable name="fcb_col_">
1144                         <xsl:call-template name="BusType2Color">
1145                                 <xsl:with-param name="iBusType" select="'FCB'"/>
1146                         </xsl:call-template>    
1147                 </xsl:variable>
1148                 
1149                 <rect 
1150               x="{12  + ((12 + $BLKD_BIFC_W + 36) * 0)}"
1151                           y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1152                       width= "{$BLKD_BIFC_H}"
1153                       height="{$BLKD_BIFC_W}"
1154                           style="fill:{$fcb_col_}; stroke:none;"/>              
1155                 <text class="keylabel"
1156               x="{12  + $BLKD_BIFC_W + 4}"
1157                           y="{200 + (($BLKD_BIF_H + 4) * 2)}">FCB</text>                  
1158                 
1159                 <xsl:variable name="fsl_col_">
1160                         <xsl:call-template name="BusType2Color">
1161                                 <xsl:with-param name="iBusType" select="'FSL'"/>
1162                         </xsl:call-template>    
1163                 </xsl:variable>
1164                           
1165                 <rect 
1166               x="{12 + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1167                           y="200"
1168                       width= "{$BLKD_BIFC_H}"
1169                       height="{$BLKD_BIFC_W}"
1170                           style="fill:{$fsl_col_}; stroke:none;"/>              
1171                 <text class="keylabel"
1172               x="{12  +  ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1173                           y="{200 + (($BLKD_BIF_H + 4) * 1)}">FSL</text>                  
1174                 
1175                 <xsl:variable name="col_lmb_">
1176                         <xsl:call-template name="BusType2Color">
1177                                 <xsl:with-param name="iBusType" select="'LMB'"/>
1178                         </xsl:call-template>    
1179                 </xsl:variable>
1180                           
1181                 <rect 
1182               x="{12 + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1183                           y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1184                       width= "{$BLKD_BIFC_H}"
1185                       height="{$BLKD_BIFC_W}"
1186                           style="fill:{$col_lmb_}; stroke:none;"/>              
1187                 <text class="keylabel"
1188               x="{12  + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1)}"
1189                           y="{200 + (($BLKD_BIF_H + 4) * 2)}">LMB</text>                  
1190                           
1191                 
1192                 <xsl:variable name="opb_col_">
1193                         <xsl:call-template name="BusType2Color">
1194                                 <xsl:with-param name="iBusType" select="'OPB'"/>
1195                         </xsl:call-template>    
1196                 </xsl:variable>
1197                           
1198                 <rect 
1199               x="{12 + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1200                           y="200"
1201                       width= "{$BLKD_BIFC_H}"
1202                       height="{$BLKD_BIFC_W}"
1203                           style="fill:{$opb_col_}; stroke:none;"/>              
1204                 <text class="keylabel"
1205               x="{12  +  ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1206                           y="{200 + (($BLKD_BIF_H + 4) * 1)}">OPB</text>                  
1207                 
1208                 <xsl:variable name="plb_col_">
1209                         <xsl:call-template name="BusType2Color">
1210                                 <xsl:with-param name="iBusType" select="'PLB'"/>
1211                         </xsl:call-template>    
1212                 </xsl:variable>
1213                 
1214                 <rect 
1215               x="{12 + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1216                           y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1217                       width= "{$BLKD_BIFC_H}"
1218                       height="{$BLKD_BIFC_W}"
1219                           style="fill:{$plb_col_}; stroke:none;"/>              
1220                 <text class="keylabel"
1221               x="{12  +  ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2)}"
1222                           y="{200 + (($BLKD_BIF_H + 4) * 2)}">PLB</text>                  
1223                 
1224                          
1225                 <xsl:variable name="ocm_col_">
1226                         <xsl:call-template name="BusType2Color">
1227                                 <xsl:with-param name="iBusType" select="'OCM'"/>
1228                         </xsl:call-template>    
1229                 </xsl:variable>
1230                           
1231                 <rect 
1232               x="{12 + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1233                           y="200"
1234                       width= "{$BLKD_BIFC_H}"
1235                       height="{$BLKD_BIFC_W}"
1236                           style="fill:{$ocm_col_}; stroke:none;"/>              
1237                 <text class="keylabel"
1238               x="{12  + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1239                           y="{200 + (($BLKD_BIF_H + 4) * 1)}">SOCM</text>
1240                 
1241                 
1242                 <xsl:variable name="xil_col_">
1243                         <xsl:call-template name="BusType2Color">
1244                                 <xsl:with-param name="iBusType" select="'XIL'"/>
1245                         </xsl:call-template>    
1246                 </xsl:variable>
1247                           
1248                 <rect 
1249               x="{12 + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1250                           y="{200 + (($BLKD_BIFC_H + 4) * 1)}"
1251                       width= "{$BLKD_BIFC_H}"
1252                       height="{$BLKD_BIFC_W}"
1253                           style="fill:{$xil_col_}; stroke:none;"/>              
1254                 <text class="keylabel"
1255               x="{12  + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3)}"
1256                           y="{200 + (($BLKD_BIF_H + 4) * 2)}">XIL (prefix) P2P</text>             
1257                          
1258                           
1259                 <xsl:variable name="trs_col_">
1260                         <xsl:call-template name="BusType2Color">
1261                                 <xsl:with-param name="iBusType" select="'TRS'"/>
1262                         </xsl:call-template>    
1263                 </xsl:variable>
1264                           
1265                 <rect 
1266               x="{12 + ((12 + $BLKD_BIFC_W + 36) * 4)}"
1267                           y="200"
1268                       width= "{$BLKD_BIFC_H}"
1269                       height="{$BLKD_BIFC_W}"
1270                           style="fill:{$trs_col_}; stroke:none;"/>              
1271                 <text class="keylabel"
1272               x="{12  + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 4)}"
1273                           y="{200 + (($BLKD_BIF_H + 4) * 1)}">GEN. P2P, USER, etc</text>                  
1274                           
1275 </symbol>       
1276 </xsl:template>
1277
1278 <xsl:template name="Define_BlkDiagram_Specs">
1279
1280         <xsl:param name="iArch"       select="'NA'"/>
1281         <xsl:param name="iPart"       select="'NA'"/>
1282         <xsl:param name="iTimeStamp"  select="'NA'"/>
1283         <xsl:param name="iEdkVersion" select="'NA'"/>
1284                         
1285         <symbol id="BlkDiagram_Specs">
1286                 <rect 
1287               x="0"
1288                           y="0"
1289                       width= "{$BLKD_SPECS_W}"
1290                       height="{$BLKD_SPECS_H}"
1291                           style="fill:{$COL_BG}; stroke:none;"/>                
1292                           
1293                 <rect 
1294               x="0"
1295                           y="0"
1296                       width= "{$BLKD_SPECS_W}"
1297                       height="16"
1298                           style="fill:{$COL_BG}; stroke:none;"/>                
1299                           
1300                 <text class="keytitle"
1301               x="{ceiling($BLKD_SPECS_W div 2)} "
1302                           y="14">SPECS</text>
1303                           
1304                 <rect 
1305               x="0"
1306                           y="20"
1307                       width= "{$BLKD_SPECS_W}"
1308                       height="16"
1309                           style="fill:{$COL_BG_LT}; stroke:none;"/>             
1310                           
1311                 <text class="specsheader"
1312               x="4"
1313                           y="32">EDK VERSION</text>
1314                           
1315 <!--            
1316                 <text class="specsvalue"
1317               x="{($BLKD_SPECS_W + 1) - (string-length($blkd_edkver) * 6.5)}"
1318                           y="32"><xsl:value-of select="$blkd_edkver"/></text>
1319 -->             
1320                 <text class="specsvaluemid"
1321               x="{($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)}"
1322                           y="32"><xsl:value-of select="$iEdkVersion"/></text>
1323                           
1324                 <rect 
1325               x="0"
1326                           y="40"
1327                       width= "{$BLKD_SPECS_W}"
1328                       height="16"
1329                           style="fill:{$COL_BG_LT}; stroke:none;"/>             
1330                           
1331                 <text class="specsheader"
1332               x="4"
1333                           y="52">ARCH</text>
1334                           
1335 <!--            
1336                 <text class="specsvalue"
1337               x="{($BLKD_SPECS_W + 1) - (string-length($blkd_arch) * 6.5)}"
1338                           y="52"><xsl:value-of select="$blkd_arch"/></text>
1339 -->             
1340                 <text class="specsvaluemid"
1341               x="{($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)}"
1342                           y="52"><xsl:value-of select="$iArch"/></text>
1343                           
1344                 <rect 
1345               x="0"
1346                           y="60"
1347                       width= "{$BLKD_SPECS_W}"
1348                       height="16"
1349                           style="fill:{$COL_BG_LT}; stroke:none;"/>             
1350                           
1351                 <text class="specsheader"
1352               x="4"
1353                           y="72">PART</text>
1354                           
1355 <!--            
1356                 <text class="specsvalue"
1357               x="{($BLKD_SPECS_W  + 1) - ((string-length($blkd_part) + 2) * 6.5)}"
1358                           y="72"><xsl:value-of select="$blkd_part"/></text>
1359 -->             
1360                 <text class="specsvaluemid"
1361               x="{($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)}"
1362                           y="72"><xsl:value-of select="$iPart"/></text>
1363                           
1364                 <rect 
1365               x="0"
1366                           y="80"
1367                       width= "{$BLKD_SPECS_W}"
1368                       height="16"
1369                           style="fill:{$COL_BG_LT}; stroke:none;"/>             
1370                           
1371                 <text class="specsheader"
1372               x="4"
1373                           y="92">GENERATED</text>
1374                           
1375                 <text class="specsvalue"
1376               x="{($BLKD_SPECS_W  + 1) - (string-length($iTimeStamp) * 6.5)}"
1377                           y="92"><xsl:value-of select="$iTimeStamp"/></text>
1378                           
1379                           
1380         </symbol>       
1381 </xsl:template>
1382         
1383
1384         
1385
1386 </xsl:stylesheet>
1387
1388 <!-- =========================================================================== -->
1389 <!--                          FUNCTION TEMPLATE                                  -->
1390 <!--                                                                                                                                                     -->
1391 <!-- =========================================================================== -->