summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/initfiles/sample.initfile
blob: 325313f5ce7e2d344a29ba6350266175a464375a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
#-- $Id: sample.initfile,v 1.1 2011/07/13 16:03:44 andrewg Exp $
#-- CHANGE HISTORY:
#--------------------------------------------------------------------------------
#-- Version:|Author: | Date:  | Comment:
#-- --------|--------|--------|--------------------------------------------------
#--     0.01|andrewg |05/24/11|Created sample file
#-- --------|--------|--------|--------------------------------------------------
#--------------------------------------------------------------------------------
# End of revision history
#--------------------------------------------------------------------------------

#--Master list of variables that can be used in this file is at:
#--<Attribute Definition Location>

SyntaxVersion = 1

#-- -----------------------------------------------------------------------------
#--******************************************************************************
#-- -----------------------------------------------------------------------------
#--
#-- Includes
#-- Note:
#   Must specify the path to the .define file here; i.e. 
#      "include ./hwp/initfiles/sample.define"
#   Or specify the directories to search for the include file (-I <path to search>)
#   in priority order at the initCompiler command line; i.e.
#      "initCompiler -init ./sample.initfile -outdir . -attr ./fapiAttributeIds.H \
#      -I hwp/initfiles -I hwp"
#       
#-- -----------------------------------------------------------------------------
#--******************************************************************************
#-- -----------------------------------------------------------------------------
include sample.define

#-- -----------------------------------------------------------------------------
#--******************************************************************************
#-- -----------------------------------------------------------------------------
#--
#-- Defines
#--
#-- -----------------------------------------------------------------------------
#--******************************************************************************
#-- -----------------------------------------------------------------------------

define def_equal_test     =  (SYS.ATTR_SCRATCH_UINT32_1 == SYS.ATTR_SCRATCH_UINT32_2);
define def_not_equal_test =  (SYS.ATTR_SCRATCH_UINT64_1 != SYS.ATTR_SCRATCH_UINT64_2);


#--******************************************************************************
#-- Basic SCOM
#--******************************************************************************
scom 0x0000000013010002              {
  scom_data                 ;
  0xAABBC00000000000        ;
}

#--******************************************************************************
#-- Basic SCOM with Expression and Attribute
#--******************************************************************************

scom 0x0000000013030007              {
  scom_data,            expr                 ;
  0x00000CDE00000000,   SYS.ATTR_SCRATCH_UINT8_1 == SYS.ATTR_SCRATCH_UINT8_2    ;
}

#--******************************************************************************
#-- SCOM with Address and Data of Array Type, Range of Index, Bit Support
#-- The following Scom is equivalent to:
#scom 0x000000000006002B           {
#  bits, scom_data             ,              expr;
#  0:7,  SYS.ATTR_SCRATCH_UINT8_ARRAY_1[2],   SYS.ATTR_SCRATCH_UINT8_ARRAY_1[2] > SYS.ATTR_SCRATCH_UINT8_1;
#  24:31, SYS.ATTR_SCRATCH_UINT8_ARRAY_1[2],  SYS.ATTR_SCRATCH_UINT8_1 == SYS.ATTR_SCRATCH_UINT8_ARRAY_1[3];
#  32:39, SYS.ATTR_SCRATCH_UINT8_ARRAY_2[0][1][2], SYS.ATTR_SCRATCH_UINT8_ARRAY_1[0] < SYS.ATTR_SCRATCH_UINT8_ARRAY_1[1];
#}
#
#scom 0x000000000006002C           {
#  bits, scom_data             ,              expr;
#  0:7,  SYS.ATTR_SCRATCH_UINT8_ARRAY_1[2],   SYS.ATTR_SCRATCH_UINT8_ARRAY_1[31] > SYS.ATTR_SCRATCH_UINT8_1;
#  24:31, SYS.ATTR_SCRATCH_UINT8_ARRAY_1[31], SYS.ATTR_SCRATCH_UINT8_1 == SYS.ATTR_SCRATCH_UINT8_ARRAY_1[7];
#  32:39, SYS.ATTR_SCRATCH_UINT8_ARRAY_2[1][2][3], SYS.ATTR_SCRATCH_UINT8_ARRAY_1[17] < SYS.ATTR_SCRATCH_UINT8_ARRAY_1[18];
#}
#--******************************************************************************

