From 348978739b116366b815c7ab8c6c5e3bd4a67c74 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 26 Jun 2020 17:17:44 +0100 Subject: [PATCH] shrink test memory size down to only 64 words --- src/soc/experiment/pimem.py | 4 +++- src/soc/experiment/testmem.py | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/soc/experiment/pimem.py b/src/soc/experiment/pimem.py index eb79f676..bd3422f0 100644 --- a/src/soc/experiment/pimem.py +++ b/src/soc/experiment/pimem.py @@ -205,7 +205,9 @@ class TestMemoryPortInterface(Elaboratable): """ def __init__(self, regwid=64, addrwid=4): - self.mem = TestMemory(regwid, addrwid, granularity=regwid//8) + # hard-code memory addressing width to 6 bits + self.mem = TestMemory(regwid, 6, granularity=regwid//8, + init=False) self.regwid = regwid self.addrwid = addrwid self.pi = LDSTPort(0, regwid, addrwid) diff --git a/src/soc/experiment/testmem.py b/src/soc/experiment/testmem.py index 5a1165de..02000d89 100644 --- a/src/soc/experiment/testmem.py +++ b/src/soc/experiment/testmem.py @@ -2,13 +2,17 @@ from nmigen import Module, Elaboratable, Memory class TestMemory(Elaboratable): - def __init__(self, regwid, addrw, granularity=None): + def __init__(self, regwid, addrw, granularity=None, init=True): self.ddepth = 1 # regwid //8 depth = (1<