]> git.sur5r.net Git - freertos/blob
160f2d8bee650a4d609ad1ddcdc6ef12afb94b05
[freertos] /
1 <?xml version="1.0" standalone="no"?>
2 <xsl:stylesheet  version="1.0"
3            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4        xmlns:exsl="http://exslt.org/common"
5        xmlns:dyn="http://exslt.org/dynamic"
6        xmlns:math="http://exslt.org/math"
7        xmlns:xlink="http://www.w3.org/1999/xlink"
8        extension-element-prefixes="math dyn exsl xlink">
9            
10 <!-- 
11 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"
12                doctype-public="-//W3C//DTD SVG 1.0//EN"
13                    doctype-system="http://www.w3.org/TR/SVG/DTD/svg10.dtd"/>
14 -->                     
15
16 <!-- ======================= DEF BLOCK =================================== -->
17
18 <xsl:template name="Define_ConnectedBifTypes">
19
20         <xsl:for-each select="exsl:node-set($COL_BUSSTDS)/BUSCOLOR">
21                 <xsl:variable name="busStd_" select="@BUSSTD"/>
22                 <xsl:variable name="psfStd_" select="@BUSSTD_PSF"/>
23                 <xsl:for-each select="$G_SYS_MODS"> 
24                         <xsl:variable name="bif_by_busStd_"  select="key('G_MAP_ALL_BIFS',$busStd_)[((@IS_INSTANTIATED = 'TRUE') or (@IS_INMHS = 'TRUE'))]"/>
25                         <xsl:variable name="num_of_busStd_"  select="count($bif_by_busStd_)"/>
26                         
27                         <xsl:variable name="bif_by_psfStd_"  select="key('G_MAP_ALL_BIFS',$psfStd_)[((@IS_INSTANTIATED = 'TRUE') or  (@IS_INMHS = 'TRUE'))]"/>
28                         <xsl:variable name="num_of_psfStd_"  select="count($bif_by_psfStd_)"/>                  
29                         <!-- 
30                         <xsl:message>DEBUG : <xsl:value-of select="$busStd_"/> : <xsl:value-of select="$num_of_busStd_"/> : <xsl:value-of select="$num_of_psfStd_"/></xsl:message>
31                         <xsl:variable name="bif_by_busStd_"  select="key('G_MAP_ALL_BIFS',$busStd_)[(@IS_INSTANTIATED = 'TRUE')]"/>
32                         <xsl:variable name="num_of_busStd_"  select="count($bif_by_busStd_)"/>
33                          -->
34                         <xsl:if test="(($num_of_busStd_ &gt; 0) or ($num_of_psfStd_ &gt; 0))">
35                                 <xsl:if test="($num_of_busStd_ &gt; 0)">
36                                         <xsl:call-template name="Define_BifLabel"> 
37                                                 <xsl:with-param name="iBusStd"  select="$busStd_"/>
38                                         </xsl:call-template>
39                                 </xsl:if>
40                                 <xsl:if test="($num_of_psfStd_ &gt; 0)">
41                                         <xsl:call-template name="Define_BifLabel"> 
42                                                 <xsl:with-param name="iBusStd"  select="$psfStd_"/>
43                                         </xsl:call-template>
44                                 </xsl:if>                                       
45                                 <xsl:for-each select="exsl:node-set($G_BIFTYPES)/BIFTYPE">
46                                         <xsl:variable name="bifType_" select="@TYPE"/>
47                                         
48                                         <xsl:variable name="num_of_bifType_"  select="count($bif_by_busStd_[(@TYPE = $bifType_)])"/>
49                                         <!-- 
50                                         <xsl:message>DEBUG     : <xsl:value-of select="$bifType_"/> : <xsl:value-of select="$num_of_bifType_"/></xsl:message>
51                                          -->
52                                         
53                                         <xsl:if test="($num_of_bifType_ &gt; 0)">
54                                                 <xsl:if test="($num_of_busStd_ &gt; 0)">
55                                                         <xsl:call-template name="Define_BifTypeConnector"> 
56                                                                 <xsl:with-param name="iBusStd"  select="$busStd_"/>
57                                                                 <xsl:with-param name="iBifType" select="$bifType_"/>
58                                                         </xsl:call-template>
59                                                 </xsl:if>
60                                                 <xsl:if test="($num_of_psfStd_ &gt; 0)">
61                                                         <xsl:call-template name="Define_BifTypeConnector"> 
62                                                                 <xsl:with-param name="iBusStd"  select="$busStd_"/>
63                                                                 <xsl:with-param name="iBifType" select="$bifType_"/>
64                                                         </xsl:call-template>
65                                                 </xsl:if>                                               
66                                         </xsl:if>
67                                 </xsl:for-each>
68                         </xsl:if>
69                 </xsl:for-each>
70         </xsl:for-each>                 
71                 
72         <xsl:call-template name="Define_BifLabel"> 
73                 <xsl:with-param name="iBusStd"  select="'KEY'"/>
74         </xsl:call-template>
75         
76         <xsl:for-each select="exsl:node-set($G_BIFTYPES)/BIFTYPE">
77                 <xsl:variable name="bifType_" select="@TYPE"/>
78         
79                 <xsl:call-template name="Define_BifTypeConnector"> 
80                         <xsl:with-param name="iBusStd"  select="'KEY'"/>
81                         <xsl:with-param name="iBifType" select="$bifType_"/>
82                 </xsl:call-template>
83                         
84         </xsl:for-each> 
85
86 </xsl:template>
87
88 <xsl:template name="Define_BifLabel"> 
89         
90         <xsl:param name="iBusStd" select="'USER'"/>
91         
92         <xsl:variable name="busStdColor_">
93                 <xsl:call-template name="F_BusStd2RGB">
94                         <xsl:with-param name="iBusStd" select="$iBusStd"/>
95                 </xsl:call-template>    
96         </xsl:variable>
97                         
98     <g id="{$iBusStd}_BifLabel">
99                 <rect x="0"  
100                           y="0" 
101                           rx="3"
102                           ry="3"
103                           width= "{$BIF_W}" 
104                           height="{$BIF_H}" 
105                           style="fill:{$busStdColor_}; stroke:black; stroke-width:1"/> 
106         </g>
107         
108 </xsl:template>
109
110
111 <xsl:template name="Define_BifTypeConnector"> 
112         
113         <xsl:param name="iBusStd"     select="'USER'"/>
114         <xsl:param name="iBifType"    select="'USER'"/>
115         
116         <xsl:variable name="busStdColor_">
117                 <xsl:call-template name="F_BusStd2RGB">
118                         <xsl:with-param name="iBusStd" select="$iBusStd"/>
119                 </xsl:call-template>    
120         </xsl:variable>
121         
122         <xsl:variable name="busStdColor_lt_">
123                 <xsl:call-template name="F_BusStd2RGB_LT">
124                         <xsl:with-param name="iBusStd" select="$iBusStd"/>
125                 </xsl:call-template>    
126         </xsl:variable>
127         
128         <xsl:variable name="bifc_wi_" select="ceiling($BIFC_W div 3)"/>
129         <xsl:variable name="bifc_hi_" select="ceiling($BIFC_H div 3)"/>
130         
131         <xsl:choose>
132         
133                 <xsl:when test="$iBifType = 'SLAVE'">
134                 <g id="{$iBusStd}_busconn_{$iBifType}">
135                                 <circle 
136                                         cx="{ceiling($BIFC_W div 2)}"  
137                                         cy="{ceiling($BIFC_H div 2)}" 
138                                         r="{ceiling($BIFC_W  div 2)}" 
139                                         style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
140                                 <circle 
141                                         cx="{ceiling($BIFC_W div 2) + 0.5}"  
142                                         cy="{ceiling($BIFC_H div 2)}" 
143                                         r="{ceiling($BIFC_Wi div 2)}" 
144                                         style="fill:{$busStdColor_}; stroke:none;"/> 
145                         </g>
146                 </xsl:when>
147         
148                 <xsl:when test="$iBifType = 'MASTER'">
149                 <g id="{$iBusStd}_busconn_{$iBifType}">
150                                 <rect x="0"  
151                                           y="0" 
152                                           width= "{$BIFC_W}" 
153                                           height="{$BIFC_H}" 
154                                           style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
155                                 <rect x="{$BIFC_dx + 0.5}"  
156                                           y="{$BIFC_dy}" 
157                                           width= "{$BIFC_Wi}" 
158                                           height="{$BIFC_Hi}" 
159                                           style="fill:{$busStdColor_}; stroke:none;"/> 
160                         </g>
161                 </xsl:when>
162                 
163                 <xsl:when test="$iBifType = 'INITIATOR'">
164                 <g id="{$iBusStd}_busconn_{$iBifType}">
165                                 <rect x="0"  
166                                           y="0" 
167                                   width= "{$BIFC_W}" 
168                                   height="{$BIFC_H}" 
169                                   style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
170                                 <rect x="{$BIFC_dx + 0.5}"  
171                                           y="{$BIFC_dy}" 
172                                   width= "{$BIFC_Wi}" 
173                                   height="{$BIFC_Hi}" 
174                                       style="fill:{$busStdColor_}; stroke:none;"/> 
175                         </g>
176                 </xsl:when>
177                 
178                 <xsl:when test="$iBifType = 'TARGET'">
179                 <g id="{$iBusStd}_busconn_{$iBifType}">
180                                 <circle 
181                                         cx="{ceiling($BIFC_W div 2)}"  
182                                         cy="{ceiling($BIFC_H div 2)}" 
183                                         r="{ceiling($BIFC_W  div 2)}" 
184                                         style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
185                                 <circle 
186                                         cx="{ceiling($BIFC_W div 2) + 0.5}"  
187                                         cy="{ceiling($BIFC_H div 2)}" 
188                                         r="{ceiling($BIFC_Wi div 2)}" 
189                                         style="fill:{$busStdColor_}; stroke:none;"/> 
190                         </g>
191                 </xsl:when>
192                 
193                 <xsl:when test="$iBifType = 'MASTER_SLAVE'">
194                 <g id="{$iBusStd}_busconn_{$iBifType}">
195                                 <circle 
196                                         cx="{ceiling($BIFC_W div 2)}"  
197                                         cy="{ceiling($BIFC_H div 2)}" 
198                                         r="{ceiling($BIFC_W  div 2)}" 
199                                         style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
200                                 <circle 
201                                         cx="{ceiling($BIFC_W div 2) + 0.5}"  
202                                         cy="{ceiling($BIFC_H div 2)}" 
203                                         r="{ceiling($BIFC_Wi div 2)}" 
204                                         style="fill:{$busStdColor_}; stroke:none;"/> 
205                                 <rect 
206                                         x="0"  
207                                         y="{ceiling($BIFC_H div 2)}" 
208                                         width= "{$BIFC_W}" 
209                                         height="{ceiling($BIFC_H div 2)}" 
210                                         style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
211                                 <rect 
212                                         x="{$BIFC_dx + 0.5}"  
213                                         y="{ceiling($BIFC_H div 2)}" 
214                                         width= "{$BIFC_Wi}" 
215                                         height="{ceiling($BIFC_Hi div 2)}" 
216                                         style="fill:{$busStdColor_}; stroke:none;"/> 
217                         </g>
218                 </xsl:when>
219                 
220                 <xsl:when test="$iBifType = 'MONITOR'">
221                         <g id="{$iBusStd}_busconn_{$iBifType}">
222                                 <rect 
223                                         x="0"  
224                                         y="0.5" 
225                                         width= "{$BIFC_W}" 
226                                         height="{ceiling($BIFC_Hi div 2)}" 
227                                         style="fill:{$busStdColor_}; stroke:none;"/> 
228                                 <rect 
229                                         x="0"  
230                                         y="{ceiling($BIFC_H div 2) + 4}" 
231                                         width= "{$BIFC_W}" 
232                                         height="{ceiling($BIFC_Hi div 2)}" 
233                                         style="fill:{$busStdColor_}; stroke:none;"/> 
234                         </g>
235                 </xsl:when>
236                 
237                 <xsl:when test="$iBifType  = 'USER'">
238                 <g id="{$iBusStd}_busconn_USER">
239                                 <circle 
240                                         cx="{ceiling($BIFC_W div 2)}"  
241                                         cy="{ceiling($BIFC_H div 2)}" 
242                                         r="{ceiling($BIFC_W  div 2)}" 
243                                         style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/> 
244                                 <circle 
245                                         cx="{ceiling($BIFC_W div 2) + 0.5}"  
246                                         cy="{ceiling($BIFC_H div 2)}" 
247                                         r="{ceiling($BIFC_Wi div 2)}" 
248                                         style="fill:{$busStdColor_}; stroke:none;"/> 
249                         </g>
250                 </xsl:when>
251                 
252                 <xsl:otherwise>
253                 <g id="{$iBusStd}_busconn_{$iBifType}">
254                                 <circle 
255                                         cx="{ceiling($BIFC_W div 2)}"  
256                                         cy="{ceiling($BIFC_H div 2)}" 
257                                         r="{ceiling($BIFC_W  div 2)}" 
258                                         style="fill:{$COL_WHITE}; stroke:{$busStdColor_}; stroke-width:1"/> 
259                                 <circle 
260                                         cx="{ceiling($BIFC_W div 2) + 0.5}"  
261                                         cy="{ceiling($BIFC_H div 2)}" 
262                                         r="{ceiling($BIFC_Wi div 2)}" 
263                                         style="fill:{$COL_WHITE}; stroke:none;"/> 
264                         </g>
265                 </xsl:otherwise>
266         </xsl:choose>
267         
268 </xsl:template>
269
270
271 </xsl:stylesheet>