-
Notifications
You must be signed in to change notification settings - Fork 3
/
wdog_registers.sv
350 lines (267 loc) · 12.6 KB
/
wdog_registers.sv
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
/* ~wdog_register~ contains various registers which are present in the
AMR_WDOG module */
// FOR REFERENCE: Funtion definition of configure(). FOR REFERENCE
// function void configure(
// uvm_reg parent,
// int unsigned size,
// int unsigned lsb_pos,
// string access,
// bit volatile,
// uvm_reg_data_t reset,
// bit has_reset,
// bit is_rand,
// bit individually_accessible)
// ********************************************************************************
// 1. WDOG_LOAD (Load Register)
// ********************************************************************************
class Wdog_load extends uvm_reg;
`uvm_object_utils(Wdog_load)
rand uvm_reg_field wdog_load;
function new(string name = "wdog_load");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
wdog_load = uvm_reg_field::type_id::create("wdog_load");
wdog_load.configure(this, 32, 0, "RW", 0, 32'hFFFFFFFF, 1, 1, 0);
endfunction: build
endclass //Wdog_load extends uvm_reg
// ********************************************************************************
// 2. WDOG_Value (Vaue Register)
// ********************************************************************************
class Wdog_value extends uvm_reg;
`uvm_object_utils(Wdog_value)
uvm_reg_field wdog_value;
function new(string name = "wdog_value");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
wdog_value = uvm_reg_field::type_id::create("wdog_value");
wdog_value.configure(this, 32, 0, "RO", 1, 32'hFFFFFFFF, 1, 0, 0);
endfunction: build
endclass //wdog_value extends uvm_reg
// ********************************************************************************
// 3. WDOG_Control (Control Register)
// WDOG_Control[0] = inten
// WDOG_Control[1] = resen
// ********************************************************************************
class Wdog_control extends uvm_reg;
`uvm_object_utils(Wdog_value)
rand uvm_reg_field inten;
rand uvm_reg_field resen;
function new(string name = "wdog_control");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
// Build ~inten~ field and configure it
inten = uvm_reg_field::type_id::create("inten");
inten.configure(this, 1, 0, "RW", 0, 1'h0, 1, 1, 0);
// Build ~resen~ field and configure it
resen = uvm_reg_field::type_id::create("resen");
resen.configure(this, 1, 1, "RW", 0, 1'h0, 1, 1, 0);
endfunction: build
endclass //wdog_control extends uvm_reg
// ********************************************************************************
// 4. WDOG_INTCLR (Interupt Clear Register)
// ********************************************************************************
class Wdog_intclr extends uvm_reg;
// `uvm_object_utils(Wdog_intclr)
uvm_reg_field wdog_intclr;
function new(string name = "wdog_intclr");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
wdog_intclr = uvm_reg_field::type_id::create("wdog_intclr");
wdog_intclr.configure(this, 32, 0, "WO", 0, 32'h0, 0, 1, 0);
endfunction: build
endclass //wdog_intclr extends uvm_reg
// ********************************************************************************
// 5. WDOG_RIS (Raw Interrupt Register)
// ********************************************************************************
class Wdog_ris extends uvm_reg;
// `uvm_object_utils(Wdog_ris)
uvm_reg_field wdog_ris;
function new(string name = "wdog_ris");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
wdog_ris = uvm_reg_field::type_id::create("wdog_ris");
wdog_ris.configure(this, 1, 0, "RO", 1, 1'h0, 1, 0, 0);
endfunction: build
endclass //wdog_ris extends uvm_reg
// ********************************************************************************
// 6. WDOG_MIS(Masked Interrupt Register)
// ********************************************************************************
class Wdog_mis extends uvm_reg;
`uvm_object_utils(Wdog_mis)
uvm_reg_field wdog_mis;
function new(string name = "wdog_mis");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
wdog_mis = uvm_reg_field::type_id::create("wdog_mis");
wdog_mis.configure(this, 1, 0, "RO", 1, 1'h0, 1, 0, 0);
endfunction: build
endclass //wdog_mis extends uvm_reg
// ********************************************************************************
// 7. WDOG_LOCK (Lock Register)
// ********************************************************************************
class Wdog_lock extends uvm_reg;
`uvm_object_utils(Wdog_lock)
uvm_reg_field wdog_lock;
function new(string name = "wdog_lock");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
wdog_lock = uvm_reg_field::type_id::create("wdog_lock");
wdog_lock.configure(this, 32, 0, "RW", 0, 32'h0, 1, 1, 0);
endfunction: build
endclass //wdog_lock extends uvm_reg
// ********************************************************************************
// 8. WDOG_ITCR (Integrtion Test Control Register)
// ********************************************************************************
class Wdog_itcr extends uvm_reg;
`uvm_object_utils(Wdog_itcr)
uvm_reg_field iten;
function new(string name = "wdog_itcr");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
iten = uvm_reg_field::type_id::create("iten");
iten.configure(this, 1, 0, "RW", 0, 1'h0, 1, 1, 1);
endfunction: build
endclass //wdog_itcr extends uvm_reg
// ********************************************************************************
// 9. WDOG_ITOP (Integration Test Output Set Register)
// ********************************************************************************
class Wdog_itop extends uvm_reg;
`uvm_object_utils(Wdog_itop)
uvm_reg_field wdogint;
uvm_reg_field wdogres;
function new(string name = "wdog_itop");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
wdogres = uvm_reg_field::type_id::create("wdogres");
wdogres.configure(this, 1, 0, "WO", 0, 32'h0, 1, 1, 0);
wdogint = uvm_reg_field::type_id::create("wdogint");
wdogint.configure(this, 1, 1, "WO", 0, 32'h0, 1, 1, 0);
endfunction: build
endclass //wdog_itop extends uvm_reg
// ********************************************************************************
// 10. WDOG_PERIPHERAL_ID0 (Peripheral ID Register)
// ********************************************************************************
class Wdog_peripheral_id0 extends uvm_reg;
`uvm_object_utils(Wdog_peripheral_id0)
uvm_reg_field part_number0;
function new(string name = "wdog_peripheral_id0");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
part_number0 = uvm_reg_field::type_id::create("part_number0");
part_number0.configure(this, 8, 0, "RO", 0, 32'h05, 1, 0, 0);
endfunction: build
endclass //wdog_peripheral_id0 extends uvm_reg
// ********************************************************************************
// 11. WDOG_PERIPHERAL_ID1 (Peripheral ID Register)
// ********************************************************************************
class Wdog_peripheral_id1 extends uvm_reg;
`uvm_object_utils(Wdog_peripheral_id1)
uvm_reg_field part_number1;
uvm_reg_field designer0;
function new(string name = "wdog_peripheral_id1");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
part_number1 = uvm_reg_field::type_id::create("part_number1");
part_number1.configure(this, 4, 0, "RO", 0, 32'h08, 1, 0, 0);
designer0 = uvm_reg_field::type_id::create("designer0");
designer0.configure(this, 4, 4, "RO", 0, 32'h01, 1, 0, 0);
endfunction: build
endclass //wdog_peripheral_id1 extends uvm_reg
// ********************************************************************************
// 12. WDOG_PERIPHERAL_ID2 (Peripheral ID Register)
// ********************************************************************************
class Wdog_peripheral_id2 extends uvm_reg;
`uvm_object_utils(Wdog_peripheral_id2)
uvm_reg_field designer1;
uvm_reg_field revision;
function new(string name = "wdog_peripheral_id2");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
designer1 = uvm_reg_field::type_id::create("designer1");
designer1.configure(this, 4, 0, "RO", 0, 4'h4, 1, 0, 0);
revision = uvm_reg_field::type_id::create("revision");
revision.configure(this, 4, 4, "RO", 0, 32'h1, 1, 0, 0);
endfunction: build
endclass //wdog_peripheral_id2 extends uvm_reg
// ********************************************************************************
// 13. WDOG_PERIPHERAL_ID3 (Peripheral ID Register)
// ********************************************************************************
class Wdog_peripheral_id3 extends uvm_reg;
`uvm_object_utils(Wdog_peripheral_id3)
uvm_reg_field configuration;
function new(string name = "wdog_peripheral_id3");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
configuration = uvm_reg_field::type_id::create("configuration");
configuration.configure(this, 8, 0, "RO", 0, 32'h00, 1, 0, 0);
endfunction: build
endclass //wdog_peripheral_id3 extends uvm_reg
// ********************************************************************************
// 14. WDOG_PCELL_ID0 (PCELL ID Register)
// ********************************************************************************
class Wdog_pcell_id0 extends uvm_reg;
`uvm_object_utils(Wdog_pcell_id0)
uvm_reg_field wdog_pcell_id0;
function new(string name = "wdog_pcell_id0");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
wdog_pcell_id0 = uvm_reg_field::type_id::create("wdog_pcell_id0");
wdog_pcell_id0.configure(this, 8, 0, "RO", 0, 8'h0D, 1, 0, 0);
endfunction: build
endclass //wdog_pcell_id0 extends uvm_reg
// ********************************************************************************
// 15. WDOG_PCELL_ID1 (PCELL ID Register)
// ********************************************************************************
class Wdog_pcell_id1 extends uvm_reg;
`uvm_object_utils(Wdog_pcell_id1)
uvm_reg_field wdog_pcell_id1;
function new(string name = "wdog_pcell_id1");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
wdog_pcell_id1 = uvm_reg_field::type_id::create("wdog_pcell_id1");
wdog_pcell_id1.configure(this, 8, 0, "RO", 0, 8'hF0, 1, 0, 0);
endfunction: build
endclass //wdog_pcell_id1 extends uvm_reg
// ********************************************************************************
// 16. WDOG_PCELL_ID2 (PCELL ID Register)
// ********************************************************************************
class Wdog_pcell_id2 extends uvm_reg;
`uvm_object_utils(Wdog_pcell_id2)
uvm_reg_field wdog_pcell_id2;
function new(string name = "wdog_pcell_id2");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
wdog_pcell_id2 = uvm_reg_field::type_id::create("wdog_pcell_id2");
wdog_pcell_id2.configure(this, 8, 0, "RO", 0, 8'h05, 1, 0, 0);
endfunction: build
endclass //wdog_pcell_id2 extends uvm_reg
// ********************************************************************************
// 17. WDOG_PCELL_ID3 (PCELL ID Register)
// ********************************************************************************
class Wdog_pcell_id3 extends uvm_reg;
`uvm_object_utils(Wdog_pcell_id3)
uvm_reg_field wdog_pcell_id3;
function new(string name = "wdog_pcell_id3");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction //new()
function void build();
wdog_pcell_id3 = uvm_reg_field::type_id::create("wdog_pcell_id3");
wdog_pcell_id3.configure(this, 8, 0, "RO", 0, 8'hB1, 1, 0, 0);
endfunction: build
endclass //wdog_pcell_id3 extends uvm_reg