frontend/axi: add assert on axi.address_width and base_address

This commit is contained in:
Florent Kermarrec 2019-10-18 18:29:39 +02:00
parent 1d037d2a64
commit d84e1b4ac5
1 changed files with 2 additions and 0 deletions

View File

@ -31,6 +31,7 @@ class LiteDRAMAXIPort(AXIInterface):
class LiteDRAMAXI2NativeW(Module):
def __init__(self, axi, port, buffer_depth, base_address):
assert axi.address_width >= log2_int(base_address)
self.cmd_request = Signal()
self.cmd_grant = Signal()
@ -97,6 +98,7 @@ class LiteDRAMAXI2NativeW(Module):
class LiteDRAMAXI2NativeR(Module):
def __init__(self, axi, port, buffer_depth, base_address):
assert axi.address_width >= log2_int(base_address)
self.cmd_request = Signal()
self.cmd_grant = Signal()