-
Notifications
You must be signed in to change notification settings - Fork 3
/
wdog_seq_item.sv
81 lines (60 loc) · 2.71 KB
/
wdog_seq_item.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
// Class: wdog_seq_item
//
class wdog_seq_item extends uvm_sequence_item;
typedef wdog_seq_item this_type_t;
`uvm_object_utils(wdog_seq_item);
// Group: Variables
rand bit WDOGCLKEN;
bit WDOGRESn;
bit WDOGINT;
bit WDOGRES;
// Group: Constraints
// Group: Functions
// Constructor: new
function new(string name = "wdog_seq_item");
super.new(name);
endfunction: new
// Function: do_copy
// extern function void do_copy(uvm_object rhs);
// Function: do_compare
// extern function bit do_compare(uvm_object rhs, uvm_comparer comparer);
// Function: convert2string
extern function string convert2string();
// Function: do_print
extern function void do_print(uvm_printer printer);
// Function: do_record
// extern function void do_record(uvm_recorder recorder);
// Function: do_pack
// extern function void do_pack();
// Function: do_unpack
// extern function void do_unpack();
endclass: wdog_seq_item
/*----------------------------------------------------------------------------*/
/* Constraints */
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
/* Functions */
/*----------------------------------------------------------------------------*/
function string wdog_seq_item::convert2string();
string s;
/* chain the convert2string with parent classes */
s = super.convert2string();
/* list of local properties to be printed: */
// guide 0---4---8--12--16--20--24--28--32--36--40--44--48--
// s = {s, $sformatf("property_label : 0x%0h\n", property_name)};
s = {s, $sformatf("WDOGCLKEN : %b\n", WDOGCLKEN)};
s = {s, $sformatf("WDOGRESn : %b\n", WDOGRESn)};
s = {s, $sformatf("WDOGINT : %b\n", WDOGINT)};
s = {s, $sformatf("WDOGRES : %b\n", WDOGRES)};
return s;
endfunction: convert2string
function void wdog_seq_item::do_print(uvm_printer printer);
/* chain the print with parent classes */
super.do_print(printer);
/* list of local properties to be printed: */
// printer.print_string("property_label", property_name);
printer.print_field("WDOGCLKEN", WDOGCLKEN, $bits(WDOGCLKEN), UVM_BIN);
printer.print_field("WDOGRESn", WDOGRESn, $bits(WDOGRESn), UVM_BIN);
printer.print_field("WDOGINT", WDOGINT, $bits(WDOGINT), UVM_BIN);
printer.print_field("WDOGRES", WDOGRES, $bits(WDOGRES), UVM_BIN);
endfunction: do_print