Skip to content

Commit

Permalink
[dv] Fix regression for non PMP configs
Browse files Browse the repository at this point in the history
Programs generated from RISC-V were exiting early in configs that don't
have PMP
  • Loading branch information
GregAC committed Feb 5, 2024
1 parent a390e73 commit 2576791
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dv/uvm/core_ibex/riscv_dv_extension/ibex_asm_program_gen.sv
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ class ibex_asm_program_gen extends riscv_asm_program_gen;

super.gen_init_section(hart);

// RISCV-DV assumes main is immediately after init when riscv_instr_pkg::support_pmp isn't set.
// This override of gen_init_section breaks that assumption so add a jump to main here so the
// test starts correctly for configurations that don't support PMP.
if (!riscv_instr_pkg::support_pmp) begin
instr_stream.push_back({indent, "j main"});
end

gen_test_end(.result(TEST_PASS), .instr(instr));
instr_stream = {instr_stream,
{format_string("test_done:", LABEL_STR_LEN)},
Expand Down

0 comments on commit 2576791

Please sign in to comment.