scom 0x000000000006002(B,C)        {
  bits, scom_data             ,              expr;
  0:7,  SYS.ATTR_SCRATCH_UINT8_ARRAY_1[2],   SYS.ATTR_SCRATCH_UINT8_ARRAY_1[2,31] > SYS.ATTR_SCRATCH_UINT8_1;
  24:31, SYS.ATTR_SCRATCH_UINT8_ARRAY_1[2,31], SYS.ATTR_SCRATCH_UINT8_1 == SYS.ATTR_SCRATCH_UINT8_ARRAY_1[3,7];
  32:39, SYS.ATTR_SCRATCH_UINT8_ARRAY_2[0..1][1,2][2,3], SYS.ATTR_SCRATCH_UINT8_ARRAY_1[0,17] < SYS.ATTR_SCRATCH_UINT8_ARRAY_1[1,18];
}

#--******************************************************************************
#-- Basic SCOM with define used
#--******************************************************************************

scom 0x000000000006800b              {
  scom_data,            expr                 ;
  0x0000000000000184,   def_equal_test       ;
}

#--******************************************************************************
#-- Basic SCOM with a single bit set
#--******************************************************************************

scom 0x000000000006800c              {
    bits ,                    scom_data        ;
    23   ,                    0b1              ;
}

#--******************************************************************************
#-- Basic SCOM with same address but different bits set & Scom data of Attr type
#--******************************************************************************

scom 0x000000000006800c              {
    bits ,                    scom_data        ;
    24:31   ,                 SYS.ATTR_SCRATCH_UINT8_ARRAY_2[1][2][3]       ;
    32:63   ,                 SYS.ATTR_SCRATCH_UINT32_1;
}

#--******************************************************************************
#-- Basic SCOM with bits
#--******************************************************************************
scom 0x0000000013013283              {
    bits ,                    scom_data        ;
    0:11 ,                    0b001111001001   ;
    12   ,                    0b1              ;
    13   ,                    0x1              ;
    14:59,                    0x00c190010480   ;
}

#--******************************************************************************
#-- Complext SCOM with Bit Support, define, and attributes
#--******************************************************************************

scom 0x0000000013013284              {
    bits ,                    scom_data,        expr                                  ;
    0:11 ,                    0b001111001001,   any                                   ;
    12   ,                    0b1,              def_equal_test                        ;
    12   ,                    0b0,              def_not_equal_test                    ;
    13   ,                    0b1,              def_uint8_greater_test                ;
    14:59, 0b0000001100000110010000000000010000010010000000,  SYS.ATTR_SCRATCH_UINT64_2 == ENUM_ATTR_SCRATCH_UINT64_2_VAL_C;
}

#--******************************************************************************
#-- Complex SCOM with Bit Support, and logical operators
#--******************************************************************************

scom 0x0000000013013285              {
    bits ,                    scom_data,        expr                                  ;
    12   ,                    0b1,              def_equal_test && def_not_equal_test  ;
    12   ,                    0b0,              def_equal_test || def_not_equal_test  ;
    14   ,                    0b1,              SYS.ATTR_SCRATCH_UINT32_1 < SYS.ATTR_SCRATCH_UINT32_2   ;
    15   ,                    0b1,              def_uint32_greater_test                                 ;
    16   ,                    0b1,              SYS.ATTR_SCRATCH_UINT32_1 >= SYS.ATTR_SCRATCH_UINT32_2  ;
    17   ,                    0b1,              SYS.ATTR_SCRATCH_UINT32_1 <= SYS.ATTR_SCRATCH_UINT32_2  ;
    18   ,                    0b1,              SYS.ATTR_SCRATCH_UINT32_1 == SYS.ATTR_SCRATCH_UINT32_2  ;
    19   ,                    0b1,              SYS.ATTR_SCRATCH_UINT32_1 != SYS.ATTR_SCRATCH_UINT32_2  ;
    20   ,                    0b1,              (SYS.ATTR_SCRATCH_UINT32_1 + SYS.ATTR_SCRATCH_UINT32_2) == 4 ;
    21:59, 0b000000110000011001000000000001000001001, SYS.ATTR_SCRATCH_UINT8_1 == SYS.ATTR_SCRATCH_UINT8_2 ;
}

