diff --git a/src/riscv_instr_gen_config.sv b/src/riscv_instr_gen_config.sv index 06818355..6e7dcbc2 100644 --- a/src/riscv_instr_gen_config.sv +++ b/src/riscv_instr_gen_config.sv @@ -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]}; @@ -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;