mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-22 12:57:13 -04:00
[if,pmp] Check second bit instead of third for instruction alignment
Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
This commit is contained in:
parent
0e396d5944
commit
7ab2571bea
1 changed files with 2 additions and 2 deletions
|
@ -386,13 +386,13 @@ module ibex_if_stage import ibex_pkg::*; #(
|
|||
// An error can come from the instruction address, or the next instruction address for unaligned,
|
||||
// uncompressed instructions.
|
||||
assign if_instr_pmp_err = pmp_err_if_i |
|
||||
(if_instr_addr[2] & ~instr_is_compressed & pmp_err_if_plus2_i);
|
||||
(if_instr_addr[1] & ~instr_is_compressed & pmp_err_if_plus2_i);
|
||||
|
||||
// Combine bus errors and pmp errors
|
||||
assign if_instr_err = if_instr_bus_err | if_instr_pmp_err;
|
||||
|
||||
// Capture the second half of the address for errors on the second part of an instruction
|
||||
assign if_instr_err_plus2 = ((if_instr_addr[2] & ~instr_is_compressed & pmp_err_if_plus2_i) |
|
||||
assign if_instr_err_plus2 = ((if_instr_addr[1] & ~instr_is_compressed & pmp_err_if_plus2_i) |
|
||||
fetch_err_plus2) & ~pmp_err_if_i;
|
||||
|
||||
// compressed instruction decoding, or more precisely compressed instruction
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue