-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathf_sequence.sv
More file actions
59 lines (54 loc) · 2.04 KB
/
Copy pathf_sequence.sv
File metadata and controls
59 lines (54 loc) · 2.04 KB
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
class f_sequence extends uvm_sequence#(f_sequence_item);
`uvm_object_utils(f_sequence)
function new(string name = "f_sequence");
super.new(name);
endfunction
virtual task body();
`uvm_info(get_type_name(), $sformatf("******** Generate 16 Write REQs ********"), UVM_LOW)
repeat(16) begin
req = f_sequence_item::type_id::create("req");
start_item(req);
assert(req.randomize() with {{i_wren,i_rden} == 2'b10;});
finish_item(req);
end
`uvm_info(get_type_name(), $sformatf("******** Generate 16 Read REQs ********"), UVM_LOW)
repeat(16) begin
req = f_sequence_item::type_id::create("req");
start_item(req);
assert(req.randomize() with {{i_wren,i_rden} == 2'b01;});
finish_item(req);
end
`uvm_info(get_type_name(), $sformatf("******** Generate 20 Random REQs ********"), UVM_LOW)
repeat(20) begin
req = f_sequence_item::type_id::create("req");
start_item(req);
assert(req.randomize() with {{i_wren,i_rden} == 2'b10;});
finish_item(req);
req = f_sequence_item::type_id::create("req");
start_item(req);
assert(req.randomize() with {{i_wren,i_rden} == 2'b01;});
finish_item(req);
end
`uvm_info(get_type_name(), $sformatf("******** Generate 16 Read REQs ********"), UVM_LOW)
repeat(16) begin
req = f_sequence_item::type_id::create("req");
start_item(req);
assert(req.randomize() with {{i_wren,i_rden} == 2'b11;});
finish_item(req);
end
`uvm_info(get_type_name(), $sformatf("******** Generate 16 Read REQs ********"), UVM_LOW)
repeat(16) begin
req = f_sequence_item::type_id::create("req");
start_item(req);
assert(req.randomize() with {{i_wren,i_rden} == 2'b00;});
finish_item(req);
end
`uvm_info(get_type_name(), $sformatf("******** Generate 20 Random REQs ********"), UVM_LOW)
repeat(20) begin
req = f_sequence_item::type_id::create("req");
start_item(req);
assert(req.randomize());
finish_item(req);
end
endtask
endclass