From addb2cdcbeffc138ae54cb9f43467e3fa0e1f907 Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Sat, 16 Feb 2019 00:13:07 -0800 Subject: [PATCH] Fix issue #4, change implementation to comply with old simulator --- src/riscv_instr_gen_config.sv | 12 ++++++------ src/riscv_loop_instr.sv | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/riscv_instr_gen_config.sv b/src/riscv_instr_gen_config.sv index 676265a2..15744953 100644 --- a/src/riscv_instr_gen_config.sv +++ b/src/riscv_instr_gen_config.sv @@ -28,7 +28,7 @@ class riscv_instr_gen_config extends uvm_object; privileged_mode_t supported_privileged_mode[] = {USER_MODE, SUPERVISOR_MODE, MACHINE_MODE}; // Unsupported instructions - riscv_instr_name_t unsupported_instr[] = {}; + riscv_instr_name_t unsupported_instr[]; // ISA supported by the processor riscv_instr_group_t supported_isa[] = {RV32I, RV32M, RV64I, RV64M, RV32C, RV64C}; @@ -128,11 +128,11 @@ class riscv_instr_gen_config extends uvm_object; // For tests doesn't involve load/store, the data section generation could be skipped bit no_data_page; // Options to turn off some specific types of instructions - bit no_branch_jump; // No branch/jump instruction - bit no_load_store; // No load/store instruction - bit no_csr_instr = 1; // No csr instruction - bit no_ebreak = 1; // No ebreak instruction - bit no_fence; // No fence instruction + bit no_branch_jump; // No branch/jump instruction + bit no_load_store; // No load/store instruction + bit no_csr_instr; // No csr instruction + bit no_ebreak = 1; // No ebreak instruction + bit no_fence; // No fence instruction // Directed boot privileged mode, u, m, s string boot_mode_opts; int enable_page_table_exception; diff --git a/src/riscv_loop_instr.sv b/src/riscv_loop_instr.sv index baf2ef3e..b0fe8e1b 100644 --- a/src/riscv_loop_instr.sv +++ b/src/riscv_loop_instr.sv @@ -153,7 +153,7 @@ class riscv_loop_instr extends riscv_rand_instr_stream; // Build the whole loop structure from innermost loop to the outermost loop function void build_loop_instr_stream(); - loop_instr = {}; + loop_instr.delete; for(int i = 0; i < num_of_nested_loop; i++) begin loop_instr = {loop_init_instr[2*i], loop_init_instr[2*i+1],