axi/axi_lite: Add addressing parameters and assert on byte.

Useful to have similar properties than Wishbone.
This commit is contained in:
Florent Kermarrec 2023-10-26 17:18:38 +02:00
parent d6f7652b68
commit 4524262f64
1 changed files with 13 additions and 4 deletions

View File

@ -44,13 +44,22 @@ def r_lite_description(data_width):
]
class AXILiteInterface:
def __init__(self, data_width=32, address_width=32, clock_domain="sys", name=None, bursting=False):
self.data_width = data_width
self.address_width = address_width
self.clock_domain = clock_domain
def __init__(self, data_width=32, address_width=32, addressing="byte", clock_domain="sys", name=None, bursting=False):
# Parameters checks.
# ------------------
assert addressing == "byte"
if bursting is not False:
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.w = stream.Endpoint(w_lite_description(data_width), name=name)
self.b = stream.Endpoint(b_lite_description(), name=name)