From bd1013812434b31a21c50946b8fd3f982126a7cd Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 2 Sep 2020 10:54:38 +0200 Subject: [PATCH] core/_Storage: fix size of length/offset signals. --- litescope/core.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/litescope/core.py b/litescope/core.py index 1efca83..8cfc8cd 100644 --- a/litescope/core.py +++ b/litescope/core.py @@ -162,12 +162,10 @@ class _Storage(Module, AutoCSR): self.specials += MultiReg(self.enable.storage, enable, "scope") self.sync.scope += enable_d.eq(enable) - length = Signal(max=depth) - offset = Signal(max=depth) - self.specials += [ - MultiReg(self.length.storage, length, "scope"), - MultiReg(self.offset.storage, offset, "scope") - ] + length = Signal().like(self.length.storage) + offset = Signal().like(self.offset.storage) + self.specials += MultiReg(self.length.storage, length, "scope") + self.specials += MultiReg(self.offset.storage, offset, "scope") # Status re-synchronization done = Signal()