Hi All, i am Sravan Kumar.
I am verifying One Small example code for testing UVM1.1d and UVM1.2 environment, i wrote a sequence and i am randomizing the packet for 5 times and driving it to the driver.
The main problem i am facing here is when i ran the environment in UVM1.1d mode it drives 5 packets to the driver and in UVM1.2 mode driver getting only 2 packets .For the third packet the sequence is stucked at the wait_grant method and drops the objection.
Why it is happening ??
can anyone provide me the solution ASAP?
class packet_sequence extends uvm_sequence # (packet);
`uvm_object_utils(packet_sequence)
function new (string name = "packet_sequence");
super.new(name);
`uvm_info("packet_sequence",$sformatf("%m"),UVM_MEDIUM);
endfunction
task body();
`uvm_info("TRACE",$sformatf("%m"),UVM_MEDIUM);
`uvm_info("TRACE",$sformatf("%m 11111111111"),UVM_MEDIUM);
if (starting_phase != null)
begin
starting_phase.raise_objection(this);
end
repeat (5)
begin
req = packet::type_id::create("req");
`uvm_info("TRACE",$sformatf("%m wait grant"),UVM_MEDIUM);
wait_for_grant(10, 0);
`uvm_info("TRACE",$sformatf("%m get grant"),UVM_MEDIUM);
assert(req.randomize());
send_request(req);
`uvm_info("TRACE",$sformatf("%m send req"),UVM_MEDIUM);
wait_for_item_done();
`uvm_info("TRACE",$sformatf("%m seq task done"),UVM_MEDIUM);
end
if (starting_phase != null)
begin
starting_phase.drop_objection(this);
`uvm_info("TRACE",$sformatf("%m //TESTING//"),UVM_MEDIUM);
end
endtask
endclass
Result:
UVM_INFO driver.sv(43) @ 0: uvm_test_top.e.ag.drv [DRIVER] Waiting for data from sequencer
UVM_INFO packet_sequence.sv(7) @ 0: reporter@@packet_sequence [packet_sequence] $unit::\packet_sequence::new
UVM_INFO packet_sequence.sv(11) @ 0: uvm_test_top.e.ag.seqr@@packet_sequence [TRACE] $unit::\packet_sequence::body
UVM_INFO packet_sequence.sv(12) @ 0: uvm_test_top.e.ag.seqr@@packet_sequence [TRACE] $unit::\packet_sequence::body 11111111111
UVM_INFO packet.sv(20) @ 0: reporter@@req [packet] $unit::\packet::new
UVM_INFO packet_sequence.sv(38) @ 0: uvm_test_top.e.ag.seqr@@packet_sequence [TRACE] $unit::\packet_sequence::body wait grant
UVM_INFO packet_sequence.sv(40) @ 0: uvm_test_top.e.ag.seqr@@packet_sequence [TRACE] $unit::\packet_sequence::body get grant
UVM_INFO packet_sequence.sv(45) @ 0: uvm_test_top.e.ag.seqr@@packet_sequence [TRACE] $unit::\packet_sequence::body send req
UVM_INFO driver.sv(46) @ 0: uvm_test_top.e.ag.drv [DRIVER] Getting data
------------------------------
Name Type Size Value
------------------------------
req packet - @806
a integral 8 'h1
b integral 8 'h3
doAdd integral 1 'h0
------------------------------
UVM_INFO driver.sv(54) @ 0: uvm_test_top.e.ag.drv [DRIVER] Driver task done
UVM_INFO driver.sv(43) @ 0: uvm_test_top.e.ag.drv [DRIVER] Waiting for data from sequencer
UVM_INFO packet_sequence.sv(47) @ 0: uvm_test_top.e.ag.seqr@@packet_sequence [TRACE] $unit::\packet_sequence::body seq task done
UVM_INFO packet.sv(20) @ 0: reporter@@req [packet] $unit::\packet::new
UVM_INFO packet_sequence.sv(38) @ 0: uvm_test_top.e.ag.seqr@@packet_sequence [TRACE] $unit::\packet_sequence::body wait grant
UVM_INFO packet_sequence.sv(40) @ 0: uvm_test_top.e.ag.seqr@@packet_sequence [TRACE] $unit::\packet_sequence::body get grant
UVM_INFO packet_sequence.sv(45) @ 0: uvm_test_top.e.ag.seqr@@packet_sequence [TRACE] $unit::\packet_sequence::body send req
UVM_INFO driver.sv(46) @ 0: uvm_test_top.e.ag.drv [DRIVER] Getting data
------------------------------
Name Type Size Value
------------------------------
req packet - @826
a integral 8 'h4
b integral 8 'h3
doAdd integral 1 'h0
------------------------------
UVM_INFO driver.sv(54) @ 0: uvm_test_top.e.ag.drv [DRIVER] Driver task done
UVM_INFO driver.sv(43) @ 0: uvm_test_top.e.ag.drv [DRIVER] Waiting for data from sequencer
UVM_INFO packet_sequence.sv(47) @ 0: uvm_test_top.e.ag.seqr@@packet_sequence [TRACE] $unit::\packet_sequence::body seq task done
UVM_INFO packet.sv(20) @ 0: reporter@@req [packet] $unit::\packet::new
UVM_INFO packet_sequence.sv(38) @ 0: uvm_test_top.e.ag.seqr@@packet_sequence [TRACE] $unit::\packet_sequence::body wait grant
UVM_INFO /apps/vcsmx/vcs/P-2019.06-1//etc/uvm-1.2/src/base/uvm_report_server.svh(894) @ 0: reporter [UVM/REPORT/SERVER]
--- UVM Report Summary ---
** Report counts by severity
UVM_INFO : 33
UVM_WARNING : 0
UVM_ERROR : 0
UVM_FATAL : 0
** Report counts by id
[DRIVER] 7
[RNTST] 1
[TRACE] 14
[UVM/RELNOTES] 1
[UVMTOP] 1
[agent] 1
[drv] 1
[env] 1
[packet] 4
[packet_sequence] 1
[test] 1
$finish called from file "/apps/vcsmx/vcs/P-2019.06-1//etc/uvm-1.2/src/base/uvm_root.svh", line 613.
$finish at simulation time 0