I have made a simple uvm testbench for a simple processor. The compilation is done successfully. But when I start the simulation, the test does not seem to enter the build phase and the simulation is stuck at time 0.
class core_test extends uvm_test;
`uvm_component_utils(core_test)
core_env core_env_h;
virtual interface reg_if reg_vif;
core_agent_config core_agent_config_h;
memory_agent_config memory_agent_config_h;
function new(string name, uvm_component parent);
super.new(name, parent);
`uvm_info("core_test", "Test created", UVM_LOW)
endfunction
function void build_phase(uvm_phase phase);
super.build_phase(phase);
`uvm_info("core_test", "build", UVM_LOW)
core_env_h = core_env::type_id::create("core_env_h", this);
if(!uvm_config_db #(core_agent_config)::get(this, "", "core_config", core_agent_config_h))
`uvm_fatal("CORE_TEST", "Failed to get configuration object");
if(!uvm_config_db #(memory_agent_config)::get(this, "", "memory_config", memory_agent_config_h))
`uvm_fatal("CORE_TEST", "Failed to get configuration object");
reg_vif = core_agent_config_h.reg_vif;
memory_agent_config_h.test_name = "diag.hex";
`uvm_info("core_test", "end of build", UVM_LOW)
endfunction
task run_phase(uvm_phase phase);
phase.raise_objection(this);
wait_for_test_done();
phase.drop_objection(this);
endtask
endclass: core_test
snippet from the top module:
initial begin
$display("creating config objects");
memory_agent_config_h = new();
core_agent_config_h = new(core_vif,reg_vif);
uvm_config_db #(memory_agent_config)::set(uvm_top,"", "memory_config", memory_agent_config_h);
uvm_config_db #(core_agent_config)::set(uvm_top ,"", "core_config",core_agent_config_h);
$display("Starting test");
run_test("core_test");
end
transcript:
# UVM_INFO verilog_src/questa_uvm_pkg-1.2/src/questa_uvm_pkg.sv(215) @ 0: reporter [Questa UVM] QUESTA_UVM-1.2.3
# UVM_INFO verilog_src/questa_uvm_pkg-1.2/src/questa_uvm_pkg.sv(217) @ 0: reporter [Questa UVM] questa_uvm::init(+struct)
# creating config objects
# Starting test
# UVM_INFO D:/GraduationProject/GPCore/uvm/core-components/c_core_test.svh(14) @ 0: uvm_test_top [core_test] Test created
# UVM_INFO @ 0: reporter [RNTST] Running test core_test...