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">
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"/>
12 <!-- ======================= DEF BLOCK =================================== -->
14 <xsl:template name="Define_ConnectedBifTypes">
16 <xsl:for-each select="exsl:node-set($COL_BUSSTDS)/BUSCOLOR">
17 <xsl:variable name="busStd_" select="@BUSSTD"/>
19 <xsl:for-each select="exsl:node-set($G_BIFTYPES)/BIFTYPE">
20 <xsl:variable name="bifType_" select="@TYPE"/>
22 <xsl:variable name="connectedBifs_cnt_" select="count($G_ROOT/EDKSYSTEM/MODULES/MODULE/BUSINTERFACE[((@IS_INMHS = 'TRUE') and (@TYPE = $bifType_) and (@BUSSTD = $busStd_))])"/>
24 <xsl:if test="($connectedBifs_cnt_ > 0)">
26 <xsl:message>DEBUG : Connected BifType : <xsl:value-of select="$busStd_"/> : <xsl:value-of select="@TYPE"/> : <xsl:value-of select="$connectedBifs_cnt_"/> </xsl:message>
28 <xsl:call-template name="Define_BifTypeConnector">
29 <xsl:with-param name="iBusStd" select="$busStd_"/>
30 <xsl:with-param name="iBifType" select="$bifType_"/>
33 <xsl:call-template name="Define_BifLabel">
34 <xsl:with-param name="iBusStd" select="$busStd_"/>
43 <xsl:for-each select="exsl:node-set($G_BIFTYPES)/BIFTYPE">
44 <xsl:variable name="bifType_" select="@TYPE"/>
46 <xsl:call-template name="Define_BifTypeConnector">
47 <xsl:with-param name="iBusStd" select="'KEY'"/>
48 <xsl:with-param name="iBifType" select="$bifType_"/>
51 <xsl:call-template name="Define_BifLabel">
52 <xsl:with-param name="iBusStd" select="'KEY'"/>
58 <xsl:template name="Define_BifLabel">
60 <xsl:param name="iBusStd" select="'OPB'"/>
62 <xsl:variable name="busStdColor_">
63 <xsl:call-template name="F_BusStd2RGB">
64 <xsl:with-param name="iBusStd" select="$iBusStd"/>
68 <g id="{$iBusStd}_BifLabel">
75 style="fill:{$busStdColor_}; stroke:black; stroke-width:1"/>
81 <xsl:template name="Define_BifTypeConnector">
83 <xsl:param name="iBusStd" select="'OPB'"/>
84 <xsl:param name="iBifType" select="'USER'"/>
86 <xsl:variable name="busStdColor_">
87 <xsl:call-template name="F_BusStd2RGB">
88 <xsl:with-param name="iBusStd" select="$iBusStd"/>
92 <xsl:variable name="busStdColor_lt_">
93 <xsl:call-template name="F_BusStd2RGB_LT">
94 <xsl:with-param name="iBusStd" select="$iBusStd"/>
98 <xsl:variable name="bifc_wi_" select="ceiling($BIFC_W div 3)"/>
99 <xsl:variable name="bifc_hi_" select="ceiling($BIFC_H div 3)"/>
103 <xsl:when test="$iBifType = 'SLAVE'">
104 <g id="{$iBusStd}_busconn_{$iBifType}">
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"/>
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;"/>
118 <xsl:when test="$iBifType = 'MASTER'">
119 <g id="{$iBusStd}_busconn_{$iBifType}">
124 style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/>
125 <rect x="{$BIFC_dx + 0.5}"
129 style="fill:{$busStdColor_}; stroke:none;"/>
133 <xsl:when test="$iBifType = 'INITIATOR'">
134 <g id="{$iBusStd}_busconn_{$iBifType}">
139 style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/>
140 <rect x="{$BIFC_dx + 0.5}"
144 style="fill:{$busStdColor_}; stroke:none;"/>
148 <xsl:when test="$iBifType = 'TARGET'">
149 <g id="{$iBusStd}_busconn_{$iBifType}">
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"/>
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;"/>
163 <xsl:when test="$iBifType = 'MASTER_SLAVE'">
164 <g id="{$iBusStd}_busconn_{$iBifType}">
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"/>
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;"/>
177 y="{ceiling($BIFC_H div 2)}"
179 height="{ceiling($BIFC_H div 2)}"
180 style="fill:{$busStdColor_lt_}; stroke:{$busStdColor_}; stroke-width:1"/>
183 y="{ceiling($BIFC_H div 2)}"
185 height="{ceiling($BIFC_Hi div 2)}"
186 style="fill:{$busStdColor_}; stroke:none;"/>
190 <xsl:when test="$iBifType = 'MONITOR'">
191 <g id="{$iBusStd}_busconn_{$iBifType}">
196 height="{ceiling($BIFC_Hi div 2)}"
197 style="fill:{$busStdColor_}; stroke:none;"/>
200 y="{ceiling($BIFC_H div 2) + 4}"
202 height="{ceiling($BIFC_Hi div 2)}"
203 style="fill:{$busStdColor_}; stroke:none;"/>
207 <xsl:when test="$iBifType = 'USER'">
208 <g id="{$iBusStd}_busconn_USER">
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"/>
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;"/>
223 <g id="{$iBusStd}_busconn_{$iBifType}">
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"/>
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;"/>