axi/axi_lite: Add addressing parameters and assert on byte.
Useful to have similar properties than Wishbone.
This commit is contained in:
parent
d6f7652b68
commit
4524262f64
|
@ -44,13 +44,22 @@ def r_lite_description(data_width):
|
||||||
]
|
]
|
||||||
|
|
||||||
class AXILiteInterface:
|
class AXILiteInterface:
|
||||||
def __init__(self, data_width=32, address_width=32, clock_domain="sys", name=None, bursting=False):
|
def __init__(self, data_width=32, address_width=32, addressing="byte", clock_domain="sys", name=None, bursting=False):
|
||||||
self.data_width = data_width
|
# Parameters checks.
|
||||||
self.address_width = address_width
|
# ------------------
|
||||||
self.clock_domain = clock_domain
|
assert addressing == "byte"
|
||||||
if bursting is not False:
|
if bursting is not False:
|
||||||
raise NotImplementedError("AXI-Lite does not support bursting")
|
raise NotImplementedError("AXI-Lite does not support bursting")
|
||||||
|
|
||||||
|
# Parameters.
|
||||||
|
# -----------
|
||||||
|
self.data_width = data_width
|
||||||
|
self.address_width = address_width
|
||||||
|
self.addressing = addressing
|
||||||
|
self.clock_domain = clock_domain
|
||||||
|
|
||||||
|
# Channels.
|
||||||
|
# ---------
|
||||||
self.aw = stream.Endpoint(ax_lite_description(address_width), name=name)
|
self.aw = stream.Endpoint(ax_lite_description(address_width), name=name)
|
||||||
self.w = stream.Endpoint(w_lite_description(data_width), name=name)
|
self.w = stream.Endpoint(w_lite_description(data_width), name=name)
|
||||||
self.b = stream.Endpoint(b_lite_description(), name=name)
|
self.b = stream.Endpoint(b_lite_description(), name=name)
|
||||||
|
|
Loading…
Reference in New Issue