Quantcast
Channel: UVM SystemVerilog Discussions Forum RSS Feed
Viewing all articles
Browse latest Browse all 410

uvm_tlm_analysis_fifo issue

$
0
0

Hello All,

 

I am facing a acute problem:

 

Using a uvm_tlm_analysis_fifo as:

class bla_bla extends uvm_component

uvm_tlm_analysis_fifo  (my_packet) analysis_fifo;
 
my_packet get_my_packet ;

// other code

task run_phase

  for(int i = 0 ; i < 10; i++)begin
    analysis_fifo.write(my_packet<updated everytime before this>);
  end

  for(int i = 0 ; i < 10; i++)begin
    analysis_fifo.get(get_my_packet);
    get_my_packet.print();
  end


this displays last packet value always :o

 

I have made a small test and created it for int type instead of using the packet and it works fine with it, may be I am missing something :(

 

What should I need to do get the right values.? Is there any issues that it is keeping the pointer to the value written and one has to maintain that packets himself ?

 

Note: the above is just an example of the problem I am facing , since the exact code is much bigger so created an example just to explain better, it may have some syntax issues.

 

Thanks,

Karandeep


Viewing all articles
Browse latest Browse all 410

Trending Articles