]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/PlatformStudioProject/__xps/edw2xtl_sav_view_groups.xsl
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / MicroBlaze_Spartan-6_EthernetLite / PlatformStudioProject / __xps / edw2xtl_sav_view_groups.xsl
1 <!DOCTYPE stylesheet [
2     <!ENTITY ALPUPRS "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
3     <!ENTITY ALPLWRS "abcdefghijklmnopqrstuvwxyz">
4     <!ENTITY UPR2LWS " '&ALPUPRS;' , '&ALPLWRS;' ">
5     
6     <!ENTITY HEXUPPER "ABCDEFxx0123456789">
7     <!ENTITY HEXLOWER "abcdefxX0123456789">
8     <!ENTITY HEXU2L " '&HEXLOWER;' , '&HEXUPPER;' ">
9     
10     <!ENTITY DIV2SLSH " 'div' , '&#047;' ">     
11     
12     <!ENTITY NOT_ELM_CONN "not(name() = 'PARAMETER') and not(name() = 'PORT')          and not(name() = 'BUSINTERFACE')">
13     <!ENTITY NOT_BEF_CONN "not(name() = 'DOCUMENT')  and not(name() = 'DOCUMENTATION') and not(name() = 'DESCRIPTION') and not(name() = 'LICENSEINFO')">
14     <!ENTITY NOT_AFT_CONN "not(name() = 'MEMORYMP') and not(name() = 'PERIPHERALS')   and not(name() = 'INTERRUPTINFO')">
15 ]>
16
17 <!-- ==============================================================
18          This XSL file converts BLOCK xml to SAV XTeller 
19         ============================================================== -->      
20 <xsl:stylesheet 
21            version="1.0"
22            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
23            xmlns:exsl="http://exslt.org/common"
24            xmlns:dyn="http://exslt.org/dynamic"
25            xmlns:math="http://exslt.org/math"
26            xmlns:xlink="http://www.w3.org/1999/xlink"
27            extension-element-prefixes="math exsl dyn xlink">
28            
29 <xsl:output method="xml" 
30             version="1.0" 
31             indent="yes"
32             encoding="UTF-8"/> 
33 <!--
34     ===================================================
35         THE MAIN TEMPLATE FOR PORT VIEW SELECTED FOCUS
36     ===================================================
37 -->
38 <xsl:template name="WRITE_VIEW_PORT_FOCUSED">
39         <xsl:choose>
40                 <xsl:when test="$G_ROOT/SAV/@MODE = 'TREE'">
41                         <xsl:call-template name="WRITE_VIEW_EXTP_TREE_SET"/>
42                 </xsl:when>
43                 <xsl:when test="$G_ROOT/SAV/@MODE = 'FLAT'">
44                         <xsl:call-template name="WRITE_VIEW_EXTP_FLAT_SET"/>
45                 </xsl:when>
46         </xsl:choose>
47         <xsl:apply-templates  select="$G_SYS_MODS/MODULE" mode="_port_view_focusing_on_selected"/>
48 </xsl:template> 
49
50
51 <!--
52     ====================================================
53         THE MAIN TEMPLATE FOR BIF VIEW BUS FOCUS
54     ====================================================
55 -->
56 <xsl:template name="WRITE_VIEW_BIF_FOCUS_ON_BUSES">
57
58 <xsl:if test="$G_DEBUG = 'TRUE'"><xsl:message>Focusing on busses</xsl:message></xsl:if>
59 <!--
60         <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_CONNECTED_MODULES">
61                 <xsl:with-param name="iModules" select="$G_GROUPS"/>
62         </xsl:call-template>
63   -->
64   <xsl:apply-templates  select="$G_SYS_MODS/MODULE" mode="_bif_view_focusing_on_buses"/>
65         <xsl:if test="$G_ROOT/SAV/@MODE = 'TREE'"> <!--  The separator -->
66                 <xsl:element name="SET">
67                 
68                         <xsl:attribute name="ID">MODULES WITH POTENTIAL CONNECTIONS TO FOCUSED BUS</xsl:attribute>
69                         <xsl:attribute name="CLASS">SEPARATOR</xsl:attribute>
70                         <xsl:element name="VARIABLE">
71                                 <xsl:attribute name="VIEWDISP">Name</xsl:attribute>
72                                 <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
73                                 <xsl:attribute name="NAME">Name</xsl:attribute>
74                                 <xsl:attribute name="VALUE">POTENTIAL MODULES BELOW HERE</xsl:attribute>
75                         </xsl:element>
76                         <xsl:element name="VARIABLE">
77                         <xsl:attribute name="VIEWDISP">IP Type</xsl:attribute>
78                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
79                         <xsl:attribute name="NAME">MODTYPE</xsl:attribute>
80                         <xsl:attribute name="VALUE"></xsl:attribute>
81                         </xsl:element>
82                         <xsl:element name="VARIABLE">
83                 <xsl:attribute name="VIEWDISP">IP Version</xsl:attribute>
84                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
85                         <xsl:attribute name="NAME">HWVERSION</xsl:attribute>
86                         <xsl:attribute name="VALUE"></xsl:attribute>
87                                 </xsl:element>                  
88                         <xsl:element name="VARIABLE">
89                         <xsl:attribute name="VIEWDISP">IP Classification</xsl:attribute>
90                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
91                         <xsl:attribute name="NAME">IPCLASS</xsl:attribute>
92                         <xsl:attribute name="VALUE"></xsl:attribute>
93                         </xsl:element>
94                         <xsl:element name="VARIABLE">
95                         <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
96                         <xsl:attribute name="VIEWTYPE"></xsl:attribute>
97                         <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
98                         <xsl:attribute name="VALUE"></xsl:attribute>
99                         </xsl:element>
100                         <xsl:element name="VARIABLE">
101                         <xsl:attribute name="VIEWDISP">Type</xsl:attribute>
102                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
103                         <xsl:attribute name="NAME">TYPE</xsl:attribute>
104                         <xsl:attribute name="VALUE"></xsl:attribute>
105                         </xsl:element>                  
106                         <xsl:element name="VARIABLE">
107                         <xsl:attribute name="VIEWDISP">Bus Standard</xsl:attribute>
108                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
109                         <xsl:attribute name="NAME">BUSSTD</xsl:attribute>
110                         <xsl:attribute name="VALUE"></xsl:attribute>
111                         </xsl:element>                                          
112                 </xsl:element>
113         </xsl:if>  
114 </xsl:template> 
115
116 <!--
117     ====================================================
118         THE MAIN TEMPLATE FOR BIF VIEW PROCESSOR FOCUS
119     ====================================================
120 -->
121 <xsl:template name="WRITE_VIEW_BIF_FOCUS_ON_PROCS">
122
123         <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_CONNECTED_MODULES">
124                 <xsl:with-param name="iModules" select="$G_GROUPS"/>
125         </xsl:call-template>
126         
127         <xsl:if test="$G_ROOT/SAV/@MODE = 'TREE'"> <!--  The separator -->
128                 <xsl:element name="SET">
129                 
130                         <xsl:attribute name="ID">MODULES WITH POTENTIAL CONNECTIONS TO THIS SUBSYSTEM</xsl:attribute>
131                         <xsl:attribute name="CLASS">SEPARATOR</xsl:attribute>
132                         <xsl:element name="VARIABLE">
133                                 <xsl:attribute name="VIEWDISP">Name</xsl:attribute>
134                                 <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
135                                 <xsl:attribute name="NAME">Name</xsl:attribute>
136                                 <xsl:attribute name="VALUE">POTENTIAL MODULES BELOW HERE</xsl:attribute>
137                         </xsl:element>
138                         <xsl:element name="VARIABLE">
139                         <xsl:attribute name="VIEWDISP">IP Type</xsl:attribute>
140                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
141                         <xsl:attribute name="NAME">MODTYPE</xsl:attribute>
142                         <xsl:attribute name="VALUE"></xsl:attribute>
143                         </xsl:element>
144                         <xsl:element name="VARIABLE">
145                 <xsl:attribute name="VIEWDISP">IP Version</xsl:attribute>
146                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
147                         <xsl:attribute name="NAME">HWVERSION</xsl:attribute>
148                         <xsl:attribute name="VALUE"></xsl:attribute>
149                                 </xsl:element>                  
150                         <xsl:element name="VARIABLE">
151                         <xsl:attribute name="VIEWDISP">IP Classification</xsl:attribute>
152                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
153                         <xsl:attribute name="NAME">IPCLASS</xsl:attribute>
154                         <xsl:attribute name="VALUE"></xsl:attribute>
155                         </xsl:element>
156                         <xsl:element name="VARIABLE">
157                         <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
158                         <xsl:attribute name="VIEWTYPE"></xsl:attribute>
159                         <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
160                         <xsl:attribute name="VALUE"></xsl:attribute>
161                         </xsl:element>
162                         <xsl:element name="VARIABLE">
163                         <xsl:attribute name="VIEWDISP">Type</xsl:attribute>
164                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
165                         <xsl:attribute name="NAME">TYPE</xsl:attribute>
166                         <xsl:attribute name="VALUE"></xsl:attribute>
167                         </xsl:element>                  
168                         <xsl:element name="VARIABLE">
169                         <xsl:attribute name="VIEWDISP">Bus Standard</xsl:attribute>
170                         
171                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
172                         <xsl:attribute name="NAME">BUSSTD</xsl:attribute>
173                         <xsl:attribute name="VALUE"></xsl:attribute>
174                         </xsl:element>                                          
175                 </xsl:element>
176         </xsl:if>
177 </xsl:template>
178
179 <!--
180     ===============================================
181         COPY TRANSFORMS FOR FOCUSING IN BIF VIEW 
182     ===============================================
183 -->
184
185 <!-- Root copy template for connected -->
186 <xsl:template match="node() | @*" mode="_bif_view_focusing_on_connected">
187         <xsl:copy>
188                 <xsl:apply-templates select="@* | node()" mode="_bif_view_focusing_on_connected"/>
189         </xsl:copy>
190 </xsl:template>
191
192 <!-- Root copy template for potentials -->
193 <xsl:template match="node() | @*" mode="_bif_view_focusing_on_potentials">
194         <xsl:copy>
195                 <xsl:apply-templates select="@* | node()" mode="_bif_view_focusing_on_potentials"/>
196         </xsl:copy>
197 </xsl:template>
198
199
200 <xsl:template name="WRITE_VIEW_BIF_FOCUSED_CONNECTED_MODULES"> <!--  Recursive  !! -->
201         <xsl:param name="iModules"/>
202         
203         <xsl:for-each select="$iModules/BLOCK[@ID and not(BLOCK) and not(@C)]">
204         <xsl:variable name="m_id_"                                      select="@ID"/>
205                 <xsl:if test="(count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME = $m_id_]) &gt; 0)">
206                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING BUS <xsl:value-of select="@ID"/></xsl:message></xsl:if>
207                         <xsl:variable name="m_module_"                          select="$G_SYS_MODS/MODULE[@INSTANCE = $m_id_]"/>
208                         <xsl:apply-templates  select="$m_module_"   mode="_bif_view_focusing_on_connected"/>
209         </xsl:if>
210     </xsl:for-each> 
211             
212         <xsl:for-each select="$iModules/BLOCK[@ID and BLOCK]">
213                 <xsl:choose>
214                 
215                         <!--  An actual module that needs to be written -->     
216                         <xsl:when test="not(starts-with(@ID,'__')) and BLOCK[@C] and (not(BLOCK/BLOCK) or BLOCK/BLOCK[@CP])">
217                                 
218                                 <xsl:variable name="m_id_"          select="@ID"/>
219                         <xsl:variable name="m_module_"      select="$G_SYS_MODS/MODULE[@INSTANCE = $m_id_]"/>
220                         <xsl:apply-templates select="$m_module_"  mode="_bif_view_focusing_on_connected"/>
221                     </xsl:when>
222                     
223                         <xsl:when test="starts-with(@ID,'__GROUP_PROCESSOR__.') or starts-with(@ID,'__GROUP_MASTER__.')">
224                         
225                                 <!-- 
226                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>MASTER GROUP <xsl:value-of select="@ID"/></xsl:message></xsl:if>
227                                  -->
228                                 
229                                 <xsl:variable name="master_id_">
230                                         <xsl:choose>
231                                                 <xsl:when test="starts-with(@ID,'__GROUP_MASTER__.')"><xsl:value-of    select="substring-after(@ID,'__GROUP_MASTER__.')"/> </xsl:when>
232                                                 <xsl:when test="starts-with(@ID,'__GROUP_PROCESSOR__.')"><xsl:value-of select="substring-after(@ID,'__GROUP_PROCESSOR__.')"/> </xsl:when>
233                                         </xsl:choose>
234                                 </xsl:variable>
235                                 
236                                 <xsl:variable name="num_focused_on_" select="count($G_ROOT/SAV/MASTER[(@INSTANCE = $master_id_)])"/>    
237
238                                 <xsl:choose>
239                                         <xsl:when test="$num_focused_on_  &gt; 0">
240                                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>CONNECTED MASTER GROUP <xsl:value-of select="$master_id_"/></xsl:message></xsl:if>
241                                                 <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_CONNECTED_MODULES">
242                                                         <xsl:with-param name="iModules" select="self::node()"/>
243                                                 </xsl:call-template>
244                                         </xsl:when>
245                                         
246                                         <xsl:otherwise>
247                                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>POTENTIAL MASTER GROUP <xsl:value-of select="$master_id_"/></xsl:message></xsl:if>
248                                                 <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_POTENTIAL_MODULES">
249                                                         <xsl:with-param name="iModules" select="self::node()"/>
250                                                 </xsl:call-template>
251                                         </xsl:otherwise>
252                                 </xsl:choose>
253                         </xsl:when>     
254                         
255                         <xsl:when test="starts-with(@ID,'__GROUP_SHARED__')">
256                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>SHARED GROUP <xsl:value-of select="@ID"/></xsl:message></xsl:if>
257                                 <xsl:variable name="p_id_" select="substring-after(@ID,'__GROUP_SHARED__')"/>
258                                 
259                                 <xsl:variable name="num_focused_on_" select="count($G_ROOT/SAV/MASTER[contains($p_id_,@INSTANCE)])"/>   
260                                 
261                                 <xsl:choose>
262                                         <xsl:when test="$num_focused_on_  &gt; 0">
263                                                 <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_CONNECTED_MODULES">
264                                                         <xsl:with-param name="iModules" select="self::node()"/>
265                                                 </xsl:call-template>
266                                         </xsl:when>
267                                         
268                                         <xsl:otherwise>
269                                                 <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_POTENTIAL_MODULES">
270                                                         <xsl:with-param name="iModules" select="self::node()"/>
271                                                 </xsl:call-template>
272                                         </xsl:otherwise>
273                                 </xsl:choose>
274                         </xsl:when>     
275                         
276                         <xsl:when test="starts-with(@ID,'__GROUP_MEMORY__')">
277                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message> MEMORY GROUP <xsl:value-of select="@ID"/></xsl:message></xsl:if>
278                                 
279                                 <xsl:variable name="m_id_" select="substring-after(@ID,'__GROUP_MEMORY__')"/>
280                                 
281                                 <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_CONNECTED_MODULES">
282                                         <xsl:with-param name="iModules" select="self::node()"/>
283                                 </xsl:call-template>    
284                         </xsl:when>     
285                         
286                         <xsl:when test="starts-with(@ID,'__GROUP_PERIPHERAL__')">
287                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PERIPHERAL GROUP <xsl:value-of select="@ID"/></xsl:message></xsl:if>
288                                 
289                                 <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_CONNECTED_MODULES">
290                                         <xsl:with-param name="iModules" select="self::node()"/>
291                                 </xsl:call-template>    
292                         </xsl:when>
293                         
294                         <xsl:when test="starts-with(@ID,'__GROUP_SLAVES__')">
295                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>SLAVE GROUP <xsl:value-of select="@ID"/></xsl:message></xsl:if>
296                                 
297                                 <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_CONNECTED_MODULES">
298                                         <xsl:with-param name="iModules" select="self::node()"/>
299                                 </xsl:call-template>    
300                         </xsl:when>
301                         
302                         <xsl:when test="(starts-with(@ID,'__GROUP_IP__') and not($G_ROOT/SAV/@VIEW = 'BUSINTERFACE'))">
303                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>IP GROUP<xsl:value-of select="@ID"/></xsl:message></xsl:if>
304                                 <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_CONNECTED_MODULES">
305                                         <xsl:with-param name="iModules" select="self::node()"/>
306                                 </xsl:call-template>    
307                         </xsl:when>
308                         
309                         <xsl:when test="starts-with(@ID,'__GROUP_FLOATING__')">
310                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>FLOATING GROUP <xsl:value-of select="@ID"/></xsl:message></xsl:if>
311                                 
312                                 <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_POTENTIAL_MODULES">
313                                         <xsl:with-param name="iModules" select="self::node()"/>
314                                 </xsl:call-template>    
315                         </xsl:when>
316                         <xsl:otherwise>
317                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message> IGNORING <xsl:value-of select="@ID"/></xsl:message></xsl:if>
318                         </xsl:otherwise>                        
319                 </xsl:choose>
320         </xsl:for-each>
321 </xsl:template> 
322
323
324
325 <!--
326     ===============================================
327         TRANSFORMS FOR FOCUSED POTENTIAL MODULES
328     ===============================================
329 -->
330 <xsl:template name="WRITE_VIEW_BIF_FOCUSED_POTENTIAL_MODULES"> <!--  Recursive  !! -->
331         <xsl:param name="iModules"/>
332         
333         <!--  BUS -->
334         <xsl:for-each select="$iModules/BLOCK[@ID and not(BLOCK) and not(@C)]">
335         <xsl:variable name="m_id_"                                      select="@ID"/>
336                 <xsl:if test="(count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME = $m_id_]) &gt; 0)">
337                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING BUS <xsl:value-of select="@ID"/></xsl:message></xsl:if>
338                         <xsl:variable name="m_module_"                          select="$G_SYS_MODS/MODULE[@INSTANCE = $m_id_]"/>
339                         <xsl:apply-templates  select="$m_module_"   mode="_bif_view_focusing_on_connected"/>
340         </xsl:if>
341     </xsl:for-each>
342     
343         <!--  GROUP -->
344         <xsl:for-each select="$iModules/BLOCK[@ID and BLOCK]">
345                 <xsl:choose>
346                         <xsl:when test="not(starts-with(@ID,'__')) and BLOCK[@C] and (not(BLOCK/BLOCK) or BLOCK/BLOCK[@CP])">
347                                 
348                                 <xsl:variable name="m_id_"      select="@ID"/>
349                         <xsl:variable name="m_module_"  select="$G_SYS_MODS/MODULE[@INSTANCE = $m_id_]"/>
350                         <xsl:variable name="m_class_"   select="$m_module_/@MODCLASS"/>
351                         <xsl:choose>
352                                 <xsl:when test ="not($m_class_ = 'PROCESSOR')">
353                                         <xsl:variable name="potential_bifs_">
354                                                         <xsl:for-each select="$m_module_/BUSINTERFACES/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]">
355                                                                 <xsl:variable name="b_std_"  select="@BUSSTD"/>
356                                                                 <xsl:variable name="b_bus_"  select="@BUSNAME"/>
357                                                                 <xsl:if test="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_]) &gt; 0"><CONNECTED/></xsl:if>
358                                                                 <xsl:if test="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@BUSSTD = $b_std_]) &gt; 0"><POTENTIAL/></xsl:if>
359                                                         </xsl:for-each>
360                                                 </xsl:variable>
361                                                 
362                                                 <xsl:variable name="num_potential_" select="count(exsl:node-set($potential_bifs_)/POTENTIAL)"/> 
363                                                 <xsl:variable name="num_connected_" select="count(exsl:node-set($potential_bifs_)/CONNECTED)"/> 
364                                                 
365                                                 <xsl:if test=" ($num_potential_ &gt; 0)">
366                                                 <xsl:apply-templates select="$m_module_" mode="_bif_view_focusing_on_potentials"/>
367                                                 </xsl:if>       
368                                 </xsl:when>
369                                 <xsl:when test="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[(@NAME   = $m_id_)]) &gt; 0">
370                                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message> PERI PROCESSOR <xsl:value-of select="$m_id_"/></xsl:message></xsl:if>
371                                                 <xsl:apply-templates select="$m_module_" mode="_bif_view_focusing_on_potentials"/>
372                                 </xsl:when>
373                         </xsl:choose>
374                     </xsl:when>
375                     
376                         <xsl:when test="starts-with(@ID,'__GROUP_MEMORY__')">
377                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING MEMORY <xsl:value-of select="@ID"/></xsl:message></xsl:if>
378                                 
379                                 <xsl:variable name="m_id_" select="substring-after(@ID,'__GROUP_MEMORY__')"/>
380                                 
381                                 <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_POTENTIAL_MODULES">
382                                         <xsl:with-param name="iModules" select="self::node()"/>
383                                 </xsl:call-template>    
384                         </xsl:when>     
385                         
386                         <xsl:when test="starts-with(@ID,'__GROUP_PERIPHERAL__')">
387                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING POTENTIAL GROUP OF PERIPHERALS <xsl:value-of select="@ID"/></xsl:message></xsl:if>
388                                 
389                                 <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_POTENTIAL_MODULES">
390                                         <xsl:with-param name="iModules" select="self::node()"/>
391                                 </xsl:call-template>    
392                         </xsl:when>
393                         
394                         <xsl:when test="starts-with(@ID,'__GROUP_SLAVES__')">
395                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING POTENTIAL GROUP OF SLAVES <xsl:value-of select="@ID"/></xsl:message></xsl:if>
396                                 
397                                 <xsl:call-template name="WRITE_VIEW_BIF_FOCUSED_POTENTIAL_MODULES">
398                                         <xsl:with-param name="iModules" select="self::node()"/>
399                                 </xsl:call-template>    
400                         </xsl:when>
401                         <xsl:otherwise>
402                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message> IGNORING <xsl:value-of select="@ID"/></xsl:message></xsl:if>
403                         </xsl:otherwise>
404                 </xsl:choose>
405         </xsl:for-each>
406 </xsl:template> 
407
408 <!--
409     +++++++++++++++++++++++++++++++++++++++++++++++++++++
410                       MODULE TEMPLATES
411     +++++++++++++++++++++++++++++++++++++++++++++++++++++
412 -->
413
414 <!--
415     ===================================================
416         THE MODULE TEMPLATE FOR PORT VIEW SELECTED FOCUS
417     ===================================================
418 -->
419
420 <xsl:template match="MODULE" mode="_port_view_focusing_on_selected">
421         <xsl:variable name="m_inst_" select="@INSTANCE"/>
422         
423         <xsl:if test="count($G_ROOT/SAV/SELECTED[(@INSTANCE = $m_inst_)]) &gt; 0">
424                 <xsl:choose>
425                         <xsl:when test="$G_ROOT/SAV/@MODE = 'TREE'">
426                                 <xsl:call-template name="WRITE_VIEW_PORT_TREE_SET">
427                                         <xsl:with-param name="iModRef" select="self::node()"/>
428                                 </xsl:call-template>    
429                         </xsl:when>             
430                 
431                         <xsl:when test="$G_ROOT/SAV/@MODE = 'FLAT'">
432                                 <xsl:call-template name="WRITE_VIEW_PORT_FLAT_SET">
433                                         <xsl:with-param name="iModRef" select="self::node()"/>
434                                 </xsl:call-template>
435                         </xsl:when>
436                 </xsl:choose>
437         </xsl:if>
438 </xsl:template>
439  
440 <!--
441     ===================================================
442         THE MODULE TEMPLATE FOR  BIF VIEW BUS FOCUS
443     ===================================================
444 -->
445 <xsl:template match="MODULE" mode="_bif_view_focusing_on_buses">
446
447         <xsl:variable name="m_instance_" select="@INSTANCE"/>
448         <xsl:variable name="m_modclass_" select="@MODCLASS"/>
449         
450         <xsl:variable name="is_focused_bus_"  select="count($G_ROOT/SAV/BUS[(@INSTANCE = $m_instance_)])"/>
451         
452         <xsl:variable name="bif_scope_">
453                 <xsl:if test="$is_focused_bus_ = 0"> <!--  No need to waste time if we know its one of the focused bus -->
454                         <xsl:for-each select="BUSINTERFACES/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]">
455                                 <xsl:variable name="b_bus_"                     select="@BUSNAME"/>
456                                 <xsl:variable name="b_bstd_"                    select="@BUSSTD"/>
457                                 <xsl:variable name="b_on_focused_bus_"  select="count($G_ROOT/SAV/BUS[(@INSTANCE = $b_bus_)])"/>
458                                 <xsl:variable name="b_of_focused_bstd_" select="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@BUSSTD   = $b_bstd_])"/>
459                                 <xsl:if test="$b_on_focused_bus_  &gt; 0"><CONNECTED/></xsl:if>
460                                 <xsl:if test="$b_of_focused_bstd_ &gt; 0"><POTENTIAL/></xsl:if>
461                         </xsl:for-each>
462                 </xsl:if>
463         </xsl:variable>
464         
465         <xsl:variable name="on_focused_bus_"  select="count(exsl:node-set($bif_scope_)/CONNECTED)"/>
466         <xsl:variable name="of_focused_bstd_" select="count(exsl:node-set($bif_scope_)/POTENTIAL)"/>
467         
468         <xsl:if test="(($is_focused_bus_ + $on_focused_bus_ + $of_focused_bstd_) &gt; 0)">
469         
470                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING MODULE ON BUS <xsl:value-of select="@INSTANCE"/></xsl:message></xsl:if>
471                 
472                 <xsl:choose>
473                         <!--  TREE VIEW -->     
474                         <xsl:when test="$G_ROOT/SAV/@MODE = 'TREE'">            
475                                 <xsl:element name="SET">
476                                         <xsl:attribute name="ID"><xsl:value-of select="@INSTANCE"/></xsl:attribute>
477                                         <xsl:attribute name="CLASS">MODULE</xsl:attribute>
478                                         
479                                         <xsl:if test="($is_focused_bus_ &gt; 0)">
480                                                 <xsl:attribute name="RGB_BG"><xsl:value-of select="$COL_FOCUSED_MASTER"/></xsl:attribute>
481                                         </xsl:if>
482                                                                 
483                                         <xsl:choose>
484                                         
485                                                 <xsl:when test="(($is_focused_bus_ + $on_focused_bus_) &gt; 0)">
486                                                         <xsl:attribute name="CONNECTED_INDEX"><xsl:value-of select="@MHS_INDEX"/></xsl:attribute>
487                                                 </xsl:when>
488                                                 <xsl:otherwise>
489                                                         <xsl:attribute name="POTENTIAL_INDEX"><xsl:value-of select="@MHS_INDEX"/></xsl:attribute>
490                                                 </xsl:otherwise>
491                                         </xsl:choose>                                           
492
493
494                                         
495                                         <!-- CR452579 Can only modify INSTANCE name in Hierarchal view. -->     
496                                     <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Name"       NAME="INSTANCE"  VALUE="{@INSTANCE}"/>
497                                     <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Type"    NAME="MODTYPE"   VALUE="{@MODTYPE}" VIEWICON="{LICENSEINFO/@ICON_NAME}"/>
498                                     <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{@HWVERSION}"/>
499                                     
500                                     <xsl:variable name="ipClassification_">
501                                                 <xsl:call-template name="F_ModClass_To_IpClassification">
502                                                         <xsl:with-param name="iModClass"  select="@MODCLASS"/>
503                                                         <xsl:with-param name="iBusStd"    select="@BUSSTD"/> 
504                                                 </xsl:call-template>    
505                                     </xsl:variable>
506                                     
507                                <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Classification" NAME="IPCLASS" VALUE="{$ipClassification_}"/>
508                                
509                                <xsl:for-each select="BUSINTERFACES/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]">
510                                                 <xsl:variable name="b_bus_"                     select="@BUSNAME"/>
511                                                 <xsl:variable name="b_bstd_"                    select="@BUSSTD"/>
512                                                 <xsl:variable name="b_on_focused_bus_"  select="count($G_ROOT/SAV/BUS[(@INSTANCE = $b_bus_)])"/>
513                                                 <xsl:variable name="b_of_focused_bstd_" select="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@BUSSTD   = $b_bstd_])"/>
514                                                 <xsl:variable name="bif_col_">
515                                                         <xsl:choose>
516                                                                 <xsl:when test="(not($b_bus_ ='__NOC__') and ($b_on_focused_bus_  = 0) and ($b_of_focused_bstd_ &gt; 0))"><xsl:value-of select="$COL_BG_OUTOF_FOCUS_CONNECTIONS"/></xsl:when>
517                                                                 <xsl:otherwise>__NONE__</xsl:otherwise>
518                                                         </xsl:choose>
519                                                 </xsl:variable>
520                                                 <xsl:if test="(($b_on_focused_bus_  + $b_of_focused_bstd_) &gt; 0)">
521                                                         <xsl:if test="$G_ROOT/SAV/@MODE = 'TREE'">
522                                                                 <xsl:call-template name="WRITE_VIEW_BIF_TREE_SET">
523                                                                         <xsl:with-param name="iModRef" select="../.."/>
524                                                                         <xsl:with-param name="iBifRef" select="self::node()"/>
525                                                                         <xsl:with-param name="iBifCol" select="$bif_col_"/>
526                                                                 </xsl:call-template>    
527                                                         </xsl:if>
528                                                         <xsl:if test="$G_ROOT/SAV/@MODE = 'FLAT'">
529                                                                 <xsl:call-template name="WRITE_VIEW_BIF_FLAT_SET">
530                                                                         <xsl:with-param name="iModRef" select="../.."/>
531                                                                         <xsl:with-param name="iBifRef" select="self::node()"/>
532                                                                         <xsl:with-param name="iBifCol" select="$bif_col_"/>
533                                                                 </xsl:call-template>
534                                                         </xsl:if>
535                                                 </xsl:if>
536                                         </xsl:for-each>
537                                 </xsl:element>
538                         </xsl:when>
539                         
540                         <!--  FLAT VIEW -->     
541                         <xsl:otherwise>
542                                <xsl:for-each select="BUSINTERFACES/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]">
543                                                 <xsl:variable name="b_bus_"                     select="@BUSNAME"/>
544                                                 <xsl:variable name="b_on_focused_bus_"  select="count($G_ROOT/SAV/BUS[(@INSTANCE = $b_bus_)])"/>
545                                                 <xsl:if test="($b_on_focused_bus_ &gt; 0)">
546                                                         <xsl:if test="$G_ROOT/SAV/@MODE = 'TREE'">
547                                                                 <xsl:call-template name="WRITE_VIEW_BIF_TREE_SET">
548                                                                         <xsl:with-param name="iModRef" select="../.."/>
549                                                                         <xsl:with-param name="iBifRef" select="self::node()"/>
550                                                                 </xsl:call-template>    
551                                                         </xsl:if>
552                                                         <xsl:if test="$G_ROOT/SAV/@MODE = 'FLAT'">
553                                                                 <xsl:call-template name="WRITE_VIEW_BIF_FLAT_SET">
554                                                                         <xsl:with-param name="iModRef" select="../.."/>
555                                                                         <xsl:with-param name="iBifRef" select="self::node()"/>
556                                                                 </xsl:call-template>
557                                                         </xsl:if>
558                                                 </xsl:if>
559                                         </xsl:for-each>            
560                         </xsl:otherwise>
561                 </xsl:choose>
562         </xsl:if>
563         
564 </xsl:template>
565
566 <!--
567     ===================================================
568         THE MODULE TEMPLATE FOR CONNECTED MODULES
569         IN BIF VIEW PROC FOCUS
570     ===================================================
571 -->
572
573 <xsl:template match="MODULE" mode="_bif_view_focusing_on_connected">
574
575         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>EXAMINING CONNECTED MODULE <xsl:value-of select="@INSTANCE"/></xsl:message></xsl:if>
576         
577         <xsl:variable name="m_instance_" select="@INSTANCE"/>
578         <xsl:variable name="m_class_"    select="@MODCLASS"/>
579         
580         <xsl:variable name="bif_scope_">
581                 <xsl:for-each select="BUSINTERFACES/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]">
582                         <xsl:variable name="b_std_"  select="@BUSSTD"/>
583                         <xsl:variable name="b_bus_"  select="@BUSNAME"/>
584                         <xsl:variable name="b_name_" select="@NAME"/>
585         
586                         <xsl:choose>
587                                 <xsl:when test="($b_bus_ = '__NOC__')"><POTENTIAL/></xsl:when>
588                                 
589                                 <xsl:when test="((@TYPE = 'TARGET') or (@TYPE = 'INITIATOR')) and (count(key('G_MAP_P2P_BIFS',$b_bus_)[not(@BUSNAME  = '__NOC__')]) &gt; 0)">
590                                 
591                                          <xsl:variable name="p2p_scope_">
592                                                 <xsl:for-each select="$G_SYS_MODS">                                             
593                                                         <xsl:for-each select="key('G_MAP_P2P_BIFS',$b_bus_)[not(@BUSNAME  = '__NOC__')]">
594                                                                 <xsl:variable name="b_instance_" select="../../@INSTANCE"/>
595                                                                 <xsl:variable name="b_modclass_" select="../../@MODCLASS"/>
596                                                                 <xsl:variable name="b_bifname_"  select="@NAME"/>
597                                                                 <xsl:if test="not(($b_bifname_ = $b_name_) and ($b_instance_ = $m_instance_))">
598                                                                         <xsl:variable name="num_mast_connections_" select="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_])"/>
599                                                                         <xsl:variable name="num_peri_connections_" select="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[(@NAME   = $b_instance_)])"/>
600                                                                         <xsl:if test="(($num_mast_connections_  + $num_peri_connections_) &gt; 0)"><INSCOPE/></xsl:if>
601                                                                         <xsl:if test="(($num_mast_connections_  + $num_peri_connections_) = 0) and not($m_class_ = 'MEMORY') and not($m_class_ = 'MEMORY_CNTLR')"><UNFOCUSED/></xsl:if>
602                                                                 </xsl:if>
603                                                         </xsl:for-each>
604                                                 </xsl:for-each>
605                                          </xsl:variable>
606                                          <xsl:variable name="num_p2p_inscope_"   select="count(exsl:node-set($p2p_scope_)/INSCOPE)"/>
607                                          <xsl:variable name="num_p2p_unfocused_" select="count(exsl:node-set($p2p_scope_)/UNFOCUSED)"/>
608                                          <xsl:if test="$num_p2p_inscope_   &gt; 0"><CONNECTED/></xsl:if>
609                                          <xsl:if test="$num_p2p_unfocused_ &gt; 0"><UNFOCUSED/></xsl:if>
610                                 </xsl:when>
611                                 
612                                          <!-- 
613                                          <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>   P2P <xsl:value-of select="$b_instance_"/> == <xsl:value-of select="$num_peri_connections_"/> UNFOCUSED</xsl:message></xsl:if>
614                                          <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>   P2P <xsl:value-of select="$m_instance_"/>.<xsl:value-of select="$b_name_"/> = <xsl:value-of select="$num_p2p_unfocused_"/> UNFOCUSED</xsl:message></xsl:if>
615                                           -->
616                                 
617                                 <xsl:when test="((@TYPE = 'SLAVE') and not(MASTERS/MASTER)) or (@TYPE = 'MASTER')">
618                                         <xsl:if test="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_]) &gt; 0"><CONNECTED/></xsl:if>
619                                         <xsl:if test="($b_bus_ = '__NOC__') and count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@BUSSTD = $b_std_]) &gt; 0"><POTENTIAL/></xsl:if>
620                                 </xsl:when>
621                                 
622                                 <xsl:when test="(MASTERS/MASTER)">
623                                         <xsl:if test="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_]) &gt; 0"><POTENTIAL/></xsl:if>
624                                         <xsl:for-each select="MASTERS/MASTER">
625                                                 <xsl:variable name="m_inst_" select="@INSTANCE"/>
626                                                 <xsl:choose>
627                                                         <xsl:when test="count($G_ROOT/SAV/MASTER[(@INSTANCE = $m_inst_)]) &gt; 0"><CONNECTED/></xsl:when>
628                                                         <xsl:when test="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[(@NAME   = $m_inst_)]) &gt; 0"><CONNECTED/></xsl:when>
629                                                         <xsl:otherwise><UNFOCUSED/></xsl:otherwise>
630                                                 </xsl:choose>
631                                         </xsl:for-each>
632                                 </xsl:when>
633                         </xsl:choose>
634                 </xsl:for-each>
635                 
636                 <xsl:if test="$m_class_ = 'BUS'">
637                         <xsl:variable name="num_bifs_on_bus_" select="count(key('G_MAP_ALL_BIFS_BY_BUS',$m_instance_))"/>
638                         <!--  <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>BBBBBB <xsl:value-of select="$m_instance_"/> has <xsl:value-of select="$num_bifs_on_bus_"/> bifs </xsl:message></xsl:if> -->
639                         <xsl:for-each select="key('G_MAP_ALL_BIFS_BY_BUS',$m_instance_)">
640                                 <xsl:variable name="b_name_" select="@NAME"/>
641                                 <xsl:variable name="b_type_" select="@TYPE"/>
642                                 <xsl:variable name="b_inst_" select="../../@INSTANCE"/>
643                                 <xsl:variable name="b_icls_" select="../../@MODCLASS"/>
644                                 <xsl:variable name="is_mast_in_focus_" select="count($G_ROOT/SAV/MASTER[(@INSTANCE = $b_inst_)])"/>
645                                 <xsl:variable name="is_peri_in_focus_" select="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[@NAME   = $b_inst_])"/>
646                                 <xsl:if test="(($is_peri_in_focus_ + $is_mast_in_focus_) = 0)"><UNFOCUSED/></xsl:if>
647                         </xsl:for-each>
648                 </xsl:if>
649         </xsl:variable>
650         
651     <xsl:variable name="mod_id_"                         select="@INSTANCE"/>   
652     <xsl:variable name="potential_masts_id_" select="concat('__GROUP_MASTER__.',@INSTANCE)"/>   
653         <xsl:variable name="is_master_"          select="count($G_GROUPS/BLOCK[(@ID = $potential_masts_id_)])"/>        
654         <xsl:variable name="is_focused_on_"      select="count($G_ROOT/SAV/MASTER[(@INSTANCE = $mod_id_)])"/>   
655         <xsl:variable name="is_peripheral_"      select="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[@NAME   = $mod_id_])"/>               
656         <xsl:variable name="num_potential_bifs_" select="count(exsl:node-set($bif_scope_)/POTENTIAL)"/> 
657         <xsl:variable name="num_connected_bifs_" select="count(exsl:node-set($bif_scope_)/CONNECTED)"/>
658         <xsl:variable name="num_unfocused_bifs_" select="count(exsl:node-set($bif_scope_)/UNFOCUSED)"/>
659         
660         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  CONNECTED BIFS <xsl:value-of select="$num_connected_bifs_"/></xsl:message></xsl:if>
661         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  POTENTIAL BIFS <xsl:value-of select="$num_potential_bifs_"/></xsl:message></xsl:if>
662         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  IS PERIPHERAL  <xsl:value-of select="$is_peripheral_"/></xsl:message></xsl:if>                    
663         <xsl:if test="((@MODCLASS = 'BUS') or ($num_connected_bifs_ + $is_focused_on_ + $num_potential_bifs_ + $is_peripheral_) &gt; 0)">               
664         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>    PLACING MODULE <xsl:value-of select="@INSTANCE"/></xsl:message></xsl:if>
665
666                 <xsl:choose>
667                         <xsl:when test="$G_ROOT/SAV/@MODE = 'TREE'">
668                                 <xsl:element name="SET">
669                                         <xsl:attribute name="ID"><xsl:value-of select="@INSTANCE"/></xsl:attribute>
670                                         <xsl:attribute name="CLASS">MODULE</xsl:attribute>
671                                         
672                                         <xsl:choose>
673                                                 <xsl:when test="((@MODCLASS = 'BUS') or (($num_connected_bifs_ + $is_peripheral_ + $is_focused_on_) &gt; 0))">
674                                                                 <xsl:attribute name="CONNECTED_INDEX"><xsl:value-of select="@MHS_INDEX"/></xsl:attribute>
675                                                 </xsl:when>
676                                                 <xsl:otherwise>
677                                                                 <xsl:attribute name="POTENTIAL_INDEX"><xsl:value-of select="@MHS_INDEX"/></xsl:attribute>
678                                                 </xsl:otherwise>
679                                         </xsl:choose>
680                                         
681                                         
682                                         <xsl:choose>
683                                                 <xsl:when test="count($G_ROOT/SAV/MASTER[(@INSTANCE = $mod_id_)]) &gt; 0">
684                                                         <xsl:attribute name="RGB_BG"><xsl:value-of select="$COL_FOCUSED_MASTER"/></xsl:attribute>
685                                                 </xsl:when>
686                                                 <xsl:when test="$num_unfocused_bifs_ &gt; 0">
687                                                         <xsl:attribute name="RGB_FG"><xsl:value-of select="$COL_BG_OUTOF_FOCUS_CONNECTIONS"/></xsl:attribute>
688                                                 </xsl:when>
689                                         </xsl:choose>
690                                                 <!--            
691                                                            CR452579
692                                                            Can only modify INSTANCE name in Hierarchal view.
693                                                 -->     
694                                             <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Name"       NAME="INSTANCE"  VALUE="{@INSTANCE}"/>
695                                             <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Type"    NAME="MODTYPE"   VALUE="{@MODTYPE}" VIEWICON="{LICENSEINFO/@ICON_NAME}"/>
696                                             <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{@HWVERSION}"/>
697                                             
698                                             <xsl:variable name="ipClassification_">
699                                                         <xsl:call-template name="F_ModClass_To_IpClassification">
700                                                                 <xsl:with-param name="iModClass"  select="@MODCLASS"/>
701                                                                 <xsl:with-param name="iBusStd"    select="@BUSSTD"/> 
702                                                         </xsl:call-template>    
703                                             </xsl:variable>
704                                        <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Classification" NAME="IPCLASS" VALUE="{$ipClassification_}"/>
705                                        
706                                    <xsl:apply-templates  select="BUSINTERFACES/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]" mode="_bif_view_focusing_on_connected"/>
707                                 </xsl:element>
708                         </xsl:when>
709                         
710                         <xsl:otherwise>
711                    <xsl:apply-templates  select="BUSINTERFACES/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]" mode="_bif_view_focusing_on_connected"/>
712                         </xsl:otherwise>
713                 </xsl:choose>
714         </xsl:if>
715 </xsl:template>
716
717
718 <!--
719     ===================================================
720         THE MODULE TEMPLATE FOR POTENTIAL MODULES
721         IN BIF VIEW PROC FOCUS
722     ===================================================
723 -->
724
725 <xsl:template match="MODULE" mode="_bif_view_focusing_on_potentials">
726
727         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>EXAMINING POTENTIAL MODULE <xsl:value-of select="@INSTANCE"/></xsl:message></xsl:if>
728         
729         <xsl:variable name="m_instance_" select="@INSTANCE"/>
730         <xsl:variable name="m_modclass_" select="@MODCLASS"/>
731         
732         <xsl:variable name="bif_scope_">
733                 <xsl:for-each select="BUSINTERFACES/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]">
734                         <xsl:variable name="b_std_"  select="@BUSSTD"/>
735                         <xsl:variable name="b_bus_"  select="@BUSNAME"/>
736                         <xsl:choose>
737                         
738                                 <xsl:when test="($b_bus_ = '__NOC__')"><POTENTIAL/></xsl:when>
739                                 
740                                 <xsl:when test="((@TYPE = 'TARGET') or (@TYPE = 'INITIATOR')) and (count(key('G_MAP_P2P_BIFS',$b_bus_)[not(@BUSNAME  = '__NOC__')]) &gt; 0)">
741                                          <xsl:variable name="p2p_scope_">
742                                                 <xsl:for-each select="$G_SYS_MODS"> <!-- To set the right scope for the keys  -->
743                                                         <xsl:for-each select="key('G_MAP_P2P_BIFS',$b_bus_)[not(@BUSNAME  = '__NOC__')]">
744                                                                 <xsl:variable name="b_instance_" select="../../@INSTANCE"/>
745                                                                 <xsl:variable name="b_modclass_" select="../../@MODCLASS"/>
746                                                                 <xsl:variable name="num_mast_connections_" select="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_])"/>
747                                                                 <xsl:variable name="num_peri_connections_">
748                                                                         <xsl:choose>
749                                                                                 <xsl:when test="((($m_modclass_ = 'PROCESSOR') and ($b_modclass_ = 'PROCESSOR')) or not($b_modclass_ = 'PROCESSOR'))">
750                                                                                         <xsl:value-of select="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[(@NAME   = $b_instance_)])"/>
751                                                                                 </xsl:when>
752                                                                                 <xsl:otherwise>0</xsl:otherwise>
753                                                                         </xsl:choose>
754                                                                 </xsl:variable> 
755                                                                         
756                                                                 <xsl:if test="(($num_mast_connections_  + $num_peri_connections_) &gt; 0)"><INSCOPE/></xsl:if>
757                                                                 <xsl:if test="(($num_mast_connections_  + $num_peri_connections_) = 0) and not($m_modclass_ = 'MEMORY') and not($m_modclass_ = 'MEMORY_CNTLR')"><UNFOCUSED/></xsl:if>
758                                                         </xsl:for-each>
759                                                 </xsl:for-each>
760                                          </xsl:variable>
761                                          <xsl:variable name="num_p2p_inscope_"   select="count(exsl:node-set($p2p_scope_)/INSCOPE)"/>
762                                          <xsl:variable name="num_p2p_unfocused_" select="count(exsl:node-set($p2p_scope_)/UNFOCUSED)"/>
763                                          <xsl:if test="$num_p2p_inscope_   &gt; 0"><CONNECTED/></xsl:if>
764                                          <xsl:if test="$num_p2p_unfocused_ &gt; 0"><UNFOCUSED/></xsl:if>
765                                 </xsl:when>
766                                 
767                                 <xsl:when test="(@TYPE = 'SLAVE') and not(MASTERS/MASTER)">
768                                         <xsl:if test="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_]) &gt; 0"><CONNECTED/></xsl:if>
769                                         <xsl:if test="($b_bus_ = '__NOC__') and count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@BUSSTD = $b_std_]) &gt; 0"><POTENTIAL/></xsl:if>
770                                 </xsl:when>
771                                 
772                                 <xsl:when test="(MASTERS/MASTER)">
773                                         <xsl:if test="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_]) &gt; 0"><POTENTIAL/></xsl:if>
774                                         <xsl:for-each select="MASTERS/MASTER">
775                                                 <xsl:variable name="m_inst_" select="@INSTANCE"/>
776                                                 <xsl:choose>
777                                                         <xsl:when test="count($G_ROOT/SAV/MASTER[(@INSTANCE = $m_inst_)]) &gt; 0"><CONNECTED/></xsl:when>
778                                                         <xsl:when test="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[(@NAME   = $m_inst_)]) &gt; 0"><CONNECTED/></xsl:when>
779                                                         <xsl:otherwise><UNFOCUSED/></xsl:otherwise>
780                                                 </xsl:choose>
781                                         </xsl:for-each>
782                                 </xsl:when>
783                         </xsl:choose>
784                 </xsl:for-each>
785                 
786                 <xsl:if test="$m_modclass_ = 'BUS'">
787                         <xsl:variable name="num_bifs_on_bus_" select="count(key('G_MAP_ALL_BIFS_BY_BUS',$m_instance_))"/>
788                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>BUS <xsl:value-of select="$m_instance_"/> has <xsl:value-of select="$num_bifs_on_bus_"/> bifs </xsl:message></xsl:if>
789                         <xsl:for-each select="key('G_MAP_ALL_BIFS_BY_BUS',$m_instance_)">
790                                 <xsl:variable name="b_name_" select="@NAME"/>
791                                 <xsl:variable name="b_type_" select="@TYPE"/>
792                                 <xsl:variable name="b_inst_" select="../../@INSTANCE"/>
793                                 <xsl:variable name="b_icls_" select="../../@MODCLASS"/>
794                                 <xsl:variable name="is_mast_in_focus_" select="count($G_ROOT/SAV/MASTER[(@INSTANCE = $b_inst_)])"/>
795                                 <xsl:variable name="is_peri_in_focus_" select="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[@NAME   = $b_inst_])"/>
796                                 <xsl:if test="(($is_peri_in_focus_ + $is_mast_in_focus_) = 0)"><UNFOCUSED/></xsl:if>                            
797                         </xsl:for-each>
798                 </xsl:if>
799         </xsl:variable>
800         
801     <xsl:variable name="mod_id_"                         select="@INSTANCE"/>   
802     <xsl:variable name="potential_masts_id_" select="concat('__GROUP_MASTER__.',@INSTANCE)"/>   
803         <xsl:variable name="is_master_"          select="count($G_GROUPS/BLOCK[(@ID = $potential_masts_id_)])"/>        
804         <xsl:variable name="is_peripheral_"      select="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[@NAME   = $mod_id_])"/>               
805         <xsl:variable name="num_potential_bifs_" select="count(exsl:node-set($bif_scope_)/POTENTIAL)"/> 
806         <xsl:variable name="num_connected_bifs_" select="count(exsl:node-set($bif_scope_)/CONNECTED)"/>
807         <xsl:variable name="num_unfocused_bifs_" select="count(exsl:node-set($bif_scope_)/UNFOCUSED)"/>
808 <!-- 
809 -->
810         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  <xsl:value-of select="$num_connected_bifs_"/> connected BIFS</xsl:message></xsl:if>       
811         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  <xsl:value-of select="$num_potential_bifs_"/> potential bifs </xsl:message></xsl:if>      
812         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  <xsl:value-of select="$num_unfocused_bifs_"/> unfocused bifs </xsl:message></xsl:if>      
813         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  <xsl:value-of select="$is_peripheral_"/> is a peripheral</xsl:message></xsl:if>   
814         
815         <xsl:if test="(($num_connected_bifs_ + $num_potential_bifs_ + $is_peripheral_) &gt; 0)">
816                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING POTENTIAL MODULE <xsl:value-of select="@INSTANCE"/></xsl:message></xsl:if>
817                 <xsl:choose>
818                 
819                         <xsl:when test="$G_ROOT/SAV/@MODE = 'TREE'">            
820                                 <xsl:element name="SET">
821                                         <xsl:attribute name="ID"><xsl:value-of select="@INSTANCE"/></xsl:attribute>
822                                         <xsl:attribute name="CLASS">MODULE</xsl:attribute>
823                                         <xsl:choose>
824                                                 <xsl:when  test="(($is_peripheral_ &gt; 0) or ($num_connected_bifs_ &gt; 0))">
825                                                         <xsl:attribute name="CONNECTED_INDEX"><xsl:value-of select="@MHS_INDEX"/></xsl:attribute>
826                                                 </xsl:when>
827                                                 <xsl:otherwise>
828                                                         <xsl:attribute name="POTENTIAL_INDEX"><xsl:value-of select="@MHS_INDEX"/></xsl:attribute>
829                                                 </xsl:otherwise>
830                                         </xsl:choose>
831                                         
832                                         <xsl:choose>
833                                                 <xsl:when test="count($G_ROOT/SAV/MASTER[(@INSTANCE = $mod_id_)]) &gt; 0">
834                                                         <xsl:attribute name="RGB_BG"><xsl:value-of select="$COL_FOCUSED_MASTER"/></xsl:attribute>
835                                                 </xsl:when>
836                                                 <xsl:when test="$num_unfocused_bifs_ &gt; 0">
837                                                         <xsl:attribute name="RGB_FG"><xsl:value-of select="$COL_BG_OUTOF_FOCUS_CONNECTIONS"/></xsl:attribute>
838                                                 </xsl:when>
839                                         </xsl:choose>           
840                                         
841                                         <!-- CR452579 Can only modify INSTANCE name in Hierarchal view. -->     
842                                     <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Name"       NAME="INSTANCE"  VALUE="{@INSTANCE}"/>
843                                     <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Type"    NAME="MODTYPE"   VALUE="{@MODTYPE}" VIEWICON="{LICENSEINFO/@ICON_NAME}"/>
844                                     <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{@HWVERSION}"/>
845                                     
846                                     <xsl:variable name="ipClassification_">
847                                                 <xsl:call-template name="F_ModClass_To_IpClassification">
848                                                         <xsl:with-param name="iModClass"  select="@MODCLASS"/>
849                                                         <xsl:with-param name="iBusStd"    select="@BUSSTD"/> 
850                                                 </xsl:call-template>    
851                                     </xsl:variable>
852                                     
853                                <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Classification" NAME="IPCLASS" VALUE="{$ipClassification_}"/>
854                                
855                            <xsl:apply-templates  select="BUSINTERFACES/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]" mode="_bif_view_focusing_on_potentials"/>
856                                 </xsl:element>                 
857                         </xsl:when>
858                         
859                         <xsl:otherwise>
860                            <xsl:apply-templates  select="BUSINTERFACES/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]" mode="_bif_view_focusing_on_potentials"/>
861                         </xsl:otherwise>
862                 </xsl:choose>
863         </xsl:if>
864 </xsl:template>
865
866 <!--
867     +++++++++++++++++++++++++++++++++++++++++++++++++++++
868                        BUS INTERFACE TEMPLATES
869     +++++++++++++++++++++++++++++++++++++++++++++++++++++
870 -->
871
872 <!--
873     ===================================================
874         THE BIF TEMPLATE FOR CONNECTED MODULES
875         IN BIF VIEW PROC FOCUS
876     ===================================================
877 -->
878 <xsl:template match="BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]" mode="_bif_view_focusing_on_connected">
879         <xsl:variable name="m_instance_" select="../../@INSTANCE"/>
880         <xsl:variable name="b_std_"      select="@BUSSTD"/>
881         <xsl:variable name="b_bus_"      select="@BUSNAME"/>
882         <xsl:variable name="b_name_"     select="@NAME"/>
883         
884         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message> EXAMINING CONNECTED INTERFACE <xsl:value-of select="$m_instance_"/>.<xsl:value-of select="$b_name_"/></xsl:message></xsl:if>
885         
886         <xsl:variable name="bif_scope_">
887                 <xsl:choose>
888                         <xsl:when test="($b_bus_ = '__NOC__')"><POTENTIAL/></xsl:when>
889                         <xsl:when test="((@TYPE = 'TARGET') or (@TYPE = 'INITIATOR')) and (count(key('G_MAP_P2P_BIFS',$b_bus_)[not(@BUSNAME  = '__NOC__')]) &gt; 0)">
890                                  <xsl:variable name="p2p_scope_">
891                                         <xsl:for-each select="$G_SYS_MODS">     <!--  to put in right scope for key below -->
892                                                 <xsl:for-each select="key('G_MAP_P2P_BIFS',$b_bus_)[not(@BUSNAME  = '__NOC__')]">
893                                                         <xsl:variable name="p2p_bifname_"  select="@NAME"/>
894                                                         <xsl:variable name="p2p_instance_" select="../../@INSTANCE"/>
895                                                         
896                                                         <xsl:variable name="num_proc_connections_" select="count(key('G_MAP_PROCESSORS',$p2p_instance_))"/>
897                                                         <xsl:variable name="num_mast_connections_" select="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_])"/>
898                                                         <xsl:variable name="num_peri_connections_" select="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[(@NAME   = $p2p_instance_)])"/>
899                                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  <xsl:value-of select="$p2p_instance_"/>.<xsl:value-of select="$p2p_bifname_"/></xsl:message></xsl:if>
900                                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  PROC CONNECTIONS <xsl:value-of select="$num_proc_connections_"/></xsl:message></xsl:if>
901                                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  MAST CONNECTIONS <xsl:value-of select="$num_mast_connections_"/></xsl:message></xsl:if>
902                                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  PERI CONNECTIONS <xsl:value-of select="$num_peri_connections_"/></xsl:message></xsl:if>
903                                                         
904                                                         <xsl:if test="($num_mast_connections_ = 0)   and ($num_proc_connections_ &gt; 0)"><OUTSCOPE/></xsl:if>
905                                                         <xsl:if test="($num_mast_connections_ &gt; 0) or ($num_peri_connections_ &gt; 0)"><INSCOPE/></xsl:if>
906                                                         
907                                                 </xsl:for-each>
908                                         </xsl:for-each>
909                                  </xsl:variable>
910                                  
911                                  <xsl:variable name="num_p2p_inscope_"  select="count(exsl:node-set($p2p_scope_)/INSCOPE)"/>
912                                  <xsl:variable name="num_p2p_outscope_" select="count(exsl:node-set($p2p_scope_)/OUTSCOPE)"/>
913                                  
914                                  <xsl:if test="(($num_p2p_inscope_ &gt; 0) and ($num_p2p_outscope_ = 0))"><CONNECTED/></xsl:if>
915                         </xsl:when>
916                         <xsl:when test="(@TYPE = 'MASTER')">
917                                 <xsl:if test="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_]) &gt; 0"><CONNECTED/></xsl:if>
918                         </xsl:when>
919                         <xsl:when test="(@TYPE = 'SLAVE') and not(MASTERS/MASTER)">
920                                 <xsl:if test="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_]) &gt; 0"><CONNECTED/></xsl:if>
921                                 <xsl:if test="($b_bus_ = '__NOC__') and count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@BUSSTD = $b_std_]) &gt; 0"><POTENTIAL/></xsl:if>
922                         </xsl:when>
923                         <xsl:when test="(MASTERS/MASTER)">
924                                 <xsl:if test="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_]) &gt; 0"><POTENTIAL/></xsl:if>
925                                 <xsl:for-each select="MASTERS/MASTER">
926                                         <xsl:variable name="m_inst_" select="@INSTANCE"/>
927                                         <xsl:choose>
928                                                 <xsl:when test="count($G_ROOT/SAV/MASTER[(@INSTANCE = $m_inst_)]) &gt; 0"><CONNECTED/></xsl:when>
929                                                 <xsl:when test="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[(@NAME   = $m_inst_)]) &gt; 0"><CONNECTED/></xsl:when>
930                                                 <xsl:otherwise><UNFOCUSED/></xsl:otherwise>
931                                         </xsl:choose>
932                                 </xsl:for-each>
933                         </xsl:when>
934                 </xsl:choose>
935         </xsl:variable>         
936         
937         <xsl:variable name="num_scope_unfocuseds_" select="count(exsl:node-set($bif_scope_)/UNFOCUSED)"/>       
938         <xsl:variable name="num_scope_potentials_" select="count(exsl:node-set($bif_scope_)/POTENTIAL)"/>
939         <xsl:variable name="num_scope_connecteds_" select="count(exsl:node-set($bif_scope_)/CONNECTED)"/>
940         
941         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  CONNECTED SCOPE <xsl:value-of select="$num_scope_connecteds_"/></xsl:message></xsl:if>
942         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  POTENTIAL SCOPE <xsl:value-of select="$num_scope_potentials_"/></xsl:message></xsl:if>
943
944         <xsl:variable name="include_bif_">
945                 <xsl:choose>
946                         <xsl:when test="($b_bus_ = '__NOC__')">TRUE</xsl:when>
947                         <xsl:when test="(((@TYPE = 'TARGET') or (@TYPE = 'INITIATOR')) and ($num_scope_connecteds_  &gt; 0))">TRUE</xsl:when>
948                         <xsl:when test="((@TYPE = 'MASTER') or (@TYPE = 'SLAVE') or (@TYPE = 'MASTER_SLAVE')) and (($num_scope_potentials_  &gt; 0) or ($num_scope_connecteds_  &gt; 0))">TRUE</xsl:when>
949                         <xsl:otherwise>FALSE</xsl:otherwise>
950                 </xsl:choose>                   
951         </xsl:variable>
952                                 
953         <xsl:if test="($include_bif_ = 'TRUE')">
954                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>   PLACING CONNECTED INTERFACE <xsl:value-of select="$m_instance_"/>.<xsl:value-of select="$b_name_"/></xsl:message></xsl:if>
955
956                 <xsl:variable name="bif_col_">
957                         <xsl:choose>
958                                 <xsl:when test="($num_scope_unfocuseds_ &gt; 0)"><xsl:value-of select="$COL_BG_OUTOF_FOCUS_CONNECTIONS"/></xsl:when>
959                                 <xsl:otherwise>__NONE__</xsl:otherwise>
960                         </xsl:choose>   
961                 </xsl:variable> 
962                 
963                 <xsl:if test="$G_ROOT/SAV/@MODE = 'TREE'">
964                         <xsl:call-template name="WRITE_VIEW_BIF_TREE_SET">
965                                 <xsl:with-param name="iModRef" select="../.."/>
966                                 <xsl:with-param name="iBifRef" select="self::node()"/>
967                                 <xsl:with-param name="iBifCol" select="$bif_col_"/>
968                         </xsl:call-template>    
969                 </xsl:if>               
970                 
971                 <xsl:if test="$G_ROOT/SAV/@MODE = 'FLAT'">
972                         <xsl:call-template name="WRITE_VIEW_BIF_FLAT_SET">
973                                 <xsl:with-param name="iModRef" select="../.."/>
974                                 <xsl:with-param name="iBifRef" select="self::node()"/>
975                                 <xsl:with-param name="iBifCol" select="$bif_col_"/>
976                         </xsl:call-template>
977                 </xsl:if>       
978         </xsl:if>
979 </xsl:template>  
980
981 <!--
982     ===================================================
983         THE BIF TEMPLATE FOR POTENTIAL MODULES
984         IN BIF VIEW PROC FOCUS
985     ===================================================
986 -->
987
988 <xsl:template match="BUSINTERFACES/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]" mode="_bif_view_focusing_on_potentials">
989         <xsl:variable name="m_instance_" select="../../@INSTANCE"/>
990         <xsl:variable name="b_name_"     select="@NAME"/>
991         <xsl:variable name="b_std_"      select="@BUSSTD"/>
992         <xsl:variable name="b_bus_"      select="@BUSNAME"/>
993         
994         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message> EXAMINING POTENTIAL INTERFACE <xsl:value-of select="$m_instance_"/>.<xsl:value-of select="$b_name_"/></xsl:message></xsl:if>
995         
996         <xsl:variable name="bif_scope_">
997                 <xsl:choose>
998                         <xsl:when test="($b_bus_ = '__NOC__')"><POTENTIAL/></xsl:when>
999                         
1000                         <xsl:when test="((@TYPE = 'TARGET') or (@TYPE = 'INITIATOR')) and (count(key('G_MAP_P2P_BIFS',$b_bus_)[not(@BUSNAME  = '__NOC__')]) &gt; 0)">
1001                                  <xsl:variable name="p2p_scope_">
1002                                         <xsl:for-each select="$G_SYS_MODS">                                             
1003                                                 <xsl:for-each select="key('G_MAP_P2P_BIFS',$b_bus_)[not(@BUSNAME  = '__NOC__')]">
1004                                                         <xsl:variable name="b_instance_" select="../../@INSTANCE"/>
1005                                                         
1006                                                         <xsl:variable name="num_proc_connections_" select="count(key('G_MAP_PROCESSORS',$b_instance_))"/>
1007                                                         <xsl:variable name="num_mast_connections_" select="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_])"/>
1008                                                         <xsl:variable name="num_peri_connections_" select="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[(@NAME   = $b_instance_)])"/>
1009                                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  PROC CONNECTIONS <xsl:value-of select="$num_proc_connections_"/></xsl:message></xsl:if>
1010                                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  MAST CONNECTIONS <xsl:value-of select="$num_mast_connections_"/></xsl:message></xsl:if>
1011                                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>  PERI CONNECTIONS <xsl:value-of select="$num_peri_connections_"/></xsl:message></xsl:if>
1012                                                         
1013                                                         <xsl:if test="($num_mast_connections_ = 0)   and ($num_proc_connections_ &gt; 0)"><OUTSCOPE/></xsl:if>
1014                                                         <xsl:if test="($num_mast_connections_ &gt; 0) or ($num_peri_connections_ &gt; 0)"><INSCOPE/></xsl:if>
1015                                                         
1016                                                 </xsl:for-each>
1017                                         </xsl:for-each>
1018                                  </xsl:variable>
1019                                  
1020                                  <xsl:variable name="num_p2p_inscope_"  select="count(exsl:node-set($p2p_scope_)/INSCOPE)"/>
1021                                  <xsl:variable name="num_p2p_outscope_" select="count(exsl:node-set($p2p_scope_)/OUTSCOPE)"/>
1022                                  
1023                                  <xsl:if test="(($num_p2p_inscope_ &gt; 0) and ($num_p2p_outscope_ = 0))"><CONNECTED/></xsl:if>
1024                         </xsl:when>     
1025                         <xsl:when test="(((@TYPE = 'SLAVE') and not(MASTERS/MASTER)) or (@TYPE = 'MASTER'))">
1026                                 <xsl:if test="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_]) &gt; 0"><CONNECTED/></xsl:if>
1027                                 <xsl:if test="($b_bus_ = '__NOC__') and count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@BUSSTD = $b_std_]) &gt; 0"><POTENTIAL/></xsl:if>
1028                         </xsl:when>
1029                         <xsl:when test="(MASTERS/MASTER)">
1030                                 <xsl:if test="count(exsl:node-set($G_FOCUSED_SCOPE)/BUS[@NAME   = $b_bus_]) &gt; 0"><POTENTIAL/></xsl:if>
1031                                 <xsl:for-each select="MASTERS/MASTER">
1032                                         <xsl:variable name="m_inst_" select="@INSTANCE"/>
1033                                         <xsl:choose>
1034                                                 <xsl:when test="count($G_ROOT/SAV/MASTER[(@INSTANCE = $m_inst_)]) &gt; 0"><CONNECTED/></xsl:when>
1035                                                 <xsl:when test="count(exsl:node-set($G_FOCUSED_SCOPE)/PERIPHERAL[(@NAME   = $m_inst_)]) &gt; 0"><CONNECTED/></xsl:when>
1036                                                 <xsl:otherwise><UNFOCUSED/></xsl:otherwise>
1037                                         </xsl:choose>
1038                                 </xsl:for-each>
1039                         </xsl:when>
1040                 </xsl:choose>
1041         </xsl:variable>         
1042         
1043         <xsl:variable name="num_scope_potentials_" select="count(exsl:node-set($bif_scope_)/POTENTIAL)"/>
1044         <xsl:variable name="num_scope_connecteds_" select="count(exsl:node-set($bif_scope_)/CONNECTED)"/>
1045         <xsl:variable name="num_scope_unfocuseds_" select="count(exsl:node-set($bif_scope_)/UNFOCUSED)"/>       
1046         
1047         <xsl:variable name="include_bif_">
1048                 <xsl:choose>
1049                         <xsl:when test="($b_bus_ = '__NOC__')">TRUE</xsl:when>
1050                         <xsl:when test="(((@TYPE = 'TARGET') or (@TYPE = 'INITIATOR')) and ($num_scope_connecteds_  &gt; 0))">TRUE</xsl:when>
1051                         <xsl:when test="((@TYPE = 'MASTER') or (@TYPE = 'SLAVE') or (@TYPE = 'MASTER_SLAVE')) and (($num_scope_potentials_  &gt; 0) or ($num_scope_connecteds_  &gt; 0))">TRUE</xsl:when>
1052                         <xsl:otherwise>FALSE</xsl:otherwise>
1053                 </xsl:choose>
1054         </xsl:variable>
1055
1056         <xsl:variable name="bif_col_">
1057                 <xsl:choose>
1058                         <xsl:when test="($num_scope_unfocuseds_ &gt; 0)"><xsl:value-of select="$COL_BG_OUTOF_FOCUS_CONNECTIONS"/></xsl:when>
1059                         <xsl:otherwise>__NONE__</xsl:otherwise>
1060                 </xsl:choose>   
1061         </xsl:variable>
1062         
1063         <xsl:if test="($include_bif_ = 'TRUE')">
1064                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>   PLACING POTENTIAL INTERFACE <xsl:value-of select="$m_instance_"/>.<xsl:value-of select="$b_name_"/></xsl:message></xsl:if>
1065                 <xsl:if test="$G_ROOT/SAV/@MODE = 'TREE'">
1066                         <xsl:call-template name="WRITE_VIEW_BIF_TREE_SET">
1067                                 <xsl:with-param name="iModRef" select="../.."/>
1068                                 <xsl:with-param name="iBifRef" select="self::node()"/>
1069                                 <xsl:with-param name="iBifCol" select="$bif_col_"/>
1070                         </xsl:call-template>    
1071                 </xsl:if>
1072                 <xsl:if test="$G_ROOT/SAV/@MODE = 'FLAT'">
1073                         <xsl:call-template name="WRITE_VIEW_BIF_FLAT_SET">
1074                                 <xsl:with-param name="iModRef" select="../.."/>
1075                                 <xsl:with-param name="iBifRef" select="self::node()"/>
1076                                 <xsl:with-param name="iBifCol" select="$bif_col_"/>
1077                         </xsl:call-template>
1078                 </xsl:if>       
1079         </xsl:if>
1080         
1081 </xsl:template>
1082
1083 <!--  THINGS TO IGNORE -->
1084 <!-- Ignore all non valid bus interfaces -->
1085 <xsl:template match="MODULE/DESCRIPTION" mode="_bif_view_focusing_on_potentials">
1086 <!--  <xsl:message>Ignoring invalid bus interface <xsl:value-of select="@NAME"/></xsl:message> -->
1087 </xsl:template>
1088
1089 <xsl:template match="MODULE/PARAMETERS" mode="_bif_view_focusing_on_potentials">
1090 <!--  <xsl:message>Ignoring invalid bus interface <xsl:value-of select="@NAME"/></xsl:message> -->
1091 </xsl:template>
1092
1093 <xsl:template match="MODULE/DOCUMENTATION" mode="_bif_view_focusing_on_potentials">
1094 <!--  <xsl:message>Ignoring invalid bus interface <xsl:value-of select="@NAME"/></xsl:message> -->
1095 </xsl:template>
1096
1097 <xsl:template match="MODULE/LICENSEINFO" mode="_bif_view_focusing_on_potentials">
1098 <!--  <xsl:message>Ignoring invalid bus interface <xsl:value-of select="@NAME"/></xsl:message> -->
1099 </xsl:template>
1100
1101 <!-- Ignore all non valid bus interfaces -->
1102 <xsl:template match="BUSINTERFACES/BUSINTERFACE[(@IS_VALID = 'FALSE')]" mode="_bif_view_focusing_on_potentials">
1103 </xsl:template>
1104
1105 <xsl:template match="MODULE/DESCRIPTION" mode="_bif_view_focusing_on_connected">
1106 <!--  <xsl:message>Ignoring invalid bus interface <xsl:value-of select="@NAME"/></xsl:message> -->
1107 </xsl:template>
1108
1109 <xsl:template match="MODULE/PARAMETERS" mode="_bif_view_focusing_on_connected">
1110 <!--  <xsl:message>Ignoring invalid bus interface <xsl:value-of select="@NAME"/></xsl:message> -->
1111 </xsl:template>
1112
1113 <xsl:template match="MODULE/DOCUMENTATION" mode="_bif_view_focusing_on_connected">
1114 <!--  <xsl:message>Ignoring invalid bus interface <xsl:value-of select="@NAME"/></xsl:message> -->
1115 </xsl:template>
1116
1117 <xsl:template match="MODULE/LICENSEINFO" mode="_bif_view_focusing_on_connected">
1118 <!--  <xsl:message>Ignoring invalid bus interface <xsl:value-of select="@NAME"/></xsl:message> -->
1119 </xsl:template>
1120
1121 <xsl:template match="BUSINTERFACES/BUSINTERFACE[(@IS_VALID = 'FALSE')]" mode="_bif_view_focusing_on_connected">
1122 </xsl:template>
1123
1124 <!-- Ignore all non valid bus interfaces -->
1125 <xsl:template match="SAV" mode="_port_view_focusing_on_selected">
1126 </xsl:template>
1127
1128 <xsl:template match="MODULE/DESCRIPTION" mode="_port_view_focusing_on_selected">
1129 <!--  <xsl:message>Ignoring invalid bus interface <xsl:value-of select="@NAME"/></xsl:message> -->
1130 </xsl:template>
1131
1132 <xsl:template match="MODULE/PARAMETERS" mode="_port_view_focusing_on_selected">
1133 <!--  <xsl:message>Ignoring invalid bus interface <xsl:value-of select="@NAME"/></xsl:message> -->
1134 </xsl:template>
1135
1136 <xsl:template match="MODULE/DOCUMENTATION" mode="_port_view_focusing_on_selected">
1137 <!--  <xsl:message>Ignoring invalid bus interface <xsl:value-of select="@NAME"/></xsl:message> -->
1138 </xsl:template>
1139
1140 <xsl:template match="MODULE/LICENSEINFO" mode="_port_view_focusing_on_selected">
1141 <!--  <xsl:message>Ignoring invalid bus interface <xsl:value-of select="@NAME"/></xsl:message> -->
1142 </xsl:template>
1143
1144 <!-- Ignore all non valid bus interfaces -->
1145 <xsl:template match="BUSINTERFACES/BUSINTERFACE[(@IS_VALID = 'FALSE')]" mode="_port_view_focusing_on_selected">
1146 </xsl:template>
1147
1148 <!-- 
1149         Only write bus interfaces that are valid for non point to point interfaces 
1150         that have busstds the processor can see 
1151 -->
1152
1153 <!--
1154     ===============================================
1155           GROUP VIEW TRANSFORMS
1156     ===============================================
1157 -->
1158
1159 <xsl:template name="WRITE_VIEW_GROUPS">
1160     <xsl:param name="iModules"/>
1161
1162     <xsl:if test="$G_DEBUG='TRUE'">
1163        <!--
1164        <xsl:message>BLKD AREA            = <xsl:value-of select="$blkd_full_w_"/> X <xsl:value-of select="$blkd_full_h_"/></xsl:message>
1165        <xsl:message>NUMOF BUSSTD COLORS  = <xsl:value-of select="$COL_BUSSTDS_NUMOF"/></xsl:message>
1166             <xsl:message>NUMOF INTERFACE TYPES= <xsl:value-of select="$G_IFTYPES_NUMOF"/></xsl:message> 
1167             <xsl:message>NUMOF DIRS           = <xsl:value-of select="$G_BLKD_COMPASS_DIRS_NUMOF"/></xsl:message>
1168         <xsl:apply-templates select="$G_BLOCKS/node()" mode="_place_module_blocks_"/>        
1169         -->
1170     </xsl:if>
1171    
1172     <xsl:element name="SET">
1173         <xsl:attribute name="CLASS">PROJECT</xsl:attribute>
1174         <xsl:attribute name="VIEW_ID">BUSINTERFACE</xsl:attribute>
1175         <xsl:attribute name="DISPLAYMODE">TREE</xsl:attribute>
1176         <xsl:call-template name="WRITE_VIEW_BIF_GROUPS">
1177                 <xsl:with-param name="iModules" select="$G_BLOCKS"/>
1178         </xsl:call-template>    
1179     </xsl:element>
1180 </xsl:template>
1181 <xsl:template name="WRITE_VIEW_BIF_GROUPS">
1182         <xsl:param name="iModules"/>
1183     
1184         <xsl:for-each select="$iModules/BLOCK[@ID and not(BLOCK) and not(@C)]">
1185         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING BUS <xsl:value-of select="@ID"/></xsl:message></xsl:if>
1186         
1187         <xsl:variable name="m_id_" select="@ID"/>
1188         <xsl:variable name="m_module_"   select="$G_SYS_MODS/MODULE[@INSTANCE = $m_id_]"/>
1189         <xsl:variable name="m_instance_" select="$m_module_/@INSTANCE"/>
1190         <xsl:variable name="m_version_"  select="$m_module_/@HWVERSION"/>
1191         <xsl:variable name="m_type_"     select="$m_module_/@MODTYPE"/>
1192         <xsl:variable name="m_class_"    select="$m_module_/@MODCLASS"/>
1193         <xsl:variable name="m_busstd_"   select="$m_module_/@BUSSTD"/>
1194         
1195                 <xsl:element name="SET">
1196                 <xsl:attribute name="ID"><xsl:value-of select="@ID"/></xsl:attribute>
1197                 <xsl:attribute name="CLASS">MODULE</xsl:attribute>
1198                         <xsl:element name="VARIABLE">
1199                         <xsl:attribute name="VIEWDISP">Name</xsl:attribute>
1200                         <xsl:attribute name="VIEWTYPE">TEXTBOX</xsl:attribute>
1201                         <xsl:attribute name="NAME">INSTANCE</xsl:attribute>
1202                         <xsl:attribute name="VALUE"><xsl:value-of select="$m_instance_"/></xsl:attribute>
1203                         </xsl:element>
1204                         <xsl:element name="VARIABLE">
1205                         <xsl:attribute name="VIEWDISP">IP Type</xsl:attribute>
1206                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1207                         <xsl:attribute name="NAME">MODTYPE</xsl:attribute>
1208                         <xsl:attribute name="VALUE"><xsl:value-of select="$m_type_"/></xsl:attribute>
1209                         </xsl:element>
1210                         <xsl:element name="VARIABLE">
1211                         <xsl:attribute name="VIEWDISP">IP Version</xsl:attribute>
1212                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1213                         <xsl:attribute name="NAME">HWVERSION</xsl:attribute>
1214                         <xsl:attribute name="VALUE"><xsl:value-of select="$m_version_"/></xsl:attribute>
1215                         </xsl:element>                  
1216                         <xsl:element name="VARIABLE">
1217                         <xsl:attribute name="VIEWDISP">IP Classification</xsl:attribute>
1218                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1219                         <xsl:attribute name="NAME">IPCLASS</xsl:attribute>
1220                         <xsl:attribute name="VALUE"><xsl:value-of select="$m_busstd_"/> BUS</xsl:attribute>
1221                         </xsl:element>                          
1222             </xsl:element>
1223    </xsl:for-each> 
1224             
1225         <xsl:for-each select="$iModules/BLOCK[@ID and BLOCK]">
1226                 <xsl:choose>    
1227                         <xsl:when test="not(starts-with(@ID,'__')) and BLOCK[@C] and (not(BLOCK/BLOCK) or BLOCK/BLOCK[@CP])">
1228                         <!-- 
1229                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING MODULE <xsl:value-of select="@ID"/></xsl:message></xsl:if>
1230                          -->
1231                                 <xsl:variable name="m_id_"       select="@ID"/>
1232                         <xsl:variable name="m_module_"   select="$G_SYS_MODS/MODULE[@INSTANCE = $m_id_]"/>
1233                         <xsl:variable name="m_instance_" select="$m_module_/@INSTANCE"/>
1234                         <xsl:variable name="m_type_"     select="$m_module_/@MODTYPE"/>
1235                         <xsl:variable name="m_class_"    select="$m_module_/@MODCLASS"/>
1236                         <xsl:variable name="m_version_"  select="$m_module_/@HWVERSION"/>
1237                         
1238                                 <xsl:element name="SET">
1239                                 <xsl:attribute name="ID"><xsl:value-of select="@ID"/></xsl:attribute>
1240                                 <xsl:attribute name="CLASS">MODULE</xsl:attribute>
1241                                 
1242                                         <xsl:element name="VARIABLE">
1243                                         <xsl:attribute name="VIEWDISP">Name</xsl:attribute>
1244                                         <xsl:attribute name="VIEWTYPE">TEXTBOX</xsl:attribute>
1245                                         <xsl:attribute name="NAME">INSTANCE</xsl:attribute>
1246                                         <xsl:attribute name="VALUE"><xsl:value-of select="$m_instance_"/></xsl:attribute>
1247                                         </xsl:element>
1248                                         <xsl:element name="VARIABLE">
1249                                         <xsl:attribute name="VIEWDISP">IP Type</xsl:attribute>
1250                                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1251                                         <xsl:attribute name="NAME">MODTYPE</xsl:attribute>
1252                                         <xsl:attribute name="VALUE"><xsl:value-of select="$m_type_"/></xsl:attribute>
1253                                         </xsl:element>
1254                                         <xsl:element name="VARIABLE">
1255                                         <xsl:attribute name="VIEWDISP">IP Version</xsl:attribute>
1256                                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1257                                         <xsl:attribute name="NAME">HWVERSION</xsl:attribute>
1258                                         <xsl:attribute name="VALUE"><xsl:value-of select="$m_version_"/></xsl:attribute>
1259                                         </xsl:element>                  
1260                                         <xsl:element name="VARIABLE">
1261                                         <xsl:attribute name="VIEWDISP">IP Classification</xsl:attribute>
1262                                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1263                                         <xsl:attribute name="NAME">IPCLASS</xsl:attribute>
1264                                         <xsl:attribute name="VALUE"><xsl:value-of select="$m_class_"/></xsl:attribute>
1265                                         </xsl:element>
1266                                         
1267                                         <xsl:for-each select="BLOCK[@C and @ID]">
1268                                                 <xsl:variable name="b_bus_"    select="@C"/>
1269                                         <xsl:variable name="b_name_"   select="@ID"/>
1270                                                 <xsl:variable name="b_if_"     select="$m_module_/BUSINTERFACES/BUSINTERFACE[(@NAME = $b_name_)]"/>
1271                                         <xsl:variable name="b_type_"   select="$b_if_/@TYPE"/>
1272                                         <xsl:variable name="b_busstd_" select="$b_if_/@BUSSTD"/>
1273                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING BIF <xsl:value-of select="$b_name_"/></xsl:message></xsl:if>
1274                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>       TYPE <xsl:value-of select="$b_type_"/></xsl:message></xsl:if>
1275                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>       BUS  <xsl:value-of select="$b_bus_"/></xsl:message></xsl:if>
1276                                 
1277                                         <xsl:variable name="b_busNameViewType_">
1278                                                 <xsl:choose>
1279                                                         <xsl:when test="$b_type_ = 'INITIATOR'">TEXTBOX</xsl:when>
1280                                                                 <xsl:when test="starts-with(@ID,'S_AXI')">BUTTON</xsl:when>
1281                                                                 <xsl:when test="starts-with(@ID,'S0_AXI')">BUTTON</xsl:when>
1282                                                                 <xsl:when test="starts-with(@ID,'S1_AXI')">BUTTON</xsl:when>
1283                                                                 <xsl:otherwise>DROPDOWN</xsl:otherwise>
1284                                                 </xsl:choose>
1285                                         </xsl:variable>
1286                                         <xsl:variable name="b_busName_">
1287                                  <xsl:choose>
1288                                      <xsl:when test="$b_if_/MASTERS/MASTER">
1289                                         <xsl:variable name="mastersList_"><xsl:for-each select="$b_if_/MASTERS/MASTER"><xsl:if test="position() &gt; 1"> &amp; </xsl:if><xsl:value-of select="concat(@INSTANCE,'.',@BUSINTERFACE)"/></xsl:for-each></xsl:variable>
1290                                         <xsl:variable name="mastersConn_" select="concat($b_bus_,':',$mastersList_)"/>
1291                                          <xsl:value-of select="$mastersConn_"/>
1292                                   </xsl:when>
1293                                   <xsl:otherwise><xsl:value-of select="$b_bus_"/></xsl:otherwise>
1294                                  </xsl:choose>                                  
1295                                         </xsl:variable>
1296                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>       VIEWTYPE <xsl:value-of select="$b_busNameViewType_"/></xsl:message></xsl:if>
1297                                         <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>       BUSNAME  <xsl:value-of select="$b_busName_"/></xsl:message></xsl:if>
1298                                                 <xsl:element name="SET">
1299                                                         <xsl:attribute name="ID"><xsl:value-of select="@ID"/></xsl:attribute>
1300                                                 <xsl:attribute name="CLASS">BUSINTERFACE</xsl:attribute>
1301                                                         <xsl:element name="VARIABLE">
1302                                                         <xsl:attribute name="VIEWDISP">NAME</xsl:attribute>
1303                                                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1304                                                         <xsl:attribute name="NAME">NAME</xsl:attribute>
1305                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$b_name_"/></xsl:attribute>
1306                                                         </xsl:element>
1307                                                         <xsl:element name="VARIABLE">
1308                                                         <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
1309                                                         <xsl:attribute name="VIEWTYPE"><xsl:value-of select="$b_busNameViewType_"/></xsl:attribute>
1310                                                         <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
1311                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$b_busName_"/></xsl:attribute>
1312                                                         </xsl:element>
1313                                                         <xsl:element name="VARIABLE">
1314                                                         <xsl:attribute name="VIEWDISP">Type</xsl:attribute>
1315                                                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1316                                                         <xsl:attribute name="NAME">TYPE</xsl:attribute>
1317                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$b_type_"/></xsl:attribute>
1318                                                         </xsl:element>                  
1319                                                         <xsl:element name="VARIABLE">
1320                                                         <xsl:attribute name="VIEWDISP">Bus Standard</xsl:attribute>
1321                                                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1322                                                         <xsl:attribute name="NAME">BUSSTD</xsl:attribute>
1323                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$b_busstd_"/></xsl:attribute>
1324                                                         </xsl:element>                                          
1325                                                 </xsl:element>
1326                                         </xsl:for-each>
1327                                 </xsl:element>
1328                         </xsl:when>
1329                         
1330                         <xsl:when test="starts-with(@ID,'__GROUP_PROCESSOR__')">
1331                         
1332                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PROCESSOR GROUP<xsl:value-of select="@ID"/></xsl:message></xsl:if>
1333                                 <xsl:variable name="p_id_" select="substring-after(@ID,'__GROUP_PROCESSOR__')"/>
1334                                 <xsl:variable name="m_id_" select="concat('PROCESSOR',$p_id_)"/>
1335                                 <xsl:element name="SET">
1336                                 <xsl:attribute name="ID"><xsl:value-of select="$m_id_"/></xsl:attribute>
1337                                 <xsl:attribute name="CLASS">GROUP</xsl:attribute>
1338                                         <xsl:element name="VARIABLE">
1339                                         <xsl:attribute name="VIEWDISP">NAME</xsl:attribute>
1340                                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1341                                         <xsl:attribute name="NAME">INSTANCE</xsl:attribute>
1342                                         <xsl:attribute name="VALUE">Subsystem of <xsl:value-of select="$p_id_"/></xsl:attribute>
1343                                         </xsl:element>
1344                                         <xsl:call-template name="WRITE_VIEW_BIF_GROUPS">
1345                                         <xsl:with-param name="iModules" select="self::node()"/>
1346                                 </xsl:call-template>    
1347                                 </xsl:element>  
1348                         </xsl:when>
1349                         
1350                         <xsl:when test="starts-with(@ID,'__GROUP_MASTER__')">
1351                         
1352                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>MASTER GROUP<xsl:value-of select="@ID"/></xsl:message></xsl:if>
1353                                 <xsl:variable name="p_id_" select="substring-after(@ID,'__GROUP_MASTER__')"/>
1354                                 <xsl:variable name="m_id_" select="concat('MASTER',$p_id_)"/>                           
1355                                 <xsl:element name="SET">
1356                                 <xsl:attribute name="ID"><xsl:value-of select="$m_id_"/></xsl:attribute>
1357                                 <xsl:attribute name="CLASS">GROUP</xsl:attribute>
1358                                         <xsl:element name="VARIABLE">
1359                                         <xsl:attribute name="VIEWDISP">NAME</xsl:attribute>
1360                                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1361                                         <xsl:attribute name="NAME">INSTANCE</xsl:attribute>
1362                                         <xsl:attribute name="VALUE">Subsystem of <xsl:value-of select="$p_id_"/></xsl:attribute>
1363                                         </xsl:element>
1364                                         <xsl:call-template name="WRITE_VIEW_BIF_GROUPS">
1365                                         <xsl:with-param name="iModules" select="self::node()"/>
1366                                 </xsl:call-template>    
1367                                 </xsl:element>  
1368                         </xsl:when>                     
1369                         
1370                         <xsl:when test="starts-with(@ID,'__GROUP_SHARED__')">
1371                                 <xsl:variable name="s_id_" select="substring-after(@ID,'__GROUP_SHARED__')"/>
1372                                 <xsl:variable name="m_id_" select="concat('SHARED',$s_id_)"/>                           
1373                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING SHARED PERIPHERALS <xsl:value-of select="$s_id_"/></xsl:message></xsl:if>
1374                                 <xsl:element name="SET">
1375                                 <xsl:attribute name="ID"><xsl:value-of select="$m_id_"/></xsl:attribute>
1376                                 <xsl:attribute name="CLASS">GROUP</xsl:attribute>
1377                                         <xsl:element name="VARIABLE">
1378                                         <xsl:attribute name="VIEWDISP">NAME</xsl:attribute>
1379                                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1380                                         <xsl:attribute name="NAME">INSTANCE</xsl:attribute>
1381                                         <xsl:attribute name="VALUE">Peripherals shared by <xsl:value-of select="$s_id_"/></xsl:attribute>
1382                                         </xsl:element>
1383                                         <xsl:call-template name="WRITE_VIEW_BIF_GROUPS">
1384                                         <xsl:with-param name="iModules" select="self::node()"/>
1385                                 </xsl:call-template>    
1386                                 </xsl:element>  
1387                         </xsl:when>                     
1388                         
1389                         <xsl:when test="starts-with(@ID,'__GROUP_MEMORY__')">
1390                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING MEMORY <xsl:value-of select="@ID"/></xsl:message></xsl:if>
1391                                 <xsl:variable name="m_id_" select="substring-after(@ID,'__GROUP_MEMORY__')"/>
1392                                 <xsl:element name="SET">
1393                                 <xsl:attribute name="ID"><xsl:value-of select="$m_id_"/></xsl:attribute>
1394                                 <xsl:attribute name="CLASS">GROUP</xsl:attribute>
1395                                         <xsl:element name="VARIABLE">
1396                                         <xsl:attribute name="VIEWDISP">NAME</xsl:attribute>
1397                                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1398                                         <xsl:attribute name="NAME">INSTANCE</xsl:attribute>
1399                                         <xsl:attribute name="VALUE">(Memory) <xsl:value-of select="$m_id_"/></xsl:attribute>
1400                                         </xsl:element>
1401                                         <xsl:call-template name="WRITE_VIEW_BIF_GROUPS">
1402                                         <xsl:with-param name="iModules" select="self::node()"/>
1403                                 </xsl:call-template>    
1404                                 </xsl:element>  
1405                         </xsl:when>     
1406                         
1407                         <xsl:when test="starts-with(@ID,'__GROUP_PERIPHERAL__')">
1408                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING PERIPHERAL <xsl:value-of select="@ID"/></xsl:message></xsl:if>
1409                                         <xsl:call-template name="WRITE_VIEW_BIF_GROUPS">
1410                                         <xsl:with-param name="iModules" select="self::node()"/>
1411                                 </xsl:call-template>    
1412                         </xsl:when>
1413                         
1414                         <xsl:when test="starts-with(@ID,'__GROUP_SLAVES__')">
1415                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING SLAVES <xsl:value-of select="@ID"/></xsl:message></xsl:if>
1416                                         <xsl:call-template name="WRITE_VIEW_BIF_GROUPS">
1417                                         <xsl:with-param name="iModules" select="self::node()"/>
1418                                 </xsl:call-template>    
1419                         </xsl:when>
1420 <!-- 
1421                         <xsl:when test="starts-with(@ID,'__GROUP_SLAVES__')">
1422                                 <xsl:if test="$G_DEBUG='TRUE'"><xsl:message>PLACING SLAVES GOUP <xsl:value-of select="@ID"/></xsl:message></xsl:if>
1423                                 <xsl:variable name="m_id_" select="substring-after(@ID,'__GROUP_SLAVES__')"/>
1424                                 <xsl:element name="SET">
1425                                 <xsl:attribute name="ID"><xsl:value-of select="$m_id_"/></xsl:attribute>
1426                                 <xsl:attribute name="CLASS">GROUP</xsl:attribute>
1427                                         <xsl:element name="VARIABLE">
1428                                         <xsl:attribute name="VIEWDISP">NAME</xsl:attribute>
1429                                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
1430                                         <xsl:attribute name="NAME">INSTANCE</xsl:attribute>
1431                                         <xsl:attribute name="VALUE">(Slaves of) <xsl:value-of select="$m_id_"/></xsl:attribute>
1432                                         </xsl:element>
1433                                         <xsl:call-template name="F_Write_XTeller_MODULES">
1434                                         <xsl:with-param name="iModules" select="self::node()"/>
1435                                 </xsl:call-template>    
1436                                 </xsl:element>  
1437                         </xsl:when>                     
1438 -->                     
1439                         
1440                 </xsl:choose>
1441         </xsl:for-each>
1442 </xsl:template> 
1443
1444         
1445
1446 </xsl:stylesheet>
1447