Dynamically configure scb in different sequences via config_db

Different sequences configure parameters in scb. After the case runs, only the parameter set of scb in the first sequence is executed, and the set in the second sequence is not successful, but the simulation continues. scb made the wrong comparison.

In reply to Gyy_VE:

Could you pleasem show some code to get the right understanding of your question.
Do you want to reconfigure the scoreboard after a certain number of transactions executed?

In reply to chr_sue:

Yes, only the parameter configurations of the two sequences are different. During the simulation execution, scb successfully gets the parameters set by the first sequence. When the first sequence ends, scb fails to get the parameter values after executing the second sequence.In the main_phase function get in scb, I guess if main_phase had already been executed when I executed the second sequence, so scb could not get new parameters.

In reply to Gyy_VE:

To ask back for correct understanding:
You are transmitting parameter values with your seq_item. Or do you get the parameters from the config_db.
Do you display all the paramete values in the scoreboard?
Please show a code snippet from your scoreboard.

In reply to chr_sue:

task main_phase(uvm_phase phase);
super.main_phase(phase);
//if(read_from_file == 1’b1) begin
phase.raise_objection(this);
//uvm_config_db#(integer)::wait_modified(this,“”,“dsc_slice_high”);
if((uvm_config_db#(integer)::get(this,“”,“dsc_slice_high”,dsc_slice_high)))
uvm_info("scb",$sformatf("get dsc_slice_high value %0d via config_db",dsc_slice_high),UVM_MEDIUM) //uvm_config_db#(integer)::wait_modified(this,"","dsc_slice_with"); if((uvm_config_db#(integer)::get(this,"","dsc_slice_with",dsc_slice_with))) uvm_info(“scb”,$sformatf(“get dsc_slice_with value %0d via config_db”,dsc_slice_with),UVM_MEDIUM)
//uvm_config_db#(integer)::wait_modified(this,“”,“scan_h_total”);
if((uvm_config_db#(integer)::get(this,“”,“scan_h_total”,scan_h_total)))
uvm_info("scb",$sformatf("get scan_h_total value %0d via config_db",scan_h_total),UVM_MEDIUM) //uvm_config_db#(integer)::wait_modified(this,"","scan_v_total"); if((uvm_config_db#(integer)::get(this,"","scan_v_total",scan_v_total))) uvm_info(“scb”,$sformatf(“get scan_v_total value %0d via config_db”,scan_v_total),UVM_MEDIUM)
//uvm_config_db#(integer)::wait_modified(this,“”,“in_v_total”);
if((uvm_config_db#(integer)::get(this,“”,“in_v_total”,in_v_total)))
uvm_info("scb",$sformatf("get in_v_total value %0d via config_db",in_v_total),UVM_MEDIUM) //uvm_config_db#(integer)::wait_modified(this,"","scan_sf_total"); if((uvm_config_db#(integer)::get(this,"","scan_sf_total",scan_sf_total))) uvm_info(“scb”,$sformatf(“get scan_sf_total value %0d via config_db”,scan_sf_total),UVM_MEDIUM)
//uvm_config_db#(im_path)::wait_modified(this,“”,“dsc_case”);
if((uvm_config_db#(im_path)::get(this,“”,“dsc_case”,dsc_case)));
`uvm_info(“scb”,“get dsc_case value via config_db”,UVM_MEDIUM)
$display(“%t scb_phase time”,$time);
fork
cmp1();
cmp2();
cmp3();
join_any
phase.drop_objection(this);
//end else begin

//end

endtask:main_phase

In reply to Gyy_VE:

You are retrieving a whole set of data from the config_db at the beginning of the main_phase.
Afterwards you are starting the compare with 3 compare functions in parallel.
I do not see how the compare functions are implemented but I gues they are running in a forever loop.
In this case you have only 1 set of parameters. Looks like this is what you see. But you want to see a 2nd of parameters right?

In reply to chr_sue:

Yes, you are amazing. The following three functions loop forever, sampling data along the clock.Is this the right way?The main_phase never ends and cannot get the next sequence set. Is that right?How to solve it.

In reply to Gyy_VE:

You should never use a clock signal in the scoreboard or the compare functions. This has to work on the transaction-level.
If you want to get a new set of parameters you have to retrievem them after a compare has been done.
Two further recommendations:
(1) don’t use main_phase use run_phase instead.
(2) put your parameters in a config object, then you can retrieve this object and get all parameter settings in one shot.

In reply to chr_sue:

Thank you. I’ll try. I am a junior certification engineer, what books or learning resources do you recommend?