From d84e1b4ac5495f21a5ff685b0bca531ab4da4f9a Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 18 Oct 2019 18:29:39 +0200 Subject: [PATCH] frontend/axi: add assert on axi.address_width and base_address --- litedram/frontend/axi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/litedram/frontend/axi.py b/litedram/frontend/axi.py index cb590cf..5da64e5 100644 --- a/litedram/frontend/axi.py +++ b/litedram/frontend/axi.py @@ -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()