ssingh Posted October 31, 2012 Report Posted October 31, 2012 I have problems configuring my uvm testbench. In the static testbench module, I write intefaces as (where bus_x.mp denotes modport of an interface): uvm_config_db #(virtual dut_if.mp)::set(null, "uvm_test_top", "vif_0", bus_0.mp); uvm_config_db #(virtual dut_if.mp)::set(null, "uvm_test_top", "vif_1", bus_1.mp); uvm_config_db #(virtual dut_if.mp)::set(null, "uvm_test_top", "vif_2", bus_2.mp); Then in the uvm_test, I read back and set the interface in the build phase: uvm_config_db#(virtual dut_if.mp)::get(this, "", "vif_0", hook_0); uvm_config_db #(virtual dut_if.mp)::set(this, "env.agent_0.*", "vif", hook_0); uvm_config_db#(virtual dut_if.mp)::get(this, "", "vif_1", hook_0); uvm_config_db #(virtual dut_if.mp)::set(this, "env.agent_1.*", "vif", hook_1); uvm_config_db#(virtual dut_if.mp)::get(this, "", "vif_2", hook_0); uvm_config_db #(virtual dut_if.mp)::set(this, "env.agent_2.*", "vif", hook_2); Then I start a sequence on all the 3 sequencers in the run phase of the uvm_test: fork s_ramp.start(env.agent_0.seq); s_ramp.start(env.agent_1.seq); s_ramp.start(env.agent_2.seq); join Inspite of defining the scope clearly, all sequences get executed on env.agent_2.driver. The drivers of agent_0 and agent_1 are not used. I also get an error message: UVM_ERROR verilog_src/uvm-1.1/src/seq/uvm_sequencer_base.svh(1196) @ 1675: uvm_test_top.env.agent_2.seq [sEQFINERR] Parent sequence 'uvm_test_top.env.agent_2.seq.s_ramp' should not finish before all items from itself and items from descendent sequences are processed. The item request from the sequence 'uvm_test_top.env.agent_2.seq.s_ramp' is being removed. I have no problems when I don't use fork join. In that case, the sequence executes sequentially on the 3 respective sequencers of agent_0, agent_1, agent_2. Quote
Gunther Posted November 1, 2012 Report Posted November 1, 2012 Hi, I presume that s_ramp is the sequence you want to run? So this is a pointer to a class the sequencer needs to do stuff with. It looks to me like with the fork you are trying to do stuff in the sequencer using the same sequence object. That won't work. You can re-use the object when you run the sequence sequentially, so without the fork it would work. You need a different pointer for each agent: s_ramp_0.start(env.agent_0.seq); s_ramp_1.start(env.agent_1.seq); s_ramp_2.start(env.agent_2.seq); Or use an array or whatever you want. Cheers Gunther Quote
ssingh Posted November 2, 2012 Author Report Posted November 2, 2012 @Gunther - Yes, I was using one sequence object on all sequencers. Thanks ! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.