Hello,
I have a task in top.sv which initialises a Memory inside DUT with the contents of the init.mem file.
How can I call this task from uvm_test ?
Thanks
JeffD
Hello,
I have a task in top.sv which initialises a Memory inside DUT with the contents of the init.mem file.
How can I call this task from uvm_test ?
Thanks
JeffD
In reply to dvuvmsv:
You cannot call any TB task directly in the uvm_test.
You can do it in multiple ways.
Using uvm_event_pool:
//In your tb file
import uvm_pkg::*;
initial begin
uvm_event evt;
uvm_event_pool ev_pool;
ev_pool = uvm_event_pool::get_global_pool();
evt = ev_pool.get("EVT_DO_INIT_MEM");
forever begin
evt.wait_trigger();
end
end
//In your uvm_test
uvm_event evt;
uvm_event_pool ev_pool;
ev_pool = uvm_event_pool::get_global_pool();
evt = ev_pool.get("EVT_DO_INIT_MEM");
//Call this when you want to initialize memory
evt.trigger();
end
In reply to dvuvmsv:
Hello,
I have a task in top.sv which initialises a Memory inside DUT with the contents of the init.mem file.
How can I call this task from uvm_test ?
Thanks
JeffD
Why do you want to do this from your testbench? This would make sense only when the initialization is test dependent.