-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsimpleadder_sequencer.sv
46 lines (25 loc) · 1.05 KB
/
simpleadder_sequencer.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
class simpleadder_sequence extends uvm_sequence#(simpleadder_transaction);
`uvm_object_utils(simpleadder_sequence)
extern function new(string name = "");
extern task body();
endclass: simpleadder_sequence
typedef uvm_sequencer#(simpleadder_transaction) simpleadder_sequencer;
function simpleadder_sequence::new(string name = "");
super.new(name);
endfunction: new
task simpleadder_sequence::body();
simpleadder_transaction sa_tx;
if (starting_phase != null)
starting_phase.raise_objection(this);
repeat(15) begin
sa_tx = simpleadder_transaction::type_id::create(.name("sa_tx") ,
.contxt(get_full_name()) );
start_item(sa_tx); /* handshake with driver::get function */
if( !sa_tx.randomize() )
`uvm_error("", "failed to randomize...");
//`uvm_info("sa_sequence", sa_tx.sprint(), UVM_LOW);
finish_item(sa_tx); /* handshake with driver::get function */
end
if (starting_phase != null)
starting_phase.drop_objection(this);
endtask: body