Skip to content

Commit

Permalink
Remove seg fault
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Oct 7, 2024
1 parent bf840af commit 3ce933a
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/riscv_asm_program_gen.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1216,10 +1216,6 @@ class riscv_asm_program_gen extends uvm_object;
gen_signature_handshake(.instr(instr), .signature_type(WRITE_CSR), .csr(MCAUSE));
if (cfg.pmp_cfg.enable_pmp_exception_handler) begin
riscv_instr_pkg::riscv_reg_t arg;
cfg.pmp_cfg.gen_pmp_exception_routine({arg, cfg.scratch_reg, cfg.pmp_reg[0],
cfg.pmp_reg[1]},
INSTRUCTION_ACCESS_FAULT,
instr);
end
pop_gpr_from_kernel_stack(MSTATUS, MSCRATCH, cfg.mstatus_mprv, cfg.sp, cfg.tp, instr);
instr.push_back("mret");
Expand All @@ -1233,10 +1229,6 @@ class riscv_asm_program_gen extends uvm_object;
gen_signature_handshake(.instr(instr), .signature_type(WRITE_CSR), .csr(MCAUSE));
if (cfg.pmp_cfg.enable_pmp_exception_handler) begin
riscv_instr_pkg::riscv_reg_t arg;
cfg.pmp_cfg.gen_pmp_exception_routine({arg, cfg.scratch_reg, cfg.pmp_reg[0],
cfg.pmp_reg[1]},
LOAD_ACCESS_FAULT,
instr);
end
pop_gpr_from_kernel_stack(MSTATUS, MSCRATCH, cfg.mstatus_mprv, cfg.sp, cfg.tp, instr);
instr.push_back("mret");
Expand All @@ -1250,10 +1242,6 @@ class riscv_asm_program_gen extends uvm_object;
gen_signature_handshake(.instr(instr), .signature_type(WRITE_CSR), .csr(MCAUSE));
if (cfg.pmp_cfg.enable_pmp_exception_handler) begin
riscv_instr_pkg::riscv_reg_t arg;
cfg.pmp_cfg.gen_pmp_exception_routine({arg, cfg.scratch_reg, cfg.pmp_reg[0],
cfg.pmp_reg[1]},
STORE_AMO_ACCESS_FAULT,
instr);
end
pop_gpr_from_kernel_stack(MSTATUS, MSCRATCH, cfg.mstatus_mprv, cfg.sp, cfg.tp, instr);
instr.push_back("mret");
Expand Down

0 comments on commit 3ce933a

Please sign in to comment.