Skip to content

Commit

Permalink
interconnect/wishbone/Remapper: Shift origin when in word mode, fixes…
Browse files Browse the repository at this point in the history
… unit-test.
  • Loading branch information
enjoy-digital committed Feb 21, 2024
1 parent 6213fd2 commit c1dad95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion litex/soc/interconnect/wishbone.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ def __init__(self, master, slave, origin=0, size=None, src_regions=[], dst_regio
size = 2**master.address_width
log2_size = int(log2(size))
if master.addressing == "word":
log2_size -= int(log2(len(master.dat_w)//8))
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))
Expand Down

0 comments on commit c1dad95

Please sign in to comment.