Skip to content

Commit

Permalink
interconnect/axi: Use same default parameters than wishbone.Remapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Feb 20, 2024
1 parent d1e7388 commit c0517cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion litex/soc/interconnect/axi/axi_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@ def layout_flat(self):

class AXIRemapper(LiteXModule):
"""Remaps AXI addresses by applying an origin offset and address mask."""
def __init__(self, master, slave, origin, size):
def __init__(self, master, slave, origin=0, size=None):
# Mask.
if size is None:
size = 2**master.address_width
mask = 2**int(log2(size)) - 1

# Address Mask and Shift.
Expand Down
4 changes: 3 additions & 1 deletion litex/soc/interconnect/axi/axi_lite.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ def read(self, addr):

class AXILiteRemapper(LiteXModule):
"""Remaps AXI Lite addresses by applying an origin offset and address mask."""
def __init__(self, master, slave, origin, size):
def __init__(self, master, slave, origin=0, size=None):
# Mask.
if size is None:
size = 2**master.address_width
mask = 2**int(log2(size)) - 1

# Address Mask and Shift.
Expand Down

0 comments on commit c0517cd

Please sign in to comment.