Do not support DRET when DebugEn = 0 (#1596)

When debug mode is disable, DRET instruction is not supported.
This commit is contained in:
JeanRochCoulon 2023-11-06 08:50:46 +01:00 committed by GitHub
parent b7e936e754
commit 3fcb7b9c9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,8 +171,12 @@ module decoder
// DRET
12'b111_1011_0010: begin
instruction_o.op = ariane_pkg::DRET;
// check that we are in debug mode when executing this instruction
illegal_instr = (!debug_mode_i) ? 1'b1 : illegal_instr;
if (CVA6Cfg.DebugEn) begin
// check that we are in debug mode when executing this instruction
illegal_instr = (!debug_mode_i) ? 1'b1 : illegal_instr;
end else begin
illegal_instr = 1'b1;
end
end
// WFI
12'b1_0000_0101: begin