]> git.sur5r.net Git - freertos/blob
97adb0df885ab611fa188db322f3787dbd56b143
[freertos] /
1 <?xml version="1.0" standalone="no"?>
2
3 <!DOCTYPE stylesheet [
4         <!ENTITY UPPERCASE "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
5         <!ENTITY LOWERCASE "abcdefghijklmnopqrstuvwxyz">
6         
7         <!ENTITY UPPER2LOWER " '&UPPERCASE;' , '&LOWERCASE;' ">
8         <!ENTITY LOWER2UPPER " '&LOWERCASE;' , '&UPPERCASE;' ">
9         
10         <!ENTITY ALPHALOWER "ABCDEFxX0123456789">
11         <!ENTITY HEXUPPER "ABCDEFxX0123456789">
12         <!ENTITY HEXLOWER "abcdefxX0123456789">
13         <!ENTITY HEXU2L " '&HEXLOWER;' , '&HEXUPPER;' ">
14 ]>              
15
16 <xsl:stylesheet version="1.0"
17            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
18        xmlns:exsl="http://exslt.org/common"
19        xmlns:dyn="http://exslt.org/dynamic"
20        xmlns:math="http://exslt.org/math"
21        xmlns:xlink="http://www.w3.org/1999/xlink"
22        extension-element-prefixes="exsl dyn math xlink">
23            
24
25 <!--    
26         ================================================================================
27                                                         Generate XTeller for BIFS
28         ================================================================================ 
29 -->     
30
31 <xsl:template name="WRITE_VIEW_BIF_TREE">
32
33     <xsl:for-each select="$G_SYS_MODS/MODULE">
34     
35       <xsl:variable name="modRef_" select="self::node()"/>
36       <xsl:variable name="m_inst_" select="$modRef_/@INSTANCE"/>
37                 
38                 <xsl:element name="SET">
39                <xsl:attribute name="ID"><xsl:value-of select="@INSTANCE"/></xsl:attribute>
40                <xsl:attribute name="CLASS">MODULE</xsl:attribute>
41                
42                 <xsl:choose>
43                 <xsl:when test="$modRef_/@POTENTIAL_INDEX">
44                                 <xsl:attribute name="POTENTIAL_INDEX"><xsl:value-of select="$modRef_/@POTENTIAL_INDEX"/></xsl:attribute>
45                 </xsl:when>
46                 <xsl:when test="$modRef_/@CONNECTED_INDEX">
47                                 <xsl:attribute name="CONNECTED_INDEX"><xsl:value-of select="$modRef_/@CONNECTED_INDEX"/></xsl:attribute>
48                 </xsl:when>
49            </xsl:choose>
50            
51                         <!--            
52                                    CR452579
53                                    Can only modify INSTANCE name in Hierarchal view.
54                         -->     
55                     <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Name"       NAME="INSTANCE"  VALUE="{@INSTANCE}"/>
56                     <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Type"    NAME="MODTYPE"   VALUE="{@MODTYPE}" VIEWICON="{LICENSEINFO/@ICON_NAME}"/>
57                     <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{@HWVERSION}"/>
58                     
59                     <xsl:variable name="ipClassification_">
60                                 <xsl:call-template name="F_ModClass_To_IpClassification">
61                                         <xsl:with-param name="iModClass"  select="@MODCLASS"/>
62                                         <xsl:with-param name="iBusStd"    select="@BUSSTD"/> 
63                                 </xsl:call-template>    
64                     </xsl:variable>
65                     
66                <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Classification" NAME="IPCLASS" VALUE="{$ipClassification_}"/>
67                
68                <!-- Write Bus Interfaces here  --> 
69                 <xsl:for-each select="$G_SYS_MODS"> <!--  To put things in the right scope for the keys below -->
70                         <xsl:variable name="m_bifs_all_"  select="key('G_MAP_ALL_BIFS', $m_inst_)"/>    
71                         <xsl:for-each select="$m_bifs_all_">
72                            <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/>
73                                 <xsl:call-template name="WRITE_VIEW_BIF_TREE_SET">
74                                                 <xsl:with-param name="iModRef" select="$modRef_"/>
75                                                 <xsl:with-param name="iBifRef" select="self::node()"/>
76                                         </xsl:call-template>
77                     </xsl:for-each> <!-- End of bus interface loop  -->
78                 </xsl:for-each>
79           </xsl:element> 
80     </xsl:for-each> <!-- End module loop -->
81 </xsl:template> 
82
83
84 <xsl:template name="WRITE_VIEW_BIF_TREE_SET">
85         <xsl:param name="iModRef" select="'__NONE__'"/>
86         <xsl:param name="iBifRef" select="'__NONE__'"/>
87         <xsl:param name="iBifCol" select="'__NONE__'"/>
88         
89         <xsl:element name="SET">
90                 <xsl:if test="not($iBifCol = '__NONE__')">
91                         <xsl:attribute name="RGB_FG"><xsl:value-of select="$iBifCol"/></xsl:attribute>                
92                 </xsl:if>
93                 <xsl:attribute name="ID"><xsl:value-of select="$iBifRef/@NAME"/></xsl:attribute>
94                 <xsl:attribute name="CLASS">BUSINTERFACE</xsl:attribute>
95                 
96                 <xsl:if test="($iBifRef/@TYPE = 'MONITOR')">
97                         <xsl:choose>
98                                 <xsl:when test="($iBifRef/@IS_P2P)">
99                                         <xsl:attribute name="IS_P2P_MONITOR">TRUE</xsl:attribute>
100                                 </xsl:when>
101                                 <xsl:otherwise>
102                                         <xsl:attribute name="IS_SHARED_MONITOR">TRUE</xsl:attribute>
103                                 </xsl:otherwise>
104                         </xsl:choose>
105                 </xsl:if>
106                 
107                 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="NAME" NAME="NAME" VALUE="{$iBifRef/@NAME}"/>
108         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Type" NAME="TYPE" VALUE="{$iBifRef/@TYPE}"/>
109                 <xsl:element name="VARIABLE">
110                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
111                         <xsl:attribute name="VIEWDISP">Bus Standard</xsl:attribute>
112                         <xsl:attribute name="NAME">BUSSTD</xsl:attribute>
113                         <xsl:choose>
114                         <xsl:when test="($iBifRef/@BUSSTD_PSF)">
115                                         <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSSTD_PSF"/></xsl:attribute>
116                         </xsl:when>
117                         <xsl:when test="($iBifRef/@BUSSTD)">
118                                         <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSSTD"/></xsl:attribute>
119                         </xsl:when>
120                         <xsl:when test="($iBifRef/@BUS_STD)">
121                                         <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUS_STD"/></xsl:attribute>
122                         </xsl:when>
123                         <xsl:otherwise>
124                                         <xsl:attribute name="VALUE">USER</xsl:attribute>
125                                 </xsl:otherwise>
126                         </xsl:choose>
127                 </xsl:element>
128                 
129                 <xsl:choose>
130                         <xsl:when test="($iBifRef/@TYPE = 'INITIATOR')">
131                                 <xsl:element name="VARIABLE">
132                                         <xsl:attribute name="VIEWTYPE">TEXTBOX</xsl:attribute>
133                                         <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
134                                         <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
135                                         <xsl:choose>
136                                 <xsl:when test="(($iBifRef/@BUSNAME = '__NOC__') or ($iBifRef/@BUSNAME = '') or not($iBifRef/@BUSNAME))">
137                                                 <xsl:variable name="def_noc_name_"><xsl:value-of select="$iModRef/@INSTANCE"/>_<xsl:value-of select="$iBifRef/@NAME"/></xsl:variable>
138                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$def_noc_name_"/></xsl:attribute>
139                                         </xsl:when>
140                                         <xsl:otherwise>
141                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSNAME"/></xsl:attribute>
142                                                 </xsl:otherwise>
143                                         </xsl:choose>
144                                         <xsl:if test="$G_ADD_CHOICES = 'TRUE'">
145                                                 <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES">
146                                                         <xsl:with-param name="iModRef" select="$iModRef"/>
147                                                         <xsl:with-param name="iBifRef" select="$iBifRef"/>
148                                                 </xsl:call-template>
149                                         </xsl:if>
150                                 </xsl:element>               
151                         </xsl:when>
152                         
153                         <xsl:otherwise>
154                                 <xsl:choose>
155                         <xsl:when test="(($iBifRef/@BUSNAME = '__NOC__') or ($iBifRef/@BUSNAME = '') or not($iBifRef/@BUSNAME))">
156                                                 <xsl:element name="VARIABLE">
157                                                         <xsl:choose>
158                                         <xsl:when test="(($iBifRef/@BUSSTD = 'AXI') and ($iBifRef/@TYPE = 'SLAVE') and ($G_HAVE_XB_BUSSES = 'TRUE'))">
159                                                                         <xsl:attribute name="VIEWTYPE">BUTTON</xsl:attribute>
160                                         </xsl:when>
161                                         <xsl:otherwise>
162                                                                         <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute>
163                                         </xsl:otherwise>
164                                                         </xsl:choose>
165                                                         <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
166                                                         <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
167                                                         <xsl:attribute name="VALUE">No Connection</xsl:attribute>
168                                                         <xsl:if test="$G_ADD_CHOICES = 'TRUE'">
169                                                                 <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES">
170                                                                         <xsl:with-param name="iModRef" select="$iModRef"/>
171                                                                         <xsl:with-param name="iBifRef" select="$iBifRef"/>
172                                                                 </xsl:call-template>
173                                                         </xsl:if>       
174                                                 </xsl:element>
175                                         </xsl:when>                         
176                                         
177                     <xsl:otherwise>
178                                                 <xsl:choose>
179                                                         <xsl:when test="(($iBifRef/@TYPE = 'MONITOR') and ($iBifRef/MONITORS/MONITOR))">
180                                <xsl:variable name="monitorBif_" select="$iBifRef/MONITORS/MONITOR"/>
181                                <xsl:variable name="p2pMonConn_" select="concat($monitorBif_/@INSTANCE,'.',$monitorBif_/@BUSINTERFACE)"/>
182                                                                 <xsl:element name="VARIABLE">
183                                                                         <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute>
184                                                                         <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
185                                                                         <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
186                                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$p2pMonConn_"/></xsl:attribute>
187                                                                         <xsl:if test="$G_ADD_CHOICES = 'TRUE'">
188                                                                                 <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES">
189                                                                                         <xsl:with-param name="iModRef" select="$iModRef"/>
190                                                                                         <xsl:with-param name="iBifRef" select="$iBifRef"/>
191                                                                                 </xsl:call-template>
192                                                                         </xsl:if>
193                                                                 </xsl:element>                                                                  
194                                 </xsl:when>
195                                 
196                                                         <xsl:when test="($iBifRef/@TYPE = 'SLAVE')">
197                                                                 <xsl:element name="VARIABLE">
198                                                                 <xsl:choose>
199                                                                                 <xsl:when test="(($iBifRef/@BUSSTD = 'AXI') and ($G_HAVE_XB_BUSSES ='TRUE'))">
200                                              <xsl:attribute name="VIEWTYPE">BUTTON</xsl:attribute>
201                                          </xsl:when>
202                                                                                 <xsl:otherwise>
203                                                                                         <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute>
204                                                                                 </xsl:otherwise>
205                                                                         </xsl:choose> 
206                                     <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
207                                     <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
208                                     <xsl:choose>
209                                         <xsl:when test="$iBifRef/MASTERS/MASTER">
210                                             <xsl:variable name="mastersList_"><xsl:for-each select="$iBifRef/MASTERS/MASTER"><xsl:if test="position() &gt; 1"> &amp; </xsl:if><xsl:value-of select="concat(@INSTANCE,'.',@BUSINTERFACE)"/></xsl:for-each></xsl:variable>
211                                             <xsl:variable name="mastersConn_" select="concat($iBifRef/@BUSNAME,':',$mastersList_)"/>
212                                              <xsl:attribute name="VALUE"><xsl:value-of select="$mastersConn_"/></xsl:attribute>
213                                          </xsl:when>
214                                          <xsl:otherwise>
215                                              <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSNAME"/></xsl:attribute>
216                                          </xsl:otherwise>
217                                                                         </xsl:choose> 
218                                                                         <xsl:if test="$G_ADD_CHOICES = 'TRUE'">
219                                                                                 <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES">
220                                                                                         <xsl:with-param name="iModRef" select="$iModRef"/>
221                                                                                         <xsl:with-param name="iBifRef" select="$iBifRef"/>
222                                                                                 </xsl:call-template>
223                                                                         </xsl:if>                                                                       
224                                                                 </xsl:element>
225                                                         </xsl:when>
226                                                         
227                                                         <xsl:otherwise>
228                                                                 <xsl:element name="VARIABLE">
229                                                                         <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute>
230                                                                         <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
231                                                                         <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
232                                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSNAME"/></xsl:attribute>
233                                                                         <xsl:if test="$G_ADD_CHOICES = 'TRUE'">
234                                                                                 <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES">
235                                                                                         <xsl:with-param name="iModRef" select="$iModRef"/>
236                                                                                         <xsl:with-param name="iBifRef" select="$iBifRef"/>
237                                                                                 </xsl:call-template>
238                                                                         </xsl:if>
239                                                                 </xsl:element>                                                  
240                                                         </xsl:otherwise>
241                                                 </xsl:choose>
242                                         </xsl:otherwise>
243                                 </xsl:choose>
244                          </xsl:otherwise>
245                 </xsl:choose>
246         </xsl:element>
247 </xsl:template>
248
249
250 <xsl:template name="WRITE_VIEW_BIF_FLAT">
251
252     <xsl:for-each select="$G_SYS_MODS/MODULE">
253     
254        <xsl:sort data-type="number" select="@ROW_INDEX" order="ascending"/>
255        <xsl:variable name="moduleRef_" select="self::node()"/>
256        <xsl:variable name="busifsRef_">
257                         <xsl:choose>
258                 <xsl:when test="self::node()/BUSINTERFACES"><xsl:text>$moduleRef_/BUSINTERFACES</xsl:text></xsl:when>
259                 <xsl:otherwise><xsl:text>$moduleRef_</xsl:text></xsl:otherwise>
260                         </xsl:choose>
261                 </xsl:variable>   
262                 <xsl:for-each select="dyn:evaluate($busifsRef_)/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]">
263                 <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/>
264                 <xsl:call-template name="WRITE_VIEW_BIF_FLAT_SET">
265                                 <xsl:with-param name="iModRef" select="$moduleRef_"/>
266                                 <xsl:with-param name="iBifRef" select="self::node()"/>
267                         </xsl:call-template>
268         </xsl:for-each> <!--  End of Bus Interface Loop -->
269     </xsl:for-each> <!-- End of Module loop -->
270 </xsl:template>
271
272 <xsl:template name="WRITE_VIEW_BIF_FLAT_SET">
273
274         <xsl:param name="iModRef" select="'__NONE__'"/>
275         <xsl:param name="iBifRef" select="'__NONE__'"/>
276         <xsl:param name="iBifCol" select="'__NONE__'"/>
277         
278         <xsl:element name="SET">
279                 <xsl:if test="not($iBifCol = '__NONE__')">
280                         <xsl:attribute name="RGB_FG"><xsl:value-of select="$iBifCol"/></xsl:attribute>                
281                 </xsl:if>       
282                 <!-- 
283                 <xsl:attribute name="ID"><xsl:value-of select="$iModRef/@INSTANCE"/>.<xsl:value-of select="$iBifRef/@NAME"/></xsl:attribute>
284                  -->
285                 <xsl:attribute name="ID"><xsl:value-of select="$iBifRef/@NAME"/></xsl:attribute>
286                 <xsl:attribute name="CLASS">BUSINTERFACE</xsl:attribute>
287
288                 <xsl:if test="($iBifRef/@TYPE = 'MONITOR')">
289                         <xsl:choose>
290                                 <xsl:when test="($iBifRef/@IS_P2P)">
291                                         <xsl:attribute name="IS_P2P_MONITOR">TRUE</xsl:attribute>
292                                 </xsl:when>
293                                 <xsl:otherwise>
294                                         <xsl:attribute name="IS_SHARED_MONITOR">TRUE</xsl:attribute>
295                                 </xsl:otherwise>
296                         </xsl:choose>
297                 </xsl:if>
298                 
299                 <!-- CR452579 Can only modify INSTANCE name in Hierarchal view. --> 
300                 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance"      NAME="INSTANCE"  VALUE="{$iModRef/@INSTANCE}"/>
301                 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Interface" NAME="NAME"      VALUE="{$iBifRef/@NAME}"/>
302                 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type"       NAME="MODTYPE"   VALUE="{$iModRef/@MODTYPE}" VIEWICON="{$iModRef/LICENSEINFO/@ICON_NAME}"/>
303                 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version"    NAME="HWVERSION" VALUE="{$iModRef/@HWVERSION}"/>
304                             
305             <xsl:variable name="ipClassification_">
306                 <xsl:call-template name="F_ModClass_To_IpClassification">
307                     <xsl:with-param name="iModClass"  select="$iModRef/@MODCLASS"/>
308                     <xsl:with-param name="iBusStd"    select="$iBifRef/@BUSSTD"/> 
309                 </xsl:call-template>    
310             </xsl:variable>
311                             
312                 <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="IP Classification" NAME="IPCLASS" VALUE="{$ipClassification_}"/>
313                 <VARIABLE VIEWTYPE="STATIC"  VIEWDISP="Type" NAME="TYPE" VALUE="{$iBifRef/@TYPE}"/>
314                 
315                 <xsl:element name="VARIABLE">
316                         <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
317                         <xsl:attribute name="VIEWDISP">Bus Standard</xsl:attribute>
318                         <xsl:attribute name="NAME">BUSSTD</xsl:attribute>
319                         <xsl:choose>
320                         <xsl:when test="($iBifRef/@BUS_STD)">
321                                         <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUS_STD"/></xsl:attribute>
322                         </xsl:when>
323                         <xsl:when test="($iBifRef/@BUSSTD)">
324                                         <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSSTD"/></xsl:attribute>
325                         </xsl:when>
326                         <xsl:otherwise>
327                                         <xsl:attribute name="VALUE">USER</xsl:attribute>
328                                 </xsl:otherwise>
329                         </xsl:choose>
330                 </xsl:element>                      
331                 
332                 <xsl:choose>
333                         <xsl:when test="$iBifRef/@TYPE = 'INITIATOR'">
334                                 <xsl:element name="VARIABLE">
335                                         <xsl:attribute name="VIEWTYPE">TEXTBOX</xsl:attribute>
336                                         <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
337                                         <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
338                                         <xsl:choose>
339                                 <xsl:when test="(($iBifRef/@BUSNAME = '__NOC__') or ($iBifRef/@BUSNAME = '') or not($iBifRef/@BUSNAME))">
340                                                 <xsl:variable name="def_noc_name_"><xsl:value-of select="$iModRef/@INSTANCE"/>_<xsl:value-of select="$iBifRef/@NAME"/></xsl:variable>
341                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$def_noc_name_"/></xsl:attribute>
342                                         </xsl:when>
343                                         <xsl:otherwise>
344                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSNAME"/></xsl:attribute>
345                                                 </xsl:otherwise>
346                                         </xsl:choose>
347                                         <xsl:if test="$G_ADD_CHOICES = 'TRUE'">
348                                                 <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES">
349                                                         <xsl:with-param name="iModRef" select="$iModRef"/>
350                                                         <xsl:with-param name="iBifRef" select="$iBifRef"/>
351                                                 </xsl:call-template>
352                                         </xsl:if>       
353                                 </xsl:element>          
354                         </xsl:when>     
355                         <xsl:otherwise>
356                         <xsl:choose> 
357                         
358                         <xsl:when test="(($iBifRef/@BUSNAME = '__NOC__') or ($iBifRef/@BUSNAME = '') or not($iBifRef/@BUSNAME))">
359                                                 <xsl:element name="VARIABLE">
360                                                         <xsl:choose>
361                                         <xsl:when test="(($iBifRef/@BUSSTD = 'AXI') and ($iBifRef/@TYPE = 'SLAVE') and ($G_HAVE_XB_BUSSES = 'TRUE'))">
362                                                                         <xsl:attribute name="VIEWTYPE">BUTTON</xsl:attribute>
363                                         </xsl:when>
364                                         <xsl:otherwise>
365                                                                         <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute>
366                                         </xsl:otherwise>
367                                                         </xsl:choose>
368                                                         <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
369                                                         <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
370                                                         <xsl:attribute name="VALUE">No Connection</xsl:attribute>
371                                                         <xsl:if test="$G_ADD_CHOICES = 'TRUE'">
372                                                                 <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES">
373                                                                         <xsl:with-param name="iModRef" select="$iModRef"/>
374                                                                         <xsl:with-param name="iBifRef" select="$iBifRef"/>
375                                                                 </xsl:call-template>
376                                                         </xsl:if>                                                               
377                                                 </xsl:element>
378                                         </xsl:when>
379                         
380                                         <xsl:otherwise>
381                                 <xsl:choose>
382                                 <xsl:when test="(($iBifRef/@TYPE = 'MONITOR') and ($iBifRef/MONITORS/MONITOR))">
383                                         <xsl:variable name="monitorBif_" select="$iBifRef/MONITORS/MONITOR"/>
384                                         <xsl:variable name="p2pMonConn_" select="concat($monitorBif_/@INSTANCE,'.',$monitorBif_/@BUSINTERFACE)"/>
385                                         <!-- 
386                                         <VARIABLE VIEWTYPE="DROPDOWN"  VIEWDISP="Bus Name" NAME="BUSNAME" VALUE="{$p2pMonConn_}"/>
387                                          -->
388                                                                 <xsl:element name="VARIABLE">
389                                                                         <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute>
390                                                                         <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
391                                                                         <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
392                                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$p2pMonConn_"/></xsl:attribute>
393                                                                         <xsl:if test="$G_ADD_CHOICES = 'TRUE'">
394                                                                                 <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES">
395                                                                                         <xsl:with-param name="iModRef" select="$iModRef"/>
396                                                                                         <xsl:with-param name="iBifRef" select="$iBifRef"/>
397                                                                                 </xsl:call-template>
398                                                                         </xsl:if>       
399                                                                 </xsl:element>                                          
400                                 </xsl:when>
401                             
402                                 <xsl:when test="($iBifRef/@TYPE = 'SLAVE')">
403                                         <xsl:element name="VARIABLE">
404                                         <xsl:choose>
405                                                 <xsl:when test="$iBifRef/@BUSSTD = 'AXI' and $G_HAVE_XB_BUSSES ='TRUE'">
406                                                         <xsl:attribute name="VIEWTYPE">BUTTON</xsl:attribute>
407                                                 </xsl:when>
408                                                 <xsl:otherwise>
409                                                         <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute>
410                                                 </xsl:otherwise>
411                                         </xsl:choose> 
412                                         <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
413                                         <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
414                                         <xsl:choose>
415                                                 <xsl:when test="$iBifRef/MASTERS/MASTER">
416                                                         <xsl:variable name="mastersList_"><xsl:for-each select="$iBifRef/MASTERS/MASTER"><xsl:if test="position() &gt; 1"> &amp; </xsl:if><xsl:value-of select="concat(@INSTANCE,'.',@BUSINTERFACE)"/></xsl:for-each></xsl:variable>
417                                                         <xsl:variable name="mastersConn_" select="concat($iBifRef/@BUSNAME,':',$mastersList_)"/>
418                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$mastersConn_"/></xsl:attribute>
419                                                 </xsl:when>
420                                                 <xsl:otherwise>
421                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSNAME"/></xsl:attribute>
422                                                 </xsl:otherwise>
423                                       </xsl:choose> 
424                                                                   <xsl:if test="$G_ADD_CHOICES = 'TRUE'">
425                                                                         <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES">
426                                                                                 <xsl:with-param name="iModRef" select="$iModRef"/>
427                                                                                 <xsl:with-param name="iBifRef" select="$iBifRef"/>
428                                                                         </xsl:call-template>
429                                                                  </xsl:if>                                                    
430                                    </xsl:element>
431                                 </xsl:when> 
432                                 <xsl:otherwise>
433                                         <!-- 
434                                         <VARIABLE VIEWTYPE="DROPDOWN"  VIEWDISP="Bus Name" NAME="BUSNAME" VALUE="{$iBifRef/@BUSNAME}"/>
435                                          -->    
436                                                                 <xsl:element name="VARIABLE">
437                                                                         <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute>
438                                                                         <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute>
439                                                                         <xsl:attribute name="NAME">BUSNAME</xsl:attribute>
440                                                                         <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSNAME"/></xsl:attribute>
441                                                                         <xsl:if test="$G_ADD_CHOICES = 'TRUE'">
442                                                                                 <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES">
443                                                                                         <xsl:with-param name="iModRef" select="$iModRef"/>
444                                                                                         <xsl:with-param name="iBifRef" select="$iBifRef"/>
445                                                                                 </xsl:call-template>
446                                                                         </xsl:if>       
447                                                                 </xsl:element>                                          
448                                 </xsl:otherwise>
449                            </xsl:choose>
450                     </xsl:otherwise>
451                 </xsl:choose>
452                 </xsl:otherwise>
453         </xsl:choose>                               
454  </xsl:element>  
455 </xsl:template>
456
457 <xsl:template name="WRITE_VIEW_BIF_BUSNAME_CHOICES">
458
459         <xsl:param name="iModRef" select="None"/>
460         <xsl:param name="iBifRef" select="None"/>
461         
462         <xsl:variable name="b_bus_"      select="$iBifRef/@BUSNAME"/>
463         <xsl:variable name="b_name_"     select="$iBifRef/@NAME"/>
464         <xsl:variable name="b_type_"     select="$iBifRef/@TYPE"/>
465         <xsl:variable name="b_bstd_"     select="$iBifRef/@BUSSTD"/>
466         <xsl:variable name="b_bstd_psf_" select="$iBifRef/@BUSSTD_PSF"/>
467         <xsl:variable name="b_protocol_" select="$iBifRef/@PROTOCOL"/>
468         
469         <xsl:element name="CHOICES">
470                 <xsl:choose>
471                         <xsl:when test="($b_type_ = 'INITIATOR')">
472                                 <xsl:variable name="initiator_busName_">
473                                 <xsl:choose>
474                                         <xsl:when test="($b_bus_ = '__NOC__')"><xsl:value-of select="concat($iModRef/@INSTANCE,'_',$b_name_)"/></xsl:when>      
475                                                 <xsl:otherwise><xsl:value-of select="$b_bus_"/></xsl:otherwise>
476                                         </xsl:choose>
477                                 </xsl:variable>
478                                 <CHOICE NAME="{$initiator_busName_}"/>
479                         </xsl:when>     
480                                 
481                         <xsl:when test="(($b_type_ = 'MASTER') or ($b_type_ = 'SLAVE') or ($b_type_ = 'MASTER_SLAVE'))">
482                                 <CHOICE NAME="No Connection"/>
483                         <xsl:for-each select="$G_SYS_MODS"> <!--  To set correct scope for KEY functions below -->
484                                         <xsl:if test="not(($b_bstd_ = 'AXI') and ($b_type_ = 'SLAVE'))">
485                                                 <CHOICE NAME="New Connection"/>
486                                         </xsl:if>
487                                 <xsl:for-each select="key('G_MAP_BUSSES',$b_bstd_)">
488                                         <xsl:variable name="busName_" select="@INSTANCE"/>      
489                                         <xsl:choose>
490                                                         <!-- CR#590473 This was setting wrong choices filled up-->
491                                                 <!--xsl:when test="(($b_type_ = 'SLAVE') and (@IS_CROSSBAR) and $iBifRef/@PROTOCOL)">
492                                                                 <xsl:for-each select="key('G_MAP_MST_BIFS',$busName_)[(@PROTOCOL = $b_protocol_)]">
493                                                                         <xsl:variable name="bifName_" select="@NAME"/>  
494                                                                         <xsl:variable name="insName_" select="../../@INSTANCE"/>        
495                                                                         <xsl:variable name="xb_slave_busName_" select="concat($busName_,':',$insName_,'.',$bifName_)"/>
496                                                                         <CHOICE NAME="{$xb_slave_busName_}"/>
497                                                                 </xsl:for-each>
498                                                 </xsl:when-->
499                                                 <xsl:when test="($b_type_ = 'SLAVE') and (@IS_CROSSBAR)">
500                                                                 <xsl:for-each select="key('G_MAP_MST_BIFS',$busName_)">
501                                                                         <xsl:variable name="bifName_" select="@NAME"/>  
502                                                                         <xsl:variable name="insName_" select="../../@INSTANCE"/>        
503                                                                         <xsl:variable name="xb_slave_busName_" select="concat($busName_,':',$insName_,'.',$bifName_)"/>
504                                                                         <CHOICE NAME="{$xb_slave_busName_}"/>
505                                                                 </xsl:for-each>
506                                                 </xsl:when>                                             
507                                                 <xsl:otherwise>
508                                                                 <CHOICE NAME="{$busName_}"/>
509                                                 </xsl:otherwise>
510                                         </xsl:choose>
511                                 </xsl:for-each>
512                         </xsl:for-each> 
513                         </xsl:when>
514                         
515                         <xsl:when test="($b_type_ = 'TARGET')">
516                                 <CHOICE NAME="No Connection"/>
517                                 <xsl:for-each select="$G_SYS_MODS"> <!--  To set correct scope for KEY functions below -->
518                                         <xsl:variable name="use_bstd_"> 
519                                                 <xsl:choose>
520                                                         <xsl:when test="(($b_bstd_ = 'AXIS') or ($b_bstd_ = 'XIL'))">
521                                                                 <xsl:value-of select="$b_bstd_psf_"/>
522                                                         </xsl:when>     
523                                                         <xsl:otherwise>
524                                                                 <xsl:value-of select="$b_bstd_"/>
525                                                         </xsl:otherwise>
526                                                 </xsl:choose>
527                                         </xsl:variable>
528                                         <xsl:choose>
529                                                 <xsl:when test="$iBifRef/@PROTOCOL">
530                                                         <xsl:for-each select="key('G_MAP_P2P_BIFS',$use_bstd_)[(@TYPE = 'INITIATOR') and (@PROTOCOL = $b_protocol_)]">
531                                                                 <xsl:variable name="busName_" select="@BUSNAME"/>
532                                                                 <xsl:choose>
533                                                                         <xsl:when test="($busName_ = '__NOC__')">
534                                                                                 <xsl:variable name="bifName_" select="@NAME"/>
535                                                                                 <xsl:variable name="insName_" select="../../@INSTANCE"/>        
536                                                                                 <xsl:variable name="initiator_busName_" select="concat($insName_,'_',$bifName_)"/>
537                                                                                 <CHOICE NAME="{$initiator_busName_}"/>
538                                                                         </xsl:when>
539                                                                         <xsl:otherwise>
540                                                                                 <CHOICE NAME="{$busName_}"/>
541                                                                         </xsl:otherwise>
542                                                                 </xsl:choose>
543                                                 </xsl:for-each>                                         
544                                         </xsl:when>
545                                         <xsl:otherwise>
546                                                         <xsl:for-each select="key('G_MAP_P2P_BIFS',$use_bstd_)[(@TYPE = 'INITIATOR')]">
547                                                                 <xsl:variable name="busName_" select="@BUSNAME"/>
548                                                                 <xsl:choose>
549                                                                         <xsl:when test="($busName_ = '__NOC__')">
550                                                                                 <xsl:variable name="bifName_" select="@NAME"/>
551                                                                                 <xsl:variable name="insName_" select="../../@INSTANCE"/>        
552                                                                                 <xsl:variable name="initiator_busName_" select="concat($insName_,'_',$bifName_)"/>
553                                                                                 <CHOICE NAME="{$initiator_busName_}"/>
554                                                                         </xsl:when>
555                                                                         <xsl:otherwise>
556                                                                                 <CHOICE NAME="{$busName_}"/>
557                                                                         </xsl:otherwise>
558                                                                 </xsl:choose>
559                                                 </xsl:for-each>
560                                         </xsl:otherwise>        
561                                         </xsl:choose>
562                                 </xsl:for-each>
563                         </xsl:when>
564                         
565                         <xsl:when test="($b_type_ = 'MONITOR')">                        
566                                 <CHOICE NAME="No Connection"/>
567                         <xsl:for-each select="$G_SYS_MODS"> <!--  To set correct scope for KEY functions below -->
568                                 <xsl:choose>
569                                         <xsl:when test="($iBifRef/@IS_P2P = 'TRUE')">
570                                                 <xsl:for-each select="$G_SYS_MODS"> <!--  To set correct scope for KEY functions below -->
571                                                                 <xsl:variable name="use_bstd_"> 
572                                                                         <xsl:choose>
573                                                                                 <xsl:when test="(($b_bstd_ = 'AXIS') or ($b_bstd_ = 'XIL'))">
574                                                                                         <xsl:value-of select="$b_bstd_psf_"/>
575                                                                                 </xsl:when>     
576                                                                                 <xsl:otherwise>
577                                                                                         <xsl:value-of select="$b_bstd_"/>
578                                                                                 </xsl:otherwise>
579                                                                         </xsl:choose>
580                                                                 </xsl:variable>
581                                                                 <!--  <xsl:message>monitor p2p <xsl:value-of select="count(key('G_MAP_P2P_BIFS',$use_bstd_)[(@TYPE = 'INITIATOR')])"/> </xsl:message> -->
582                                                                 <xsl:for-each select="key('G_MAP_P2P_BIFS',$use_bstd_)[(@TYPE = 'INITIATOR')]">
583                                                                         <xsl:variable name="busName_" select="@BUSNAME"/>
584                                                                         <xsl:choose>
585                                                                                 <xsl:when test="($busName_ = '__NOC__')">
586                                                                                         <xsl:variable name="bifName_" select="@NAME"/>
587                                                                                         <xsl:variable name="insName_" select="../../@INSTANCE"/>        
588                                                                                         <xsl:variable name="initiator_busName_" select="concat($insName_,'_',$bifName_)"/>
589                                                                                         <CHOICE NAME="{$initiator_busName_}"/>
590                                                                                 </xsl:when>
591                                                                                 <xsl:otherwise>
592                                                                                         <CHOICE NAME="{$busName_}"/>
593                                                                                 </xsl:otherwise>
594                                                                         </xsl:choose>
595                                                         </xsl:for-each>                         
596                                                         </xsl:for-each> 
597                                         </xsl:when>     
598                                         <xsl:otherwise>
599                                                 <xsl:for-each select="key('G_MAP_BUSSES',$b_bstd_)">
600                                                         <xsl:variable name="busName_" select="@INSTANCE"/>      
601                                                         <xsl:choose>
602                                                                 <xsl:when test="(@IS_CROSSBAR or ($b_bstd_ = 'AXI'))">
603                                                                                 <xsl:for-each select="key('G_MAP_MOS_BIFS',$busName_)">
604                                                                                         <xsl:variable name="bifName_" select="@NAME"/>  
605                                                                                         <xsl:variable name="insName_" select="../../@INSTANCE"/>        
606                                                                                         <!-- 
607                                                                                         <xsl:variable name="xb_moni_busName_" select="concat($busName_,':',$insName_,'.',$bifName_)"/>
608                                                                                          -->
609                                                                                         <xsl:variable name="xb_moni_busName_" select="concat($insName_,'.',$bifName_)"/>
610                                                                                         <CHOICE NAME="{$xb_moni_busName_}"/>
611                                                                                 </xsl:for-each>
612                                                                 </xsl:when>
613                                                                 <xsl:otherwise>
614                                                                                 <CHOICE NAME="{$busName_}"/>
615                                                                 </xsl:otherwise>
616                                                         </xsl:choose>
617                                                 </xsl:for-each>
618                                         </xsl:otherwise>
619
620                                 </xsl:choose>
621                         </xsl:for-each>                                 
622                         </xsl:when>
623                 </xsl:choose>
624         </xsl:element>
625         
626 </xsl:template> 
627                  
628                  
629
630 </xsl:stylesheet>
631