How to use tlm_analysis_fifo?

In reply to dave_59:

Hi Dave,

Thanks for your reply. Here is my code like, the 1) works but 2) doesn’t work. Basically I have to add another analysis port, connect this analysis port to the monitor first, and then the write gets called, but if I connect the analysis fifo to the monitor directly, the write didn’t gets called … Does it make sense?

  1. `uvm_analysis_imp_decl(_abc)

uvm_analysis_imp_abc abc_export; —> Define another

uvm_tlm_analysis_fifo abc_fifo;

monitor.a_port.connect(scoreboard.abc_export); —> Connect to this ap

function void write_abc (input my_transaction1 t1); —> This one get called. Note it uses write_abc
if (t1.something)
begin
abc_fifo.write(t2)
end

  1. uvm_tlm_analysis_fifo abc_fifo;

    monitor.a_port.connect(m_tbuf_scoreboard.abc_fifo.analysis_export); → connect to the fifo directly

function void write (input my_transaction1 t1); —> Didn’t get called
if (t1.something)
begin
abc_fifo.write(t2)
end