]> git.sur5r.net Git - freertos/blob
87bd7f3992ed8dd49d83f37abc9530c8153d7c9f
[freertos] /
1 <?xml version="1.0" standalone="no"?>
2 <xsl:stylesheet version="1.0"
3            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4        xmlns:exsl="http://exslt.org/common"
5        xmlns:dyn="http://exslt.org/dynamic"
6        xmlns:math="http://exslt.org/math"
7        xmlns:xlink="http://www.w3.org/1999/xlink"
8        extension-element-prefixes="math dyn exsl xlink">
9
10 <xsl:variable name="G_ROOT" select="/"/>
11
12 <!-- 
13    ===========================================================================
14                         CALCULATE GLOBAL VARIABLES BASED ON BLKDIAGRAM DEF IN INPUT XML 
15    ===========================================================================
16 -->
17         
18 <xsl:variable name="G_Total_StandAloneMpmc_H">
19         <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE">
20                 <xsl:value-of select="($BLKD_MPMC_MOD_H + $BLKD_MPMC2PROC_GAP)"/>       
21         </xsl:if>
22         <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE)">0</xsl:if>
23 </xsl:variable>
24         
25 <xsl:variable name="G_Max_Stack_BlwSbs_H">
26         <xsl:call-template name="F_Calc_Max_Stack_BlwSbs_Height"/>
27 </xsl:variable>
28
29 <xsl:variable name="G_Max_Stack_AbvSbs_H">
30         <xsl:call-template name="F_Calc_Max_Stack_AbvSbs_Height"/>
31 </xsl:variable>
32         
33 <xsl:variable name="G_Total_Stacks_W">
34         <xsl:call-template name="F_Calc_Stack_X">
35                 <xsl:with-param name="iStackIdx"    select="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/@STACK_HORIZ_WIDTH)"/>
36         </xsl:call-template>
37 </xsl:variable>
38         
39 <xsl:variable name="G_NumOfSharedBusses"   select="count($G_ROOT/EDKSYSTEM/BLKDIAGRAM/SBSSHAPES/MODULE)"/>
40 <xsl:variable name="G_Total_SharedBus_H"   select="($G_NumOfSharedBusses * $BLKD_SBS_LANE_H)"/>
41
42 <xsl:variable name="G_NumOfBridges"        select="count($G_ROOT/EDKSYSTEM/BLKDIAGRAM/BRIDGESHAPES/MODULE)"/>
43 <xsl:variable name="G_Total_Bridges_W"     select="(($G_NumOfBridges * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))) + $BLKD_BRIDGE_GAP)"/>
44         
45 <xsl:variable name="G_Total_DrawArea_CLC"  select="($G_Total_Stacks_W + $G_Total_Bridges_W + ($BLKD_INNER_GAP * 2))"/>
46         
47 <xsl:variable name="G_Total_DrawArea_W">
48         <xsl:if test="$G_Total_DrawArea_CLC &gt; ($BLKD_KEY_W + $BLKD_SPECS_W + $BLKD_SPECS2KEY_GAP)">
49                 <xsl:value-of select="$G_Total_DrawArea_CLC"/>
50         </xsl:if>
51         <xsl:if test="not($G_Total_DrawArea_CLC &gt; ($BLKD_KEY_W + $BLKD_SPECS2KEY_GAP + $BLKD_SPECS_W))">
52                 <xsl:value-of select="($BLKD_KEY_W + $BLKD_SPECS_W + $BLKD_SPECS2KEY_GAP)"/>
53         </xsl:if>
54 </xsl:variable>
55         
56 <xsl:variable name="G_IpBucketMods_H">
57         <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/IPBUCKET/@MODS_H"><xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/IPBUCKET/@MODS_H"/></xsl:if>
58         <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/IPBUCKET/@MODS_H)">0</xsl:if>
59 </xsl:variable>
60 <xsl:variable name="G_Total_IpBucket_H"   select="($G_IpBucketMods_H * ($BLKD_MOD_H + $BLKD_BIF_H))"/>
61         
62 <xsl:variable name="G_Total_UnkBucket_H">
63         <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET">
64         
65                 <xsl:variable name="unkBucketMods_H_">
66                         <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/@MODS_H"><xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/@MODS_H"/></xsl:if>
67                         <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/@MODS_H)">0</xsl:if>
68                 </xsl:variable>
69                 
70                 <xsl:variable name="total_UnkMod_H_"       select="($unkBucketMods_H_ * ($BLKD_MOD_H + $BLKD_BIF_H))"/>         
71                 
72                 <xsl:variable name="unkBucketBifs_H_">
73                         <xsl:if test="/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/@BIFS_H"><xsl:value-of select="/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/@BIFS_H"/></xsl:if>
74                         <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/@BIFS_H)">0</xsl:if>
75                 </xsl:variable>
76                 
77                 <xsl:variable name="total_UnkBif_H_"       select="($unkBucketBifs_H_ * ($BLKD_MOD_H + $BLKD_BIF_H))"/>
78                 
79                 <xsl:value-of select="($total_UnkBif_H_ + $total_UnkMod_H_)"/>  
80         </xsl:if>
81         
82         <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET)">0</xsl:if>
83 </xsl:variable>
84         
85 <xsl:variable name="G_SharedBus_Y"    select="($BLKD_INNER_Y + $G_Total_StandAloneMpmc_H + $G_Max_Stack_AbvSbs_H + $BLKD_PROC2SBS_GAP)"/>
86         
87 <!-- ===========================================================================
88     Calculate the width of the Block Diagram based on the total number of      
89     buslanes and modules in the design. If there are no buslanes or modules,
90         a default width, just wide enough to display the KEY and SPECS is used
91    =========================================================================== -->
92 <xsl:variable name="G_Total_Blkd_W"  select="($G_Total_DrawArea_W + (($BLKD_PRTCHAN_W  + $BLKD_IORCHAN_W)* 2))"/>
93 <xsl:variable name="G_Total_Diag_W"  select="$G_Total_Blkd_W"/>
94         
95 <!-- =========================================================================== -->
96 <!-- Calculate the height of the Block Diagram based on the total number of      -->
97 <!-- buslanes and modules in the design. Take into account special shapes such   -->
98 <!-- as MultiProc shapes.                                                                                                            -->
99 <!-- =========================================================================== -->
100         
101         
102 <xsl:variable name="G_Total_DrawArea_H"  select="($G_Total_StandAloneMpmc_H + $G_Max_Stack_AbvSbs_H + $BLKD_PROC2SBS_GAP + $G_Total_SharedBus_H + $G_Max_Stack_BlwSbs_H + $BLKD_SBS2IP_GAP + $G_Total_IpBucket_H + $BLKD_IP2UNK_GAP + $G_Total_UnkBucket_H + ($BLKD_INNER_GAP * 2))"/>
103 <xsl:variable name="G_Total_Blkd_H"      select="($G_Total_DrawArea_H + (($BLKD_PRTCHAN_H  + $BLKD_IORCHAN_H)* 2))"/>
104         
105 <xsl:variable name="G_Total_Diag_H">
106         <xsl:if test="($IN_TESTMODE = 'TRUE')">
107                 <xsl:message>Generating Blkdiagram in TestMode </xsl:message>
108        <xsl:value-of select="$G_Total_Blkd_H"/>
109         </xsl:if>
110         <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))">
111        <xsl:value-of select="($G_Total_Blkd_H + $BLKD_DRAWAREA2KEY_GAP + $BLKD_KEY_H)"/>
112         </xsl:if>
113 </xsl:variable>                 
114
115 </xsl:stylesheet>