Skip to content

Commit

Permalink
Move queue size randomization to pre_randomize
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Oct 29, 2024
1 parent 30d809c commit 4cd5fab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/riscv_instr_gen_config.sv
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,6 @@ class riscv_instr_gen_config extends uvm_object;


constraint default_c {
sub_program_instr_cnt.size() == num_of_sub_program;
debug_sub_program_instr_cnt.size() == num_debug_sub_program;
main_program_instr_cnt inside {[10 : instr_cnt]};
foreach(sub_program_instr_cnt[i]) {
sub_program_instr_cnt[i] inside {[10 : instr_cnt]};
Expand Down Expand Up @@ -677,6 +675,8 @@ class riscv_instr_gen_config extends uvm_object;
endfunction

function void pre_randomize();
sub_program_instr_cnt = new[num_of_sub_program];
debug_sub_program_instr_cnt = new[num_debug_sub_program];
foreach (riscv_instr_pkg::supported_privileged_mode[i]) begin
if(riscv_instr_pkg::supported_privileged_mode[i] == SUPERVISOR_MODE)
support_supervisor_mode = 1;
Expand Down

0 comments on commit 4cd5fab

Please sign in to comment.