]> git.sur5r.net Git - freertos/blob
5e8d06cb4a9130289b4e1ad0d557f17c65fd33c0
[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 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
25
26 <!--
27     ================================================================================
28                             Generate XTeller for ADDRESSES
29     ================================================================================ 
30 -->
31
32 <xsl:template name="WRITE_VIEW_ADDRESS">
33               
34     <xsl:for-each select="$G_SYS_MODS/MODULE[((@MODCLASS = 'PROCESSOR') and (MEMORYMAP/MEMRANGE[((not(@IS_VALID) or (@IS_VALID = 'TRUE')) and ACCESSROUTE)]))]">
35         <xsl:sort data-type="number" select="@ROW_INDEX" order="ascending"/>
36             
37         <xsl:variable name="procInst_"     select="@INSTANCE"/>
38         <xsl:variable name="procMod_"      select="self::node()"/>
39         <xsl:variable name="procModType"   select="@MODTYPE"/>
40         <xsl:variable name="procModClass_" select="@MODCLASS"/>
41         <xsl:variable name="procInstHdrVal_"><xsl:value-of select="$procInst_"/>'s Address Map</xsl:variable>
42         <xsl:variable name="procInstRowIdx_" select="position() - 1"/>
43         
44         <!-- <SET ID="{$procInst_}" CLASS="MODULE" ROW_INDEX="{$procInstRowIdx_}"> -->
45         
46         <xsl:element name="SET">
47                         <xsl:attribute name="ID"><xsl:value-of select="$procInst_"/></xsl:attribute>
48                         <xsl:attribute name="CLASS">MODULE</xsl:attribute>
49                         <xsl:attribute name="ROW_INDEX"><xsl:value-of select="$procInstRowIdx_"/></xsl:attribute>
50
51             <!-- <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance" NAME="INSTANCE"  VALUE="{$procInstHdrVal_}"/> -->
52             
53             <xsl:element name="VARIABLE">
54                                 <xsl:attribute name="NAME">INSTANCE</xsl:attribute>
55                                 <xsl:attribute name="VALUE"><xsl:value-of select="$procInstHdrVal_"/></xsl:attribute>
56                                 <xsl:attribute name="VIEWDISP">Instance</xsl:attribute>
57                                 <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute>
58                         </xsl:element>
59             
60             <xsl:for-each select="$procMod_/MEMORYMAP/MEMRANGE[((not(@IS_VALID) or (@IS_VALID = 'TRUE')) and (ACCESSROUTE or (@MEMTYPE = 'BRIDGE')))]">
61                 <xsl:sort data-type="number" select="@BASEDECIMAL" order="ascending"/>
62                 
63                 <xsl:variable name="addr_id_"><xsl:value-of select="@BASENAME"/>:<xsl:value-of select="@HIGHNAME"/></xsl:variable>
64                 <xsl:variable name="baseName_" select="@BASENAME"/>
65                 <xsl:variable name="highName_" select="@HIGHNAME"/>
66                 
67                 <!-- 
68                 <xsl:if test="$G_DEBUG='TRUE'">
69                         <xsl:message>ADDRESS ID <xsl:value-of select="$addr_id_"/></xsl:message>
70                 </xsl:if>
71                 -->
72                 
73                 <xsl:variable name="set_id_">
74                     <xsl:if test="(@INSTANCE)">
75                         <xsl:value-of select="$procInst_"/>.<xsl:value-of select="@INSTANCE"/>:<xsl:value-of select="$addr_id_"/>
76                     </xsl:if>
77                     <xsl:if test="not(@INSTANCE)">
78                         <xsl:value-of select="$procInst_"/>:<xsl:value-of select="$addr_id_"/>
79                     </xsl:if>
80                 </xsl:variable>
81                 
82                 <xsl:variable name="procAddrRowIdx_" select="position() - 1"/>
83                 <SET ID="{$set_id_}" CLASS="ADDRESS" ROW_INDEX="{$procAddrRowIdx_}">
84                     
85                     <xsl:if test="(@INSTANCE)">
86                         <xsl:variable name="periInst_"   select="@INSTANCE"/>
87                                 <xsl:variable name="periMod_"    select="key('G_MAP_MODULES', $periInst_)"/>
88                         <!-- 
89                          <xsl:variable name="subInstance_"     select="$G_SYS_MODS/MODULE[(@INSTANCE = $instance_)]"/>
90                                 <xsl:message>Count memrange slaves <xsl:value-of select="count($modMemMapSlvs_)"/> </xsl:message>
91                                 <xsl:message>Count mod valid bifs  <xsl:value-of select="count($modValidBifs_)"/> </xsl:message>
92                          -->
93   
94                                               
95                         <xsl:variable name="periModType_"   select="$periMod_/@MODTYPE"/>
96                         <xsl:variable name="periViewIcon_"  select="$periMod_/LICENSEINFO/@ICON_NAME"/>
97                         <xsl:variable name="periHwVersion_" select="$periMod_/@HWVERSION"/>
98                         
99                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance"   NAME="INSTANCE"  VALUE="{$periInst_}"/>
100                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type"    NAME="MODTYPE"   VALUE="{$periModType_}" VIEWICON="{$periViewIcon_}"/>
101                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{$periHwVersion_}"/>
102                     </xsl:if>
103                     
104                     <xsl:if test="not(@INSTANCE)">
105                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance"   NAME="INSTANCE"  VALUE="{$procInst_}"/>
106                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type"    NAME="MODTYPE"   VALUE="{$procModType}" VIEWICON="{$procMod_/LICENSEINFO/@ICON_NAME}"/>
107                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{$procHwVersion_}"/>
108                     </xsl:if>
109
110                     <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Address Type" NAME="MEMTYPE" VALUE="{@MEMTYPE}"/>
111                     
112                     <xsl:variable name="instName_">
113                         <xsl:choose>
114                             <xsl:when test="@INSTANCE"><xsl:value-of select="@INSTANCE"/></xsl:when>
115                             <xsl:otherwise>Connected<xsl:value-of select="$procInst_"/></xsl:otherwise>
116                         </xsl:choose>
117                     </xsl:variable>
118                     <!-- 
119                     <xsl:message>INST : <xsl:value-of select="$set_id_"/></xsl:message>
120                      -->
121
122                    <xsl:variable name="is_locked_">
123                        <xsl:if test="@IS_LOCKED = 'TRUE'">TRUE</xsl:if>
124                        <xsl:if test="not(@IS_LOCKED) or not(@IS_LOCKED = 'TRUE')">FALSE</xsl:if>
125                    </xsl:variable>
126
127                    <xsl:variable name="baseAddrViewType_">
128                                                 <xsl:choose>
129                                                         <xsl:when test="$is_locked_='TRUE'">STATIC</xsl:when>
130                                                         <xsl:otherwise>TEXTBOX</xsl:otherwise>
131                                                 </xsl:choose>
132                                    </xsl:variable>
133
134                    <xsl:if test="(@SIZEABRV and not(@SIZEABRV = 'U'))">
135                                                 <xsl:variable name="baseAddr_"><xsl:value-of select="translate(@BASEVALUE,&HEXU2L;)"/></xsl:variable>
136                         <xsl:variable name="highAddr_"><xsl:value-of select="translate(@HIGHVALUE,&HEXU2L;)"/></xsl:variable>
137                         <VARIABLE VIEWTYPE="{$baseAddrViewType_}"  VIEWDISP="Base Address" NAME="BASEVALUE" VALUE="{$baseAddr_}"/>
138                         <VARIABLE VIEWTYPE="STATIC"   VIEWDISP="High Address" NAME="HIGHVALUE" VALUE="{$highAddr_}"/>
139
140                         <xsl:if test="not(@MEMTYPE) or not(@MEMTYPE = 'BRIDGE')">
141                                 <VARIABLE VIEWTYPE="CHECKBOX" VIEWDISP="Lock" NAME="IS_LOCKED" VALUE="{$is_locked_}"/>
142                         </xsl:if>
143
144                         <xsl:if test="@MEMTYPE and (@MEMTYPE = 'BRIDGE') and not(@BRIDGE_TO)">
145                                 <VARIABLE VIEWTYPE="CHECKBOX" VIEWDISP="Lock" NAME="IS_LOCKED" VALUE="{$is_locked_}"/>
146                                 </xsl:if>
147                                         </xsl:if>
148                     
149                     <xsl:if test="(@SIZEABRV and (@SIZEABRV = 'U'))">
150                       <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Base Address" NAME="BASEVALUE" VALUE=""/>
151                     </xsl:if>
152                    
153                     <VARIABLE VIEWTYPE="STATIC"   VIEWDISP="Base Name"  NAME="BASENAME" VALUE="{@BASENAME}"/>
154
155                                         <xsl:variable name="sizeViewType_">
156                                                 <xsl:choose>
157                                                         <xsl:when test="(@SIZEABRV and (@SIZEABRV = 'U'))">DROPDOWN</xsl:when>
158                                                         <xsl:when test="$is_locked_='TRUE'">STATIC</xsl:when>
159                                                         <xsl:otherwise>DROPDOWN</xsl:otherwise>
160                                                 </xsl:choose>
161                                         </xsl:variable>
162
163                    <VARIABLE VIEWTYPE="{$sizeViewType_}" VIEWDISP="Size" NAME="SIZEABRV" VALUE="{@SIZEABRV}"/>
164                    
165                    <xsl:variable name="periInst_"       select="@INSTANCE"/>
166                        <xsl:variable name="periMod_"        select="key('G_MAP_MODULES',  $periInst_)"/>
167                        <xsl:variable name="periModClass_"   select="$periMod_/@MODCLASS"/>
168                            <xsl:variable name="periValidBifs_"  select="key('G_MAP_ALL_BIFS', $periInst_)[not(@BUSNAME = '__NOC__')]"/> 
169                        <xsl:variable name="periMemMapSlvs_" select="$periMod_/MEMORYMAP/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES/SLAVE"/>
170                        <xsl:variable name="periMemMapBifs_">
171                                                 <xsl:for-each select="$periMemMapSlvs_">
172                             <xsl:variable name="periSlvBifName_"  select="@BUSINTERFACE"/>
173                             <xsl:if test="$periValidBifs_[(@NAME = $periSlvBifName_)]">
174                                 <xsl:variable name="periBif_"     select="$periValidBifs_[(@NAME = $periSlvBifName_)]"/>
175                                 <xsl:variable name="periBifName_" select="$periBif_/@NAME"/>
176                                 <xsl:variable name="periBifBus_"  select="$periBif_/@BUSNAME"/>
177                                         <!-- 
178                                         <xsl:message>  Slv Bif  <xsl:value-of select="$periBifName_"/> = <xsl:value-of select="$periBifBus_"/></xsl:message> 
179                                          -->
180                                         <MMBIF NAME="{$periBifName_}" BUS="{$periBifBus_}"/>
181                             </xsl:if>
182                                                 </xsl:for-each>
183                        </xsl:variable>
184                        
185                        <xsl:variable name="num_of_periMemMapBifs_" select="count(exsl:node-set($periMemMapBifs_)/MMBIF)"/>
186                        
187                        <!-- 
188                                    <xsl:message>  Total num of slv bifs <xsl:value-of select="$num_of_periMemMapBifs_"/>  </xsl:message>
189                                    <xsl:message>  </xsl:message>
190                         -->
191
192                                         <xsl:variable name="valid_bifNames_">
193                                                 <xsl:for-each select="exsl:node-set($periMemMapBifs_)/MMBIF">
194                                 <xsl:variable name="bifName_"  select="@NAME"/>
195                                 <xsl:if test="position() &gt; 1">:</xsl:if><xsl:value-of select="$bifName_"/>
196                                                 </xsl:for-each>
197                     </xsl:variable>
198                     
199                                         <xsl:variable name="valid_busNames_">
200                                                 <xsl:for-each select="exsl:node-set($periMemMapBifs_)/MMBIF">
201                                 <xsl:variable name="busName_"  select="@BUS"/>
202                                 <xsl:if test="position() &gt; 1">:</xsl:if><xsl:value-of select="$busName_"/>
203                                                 </xsl:for-each>
204                     </xsl:variable>                   
205                     
206                         <!--
207                              <xsl:message>  Mod Bif  <xsl:value-of select="$bifName_"/>  : <xsl:value-of select="position()"/></xsl:message> 
208                              <xsl:message>  Mod Bif  <xsl:value-of select="$bifName_"/>  : <xsl:value-of select="position()"/></xsl:message> 
209                                      <xsl:message>Slv Bif <xsl:value-of select="$bifName_"/>  : <xsl:value-of select="position()"/></xsl:message> 
210                                         <xsl:variable name="modBifs_"  select="$modInst_/BUSINTERFACES"/>
211                                     <xsl:if test="$periValidBifs_[(@NAME = $bifName_)]">
212                                         <xsl:variable name="busName_" select="$periValidBifs_[(@NAME = $bifName_)]/@BUSNAME"/>
213                                                 <xsl:message>Mod Bif  <xsl:value-of select="$bifName_"/>  : <xsl:value-of select="position()"/></xsl:message> 
214                                         <xsl:if test="position() &gt; 1">:</xsl:if><xsl:value-of select="$bifName_"/>
215                                     </xsl:if>             
216                         -->
217                     <!-- 
218                         <xsl:message>Module Instances <xsl:value-of select="$instName_"/> </xsl:message>
219                         <xsl:message>Base Name <xsl:value-of select="$baseName_"/> </xsl:message>
220                         <xsl:message>High Name <xsl:value-of select="$highName_"/> </xsl:message>
221                         <xsl:message>Valid bif names <xsl:value-of select="$valid_bifNames_"/> </xsl:message>
222                         <xsl:message>Valid bif names <xsl:value-of select="$valid_bifNames_"/> </xsl:message>
223                         <xsl:message>Valid bus names <xsl:value-of select="$valid_busNames_"/> </xsl:message>
224                         -->
225                         
226                     
227                         <xsl:variable name="var_bifNames_">
228                             <xsl:choose>
229                                     <xsl:when test="string-length($valid_bifNames_) &lt; 1">
230                                         <xsl:choose>
231                                             <xsl:when test="$periModClass_ = 'BUS'">Not Applicable</xsl:when>
232                                             <xsl:otherwise>Not Connected</xsl:otherwise>
233                                         </xsl:choose>
234                                     </xsl:when>
235                                     <xsl:otherwise><xsl:value-of select="$valid_bifNames_"/></xsl:otherwise>
236                             </xsl:choose> 
237                         </xsl:variable>
238                         
239                                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Interface(s)"  NAME="BIFNAMES" VALUE="{$var_bifNames_}"/>
240                                         <xsl:if test="(($num_of_periMemMapBifs_ &gt; 0) and (string-length($valid_busNames_) &gt; 0))">
241                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Name"      NAME="BUSNAME"  VALUE="{$valid_busNames_}"/>
242                                         </xsl:if>
243                 </SET>  <!--  End of one processor memory range row -->
244             </xsl:for-each> <!-- end of processor memory ranges loop -->
245         </xsl:element><!--  End of Processor memory map set -->
246     </xsl:for-each> <!-- end of processor module address space loop -->
247     
248     <!-- 
249         Add branch for valid address that are not part of a processor's 
250         memory map. Usually modules that have just been added, but have 
251         not been connected to a bus yet.
252      -->
253      
254     <xsl:variable name="nonProcAddresses_">
255     
256         <!-- Add a dummy non proc as a place holder. Otherwise the exsl:node-set test
257              Below complains if the variable is completely empty
258         -->
259         <NONPROCADDRESS INSTANCE="__DUMMY__" BASENAME="__DUMMY__" HIGHNAME="__DUMMY__" BASEDECIMAL="__DUMMY__"/>
260          
261         <xsl:for-each select="$G_SYS_MODS/MODULE[(not(@MODCLASS = 'PROCESSOR') and (MEMORYMAP/MEMRANGE[((not(@IS_VALID) or (@IS_VALID = 'TRUE')) and ACCESSROUTE)]))]">
262             <xsl:variable name="nonProcInst_" select="@INSTANCE"/>
263         
264             <xsl:for-each select="MEMORYMAP/MEMRANGE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]">
265         
266                 <xsl:variable name="highName_"    select="@HIGHNAME"/>
267                 <xsl:variable name="baseName_"    select="@BASENAME"/>
268                 <xsl:variable name="baseDecimal_" select="@BASEDECIMAL"/>
269             
270                 <xsl:if test="not($G_SYS_MODS/MODULE[(@MODCLASS = 'PROCESSOR')]/MEMORYMAP/MEMRANGE[((@INSTANCE = $nonProcInst_) and (@BASENAME = $baseName_) and (@HIGHNAME = $highName_))])">
271                      <NONPROCADDRESS INSTANCE="{$nonProcInst_}" BASENAME="{$baseName_}" HIGHNAME="{$highName_}" BASEDECIMAL="{$baseDecimal_}"/>
272                 </xsl:if>
273             </xsl:for-each>
274         </xsl:for-each>
275         
276     </xsl:variable>
277
278     <!--  Add unmapped addresses -->
279     <xsl:variable name="hasUnMappedAddress">
280         <xsl:for-each select="$G_SYS_MODS/MODULE[(not(@MODCLASS = 'PROCESSOR') and (MEMORYMAP/MEMRANGE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]))]">
281             <xsl:variable name="nonProcInst_" select="@INSTANCE"/>
282             <xsl:for-each select="MEMORYMAP/MEMRANGE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]">
283                 <xsl:variable name="highName_"    select="@HIGHNAME"/>
284                 <xsl:variable name="baseName_"    select="@BASENAME"/>
285                 <xsl:variable name="baseDecimal_" select="@BASEDECIMAL"/>
286                 <xsl:if test="not($G_SYS_MODS/MODULE[(@MODCLASS = 'PROCESSOR')]/MEMORYMAP/MEMRANGE[((@INSTANCE = $nonProcInst_) and (@BASENAME = $baseName_) and (@HIGHNAME = $highName_))])"><xsl:value-of select="$nonProcInst_"/></xsl:if>
287             </xsl:for-each>
288         </xsl:for-each>
289     </xsl:variable>
290
291     <xsl:if test="string-length($hasUnMappedAddress) &gt; 1">
292     
293         <SET ID="Unmapped Addresses" CLASS="MODULE" ROW_INDEX="{$G_NUM_OF_PROCS_W_ADDRS}">
294             
295             <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance" NAME="INSTANCE"  VALUE="Unmapped Addresses"/>
296             
297             <xsl:for-each select="$G_SYS_MODS/MODULE[(not(@MODCLASS = 'PROCESSOR') and (MEMORYMAP/MEMRANGE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]))]/MEMORYMAP/MEMRANGE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]"> 
298             
299                 <xsl:variable name="nonProcMod_"  select="../.."/>
300                 <xsl:variable name="nonProcMMap_" select="$nonProcMod_/MEMORYMAP"/>
301                 <xsl:variable name="instance_"    select="$nonProcMod_/@INSTANCE"/>
302                 
303                 <xsl:variable name="row_index_"    select="position()"/>
304                 <xsl:variable name="instName_"     select="$nonProcMod_/@INSTANCE"/>
305                 <xsl:variable name="highName_"     select="@HIGHNAME"/>
306                 <xsl:variable name="baseName_"     select="@BASENAME"/>
307                 <xsl:variable name="baseDecimal_"  select="@BASEDECIMAL"/>
308                 
309                 <xsl:for-each select="$nonProcMMap_/MEMRANGE[((@BASENAME = $baseName_) and (@HIGHNAME = $highName_))]">
310                     
311                     <xsl:if test="not($G_SYS_MODS/MODULE[(@MODCLASS = 'PROCESSOR')]/MEMORYMAP/MEMRANGE[((@INSTANCE = $instName_) and (@BASENAME = $baseName_) and (@HIGHNAME = $highName_))])">
312                     
313                         <xsl:variable name="addr_id_"><xsl:value-of select="$baseName_"/>:<xsl:value-of select="$highName_"/></xsl:variable>
314                         <xsl:variable name="set_id_"><xsl:value-of select="$instName_"/>:<xsl:value-of select="$addr_id_"/></xsl:variable>
315                             
316                         <xsl:variable name="inst_modtype_"    select="$nonProcMod_/@MODTYPE"/>
317                         <xsl:variable name="inst_viewicon_"   select="$nonProcMod_/LICENSEINFO/@ICON_NAME"/>
318                         <xsl:variable name="inst_modclass_"   select="$nonProcMod_/@MODCLASS"/>
319                         <xsl:variable name="inst_hwversion_"  select="$nonProcMod_/@HWVERSION"/>
320                             
321                         <SET ID="{$set_id_}" CLASS="ADDRESS">
322                                 
323                             <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance"   NAME="INSTANCE"  VALUE="{$instance_}"/>
324                             <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type"    NAME="MODTYPE"   VALUE="{$inst_modtype_}" VIEWICON="{$inst_viewicon_}"/>
325                             <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{$inst_hwversion_}"/>
326                             <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Address Type" NAME="MEMTYPE" VALUE="{@MEMTYPE}"/>
327
328                             <xsl:variable name="is_locked_">
329                               <xsl:if test="@IS_LOCKED = 'TRUE'">TRUE</xsl:if>
330                               <xsl:if test="not(@IS_LOCKED) or not(@IS_LOCKED = 'TRUE')">FALSE</xsl:if>
331                             </xsl:variable>
332
333                             <xsl:variable name="baseAddrViewType_">
334                               <xsl:choose>
335                                 <xsl:when test="$is_locked_='TRUE'">STATIC</xsl:when>
336                                 <xsl:otherwise>TEXTBOX</xsl:otherwise>
337                               </xsl:choose>
338                             </xsl:variable>
339
340                             <xsl:if test="(@SIZEABRV and not(@SIZEABRV = 'U'))">
341                             
342                                 <xsl:variable name="baseAddr_"><xsl:value-of select="translate(@BASEVALUE,&HEXU2L;)"/></xsl:variable>
343                                 <xsl:variable name="highAddr_"><xsl:value-of select="translate(@HIGHVALUE,&HEXU2L;)"/></xsl:variable>
344                                 
345                                 <VARIABLE VIEWTYPE="{$baseAddrViewType_}"  VIEWDISP="Base Address" NAME="BASEVALUE" VALUE="{$baseAddr_}"/>
346                                 <VARIABLE VIEWTYPE="STATIC"   VIEWDISP="High Address" NAME="HIGHVALUE" VALUE="{$highAddr_}"/>
347
348                                 <xsl:if test="not(@MEMTYPE) or not(@MEMTYPE = 'BRIDGE')">
349                                   <VARIABLE VIEWTYPE="CHECKBOX" VIEWDISP="Lock" NAME="IS_LOCKED" VALUE="{$is_locked_}"/>
350                                 </xsl:if>
351
352                                 <xsl:if test="@MEMTYPE and (@MEMTYPE = 'BRIDGE') and not(@BRIDGE_TO)">
353                                   <VARIABLE VIEWTYPE="CHECKBOX" VIEWDISP="Lock" NAME="IS_LOCKED" VALUE="{$is_locked_}"/>
354                                 </xsl:if>
355
356                             </xsl:if>
357                                 
358                             <xsl:if test="(@SIZEABRV and (@SIZEABRV = 'U'))">
359                                 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Base Address" NAME="BASEVALUE" VALUE=""/>
360                             </xsl:if>
361
362                                 
363             <!--
364                                 Lock, DCache and ICache removed in 11.1
365                                 
366                                 <xsl:if test="(@IS_CACHEABLE = 'TRUE')">
367                                     
368                                     <xsl:variable name="is_dcached_">
369                                         <xsl:if test="(@IS_DCACHED = 'TRUE')">TRUE</xsl:if>
370                                         <xsl:if test="(not(@IS_DCACHED) or not(@IS_DCACHED = 'TRUE'))">FALSE</xsl:if>
371                                     </xsl:variable>
372                                     
373                                     <xsl:variable name="is_icached_">
374                                         <xsl:if test="(@IS_ICACHED = 'TRUE')">TRUE</xsl:if>
375                                         <xsl:if test="(not(@IS_ICACHED) or not(@IS_ICACHED = 'TRUE'))">FALSE</xsl:if>
376                                     </xsl:variable>
377                                     
378                                     <VARIABLE VIEWTYPE="CHECKBOX" VIEWDISP="DCache" NAME="IS_DCACHED" VALUE="{$is_dcached_}"/>
379                                     <VARIABLE VIEWTYPE="CHECKBOX" VIEWDISP="ICache" NAME="IS_ICACHED" VALUE="{$is_icached_}"/>
380                                 </xsl:if>
381              -->                    
382                                 
383                                     <VARIABLE VIEWTYPE="STATIC"   VIEWDISP="Base Name"  NAME="BASENAME" VALUE="{@BASENAME}"/>
384
385                         <xsl:variable name="sizeViewType_">
386                           <xsl:choose>
387                             <xsl:when test="(@SIZEABRV and (@SIZEABRV = 'U'))">DROPDOWN</xsl:when>
388                             <xsl:when test="$is_locked_='TRUE'">STATIC</xsl:when>
389                             <xsl:otherwise>DROPDOWN</xsl:otherwise>
390                           </xsl:choose>
391                         </xsl:variable>
392
393                         <VARIABLE VIEWTYPE="{$sizeViewType_}" VIEWDISP="Size" NAME="SIZEABRV" VALUE="{@SIZEABRV}"/>
394                             
395                             <xsl:variable name="valid_bifNames_">
396                                 <xsl:choose>
397                                     <xsl:when test="$nonProcMMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES">
398                                         <xsl:for-each select="$nonProcMMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES/SLAVE">
399                                             <xsl:variable name="bifName_"  select="@BUSINTERFACE"/>
400                                              <!-- <xsl:message>Bif Name <xsl:value-of select="$bifName_"/> </xsl:message> -->
401                                             <xsl:variable name="modBifs_"  select="$nonProcMod_/BUSINTERFACES"/>
402                                             <xsl:if test="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]">
403                                                 <xsl:variable name="busName_" select="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]/@BUSNAME"/>
404                                                 <xsl:if test="position() &gt; 1">:</xsl:if><xsl:value-of select="@BUSINTERFACE"/>
405                                             </xsl:if>    
406                                         </xsl:for-each>
407                                     </xsl:when>
408                                     <xsl:otherwise>
409                                         <xsl:for-each select="$nonProcMMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLVINTERFACES/BUSINTERFACE">
410                                             <xsl:variable name="bifName_"  select="@NAME"/>
411                                             <xsl:variable name="modBifs_"  select="$nonProcMod_"/>
412                                             <xsl:if test="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]">
413                                                 <xsl:variable name="busName_" select="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]/@BUSNAME"/>
414                                                 <xsl:if test="position() &gt; 1">:</xsl:if><xsl:value-of select="@NAME"/>
415                                             </xsl:if>    
416                                         </xsl:for-each>                       
417                                     </xsl:otherwise>
418                                 </xsl:choose>
419                             </xsl:variable>                                 
420                     
421                      <xsl:variable name="def_bifNames_">
422                         <xsl:choose>
423                          <xsl:when test="(string-length($valid_bifNames_) &lt; 1) or ((string-length($valid_bifNames_) = 1) and ($valid_bifNames_ = ':'))">Not Connected</xsl:when>
424                             <xsl:when test="starts-with($valid_bifNames_,':')"><xsl:value-of select="substring-after($valid_bifNames_,':')"/></xsl:when>
425                             <xsl:otherwise><xsl:value-of select="$valid_bifNames_"/></xsl:otherwise>
426                         </xsl:choose>
427                      </xsl:variable>
428                      
429                      
430                     <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Interface(s)"  NAME="BIFNAMES" VALUE="{$def_bifNames_}"/>
431                             
432                         <xsl:choose>
433                             <xsl:when test="$nonProcMMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES">
434                                <xsl:for-each select="$nonProcMMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES/SLAVE">
435                                     <xsl:variable name="slvBifName_" select="@BUSINTERFACE"/>
436                                     <xsl:variable name="modBifs_"    select="$nonProcMod_/BUSINTERFACES"/>
437                                     <xsl:if test="count($modBifs_/BUSINTERFACE[((@NAME = $slvBifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]) = 1">
438                                         <xsl:variable name="slvBusName_" select="$modBifs_/BUSINTERFACE[((@NAME = $slvBifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]/@BUSNAME"/>
439                                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Name" NAME="BUSNAME" VALUE="{$slvBusName_}"/>
440                                     </xsl:if>    
441                                 </xsl:for-each>
442                             </xsl:when>
443                             <xsl:otherwise>
444                                 <xsl:for-each select="$nonProcMMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLVINTERFACES/BUSINTERFACE">
445                                     <xsl:variable name="slvBifName_" select="@NAME"/>
446                                     <xsl:variable name="modBifs_"    select="$nonProcMod_"/>
447                                     <xsl:if test="count($modBifs_/BUSINTERFACE[((@NAME = $slvBifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]) = 1">
448                                         <xsl:variable name="slvBusName_" select="$modBifs_/BUSINTERFACE[((@NAME = $slvBifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]/@BUSNAME"/>
449                                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Name" NAME="BUSNAME" VALUE="{$slvBusName_}"/>
450                                     </xsl:if>    
451                                 </xsl:for-each>
452                             </xsl:otherwise>
453                         </xsl:choose>
454                             
455                             
456                 </SET>  <!--  End of one non processor memory range row -->
457             </xsl:if>   
458                         
459         </xsl:for-each> <!-- end of non processor memory ranges loop -->
460             
461       </xsl:for-each> <!--  end of NONPROCADDRESS loop -->
462         
463       </SET> <!--  End of non processor tree branch -->
464         
465     </xsl:if> <!--  End of test to see if we have and non processor mapped address -->
466
467 </xsl:template> 
468
469
470 <xsl:template name="__WRITE_VIEW_ADDRESS__">
471
472 <!--
473 -->                
474     <xsl:for-each select="$G_SYS_MODS/MODULE[((@MODCLASS = 'PROCESSOR') and (MEMORYMAP/MEMRANGE[((not(@IS_VALID) or (@IS_VALID = 'TRUE')) and ACCESSROUTE)]))]">
475         <xsl:sort data-type="number" select="@ROW_INDEX" order="ascending"/>
476             
477         <xsl:variable name="procInst_" select="@INSTANCE"/>
478         <xsl:variable name="modClass_" select="@MODCLASS"/>
479         
480         <xsl:variable name="procInstHdrVal_"><xsl:value-of select="$procInst_"/>'s Address Map</xsl:variable>
481         <xsl:variable name="procInstRowIdx_" select="position() - 1"/>
482         <xsl:variable name="modInstance_" select="self::node()"/>
483         
484         <SET ID="{$procInst_}" CLASS="MODULE" ROW_INDEX="{$procInstRowIdx_}">
485         
486             <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance" NAME="INSTANCE"  VALUE="{$procInstHdrVal_}"/>
487             
488             <xsl:for-each select="$modInstance_/MEMORYMAP/MEMRANGE[((not(@IS_VALID) or (@IS_VALID = 'TRUE')) and (ACCESSROUTE or (@MEMTYPE = 'BRIDGE')))]">
489                 <xsl:sort data-type="number" select="@BASEDECIMAL" order="ascending"/>
490                 
491                 <xsl:variable name="addr_id_"><xsl:value-of select="@BASENAME"/>:<xsl:value-of select="@HIGHNAME"/></xsl:variable>
492                 <xsl:variable name="baseName_" select="@BASENAME"/>
493                 <xsl:variable name="highName_" select="@HIGHNAME"/>
494                 
495                 <xsl:if test="$G_DEBUG='TRUE'">
496                         <xsl:message>ADDRESS ID <xsl:value-of select="$addr_id_"/></xsl:message>
497                 </xsl:if>
498                 
499                 <xsl:variable name="set_id_">
500                     <xsl:if test="(@INSTANCE)">
501                         <xsl:value-of select="$procInst_"/>.<xsl:value-of select="@INSTANCE"/>:<xsl:value-of select="$addr_id_"/>
502                     </xsl:if>
503                     <xsl:if test="not(@INSTANCE)">
504                         <xsl:value-of select="$procInst_"/>:<xsl:value-of select="$addr_id_"/>
505                     </xsl:if>
506                 </xsl:variable>
507                 
508                 <xsl:variable name="procAddrRowIdx_" select="position() - 1"/>
509                 <SET ID="{$set_id_}" CLASS="ADDRESS" ROW_INDEX="{$procAddrRowIdx_}">
510                     
511                     <xsl:if test="(@INSTANCE)">
512                         <xsl:variable name="instance_"        select="@INSTANCE"/>
513                         <xsl:variable name="subInstance_"     select="$G_SYS_MODS/MODULE[(@INSTANCE = $instance_)]"/>
514                         
515                         <xsl:variable name="inst_modtype_"    select="$subInstance_/@MODTYPE"/>
516                         <xsl:variable name="inst_viewicon_"   select="$subInstance_/LICENSEINFO/@ICON_NAME"/>
517                         <xsl:variable name="inst_hwversion_"  select="$subInstance_/@HWVERSION"/>
518                         
519                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance"   NAME="INSTANCE"  VALUE="{$instance_}"/>
520                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type"    NAME="MODTYPE"   VALUE="{$inst_modtype_}" VIEWICON="{$inst_viewicon_}"/>
521                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{$inst_hwversion_}"/>
522                     </xsl:if>
523                     
524                     <xsl:if test="not(@INSTANCE)">
525                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance"   NAME="INSTANCE"  VALUE="{$modInstance_/@INSTANCE}"/>
526                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type"    NAME="MODTYPE"   VALUE="{$modInstance_/@MODTYPE}" VIEWICON="{$modInstance_/LICENSEINFO/@ICON_NAME}"/>
527                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{$modInstance_/@HWVERSION}"/>
528                     </xsl:if>
529
530                     <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Address Type" NAME="MEMTYPE" VALUE="{@MEMTYPE}"/>
531                     
532                     <xsl:variable name="instName_">
533                         <xsl:choose>
534                             <xsl:when test="@INSTANCE"><xsl:value-of select="@INSTANCE"/></xsl:when>
535                             <xsl:otherwise>Connected<xsl:value-of select="$modInstance_/@INSTANCE"/></xsl:otherwise>
536                         </xsl:choose>
537                     </xsl:variable>
538                     <!-- 
539                     <xsl:message>INST : <xsl:value-of select="$set_id_"/></xsl:message>
540                      -->    
541
542                    <xsl:variable name="is_locked_">
543                        <xsl:if test="@IS_LOCKED = 'TRUE'">TRUE</xsl:if>
544                        <xsl:if test="not(@IS_LOCKED) or not(@IS_LOCKED = 'TRUE')">FALSE</xsl:if>
545                    </xsl:variable>
546
547                    <xsl:variable name="baseAddrViewType_">
548                      <xsl:choose>
549                        <xsl:when test="$is_locked_='TRUE'">STATIC</xsl:when>
550                        <xsl:otherwise>TEXTBOX</xsl:otherwise>
551                      </xsl:choose>
552                    </xsl:variable>
553
554                    <xsl:if test="(@SIZEABRV and not(@SIZEABRV = 'U'))">
555                      <xsl:variable name="baseAddr_"><xsl:value-of select="translate(@BASEVALUE,&HEXU2L;)"/></xsl:variable>
556                      <xsl:variable name="highAddr_"><xsl:value-of select="translate(@HIGHVALUE,&HEXU2L;)"/></xsl:variable>
557                      <VARIABLE VIEWTYPE="{$baseAddrViewType_}"  VIEWDISP="Base Address" NAME="BASEVALUE" VALUE="{$baseAddr_}"/>
558                      <VARIABLE VIEWTYPE="STATIC"   VIEWDISP="High Address" NAME="HIGHVALUE" VALUE="{$highAddr_}"/>
559
560                      <xsl:if test="not(@MEMTYPE) or not(@MEMTYPE = 'BRIDGE')">
561                        <VARIABLE VIEWTYPE="CHECKBOX" VIEWDISP="Lock" NAME="IS_LOCKED" VALUE="{$is_locked_}"/>
562                      </xsl:if>
563
564                      <xsl:if test="@MEMTYPE and (@MEMTYPE = 'BRIDGE') and not(@BRIDGE_TO)">
565                        <VARIABLE VIEWTYPE="CHECKBOX" VIEWDISP="Lock" NAME="IS_LOCKED" VALUE="{$is_locked_}"/>
566                      </xsl:if>
567
568                    </xsl:if>
569                     
570                     <xsl:if test="(@SIZEABRV and (@SIZEABRV = 'U'))">
571                       <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Base Address" NAME="BASEVALUE" VALUE=""/>
572                     </xsl:if>
573                    
574                     <VARIABLE VIEWTYPE="STATIC"   VIEWDISP="Base Name"  NAME="BASENAME" VALUE="{@BASENAME}"/>
575
576                    <xsl:variable name="sizeViewType_">
577                      <xsl:choose>
578                        <xsl:when test="(@SIZEABRV and (@SIZEABRV = 'U'))">DROPDOWN</xsl:when>
579                        <xsl:when test="$is_locked_='TRUE'">STATIC</xsl:when>
580                        <xsl:otherwise>DROPDOWN</xsl:otherwise>
581                      </xsl:choose>
582                    </xsl:variable>
583
584                    <VARIABLE VIEWTYPE="{$sizeViewType_}" VIEWDISP="Size" NAME="SIZEABRV" VALUE="{@SIZEABRV}"/>
585
586                         <xsl:variable name="modInst_"    select="$G_SYS_MODS/MODULE[(@INSTANCE = $instName_)]"/>
587                         <xsl:variable name="modMemMap_"  select="$modInst_/MEMORYMAP"/>
588                         
589                     <xsl:variable name="valid_bifNames_">
590                         <xsl:choose>
591                             <xsl:when test="$modMemMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES">
592                                         <xsl:for-each select="$modMemMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES/SLAVE">
593                                             <xsl:variable name="bifName_"  select="@BUSINTERFACE"/>
594                                      <!-- <xsl:message>Bif Name <xsl:value-of select="$bifName_"/> </xsl:message> -->
595                                             <xsl:variable name="modBifs_"  select="$modInst_/BUSINTERFACES"/>
596                                             <xsl:if test="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]">
597                                                 <xsl:variable name="busName_" select="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]/@BUSNAME"/>
598                                                 <xsl:if test="position() &gt; 1">:</xsl:if><xsl:value-of select="@BUSINTERFACE"/>
599                                             </xsl:if>    
600                                         </xsl:for-each>
601                             </xsl:when>
602                             <xsl:otherwise>
603                                     <xsl:for-each select="$modMemMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLVINTERFACES/BUSINTERFACE">
604                                         <xsl:variable name="bifName_"  select="@NAME"/>
605                                             <xsl:variable name="modBifs_"  select="$modInst_"/>
606                                         <xsl:if test="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]">
607                                             <xsl:variable name="busName_" select="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]/@BUSNAME"/>
608                                             <xsl:if test="position() &gt; 1">:</xsl:if><xsl:value-of select="@NAME"/>
609                                         </xsl:if>    
610                                     </xsl:for-each>                       
611                             </xsl:otherwise>
612                         </xsl:choose>
613                     </xsl:variable>
614                     
615                     <!-- 
616                         <xsl:message>Module Instances <xsl:value-of select="$instName_"/> </xsl:message>
617                         <xsl:message>Base Name <xsl:value-of select="$baseName_"/> </xsl:message>
618                         <xsl:message>High Name <xsl:value-of select="$highName_"/> </xsl:message>
619                         <xsl:message>Valid bif names <xsl:value-of select="$valid_bifNames_"/> </xsl:message>
620                         -->
621                     
622                     
623                 <xsl:variable name="def_bifNames_">
624                     <xsl:choose>
625                             <xsl:when test="string-length($valid_bifNames_) &lt; 1">
626                                 <xsl:choose>
627                                     <xsl:when test="$modClass_ = 'BUS'">Not Applicable</xsl:when>
628                                     <xsl:otherwise>Not Connected</xsl:otherwise>
629                                 </xsl:choose>
630                             </xsl:when>
631                             <xsl:when test="starts-with($valid_bifNames_,':')"><xsl:value-of select="substring-after($valid_bifNames_,':')"/></xsl:when>
632                             <xsl:otherwise><xsl:value-of select="$valid_bifNames_"/></xsl:otherwise>
633                     </xsl:choose> 
634                 </xsl:variable>
635                 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Interface(s)"  NAME="BIFNAMES" VALUE="{$def_bifNames_}"/>
636                 
637                 <xsl:choose>
638                  <xsl:when test="$modMemMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES">
639                      <xsl:for-each select="$modMemMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES/SLAVE">
640                       <xsl:variable name="bifName_"  select="@BUSINTERFACE"/>
641                          <xsl:variable name="modBifs_"  select="$modInst_/BUSINTERFACES"/>
642                       <xsl:if test="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]">
643                           <xsl:variable name="busName_" select="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]/@BUSNAME"/>
644                           <xsl:variable name="numBifs_" select="count($modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))])"/>
645                           <xsl:if test="((position() = 1) or ($numBifs_ = 1))">
646                               <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Name" NAME="BUSNAME" VALUE="{$busName_}"/>
647                           </xsl:if>
648                       </xsl:if>    
649                   </xsl:for-each>
650                  </xsl:when>
651                  <xsl:otherwise>
652                         <xsl:for-each select="$modMemMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLVINTERFACES/BUSINTERFACE">
653                         <xsl:variable name="bifName_" select="@NAME"/>
654                         <xsl:variable name="modBifs_" select="$modInst_"/>
655                         <xsl:if test="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]">
656                             <xsl:variable name="busName_" select="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]/@BUSNAME"/>
657                             <xsl:variable name="numBifs_" select="count($modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))])"/>
658                             <xsl:if test="((position() = 1) or ($numBifs_ = 1))">
659                                 <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Name" NAME="BUSNAME" VALUE="{$busName_}"/>
660                             </xsl:if>
661                         </xsl:if>    
662                     </xsl:for-each>                   
663                 </xsl:otherwise>
664             </xsl:choose>
665 <!-- 
666  -->
667             </SET>  <!--  End of one processor memory range row -->
668             </xsl:for-each> <!-- end of processor memory ranges loop -->
669         </SET>  
670     </xsl:for-each> <!-- end of processor module address space loop -->
671     
672     <!-- 
673         Add branch for valid address that are not part of a processor's 
674         memory map. Usually modules that have just been added, but have 
675         not been connected to a bus yet.
676      -->
677      
678     <xsl:variable name="nonProcAddresses_">
679     
680         <!-- Add a dummy non proc as a place holder. Otherwise the exsl:node-set test
681              Below complains if the variable is completely empty
682         -->
683         <NONPROCADDRESS INSTANCE="__DUMMY__" BASENAME="__DUMMY__" HIGHNAME="__DUMMY__" BASEDECIMAL="__DUMMY__"/>
684          
685         <xsl:for-each select="$G_SYS_MODS/MODULE[(not(@MODCLASS = 'PROCESSOR') and (MEMORYMAP/MEMRANGE[((not(@IS_VALID) or (@IS_VALID = 'TRUE')) and ACCESSROUTE)]))]">
686             <xsl:variable name="nonProcInst_" select="@INSTANCE"/>
687         
688             <xsl:for-each select="MEMORYMAP/MEMRANGE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]">
689         
690                 <xsl:variable name="highName_"    select="@HIGHNAME"/>
691                 <xsl:variable name="baseName_"    select="@BASENAME"/>
692                 <xsl:variable name="baseDecimal_" select="@BASEDECIMAL"/>
693             
694                 <xsl:if test="not($G_SYS_MODS/MODULE[(@MODCLASS = 'PROCESSOR')]/MEMORYMAP/MEMRANGE[((@INSTANCE = $nonProcInst_) and (@BASENAME = $baseName_) and (@HIGHNAME = $highName_))])">
695                      <NONPROCADDRESS INSTANCE="{$nonProcInst_}" BASENAME="{$baseName_}" HIGHNAME="{$highName_}" BASEDECIMAL="{$baseDecimal_}"/>
696                 </xsl:if>
697             </xsl:for-each>
698         </xsl:for-each>
699         
700     </xsl:variable>
701
702     <!--  Add unmapped addresses -->
703     <xsl:variable name="hasUnMappedAddress">
704         <xsl:for-each select="$G_SYS_MODS/MODULE[(not(@MODCLASS = 'PROCESSOR') and (MEMORYMAP/MEMRANGE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]))]">
705             <xsl:variable name="nonProcInst_" select="@INSTANCE"/>
706             <xsl:for-each select="MEMORYMAP/MEMRANGE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]">
707                 <xsl:variable name="highName_"    select="@HIGHNAME"/>
708                 <xsl:variable name="baseName_"    select="@BASENAME"/>
709                 <xsl:variable name="baseDecimal_" select="@BASEDECIMAL"/>
710                 <xsl:if test="not($G_SYS_MODS/MODULE[(@MODCLASS = 'PROCESSOR')]/MEMORYMAP/MEMRANGE[((@INSTANCE = $nonProcInst_) and (@BASENAME = $baseName_) and (@HIGHNAME = $highName_))])"><xsl:value-of select="$nonProcInst_"/></xsl:if>
711             </xsl:for-each>
712         </xsl:for-each>
713     </xsl:variable>
714
715     <xsl:if test="string-length($hasUnMappedAddress) &gt; 1">
716     
717         <SET ID="Unmapped Addresses" CLASS="MODULE" ROW_INDEX="{$G_NUM_OF_PROCS_W_ADDRS}">
718             
719             <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance" NAME="INSTANCE"  VALUE="Unmapped Addresses"/>
720             
721             <xsl:for-each select="$G_SYS_MODS/MODULE[(not(@MODCLASS = 'PROCESSOR') and (MEMORYMAP/MEMRANGE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]))]/MEMORYMAP/MEMRANGE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]"> 
722             
723                 <xsl:variable name="nonProcMod_"  select="../.."/>
724                 <xsl:variable name="nonProcMMap_" select="$nonProcMod_/MEMORYMAP"/>
725                 <xsl:variable name="instance_"    select="$nonProcMod_/@INSTANCE"/>
726                 
727                 <xsl:variable name="row_index_"    select="position()"/>
728                 <xsl:variable name="instName_"     select="$nonProcMod_/@INSTANCE"/>
729                 <xsl:variable name="highName_"     select="@HIGHNAME"/>
730                 <xsl:variable name="baseName_"     select="@BASENAME"/>
731                 <xsl:variable name="baseDecimal_"  select="@BASEDECIMAL"/>
732                 
733                 <xsl:for-each select="$nonProcMMap_/MEMRANGE[((@BASENAME = $baseName_) and (@HIGHNAME = $highName_))]">
734                     
735                     <xsl:if test="not($G_SYS_MODS/MODULE[(@MODCLASS = 'PROCESSOR')]/MEMORYMAP/MEMRANGE[((@INSTANCE = $instName_) and (@BASENAME = $baseName_) and (@HIGHNAME = $highName_))])">
736                     
737                         <xsl:variable name="addr_id_"><xsl:value-of select="$baseName_"/>:<xsl:value-of select="$highName_"/></xsl:variable>
738                         <xsl:variable name="set_id_"><xsl:value-of select="$instName_"/>:<xsl:value-of select="$addr_id_"/></xsl:variable>
739                             
740                         <xsl:variable name="inst_modtype_"    select="$nonProcMod_/@MODTYPE"/>
741                         <xsl:variable name="inst_viewicon_"   select="$nonProcMod_/LICENSEINFO/@ICON_NAME"/>
742                         <xsl:variable name="inst_modclass_"   select="$nonProcMod_/@MODCLASS"/>
743                         <xsl:variable name="inst_hwversion_"  select="$nonProcMod_/@HWVERSION"/>
744                             
745                         <SET ID="{$set_id_}" CLASS="ADDRESS">
746                                 
747                             <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance"   NAME="INSTANCE"  VALUE="{$instance_}"/>
748                             <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type"    NAME="MODTYPE"   VALUE="{$inst_modtype_}" VIEWICON="{$inst_viewicon_}"/>
749                             <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{$inst_hwversion_}"/>
750                             <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Address Type" NAME="MEMTYPE" VALUE="{@MEMTYPE}"/>
751
752                             <xsl:variable name="is_locked_">
753                               <xsl:if test="@IS_LOCKED = 'TRUE'">TRUE</xsl:if>
754                               <xsl:if test="not(@IS_LOCKED) or not(@IS_LOCKED = 'TRUE')">FALSE</xsl:if>
755                             </xsl:variable>
756
757                             <xsl:variable name="baseAddrViewType_">
758                               <xsl:choose>
759                                 <xsl:when test="$is_locked_='TRUE'">STATIC</xsl:when>
760                                 <xsl:otherwise>TEXTBOX</xsl:otherwise>
761                               </xsl:choose>
762                             </xsl:variable>
763
764                             <xsl:if test="(@SIZEABRV and not(@SIZEABRV = 'U'))">
765                             
766                                 <xsl:variable name="baseAddr_"><xsl:value-of select="translate(@BASEVALUE,&HEXU2L;)"/></xsl:variable>
767                                 <xsl:variable name="highAddr_"><xsl:value-of select="translate(@HIGHVALUE,&HEXU2L;)"/></xsl:variable>
768                                 
769                                 <VARIABLE VIEWTYPE="{$baseAddrViewType_}"  VIEWDISP="Base Address" NAME="BASEVALUE" VALUE="{$baseAddr_}"/>
770                                 <VARIABLE VIEWTYPE="STATIC"   VIEWDISP="High Address" NAME="HIGHVALUE" VALUE="{$highAddr_}"/>
771
772                                 <xsl:if test="not(@MEMTYPE) or not(@MEMTYPE = 'BRIDGE')">
773                                   <VARIABLE VIEWTYPE="CHECKBOX" VIEWDISP="Lock" NAME="IS_LOCKED" VALUE="{$is_locked_}"/>
774                                 </xsl:if>
775
776                                 <xsl:if test="@MEMTYPE and (@MEMTYPE = 'BRIDGE') and not(@BRIDGE_TO)">
777                                   <VARIABLE VIEWTYPE="CHECKBOX" VIEWDISP="Lock" NAME="IS_LOCKED" VALUE="{$is_locked_}"/>
778                                 </xsl:if>
779
780                             </xsl:if>
781                                 
782                             <xsl:if test="(@SIZEABRV and (@SIZEABRV = 'U'))">
783                                 <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Base Address" NAME="BASEVALUE" VALUE=""/>
784                             </xsl:if>
785
786                                 
787             <!--
788                                 Lock, DCache and ICache removed in 11.1
789                                 
790                                 <xsl:if test="(@IS_CACHEABLE = 'TRUE')">
791                                     
792                                     <xsl:variable name="is_dcached_">
793                                         <xsl:if test="(@IS_DCACHED = 'TRUE')">TRUE</xsl:if>
794                                         <xsl:if test="(not(@IS_DCACHED) or not(@IS_DCACHED = 'TRUE'))">FALSE</xsl:if>
795                                     </xsl:variable>
796                                     
797                                     <xsl:variable name="is_icached_">
798                                         <xsl:if test="(@IS_ICACHED = 'TRUE')">TRUE</xsl:if>
799                                         <xsl:if test="(not(@IS_ICACHED) or not(@IS_ICACHED = 'TRUE'))">FALSE</xsl:if>
800                                     </xsl:variable>
801                                     
802                                     <VARIABLE VIEWTYPE="CHECKBOX" VIEWDISP="DCache" NAME="IS_DCACHED" VALUE="{$is_dcached_}"/>
803                                     <VARIABLE VIEWTYPE="CHECKBOX" VIEWDISP="ICache" NAME="IS_ICACHED" VALUE="{$is_icached_}"/>
804                                 </xsl:if>
805              -->                    
806                                 
807                                     <VARIABLE VIEWTYPE="STATIC"   VIEWDISP="Base Name"  NAME="BASENAME" VALUE="{@BASENAME}"/>
808
809                         <xsl:variable name="sizeViewType_">
810                           <xsl:choose>
811                             <xsl:when test="(@SIZEABRV and (@SIZEABRV = 'U'))">DROPDOWN</xsl:when>
812                             <xsl:when test="$is_locked_='TRUE'">STATIC</xsl:when>
813                             <xsl:otherwise>DROPDOWN</xsl:otherwise>
814                           </xsl:choose>
815                         </xsl:variable>
816
817                         <VARIABLE VIEWTYPE="{$sizeViewType_}" VIEWDISP="Size" NAME="SIZEABRV" VALUE="{@SIZEABRV}"/>
818                             
819                     <xsl:variable name="valid_bifNames_">
820                         <xsl:choose>
821                             <xsl:when test="$nonProcMMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES">
822                                 <xsl:for-each select="$nonProcMMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES/SLAVE">
823                                     <xsl:variable name="bifName_"  select="@BUSINTERFACE"/>
824                                      <!-- <xsl:message>Bif Name <xsl:value-of select="$bifName_"/> </xsl:message> -->
825                                     <xsl:variable name="modBifs_"  select="$nonProcMod_/BUSINTERFACES"/>
826                                     <xsl:if test="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]">
827                                         <xsl:variable name="busName_" select="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]/@BUSNAME"/>
828                                         <xsl:if test="position() &gt; 1">:</xsl:if><xsl:value-of select="@BUSINTERFACE"/>
829                                     </xsl:if>    
830                                 </xsl:for-each>
831                             </xsl:when>
832                             <xsl:otherwise>
833                                 <xsl:for-each select="$nonProcMMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLVINTERFACES/BUSINTERFACE">
834                                     <xsl:variable name="bifName_"  select="@NAME"/>
835                                     <xsl:variable name="modBifs_"  select="$nonProcMod_"/>
836                                     <xsl:if test="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]">
837                                         <xsl:variable name="busName_" select="$modBifs_/BUSINTERFACE[((@NAME = $bifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]/@BUSNAME"/>
838                                         <xsl:if test="position() &gt; 1">:</xsl:if><xsl:value-of select="@NAME"/>
839                                     </xsl:if>    
840                                 </xsl:for-each>                       
841                             </xsl:otherwise>
842                         </xsl:choose>
843                     </xsl:variable>                                 
844                     
845                      <xsl:variable name="def_bifNames_">
846                         <xsl:choose>
847                          <xsl:when test="(string-length($valid_bifNames_) &lt; 1) or ((string-length($valid_bifNames_) = 1) and ($valid_bifNames_ = ':'))">Not Connected</xsl:when>
848                             <xsl:when test="starts-with($valid_bifNames_,':')"><xsl:value-of select="substring-after($valid_bifNames_,':')"/></xsl:when>
849                             <xsl:otherwise><xsl:value-of select="$valid_bifNames_"/></xsl:otherwise>
850                         </xsl:choose>
851                      </xsl:variable>
852                      
853                      
854                     <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Interface(s)"  NAME="BIFNAMES" VALUE="{$def_bifNames_}"/>
855                             
856                         <xsl:choose>
857                             <xsl:when test="$nonProcMMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES">
858                                <xsl:for-each select="$nonProcMMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLAVES/SLAVE">
859                                     <xsl:variable name="slvBifName_" select="@BUSINTERFACE"/>
860                                     <xsl:variable name="modBifs_"    select="$nonProcMod_/BUSINTERFACES"/>
861                                     <xsl:if test="count($modBifs_/BUSINTERFACE[((@NAME = $slvBifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]) = 1">
862                                         <xsl:variable name="slvBusName_" select="$modBifs_/BUSINTERFACE[((@NAME = $slvBifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]/@BUSNAME"/>
863                                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Name" NAME="BUSNAME" VALUE="{$slvBusName_}"/>
864                                     </xsl:if>    
865                                 </xsl:for-each>
866                             </xsl:when>
867                             <xsl:otherwise>
868                                 <xsl:for-each select="$nonProcMMap_/MEMRANGE[(@BASENAME = $baseName_) and (@HIGHNAME = $highName_)]/SLVINTERFACES/BUSINTERFACE">
869                                     <xsl:variable name="slvBifName_" select="@NAME"/>
870                                     <xsl:variable name="modBifs_"    select="$nonProcMod_"/>
871                                     <xsl:if test="count($modBifs_/BUSINTERFACE[((@NAME = $slvBifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]) = 1">
872                                         <xsl:variable name="slvBusName_" select="$modBifs_/BUSINTERFACE[((@NAME = $slvBifName_) and not(@IS_VALID = 'FALSE') and not(@BUSNAME = '__NOC__'))]/@BUSNAME"/>
873                                         <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Name" NAME="BUSNAME" VALUE="{$slvBusName_}"/>
874                                     </xsl:if>    
875                                 </xsl:for-each>
876                             </xsl:otherwise>
877                         </xsl:choose>
878                             
879                             
880                 </SET>  <!--  End of one non processor memory range row -->
881             </xsl:if>   
882                         
883                 </xsl:for-each> <!-- end of non processor memory ranges loop -->
884             
885             </xsl:for-each> <!--  end of NONPROCADDRESS loop -->
886         
887         </SET> <!--  End of non processor tree branch -->
888         
889     </xsl:if> <!--  End of test to see if we have and non processor mapped address -->
890
891 </xsl:template> 
892
893 </xsl:stylesheet>
894