Hi
This is the first time I am using TLM ports. And I appreciate any pointers to help me fix the issue I am facing.
I am trying to create TLM put port in my test bench which I want to connect to my scoreboard export. I am facing the following error → Error: task enable calls an object that is not a task.
Here is what I am doing:
I have a base_test with a task create_tx_frame_buffer which is creating a packet. As soon as I create a pkt, I want to add this packet to the TLM port and use it in my scoreboard for checking the data integrity after I receive at the other end.
task geth_base_test::create_tx_frame;
txpkt = geth_tx_frame::type_id::create("txpkt", this);
txpkt.randomize();
m_env.m_txn_port.put_port(txpkt);
endtask
This is my m_txn_port code:
class geth_txn_port extends uvm_component;
`uvm_component_utils (geth_txn_port)
uvm_blocking_put_port #(geth_tx_frame) put_port;
geth_tx_frame pkt;
function new (string name = "geth_txn_port", uvm_component parent);
super.new (name, parent);
endfunction
virtual function void build_phase (uvm_phase phase);
super.build_phase (phase);
put_port = new ("put_port", this);
endfunction
endclass: geth_txn_port
This is my scoreboard which is under development
class geth_scoreboard extends uvm_scoreboard;
`uvm_component_utils (geth_scoreboard)
uvm_blocking_put_imp #(geth_tx_frame, geth_scoreboard) put_export;
function new (string name = "geth_scoreboard", uvm_component parent);
super.new (name, parent);
endfunction
virtual function void build_phase (uvm_phase phase);
super.build_phase (phase);
put_export = new ("put_export", this);
endfunction
task put (geth_tx_frame pkt);
`uvm_info (get_full_name(), "Packet received from Put port", UVM_LOW)
pkt.printInfo ();
endtask
endclass