verilogverificationuvm

uvm_analysis_imp vs uvm_tlm_analysis_fifo in UVM


What is the difference between uvm_analysis_imp and uvm_tlm_analysis_fifo in UVM? where exctly it is used? I understand that uvm_analysis_imp is for one to many and where as uvm_tlm_analysis_fifo is one to one communicatiion can anyone give example for the same? multiple monitors transferring its da to same scorboard we are using uvm_analysis_imp? and when we are using uvm_analysis_fifo?

Actually we could use same uvm_analysis_imp instead of uvm_tlm_analysis_fifo right?

I tried to send data from monitor to scoreboard using analysis FIFO i got the correct answer too. but had a confusion regarding when to choose uvm_analysis_imp vs uvm_tlm_analysis_fifo


Solution

  • A uvm_tlm_analysis_fifo is an extension of uvm_tlm_fifo that contains a uvm_analysis_imp. An analysis_imp implements a a write() method called by an analysis_port. That write() method does a put() to the fifo.

    You typically need fifos in a scoreboard when there are multiple analysis ports writing to the fifo and you cannot take action until all ports have called write() or the number of writes() from each port is not synchronized.