#--******************************************************************************
#-- SCOM with 'ec' column - Use scratch for now since all attributes work
#--******************************************************************************

scom 0x0000000013013286              {
  scom_data,            SYS.ATTR_SCRATCH_UINT32_1,  SYS.ATTR_SCRATCH_UINT32_2        ;
  0x0000000000000192,   1,                      ENUM_ATTR_SCRATCH_UINT64_ARRAY_2_VAL_B       ;
}

#--******************************************************************************
#-- Basic SCOM with an array
#--******************************************************************************
scom 0x0000000013013287              {
  scom_data,            expr                 ;
  0x0000000000000182,   SYS.ATTR_SCRATCH_UINT8_ARRAY_1[2] == SYS.ATTR_SCRATCH_UINT8_1    ;
}

#--******************************************************************************
#-- SCOM with 'ec' & expr column - Use scratch for now since all attributes work
#--******************************************************************************
scom 0x0000000013013288              {
  scom_data,            SYS.ATTR_SCRATCH_UINT32_1        expr;
  0x0000000000000192,   3,                           SYS.ATTR_SCRATCH_UINT8_ARRAY_2[1][2][3] == 0x00000000000000BE;
}

#--******************************************************************************
#-- Complex SCOM with Bit Support, logical operators and 'ec' column
#--******************************************************************************
scom 0x0000000013013289              {
  bits ,                    scom_data        SYS.ATTR_SCRATCH_UINT32_1        expr;
  23   ,                    0b1,             any,                         SYS.ATTR_SCRATCH_UINT8_ARRAY_1[2] == SYS.ATTR_SCRATCH_UINT8_1;
  23   ,                    0b0,             1,                           any;
}

#--******************************************************************************
#-- Basic SCOM with Multiple Arrays/Address Ranges
#-- Note: These are not valid SCOM addresses. Just included here as an example of
#-- the supported syntax.  Uncomment only for debugging code.
#--******************************************************************************
#scom 0x0000006(0E..10,3c)4(A,1)(D..F)56(7,8,9,0)1       {
#  scom_data             ;
#  0x0000000000000193    ;
#}

#--******************************************************************************
#-- Basic SCOM with Bin and Hex Scom Addresses of Multiple Arrays/Address Ranges
#-- Note: These are not valid SCOM addresses. Just included here as an example of
#-- the supported syntax.  Uncomment only for debugging code.
#--******************************************************************************
#scom 0x(7,8)000001301.0b1(01..10,00)(00,01)0(1,0)1.0xD(8A,8B)C {
#  scom_data                 ;
#  0x0000000000000194    ;
#}

#--******************************************************************************
#-- SCOM with defines for Scom address and each supported column.
#-- Note: This SCOM is inluded here as an example of the supported syntax.
#-- Uncomment only for debugging code.
#--******************************************************************************
#scom addr.rx_mode_reg(rx0,rx1)(lane0, lane2..lane3).addr2(xbus0,xbus3)addr3 {
#  bits     , scom_data,              SYS.ATTR_SCRATCH_UINT32_1, expr;
#  rx_field1, rx_field1_enum_value1,  any,                       def_equal_test;
#  rx_field1, rx_field1_enum_value2,  attr_value1,               def_not_equal_test;
#}
OpenPOWER on IntegriCloud