-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfifo_sequence.sv
53 lines (45 loc) · 1.92 KB
/
fifo_sequence.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
//SEQUENCE
`include "defines.sv"
class fifo_sequence extends uvm_sequence#(fifo_seq_item);
`uvm_object_utils(fifo_sequence)
fifo_seq_item req;
function new(string name = "fifo_sequence");
super.new(name);
endfunction
task body();
`uvm_info(get_type_name(), $sformatf("******** Generate 1024 WRITE REQs ********"), UVM_LOW)
repeat(`DEPTH) begin
req = fifo_seq_item::type_id::create("req");
start_item(req);
assert(req.randomize() with {i_wren == 1; i_rden == 0;});
finish_item(req);
end
`uvm_info(get_type_name(), $sformatf("******** Generate 1024 Read REQs ********"), UVM_LOW)
repeat(`DEPTH) begin
req = fifo_seq_item::type_id::create("req");
start_item(req);
assert(req.randomize() with {i_wren == 0; i_rden == 1;});
finish_item(req);
end
// `uvm_info(get_type_name(), $sformatf("******** Generate 1024 WRITE AND READ IN PARALLEL REQs ********"), UVM_LOW)
// repeat(`DEPTH) begin
// req = fifo_seq_item::type_id::create("req");
// start_item(req);
// assert(req.randomize() with {i_wren == 1; i_rden == 1;});
// `uvm_info("Sequence",$sformatf("randomised value, i_wren:%0d , i_rden:%0d" ,req.i_wren,req.i_rden), UVM_NONE);
// finish_item(req);
// end
// `uvm_info(get_type_name(), $sformatf("******** Generate 1024 WRITE AND READ IN ALTERNATE REQs ********"), UVM_LOW)
// repeat(`DEPTH) begin
// req = fifo_seq_item::type_id::create("req");
// start_item(req);
// assert(req.randomize() with {i_wren == 1; i_rden == 0;});
// finish_item(req);
// req = fifo_seq_item::type_id::create("req");
// start_item(req);
// assert(req.randomize() with {i_wren == 0; i_rden == 1;});
// finish_item(req);
// end
//
endtask
endclass