mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
interconnect/wishbone/Remapper: Shift origin when in word mode, fixes unit-test.
This commit is contained in:
parent
6213fd2151
commit
c1dad9516a
1 changed files with 2 additions and 1 deletions
|
@ -153,6 +153,7 @@ class Remapper(Module):
|
|||
log2_size = int(log2(size))
|
||||
if master.addressing == "word":
|
||||
log2_size -= int(log2(len(master.dat_w)//8))
|
||||
origin >>= int(log2(len(master.dat_w)//8))
|
||||
adr_mask = 2**log2_size - 1
|
||||
# Apply Address Origin/Mask Remapping.
|
||||
adr_remap = (origin | (master.adr & adr_mask))
|
||||
|
|
Loading…
Reference in a new issue