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">
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"/>
16 <!-- ======================= DEF BLOCK =================================== -->
18 <xsl:template name="Define_ConnectedBifTypes">
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_)"/>
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_)"/>
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_)"/>
34 <xsl:if test="(($num_of_busStd_ > 0) or ($num_of_psfStd_ > 0))">
35 <xsl:if test="($num_of_busStd_ > 0)">
36 <xsl:call-template name="Define_BifLabel">
37 <xsl:with-param name="iBusStd" select="$busStd_"/>
40 <xsl:if test="($num_of_psfStd_ > 0)">
41 <xsl:call-template name="Define_BifLabel">
42 <xsl:with-param name="iBusStd" select="$psfStd_"/>
45 <xsl:for-each select="exsl:node-set($G_BIFTYPES)/BIFTYPE">
46 <xsl:variable name="bifType_" select="@TYPE"/>
48 <xsl:variable name="num_of_bifType_" select="count($bif_by_busStd_[(@TYPE = $bifType_)])"/>
50 <xsl:message>DEBUG : <xsl:value-of select="$bifType_"/> : <xsl:value-of select="$num_of_bifType_"/></xsl:message>
53 <xsl:if test="($num_of_bifType_ > 0)">
54 <xsl:if test="($num_of_busStd_ > 0)">
55 <xsl:call-template name="Define_BifTypeConnector">
56 <xsl:with-param name="iBusStd" select="$busStd_"/>
57 <xsl:with-param name="iBifType" select="$bifType_"/>
60 <xsl:if test="($num_of_psfStd_ > 0)">
61 <xsl:call-template name="Define_BifTypeConnector">
62 <xsl:with-param name="iBusStd" select="$busStd_"/>
63 <xsl:with-param name="iBifType" select="$bifType_"/>
72 <xsl:call-template name="Define_BifLabel">
73 <xsl:with-param name="iBusStd" select="'KEY'"/>
76 <xsl:for-each select="exsl:node-set($G_BIFTYPES)/BIFTYPE">
77 <xsl:variable name="bifType_" select="@TYPE"/>
79 <xsl:call-template name="Define_BifTypeConnector">
80 <xsl:with-param name="iBusStd" select="'KEY'"/>
81 <xsl:with-param name="iBifType" select="$bifType_"/>
88 <xsl:template name="Define_BifLabel">
90 <xsl:param name="iBusStd" select="'USER'"/>
92 <xsl:variable name="busStdColor_">
93 <xsl:call-template name="F_BusStd2RGB">
94 <xsl:with-param name="iBusStd" select="$iBusStd"/>
98 <g id="{$iBusStd}_BifLabel">
105 style="fill:{$busStdColor_}; stroke:black; stroke-width:1"/>
111 <xsl:template name="Define_BifTypeConnector">
113 <xsl:param name="iBusStd" select="'USER'"/>
114 <xsl:param name="iBifType" select="'USER'"/>
116 <xsl:variable name="busStdColor_">
117 <xsl:call-template name="F_BusStd2RGB">
118 <xsl:with-param name="iBusStd" select="$iBusStd"/>
122 <xsl:variable name="busStdColor_lt_">
123 <xsl:call-template name="F_BusStd2RGB_LT">
124 <xsl:with-param name="iBusStd" select="$iBusStd"/>
128 <xsl:variable name="bifc_wi_" select="ceiling($BIFC_W div 3)"/>
129 <xsl:variable name="bifc_hi_" select="ceiling($BIFC_H div 3)"/>
133 <xsl:when test="$iBifType = 'SLAVE'">
134 <g id="{$iBusStd}_busconn_{$iBifType}">
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"/>
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;"/>
148 <xsl:when test="$iBifType = 'MASTER'">
149 <g id="{$iBusStd}_busconn_{$iBifType}">
154 style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/>
155 <rect x="{$BIFC_dx + 0.5}"
159 style="fill:{$busStdColor_}; stroke:none;"/>
163 <xsl:when test="$iBifType = 'INITIATOR'">
164 <g id="{$iBusStd}_busconn_{$iBifType}">
169 style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/>
170 <rect x="{$BIFC_dx + 0.5}"
174 style="fill:{$busStdColor_}; stroke:none;"/>
178 <xsl:when test="$iBifType = 'TARGET'">
179 <g id="{$iBusStd}_busconn_{$iBifType}">
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"/>
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;"/>
193 <xsl:when test="$iBifType = 'MASTER_SLAVE'">
194 <g id="{$iBusStd}_busconn_{$iBifType}">
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"/>
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;"/>
207 y="{ceiling($BIFC_H div 2)}"
209 height="{ceiling($BIFC_H div 2)}"
210 style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/>
213 y="{ceiling($BIFC_H div 2)}"
215 height="{ceiling($BIFC_Hi div 2)}"
216 style="fill:{$busStdColor_}; stroke:none;"/>
220 <xsl:when test="$iBifType = 'MONITOR'">
221 <g id="{$iBusStd}_busconn_{$iBifType}">
226 height="{ceiling($BIFC_Hi div 2)}"
227 style="fill:{$busStdColor_}; stroke:none;"/>
230 y="{ceiling($BIFC_H div 2) + 4}"
232 height="{ceiling($BIFC_Hi div 2)}"
233 style="fill:{$busStdColor_}; stroke:none;"/>
237 <xsl:when test="$iBifType = 'USER'">
238 <g id="{$iBusStd}_busconn_USER">
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"/>
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;"/>
253 <g id="{$iBusStd}_busconn_{$iBifType}">
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"/>
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;"/>