From 3bed97cbb137e75b95d2ee981d74603b52411e54 Mon Sep 17 00:00:00 2001 From: Ryszard Rozak Date: Tue, 29 Oct 2024 13:31:20 +0100 Subject: [PATCH] Move queue size randomization to pre_randomize Signed-off-by: Ryszard Rozak --- src/riscv_instr_gen_config.sv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/riscv_instr_gen_config.sv b/src/riscv_instr_gen_config.sv index 06818355..9b5f84cd 100644 --- a/src/riscv_instr_gen_config.sv +++ b/src/riscv_instr_gen_config.sv @@ -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]}; @@ -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;