Are Tlm Analysis Fifo Required

HI all
Is it compulsory to use TLM FIFO’s in monitor and score board. will i be able to compare transactions of read/write cycle without TLM fifo in the scoreboard

please clarify
Regards
Sankar

Hi Sankadr,

It is not compulsory to use the TLM Analysis FIFO’s. But it is recomended way to use these FIFO’s.

As the Moniotor’s and Scoreboard are used for analysis of the data. These components should not block the current simulation time. If we use normal FIFO’s(TLM FIFO’s Which have limited size), if FIFO is full it can’t store the data and as it is blocking statement, it will wait for FIFO to be free. This will waste some simulation cycles. If we have TLM Analysis FIFO’s which have infinite size, always we will have memory for the transaction formed and no simulation cycles will be wasted. So it is better to use TLM Analysis FIFO in Analysis part.

Vishnu Prashant
Thank you for the clarification. Can u please give me an example on how to use tlm fifo b/w monitor and score board
REgards
Sankardr

HI Sankadar,

Please find the code.

// Packet code
class Packet extends ovm_transaction;
endclass

// Monitor code
class monitor extends ovm_component;
 ovm_analysis_port #(Packet) out_ap; 
 
 function void build();
   super.build();
   out_ap = new("out_ap", this);
 endfunction
 
 // run task
 task run();
  Packet result_pkt = new();
  while(1) begin
   @ (negedge v_alu_if.clk)
       // Latch the data and pass via Analysis Port  
    out_ap.write(result_pkt);
   end
  end  
 endtask
endclass // monitor

// Scoreboard
class Scoreboard extends ovm_component;
 ovm_blocking_get_port #(Packet) get_port;
 // build is not shown
endclass

// class tb_env extends ovm_env;
  tlm_analysis_fifo #(Packet) mon2sb;
  monitor mon;
  Scoreboard sb;
  
   // build not shown for above components

   function void connect()
      // Connect the Monitor to Analysis FIFO 
      mon.out_ap.connect(mon2sb.analysis_export);
     // Connect the ScoreBoard to Analysis FIFO 
      sb.get_port.connect(mon2sb.blocking_get_export); 
   endfunction
  endclass

Hope this helps…

Please click one of the Quick Reply icons in the posts above to activate Quick Reply.

Hi Vishnu,
Thank you for the code. when i use the tlm fifo when does the scoreboard start the process of data. is it done for every transaction or is it done as post processing after the data is writren and read. please clarify
BTW are u friend of manoj
regards
Sankardr

HI Sankadar,
Please find the code.

// Packet code
class Packet extends ovm_transaction;
endclass
// Monitor code
class monitor extends ovm_component;
ovm_analysis_port #(Packet) out_ap; 
function void build();
super.build();
out_ap = new("out_ap", this);
endfunction
// run task
task run();
Packet result_pkt = new();
while(1) begin
@ (negedge v_alu_if.clk)
// Latch the data and pass via Analysis Port  
out_ap.write(result_pkt);
end
end  
endtask
endclass // monitor
// Scoreboard
class Scoreboard extends ovm_component;
ovm_blocking_get_port #(Packet) get_port;
// build is not shown
endclass
// class tb_env extends ovm_env;
tlm_analysis_fifo #(Packet) mon2sb;
monitor mon;
Scoreboard sb;
// build not shown for above components
function void connect()
// Connect the Monitor to Analysis FIFO 
mon.out_ap.connect(mon2sb.analysis_export);
// Connect the ScoreBoard to Analysis FIFO 
sb.get_port.connect(mon2sb.blocking_get_export); 
endfunction
endclass

Hope this helps…

Hi Sankadar,

The Process will start as soon as transaction is written by monitor into scoreboard. For putting the transaction write() method will be used. This will consume 0 delta cycle. Tlm analysis FIFO will of infinite size so it will also won’t consume time. Scoreboard won’t do anything except analysing the data which it should not consume any time ideally.
So process will start as soon as transaction put by monitor.
I don’t know manoj.

In reply to vishnuprasanth:

Hi,

Can you please tell how can I push into , pop from and delete elements of tlm fifo?

Thanks,
Anamika