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 ecea6f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/riscv_instr_gen_config.sv
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,7 @@ class riscv_instr_gen_config extends uvm_object;
int dist_control_mode;
int unsigned category_dist[riscv_instr_category_t];


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 +674,9 @@ 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 ecea6f8

Please sign in to comment.