Skip to content

Commit

Permalink
[rtl,rv_core_ibex] Mask off lower bits of mapping address
Browse files Browse the repository at this point in the history
Previously to this change software had to set the lower bits of the
mapping address to 0 otherwise the address translation would produce an
incorrect result.

Signed-off-by: Greg Chadwick <[email protected]>
  • Loading branch information
GregAC committed May 17, 2024
1 parent 628dfc9 commit d63dd6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hw/ip/rv_core_ibex/rtl/rv_core_addr_trans.sv
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ module rv_core_addr_trans import rv_core_ibex_pkg::*; #(

// if there is a match, mask off the address bits and remap
// if there is no match, just use incoming address
assign addr_o = sel_match ? addr_i & sel_region.output_mask | sel_region.remap_addr :
addr_i;
assign addr_o = sel_match ?
(addr_i & sel_region.output_mask) | (sel_region.remap_addr & ~sel_region.output_mask) :
addr_i;

// unused clock/reset, only needed for assertions
logic unused_clk;
Expand Down

0 comments on commit d63dd6a

Please sign in to comment.