interconnect/axi: Use same default parameters than wishbone.Remapper.
This commit is contained in:
parent
d1e73889f9
commit
c0517cd1cf
|
@ -144,8 +144,10 @@ class AXIInterface:
|
||||||
|
|
||||||
class AXIRemapper(LiteXModule):
|
class AXIRemapper(LiteXModule):
|
||||||
"""Remaps AXI addresses by applying an origin offset and address mask."""
|
"""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.
|
# Mask.
|
||||||
|
if size is None:
|
||||||
|
size = 2**master.address_width
|
||||||
mask = 2**int(log2(size)) - 1
|
mask = 2**int(log2(size)) - 1
|
||||||
|
|
||||||
# Address Mask and Shift.
|
# Address Mask and Shift.
|
||||||
|
|
|
@ -135,8 +135,10 @@ class AXILiteInterface:
|
||||||
|
|
||||||
class AXILiteRemapper(LiteXModule):
|
class AXILiteRemapper(LiteXModule):
|
||||||
"""Remaps AXI Lite addresses by applying an origin offset and address mask."""
|
"""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.
|
# Mask.
|
||||||
|
if size is None:
|
||||||
|
size = 2**master.address_width
|
||||||
mask = 2**int(log2(size)) - 1
|
mask = 2**int(log2(size)) - 1
|
||||||
|
|
||||||
# Address Mask and Shift.
|
# Address Mask and Shift.
|
||||||
|
|
Loading…
Reference in New Issue