]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/__xps/.dswkshop/MdtSvgBLKD_Busses.xsl
41a472e2e90260f514d68fd359b03ec34626ab32
[freertos] / FreeRTOS / Demo / PPC405_FPU_Xilinx_Virtex4_GCC / __xps / .dswkshop / MdtSvgBLKD_Busses.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:xsl="http://www.w3.org/1999/XSL/Transform"
5            xmlns:exsl="http://exslt.org/common"
6            xmlns:xlink="http://www.w3.org/1999/xlink">
7                 
8 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"
9                doctype-public="-//W3C//DTD SVG 1.0//EN"
10                    doctype-system="http://www.w3.org/TR/SVG/DTD/svg10.dtd"/>
11                 
12
13         
14 <xsl:template name="Define_Busses">
15 <!--    
16         <xsl:param name="drawarea_w"  select="500"/>
17         <xsl:param name="drawarea_h"  select="500"/>
18 -->     
19         
20         <xsl:for-each select="exsl:node-set($COL_BUSSTDS)/BUSCOLOR">
21                 
22                 <xsl:call-template name="Define_BusArrowsEastWest"> 
23                         <xsl:with-param name="iBusType"    select="@BUSSTD"/>
24                 </xsl:call-template>
25                 
26                 <xsl:call-template name="Define_BusArrowsNorthSouth"> 
27                         <xsl:with-param name="iBusType"    select="@BUSSTD"/>
28                 </xsl:call-template>
29                 
30                 <xsl:call-template name="Define_SplitBusses"> 
31                         <xsl:with-param name="iBusType"    select="@BUSSTD"/>
32                 </xsl:call-template>
33                 
34         </xsl:for-each>
35         
36         <xsl:call-template name="Define_SharedBus"> 
37                 <xsl:with-param name="iBusType"    select="'PLB'"/>
38         </xsl:call-template>
39         
40         <xsl:call-template name="Define_SharedBus"> 
41                 <xsl:with-param name="iBusType"    select="'PLBV46'"/>
42         </xsl:call-template>
43         
44         <xsl:call-template name="Define_SharedBus"> 
45                 <xsl:with-param name="iBusType"    select="'OPB'"/>
46         </xsl:call-template>
47         
48         <xsl:call-template name="Define_SharedBus_Group"/> 
49         
50 </xsl:template>
51
52 <xsl:template name="Define_BusArrowsEastWest"> 
53         <xsl:param name="iBusType"    select="'OPB'"/>
54         
55         <xsl:variable name="bus_col_">
56                 <xsl:call-template name="BusType2Color">
57                         <xsl:with-param name="iBusType" select="$iBusType"/>
58                 </xsl:call-template>    
59         </xsl:variable>
60         
61         <xsl:variable name="bus_col_lt_">
62                 <xsl:call-template name="BusType2LightColor">
63                         <xsl:with-param name="iBusType" select="$iBusType"/>
64                 </xsl:call-template>    
65         </xsl:variable>
66         
67         <symbol id="{$iBusType}_BusArrowEast">
68                 <path class="bus"
69                           d="M   0,0
70                                  L     {$BLKD_BUS_ARROW_W}, {ceiling($BLKD_BUS_ARROW_H div 2)}
71                                  L   0,{$BLKD_BUS_ARROW_H}, 
72                                  Z" style="stroke:none; fill:{$bus_col_}"/>
73         </symbol>
74         
75         <symbol id="{$iBusType}_BusArrowWest">
76                 <use   x="0"   y="0"  xlink:href="#{$iBusType}_BusArrowEast" transform="scale(-1,1) translate({$BLKD_BUS_ARROW_W * -1},0)"/>
77         </symbol>
78         
79         <symbol id="{$iBusType}_BusArrowHInitiator">
80                 <rect x="0" 
81                           y="{$BLKD_BUS_ARROW_G}"  
82                           width= "{$BLKD_BUS_ARROW_W}" 
83                           height="{$BLKD_P2P_BUS_W}" 
84                          style="stroke:none; fill:{$bus_col_}"/>
85         </symbol>
86         
87 </xsl:template>
88
89 <!--    
90         <xsl:param name="bus_col"     select="'OPB'"/>
91 -->     
92
93 <xsl:template name="Define_BusArrowsNorthSouth">
94         <xsl:param name="iBusType"    select="'OPB'"/>
95         
96         <xsl:variable name="busColor_">
97                 <xsl:call-template name="BusType2Color">
98                         <xsl:with-param name="iBusType" select="$iBusType"/>
99                 </xsl:call-template>    
100         </xsl:variable>
101         
102         <xsl:variable name="busColor_lt_">
103                 <xsl:call-template name="BusType2LightColor">
104                         <xsl:with-param name="iBusType" select="$iBusType"/>
105                 </xsl:call-template>    
106         </xsl:variable>
107         
108         <symbol id="{$iBusType}_BusArrowSouth">
109                 <path class="bus"
110                           d="M   0,0
111                                  L   {$BLKD_BUS_ARROW_H},0
112                                  L   {ceiling($BLKD_BUS_ARROW_H div 2)}, {$BLKD_BUS_ARROW_W}
113                                  Z" style="stroke:none; fill:{$busColor_}"/>
114         </symbol>
115         
116         <symbol id="{$iBusType}_BusArrowNorth">
117                 <use   x="0"   y="0"  xlink:href="#{$iBusType}_BusArrowSouth" transform="scale(1,-1) translate(0,{$BLKD_BUS_ARROW_H * -1})"/>
118         </symbol>
119         
120         <symbol id="{$iBusType}_BusArrowInitiator">
121                 <rect x="{$BLKD_BUS_ARROW_G}" 
122                           y="0"  
123                           width= "{$BLKD_BUS_ARROW_W - ($BLKD_BUS_ARROW_G * 2)}" 
124                           height="{$BLKD_BUS_ARROW_H}" 
125                          style="stroke:none; fill:{$busColor_}"/>
126         </symbol>
127         
128 </xsl:template>
129         
130
131 <xsl:template name="Draw_P2PBus">
132         
133         <xsl:param name="iBusX"    select="0"/>
134         <xsl:param name="iBusTop"  select="0"/>
135         <xsl:param name="iBusBot"  select="0"/>
136         <xsl:param name="iBotRnk"  select="'_unk_'"/>
137         <xsl:param name="iTopRnk"  select="'_unk_'"/>
138         <xsl:param name="iBusStd"  select="'_bstd_'"/>
139         <xsl:param name="iBusName" select="'_p2pbus_'"/>
140         
141         <xsl:variable name="busColor_">
142                 <xsl:choose>
143                         
144                         <xsl:when test="@BUSSTD">
145                                 <xsl:call-template name="BusType2Color">
146                                         <xsl:with-param name="iBusType" select="@BUSSTD"/>
147                                 </xsl:call-template>    
148                         </xsl:when>
149                         
150                         <xsl:when test="not($iBusStd = '_bstd_')">
151                                 <xsl:call-template name="BusType2Color">
152                                         <xsl:with-param name="iBusType" select="$iBusStd"/>
153                                 </xsl:call-template>    
154                         </xsl:when>
155                         
156                         <xsl:otherwise>
157                                 <xsl:call-template name="BusType2Color">
158                                         <xsl:with-param name="iBusType" select="'TRS'"/>
159                                 </xsl:call-template>    
160                         </xsl:otherwise>
161                         
162                 </xsl:choose>
163         </xsl:variable>
164         
165         <xsl:variable name="p2pH_" select="($iBusBot - $iBusTop) - ($BLKD_BUS_ARROW_H * 2)"/>
166
167         <xsl:variable name="botArrow_">
168                 <xsl:choose>
169                         <xsl:when test="((($iBotRnk = 'INITIATOR') or ($iBotRnk = 'MASTER')) and ($iBusStd = 'FSL'))">BusArrowInitiator</xsl:when>
170                         <xsl:otherwise>BusArrowSouth</xsl:otherwise> 
171                 </xsl:choose>           
172         </xsl:variable>
173         
174         <xsl:variable name="topArrow_">
175                 <xsl:choose>
176                         <xsl:when test="((($iTopRnk = 'INITIATOR') or ($iTopRnk = 'MASTER')) and ($iBusStd = 'FSL'))">BusArrowInitiator</xsl:when>
177                         <xsl:otherwise>BusArrowNorth</xsl:otherwise> 
178                 </xsl:choose>           
179         </xsl:variable>
180         
181         <xsl:if test="@BUSSTD">         
182                 <use  x="{($iBusX + ceiling($BLKD_BIFC_W div 2)) - ceiling($BLKD_BUS_ARROW_W div 2)}"  
183                       y="{$iBusTop + ($BLKD_BIFC_H  - $BLKD_BUS_ARROW_H) + $BLKD_BUS_ARROW_H}"  
184                       xlink:href="#{@BUSSTD}_{$topArrow_}"/>    
185                   
186                 <use  x="{($busX + ceiling($BLKD_BIFC_W div 2)) - ceiling($BLKD_BUS_ARROW_W div 2)}"  
187                       y="{$busBot - $BLKD_BUS_ARROW_H}"  
188                       xlink:href="#{@BUSSTD}_{$botArrow_}"/>    
189         </xsl:if>                 
190         
191         <xsl:if test="(not(@BUSSTD) and not($busStd = '_bstd_'))">              
192                 <use  x="{($iBusX + ceiling($BLKD_BIFC_W div 2)) - ceiling($BLKD_BUS_ARROW_W div 2)}"  
193                       y="{$iBusTop + ($BLKD_BIFC_H  - $BLKD_BUS_ARROW_H) + $BLKD_BUS_ARROW_H}"  
194                       xlink:href="#{$iBusStd}_{$topArrow_}"/>   
195                   
196                 <use  x="{($iBusX + ceiling($BLKD_BIFC_W div 2)) - ceiling($BLKD_BUS_ARROW_W div 2)}"  
197                       y="{$iBusBot - $BLKD_BUS_ARROW_H}"  
198                       xlink:href="#{$iBusStd}_{$botArrow_}"/>   
199         </xsl:if>                 
200         
201         
202         <rect x="{($iBusX + ceiling($BLKD_BIFC_W div 2)) - ceiling($BLKD_BUS_ARROW_W div 2) + $BLKD_BUS_ARROW_G}"  
203                   y="{$iBusTop + $BLKD_BIFC_H + $BLKD_BUS_ARROW_H}"  
204                   height= "{$p2pH_  - ($BLKD_BUS_ARROW_H * 2)}" 
205                   width="{$BLKD_BUS_ARROW_W - ($BLKD_BUS_ARROW_G * 2)}" 
206                   style="stroke:none; fill:{$busColor_}"/>
207                   
208         <text class="p2pbuslabel" 
209                           x="{$iBusX   + $BLKD_BUS_ARROW_W + ceiling($BLKD_BUS_ARROW_W div 2) + ceiling($BLKD_BUS_ARROW_W div 4) + 4}"
210                           y="{$iBusTop + ($BLKD_BUS_ARROW_H * 3)}">
211                         <xsl:value-of select="$iBusName"/>
212         </text>
213         
214         <xsl:if test="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iBusName)]/@GROUP">
215                 
216            <text class="ioplblgrp" 
217                   x="{$iBusX   +  $BLKD_BUS_ARROW_W + ceiling($BLKD_BUS_ARROW_W div 2) + ceiling($BLKD_BUS_ARROW_W div 4) + 6}"
218                   y="{$iBusTop + ($BLKD_BUS_ARROW_H * 10)}">
219                            <xsl:value-of select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE=$iBusName)]/@GROUP"/>
220                 </text>
221            
222         </xsl:if>       
223                 
224 </xsl:template>
225
226         
227 <xsl:template name="Draw_Proc2ProcBus">
228         
229         <xsl:param name="iBc_Y"     select="0"/>
230         <xsl:param name="iBcLeft_X" select="0"/>
231         <xsl:param name="iBcRght_X" select="0"/>
232         <xsl:param name="iLeftRnk"  select="'_unk_'"/>
233         <xsl:param name="iRghtRnk"  select="'_unk_'"/>
234         <xsl:param name="iBusStd"   select="'_bstd_'"/>
235         <xsl:param name="iBusName"  select="'_p2pbus_'"/>
236         
237         <xsl:variable name="busColor_">
238                 <xsl:call-template name="BusType2Color">
239                         <xsl:with-param name="iBusType" select="$iBusStd"/>
240                 </xsl:call-template>    
241         </xsl:variable>
242         
243         <xsl:variable name="pr2pr_W_" select="($iBcRght_X - $iBcLeft_X)"/>
244
245         <xsl:variable name="leftArrow_">
246                 <xsl:choose>
247                         <xsl:when test="((($iLeftRnk = 'INITIATOR') or ($iLeftRnk = 'MASTER')) and ($iBusStd = 'FSL'))">BusArrowHInitiator</xsl:when>
248                         <xsl:otherwise>BusArrowWest</xsl:otherwise> 
249                 </xsl:choose>           
250         </xsl:variable>
251         
252         <xsl:variable name="rghtArrow_">
253                 <xsl:choose>
254                         <xsl:when test="((($iRghtRnk = 'INITIATOR') or ($iRghtRnk = 'MASTER')) and ($iBusStd = 'FSL'))">BusArrowHInitiator</xsl:when>
255                         <xsl:otherwise>BusArrowEast</xsl:otherwise> 
256                 </xsl:choose>           
257         </xsl:variable>
258         
259         
260         <xsl:variable name="bus_Y_" select="($iBc_Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2))"/>
261         
262         <use  x="{$iBcLeft_X}"                     y="{$bus_Y_}"  xlink:href="#{$iBusStd}_{$leftArrow_}"/>      
263         <use  x="{$iBcRght_X - $BLKD_BUS_ARROW_W}" y="{$bus_Y_}"  xlink:href="#{$iBusStd}_{$rghtArrow_}"/>      
264         
265         <rect x="{$iBcLeft_X + $BLKD_BUS_ARROW_W}" 
266                   y="{$bus_Y_    + $BLKD_BUS_ARROW_G}"  
267                   width= "{$pr2pr_W_    -      (2 * $BLKD_BUS_ARROW_W)}" 
268                   height="{$BLKD_BUS_ARROW_H - (2 * $BLKD_BUS_ARROW_G)}" style="stroke:none; fill:{$busColor_}"/>
269         
270         <text class="horizp2pbuslabel" 
271                           x="{$iBcLeft_X  + $BLKD_BUS_ARROW_W + ceiling($BLKD_BUS_ARROW_W div 2) + ceiling($BLKD_BUS_ARROW_W div 4) + 4}"
272                           y="{($bus_Y_)}"><xsl:value-of select="$iBusName"/></text>
273         
274         <text class="horizp2pbuslabel" 
275                           x="{$iBcRght_X - (string-length($iBusName) * 8)}"
276                           y="{($bus_Y_)}"><xsl:value-of select="$iBusName"/></text>
277         
278 </xsl:template>
279         
280         
281 <xsl:template name="Draw_SplitConnBus">
282         
283         <xsl:param name="iBc_X"     select="0"/>
284         <xsl:param name="iBc_Y"     select="0"/>
285         <xsl:param name="iBc_Rnk"   select="'_unk_'"/>
286         <xsl:param name="iBc_Side"  select="'_unk_'"/>
287         
288         <xsl:param name="iBusStd"   select="'_bstd_'"/>
289         <xsl:param name="iBusName"  select="'_p2pbus_'"/>
290         
291         <xsl:variable name="busColor_">
292                 <xsl:call-template name="BusType2Color">
293                         <xsl:with-param name="iBusType" select="$iBusStd"/>
294                 </xsl:call-template>    
295         </xsl:variable>
296         
297         <xsl:variable name="connArrow_">
298                 <xsl:choose>
299                         <xsl:when test="((($iBc_Rnk = 'INITIATOR') or ($iBc_Rnk = 'MASTER')) and ($iBusStd = 'FSL'))">BusArrowHInitiator</xsl:when>
300                         <xsl:otherwise>BusArrowEast</xsl:otherwise> 
301                 </xsl:choose>           
302         </xsl:variable>
303         
304         <xsl:variable name="arrow_Y_" select="($iBc_Y + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_BUS_ARROW_H div 2))"/>
305         
306         <xsl:variable name="bus_X_">
307                 <xsl:choose>
308                         <xsl:when test="$iBc_Side = '0'"><xsl:value-of select="($iBc_X - ($BLKD_BUS_ARROW_W * 2))"/></xsl:when>
309                         <xsl:when test="$iBc_Side = '1'"><xsl:value-of select="($iBc_X + $BLKD_BIFC_W + $BLKD_BUS_ARROW_W)"/></xsl:when>
310                 </xsl:choose>           
311         </xsl:variable> 
312         
313 <!--    
314         <use  x="{$bus_X_}"  y="{$arrow_Y_}"  xlink:href="#{$busStd}_BusArrowHInitiator"/>      
315 -->     
316         
317         <xsl:variable name="arrow_X_">
318                 <xsl:choose>
319                         <xsl:when test="$iBc_Side = '0'"><xsl:value-of select="($iBc_X - $BLKD_BUS_ARROW_W)"/></xsl:when>
320                         <xsl:when test="$iBc_Side = '1'"><xsl:value-of select="($iBc_X + $BLKD_BIFC_W)"/></xsl:when>
321                 </xsl:choose>           
322         </xsl:variable> 
323         
324 <!--    
325         <xsl:message>The bus name is <xsl:value-of select="$busName"/></xsl:message>
326         <xsl:message>The bif side is <xsl:value-of select="$bc_Side"/></xsl:message>
327         <xsl:message>The bif rank is <xsl:value-of select="$bc_Rnk"/></xsl:message>
328 -->     
329         <xsl:choose>
330                 <xsl:when test="(($iBusStd = 'FSL') and (($iBc_Rnk = 'MASTER') or ($iBc_Rnk = 'INITIATOR')))">
331                         <use  x="{$arrow_X_}"  y="{$arrow_Y_}"  xlink:href="#{$iBusStd}_{$connArrow_}"/>        
332                         <use  x="{$bus_X_}"    y="{$arrow_Y_}"  xlink:href="#{$iBusStd}_BusArrowHInitiator"/>   
333                 </xsl:when>
334                 <xsl:when test="(($iBc_Side = '1') and not($iBusStd = 'FSL') and (($iBc_Rnk = 'MASTER') or ($iBc_Rnk = 'INITIATOR')))">
335                         <use  x="{$arrow_X_ - $BLKD_BIFC_W}"  y="{$arrow_Y_}"  xlink:href="#{$iBusStd}_SplitBus_WEST"/>
336                 </xsl:when>
337                 <xsl:when test="(($iBc_Side = '1') and (($iBc_Rnk = 'SLAVE') or ($iBc_Rnk = 'TARGET') or ($iBc_Rnk = 'TRANSPARENT')))">
338                         <use  x="{$arrow_X_}"  y="{$arrow_Y_}"  xlink:href="#{$iBusStd}_SplitBus_EAST"/>
339                 </xsl:when>
340                 <xsl:otherwise>
341                         <use  x="{$arrow_X_}" y="{$arrow_Y_}" xlink:href="#{$iBusStd}_{$connArrow_}"/>  
342                         <use  x="{$bus_X_}"   y="{$arrow_Y_}"   xlink:href="#{$iBusStd}_BusArrowHInitiator"/>   
343                 </xsl:otherwise>
344         </xsl:choose>
345         
346         <xsl:variable name="text_X_">
347                 <xsl:choose>
348                         <xsl:when test="$iBc_Side = '0'"><xsl:value-of select="($bus_X_ - $BLKD_BUS_ARROW_W - (string-length($iBusName) * 5))"/></xsl:when>
349                         <xsl:when test="$iBc_Side = '1'"><xsl:value-of select="($bus_X_ + $BLKD_BUS_ARROW_W)"/></xsl:when>
350                 </xsl:choose>           
351         </xsl:variable> 
352                 
353         
354         <text class="horizp2pbuslabel" 
355                           x="{$text_X_}"
356                           y="{($arrow_Y_)}">
357                         <xsl:value-of select="$iBusName"/>
358         </text>
359         
360 </xsl:template>
361         
362         
363 <xsl:template name="Define_SharedBus"> 
364         
365         <xsl:param name="iBusType"    select="'OPB'"/>
366         
367         <xsl:variable name="sharedbus_w_"  select="($G_total_drawarea_W - ($BLKD_INNER_GAP * 2))"/>
368         
369         <xsl:variable name="bus_col_">
370                 <xsl:call-template name="BusType2Color">
371                         <xsl:with-param name="iBusType" select="$iBusType"/>
372                 </xsl:call-template>    
373         </xsl:variable>
374         
375         <xsl:variable name="bus_col_lt_">
376                 <xsl:call-template name="BusType2LightColor">
377                         <xsl:with-param name="iBusType" select="$iBusType"/>
378                 </xsl:call-template>    
379         </xsl:variable>
380         
381          <symbol id="{$iBusType}_SharedBus">
382                 <use  x="0"                                   y="0"  xlink:href="#{$iBusType}_BusArrowWest"/>   
383                 <use  x="{$sharedbus_w_ - $BLKD_BUS_ARROW_W}" y="0"  xlink:href="#{$iBusType}_BusArrowEast"/>   
384                 
385                 <rect x="{$BLKD_BUS_ARROW_W}" 
386                           y="{$BLKD_BUS_ARROW_G}"  
387                           width= "{$sharedbus_w_  - ($BLKD_BUS_ARROW_W * 2)}" 
388                           height="{$BLKD_BUS_ARROW_H - (2 * $BLKD_BUS_ARROW_G)}" style="stroke:none; fill:{$bus_col_}"/>
389         </symbol>
390 </xsl:template>
391
392         
393 <xsl:template name="Define_SplitBusses"> 
394         
395         <xsl:param name="iBusType"    sselect="'FSL'"/>
396         
397         <xsl:variable name="busColor_">
398                 <xsl:call-template name="BusType2Color">
399                         <xsl:with-param name="iBusType" select="$iBusType"/>
400                 </xsl:call-template>    
401         </xsl:variable>
402         
403         <xsl:variable name="bifc_r_" select="ceiling($BLKD_BIFC_W div 3)"/>
404         
405          <symbol id="{$iBusType}_SplitBus_EAST">
406                 <use  x="0"  y="0"    xlink:href="#{$iBusType}_BusArrowWest"/>  
407                 
408                 <rect x="{$BLKD_BUS_ARROW_W}" 
409                           y="{$BLKD_BUS_ARROW_G}"  
410                           width= "{$BLKD_BIFC_W}" 
411                           height="{$BLKD_BUS_ARROW_H - (2 * $BLKD_BUS_ARROW_G)}" style="stroke:none; fill:{$busColor_}"/>
412                  
413         </symbol>
414         
415         <xsl:variable name="splbus_w_" select="($BLKD_BUS_ARROW_W + $BLKD_BIFC_W + $BLKD_BIFC_Wi)"/>
416         
417          <symbol id="{$iBusType}_SplitBus_WEST">
418                 <use   x="0"   y="0"  xlink:href="#{$iBusType}_SplitBus_EAST" transform="scale(-1,1) translate({$splbus_w_ * -1},0)"/>
419         </symbol>
420         
421          <symbol id="{$iBusType}_SplitBus_OneWay">
422                  
423                 <rect x="0" 
424                           y="{$BLKD_BUS_ARROW_G}"  
425                           width= "{($BLKD_BUS_ARROW_W * 2)}" 
426                           height="{$BLKD_BUS_ARROW_H - (2 * $BLKD_BUS_ARROW_G)}" style="stroke:none; fill:{$busColor_}"/>
427                  
428                 <rect x="{($BLKD_BUS_ARROW_W * 2)}"
429                           y="0"  
430                           width= "{$BLKD_BUS_ARROW_H}" 
431                           height="{$BLKD_BUS_ARROW_H}" style="stroke:none; fill:{$busColor_}"/>
432                  
433         </symbol>
434         
435         
436 </xsl:template>
437
438
439 <xsl:template name="Define_SharedBus_Group"> 
440
441 <!-- The Bridges go into the shared bus shape -->
442         <xsl:for-each select="/EDKSYSTEM/BLKDSHAPES/BRIDGESHAPES/MODULE">       
443         
444                 <xsl:variable name="modInst_" select="@INSTANCE"/>
445                 <xsl:variable name="modType_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInst_)]/@MODTYPE"/>
446                 
447                 <xsl:call-template name="Define_Peripheral"> 
448                         <xsl:with-param name="iModVori"  select="'normal'"/>
449                         <xsl:with-param name="iModInst"  select="$modInst_"/>
450                         <xsl:with-param name="iModType"  select="$modType_"/>
451                 </xsl:call-template>
452         
453         </xsl:for-each>
454         
455  <symbol id="group_sharedBusses">
456         
457         <!-- Draw the shared bus shapes first -->       
458         <xsl:for-each select="BLKDSHAPES/SBSSHAPES/MODULE">     
459                 <xsl:variable name="instance_"  select="@INSTANCE"/>
460                 
461                 <xsl:variable name="busStd_"   select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $instance_)]/@BUSSTD"/>   
462                 <xsl:variable name="busIndex_" select="/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $instance_)]/@BUSINDEX"/> 
463                 
464                 <xsl:variable name="busY_"  select="($busIndex_ * $BLKD_SBS_LANE_H)"/>  
465                 
466                 <use  x="0"  y="{$busY_}"  xlink:href="#{$busStd_}_SharedBus"/> 
467                 
468                 <text class="sharedbuslabel" 
469                           x="8"
470                           y="{$busY_ + $BLKD_BUS_ARROW_H + 10}">
471                         <xsl:value-of select="$instance_"/>
472                 </text>
473                 
474         </xsl:for-each>
475 </symbol>       
476
477  <symbol id="KEY_SharedBus">
478         <use  x="0"  y="0"  xlink:href="#KEY_BusArrowWest"/>    
479         <use  x="30" y="0"  xlink:href="#KEY_BusArrowEast"/>    
480          
481         <xsl:variable name="key_col_">
482                 <xsl:call-template name="BusType2Color">
483                         <xsl:with-param name="iBusType" select="'KEY'"/>
484                 </xsl:call-template>    
485         </xsl:variable>
486                 
487         <rect x="{$BLKD_BUS_ARROW_W}" 
488                   y="{$BLKD_BUS_ARROW_G}"  
489                   width= "{30 - $BLKD_BUS_ARROW_W}" 
490                   height="{$BLKD_BUS_ARROW_H - (2 * $BLKD_BUS_ARROW_G)}" style="stroke:none; fill:{$key_col_}"/>
491 </symbol>
492         
493 </xsl:template>
494         
495 </xsl:stylesheet>