]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/__xps/.dswkshop/MdtTinySvgDiag_BifShapes.xsl
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / PPC440_DP_FPU_Xilinx_Virtex5_GCC / __xps / .dswkshop / MdtTinySvgDiag_BifShapes.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 <!-- ======================= DEF BLOCK =================================== -->
13
14 <xsl:template name="Define_ConnectedBifTypes">
15
16         <xsl:for-each select="exsl:node-set($COL_BUSSTDS)/BUSCOLOR">
17                 <xsl:variable name="busStd_" select="@BUSSTD"/>
18         
19                 <xsl:for-each select="exsl:node-set($G_BIFTYPES)/BIFTYPE">
20                         <xsl:variable name="bifType_" select="@TYPE"/>
21                         
22                         <xsl:variable name="connectedBifs_cnt_"  select="count($G_ROOT/EDKSYSTEM/MODULES/MODULE/BUSINTERFACE[((@IS_INMHS = 'TRUE') and (@TYPE = $bifType_) and (@BUSSTD = $busStd_))])"/>
23                         
24                         <xsl:if test="($connectedBifs_cnt_ &gt; 0)">
25 <!-- 
26                                 <xsl:message>DEBUG : Connected BifType : <xsl:value-of select="$busStd_"/> : <xsl:value-of select="@TYPE"/> : <xsl:value-of select="$connectedBifs_cnt_"/> </xsl:message> 
27 -->                             
28                                 <xsl:call-template name="Define_BifTypeConnector"> 
29                                         <xsl:with-param name="iBusStd"  select="$busStd_"/>
30                                         <xsl:with-param name="iBifType" select="$bifType_"/>
31                                 </xsl:call-template>
32                                 
33                                 <xsl:call-template name="Define_BifLabel"> 
34                                         <xsl:with-param name="iBusStd"  select="$busStd_"/>
35                                 </xsl:call-template>
36                                 
37                         </xsl:if>
38                         
39                 </xsl:for-each>
40                 
41         </xsl:for-each>
42         
43         <xsl:for-each select="exsl:node-set($G_BIFTYPES)/BIFTYPE">
44                 <xsl:variable name="bifType_" select="@TYPE"/>
45         
46                 <xsl:call-template name="Define_BifTypeConnector"> 
47                         <xsl:with-param name="iBusStd"  select="'KEY'"/>
48                         <xsl:with-param name="iBifType" select="$bifType_"/>
49                 </xsl:call-template>
50                         
51                 <xsl:call-template name="Define_BifLabel"> 
52                         <xsl:with-param name="iBusStd"  select="'KEY'"/>
53                 </xsl:call-template>
54         </xsl:for-each> 
55         
56 </xsl:template>
57
58 <xsl:template name="Define_BifLabel"> 
59         
60         <xsl:param name="iBusStd"    select="'OPB'"/>
61         
62         <xsl:variable name="busStdColor_">
63                 <xsl:call-template name="F_BusStd2RGB">
64                         <xsl:with-param name="iBusStd" select="$iBusStd"/>
65                 </xsl:call-template>    
66         </xsl:variable>
67                         
68     <g id="{$iBusStd}_BifLabel">
69                 <rect x="0"  
70                           y="0" 
71                           rx="3"
72                           ry="3"
73                           width= "{$BIF_W}" 
74                           height="{$BIF_H}" 
75                           style="fill:{$busStdColor_}; stroke:black; stroke-width:1"/> 
76         </g>
77         
78 </xsl:template>
79
80
81 <xsl:template name="Define_BifTypeConnector"> 
82         
83         <xsl:param name="iBusStd"     select="'OPB'"/>
84         <xsl:param name="iBifType"    select="'USER'"/>
85         
86         <xsl:variable name="busStdColor_">
87                 <xsl:call-template name="F_BusStd2RGB">
88                         <xsl:with-param name="iBusStd" select="$iBusStd"/>
89                 </xsl:call-template>    
90         </xsl:variable>
91         
92         <xsl:variable name="busStdColor_lt_">
93                 <xsl:call-template name="F_BusStd2RGB_LT">
94                         <xsl:with-param name="iBusStd" select="$iBusStd"/>
95                 </xsl:call-template>    
96         </xsl:variable>
97         
98         <xsl:variable name="bifc_wi_" select="ceiling($BIFC_W div 3)"/>
99         <xsl:variable name="bifc_hi_" select="ceiling($BIFC_H div 3)"/>
100         
101         <xsl:choose>
102         
103                 <xsl:when test="$iBifType = 'SLAVE'">
104                 <g id="{$iBusStd}_busconn_{$iBifType}">
105                                 <circle 
106                                         cx="{ceiling($BIFC_W div 2)}"  
107                                         cy="{ceiling($BIFC_H div 2)}" 
108                                         r="{ceiling($BIFC_W  div 2)}" 
109                                         style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
110                                 <circle 
111                                         cx="{ceiling($BIFC_W div 2) + 0.5}"  
112                                         cy="{ceiling($BIFC_H div 2)}" 
113                                         r="{ceiling($BIFC_Wi div 2)}" 
114                                         style="fill:{$busStdColor_}; stroke:none;"/> 
115                         </g>
116                 </xsl:when>
117         
118                 <xsl:when test="$iBifType = 'MASTER'">
119                 <g id="{$iBusStd}_busconn_{$iBifType}">
120                                 <rect x="0"  
121                                           y="0" 
122                                           width= "{$BIFC_W}" 
123                                           height="{$BIFC_H}" 
124                                           style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
125                                 <rect x="{$BIFC_dx + 0.5}"  
126                                           y="{$BIFC_dy}" 
127                                           width= "{$BIFC_Wi}" 
128                                           height="{$BIFC_Hi}" 
129                                           style="fill:{$busStdColor_}; stroke:none;"/> 
130                         </g>
131                 </xsl:when>
132                 
133                 <xsl:when test="$iBifType = 'INITIATOR'">
134                 <g id="{$iBusStd}_busconn_{$iBifType}">
135                                 <rect x="0"  
136                                           y="0" 
137                                   width= "{$BIFC_W}" 
138                                   height="{$BIFC_H}" 
139                                   style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
140                                 <rect x="{$BIFC_dx + 0.5}"  
141                                           y="{$BIFC_dy}" 
142                                   width= "{$BIFC_Wi}" 
143                                   height="{$BIFC_Hi}" 
144                                       style="fill:{$busStdColor_}; stroke:none;"/> 
145                         </g>
146                 </xsl:when>
147                 
148                 <xsl:when test="$iBifType = 'TARGET'">
149                 <g id="{$iBusStd}_busconn_{$iBifType}">
150                                 <circle 
151                                         cx="{ceiling($BIFC_W div 2)}"  
152                                         cy="{ceiling($BIFC_H div 2)}" 
153                                         r="{ceiling($BIFC_W  div 2)}" 
154                                         style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
155                                 <circle 
156                                         cx="{ceiling($BIFC_W div 2) + 0.5}"  
157                                         cy="{ceiling($BIFC_H div 2)}" 
158                                         r="{ceiling($BIFC_Wi div 2)}" 
159                                         style="fill:{$busStdColor_}; stroke:none;"/> 
160                         </g>
161                 </xsl:when>
162                 
163                 <xsl:when test="$iBifType = 'MASTER_SLAVE'">
164                 <g id="{$iBusStd}_busconn_{$iBifType}">
165                                 <circle 
166                                         cx="{ceiling($BIFC_W div 2)}"  
167                                         cy="{ceiling($BIFC_H div 2)}" 
168                                         r="{ceiling($BIFC_W  div 2)}" 
169                                         style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
170                                 <circle 
171                                         cx="{ceiling($BIFC_W div 2) + 0.5}"  
172                                         cy="{ceiling($BIFC_H div 2)}" 
173                                         r="{ceiling($BIFC_Wi div 2)}" 
174                                         style="fill:{$busStdColor_}; stroke:none;"/> 
175                                 <rect 
176                                         x="0"  
177                                         y="{ceiling($BIFC_H div 2)}" 
178                                         width= "{$BIFC_W}" 
179                                         height="{ceiling($BIFC_H div 2)}" 
180                                         style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
181                                 <rect 
182                                         x="{$BIFC_dx + 0.5}"  
183                                         y="{ceiling($BIFC_H div 2)}" 
184                                         width= "{$BIFC_Wi}" 
185                                         height="{ceiling($BIFC_Hi div 2)}" 
186                                         style="fill:{$busStdColor_}; stroke:none;"/> 
187                         </g>
188                 </xsl:when>
189                 
190                 <xsl:when test="$iBifType = 'MONITOR'">
191                         <g id="{$iBusStd}_busconn_{$iBifType}">
192                                 <rect 
193                                         x="0"  
194                                         y="0.5" 
195                                         width= "{$BIFC_W}" 
196                                         height="{ceiling($BIFC_Hi div 2)}" 
197                                         style="fill:{$busStdColor_}; stroke:none;"/> 
198                                 <rect 
199                                         x="0"  
200                                         y="{ceiling($BIFC_H div 2) + 4}" 
201                                         width= "{$BIFC_W}" 
202                                         height="{ceiling($BIFC_Hi div 2)}" 
203                                         style="fill:{$busStdColor_}; stroke:none;"/> 
204                         </g>
205                 </xsl:when>
206                 
207                 <xsl:when test="$iBifType  = 'USER'">
208                 <g id="{$iBusStd}_busconn_USER">
209                                 <circle 
210                                         cx="{ceiling($BIFC_W div 2)}"  
211                                         cy="{ceiling($BIFC_H div 2)}" 
212                                         r="{ceiling($BIFC_W  div 2)}" 
213                                         style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
214                                 <circle 
215                                         cx="{ceiling($BIFC_W div 2) + 0.5}"  
216                                         cy="{ceiling($BIFC_H div 2)}" 
217                                         r="{ceiling($BIFC_Wi div 2)}" 
218                                         style="fill:{$busStdColor_}; stroke:none;"/> 
219                         </g>
220                 </xsl:when>
221                 
222                 <xsl:otherwise>
223                 <g id="{$iBusStd}_busconn_{$iBifType}">
224                                 <circle 
225                                         cx="{ceiling($BIFC_W div 2)}"  
226                                         cy="{ceiling($BIFC_H div 2)}" 
227                                         r="{ceiling($BIFC_W  div 2)}" 
228                                         style="fill:{$COL_WHITE}; stroke:{$busStdColor_}; stroke-width:1"/> 
229                                 <circle 
230                                         cx="{ceiling($BIFC_W div 2) + 0.5}"  
231                                         cy="{ceiling($BIFC_H div 2)}" 
232                                         r="{ceiling($BIFC_Wi div 2)}" 
233                                         style="fill:{$COL_WHITE}; stroke:none;"/> 
234                         </g>
235                 </xsl:otherwise>
236         </xsl:choose>
237         
238 </xsl:template>
239
240
241 </xsl:stylesheet>