Skip to content

Commit c73b778

Browse files
committed
perf(dma-calypte-ver): wait for send last packet before m_env.used() is
called
1 parent a308225 commit c73b778

File tree

1 file changed

+4
-3
lines changed
  • comp/dma/dma_calypte/comp/rx/uvm/tbench/tests

1 file changed

+4
-3
lines changed

comp/dma/dma_calypte/comp/rx/uvm/tbench/tests/base.sv

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@ class base#(USER_REGIONS, USER_REGION_SIZE, USER_BLOCK_SIZE, USER_ITEM_WIDTH, PC
5454
end_time = $time();
5555
`uvm_info(this.get_full_name(), $sformatf("\n\tVirtual sequence finished (%0d ns). Environment used: %0d", end_time/1ns, m_env.used()), UVM_LOW);
5656

57-
while((end_time + 200us) > $time() && (m_env.used() != 0)) begin
57+
#(2us); //wait to send last packet to DUT. This prevent when last packet is not DUT yet and m_env.used() is called.
58+
// The last packet can be stored in MFB sequence and environment doesnt have to see it.
59+
// this means that m_env.used() can return 0 and last packet can be send to DUT.
60+
while((end_time + 200us) > $time() && m_env.used() != 0) begin
5861
#(600ns);
5962
`uvm_info(this.get_full_name(), "\n\tWaiting after virtual sequence finished.", UVM_MEDIUM);
6063
end
6164

62-
#(1us)
63-
6465
for (int unsigned chan = 0; chan < CHANNELS; chan++) begin
6566
m_env.m_regmodel.m_regmodel.channel[chan].sent_packets_cnt.write(status_r, {32'h1, 32'h1});
6667
m_env.m_regmodel.m_regmodel.channel[chan].sent_packets_cnt.read(status_r, pkt_cnt[chan]);

0 commit comments

Comments
 (0)