From 9d69e91e8baa66366a9f36093b738a25dc126659 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 28 Jun 2020 20:19:14 +0100 Subject: [PATCH] add readonly option to TestMemory --- src/soc/experiment/testmem.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/soc/experiment/testmem.py b/src/soc/experiment/testmem.py index 02000d89..bf7c7e3b 100644 --- a/src/soc/experiment/testmem.py +++ b/src/soc/experiment/testmem.py @@ -2,7 +2,9 @@ from nmigen import Module, Elaboratable, Memory class TestMemory(Elaboratable): - def __init__(self, regwid, addrw, granularity=None, init=True): + def __init__(self, regwid, addrw, granularity=None, init=True, + readonly=False): + self.readonly = readonly self.ddepth = 1 # regwid //8 depth = (1<