TLM Channels in OVM :
1. tlm_fifo
unidirectional transactions between free-running independent components
// Class
class tlm_fifo #(type T, int BOUND=1);
local mailbox #(T) m;
extern task put(input T t);
extern task get(output T t);
extern task peek(output T t);
...
endclass
2. tlm_req_rsp_channel
Two back-to-back tlm_fifos pipelined or out-of-order protocols
class tlm_req_rsp_channel
#(type REQ, RSP, int BOUND=1);
tlm_fifo #(REQ, BOUND) req = new();
tlm_fifo #(RSP, BOUND) rsp = new();
...
endclass
3. tlm_transport_channel
- tlm_req_rsp_channel with fifo size = 1
- non-pipelined and in-order
class tlm_transport_channel #(type REQ, RSP);
tlm_fifo #(REQ, 1) req = new();
tlm_fifo #(RSP, 1) rsp = new();
...
task transport(input REQ reqt, output RSP rspt);
req.put(reqt);
rsp.get(rspt);
...
endtask
endclass
Analysis Fifo in SystemVerilog
Specialization of tlm_fifo Infinite fifo to ensure nonblocking writes Still has tlm_*_get exports on the other side
class analysis_fifo #( type T = int ) extends tlm_fifo #( T ); analysis_imp #( analysis_fifo #( T ) , T ) analysis_export; function new( string nm , named_component p = null ); super.new( nm , p , 0 ); analysis_export = new( this ); endfunction function void write( input T t ); try_put( t ); endfunction endclass
|