core/_Storage: fix size of length/offset signals.

This commit is contained in:
Florent Kermarrec 2020-09-02 10:54:38 +02:00
parent 02b543e5ba
commit bd10138124
1 changed files with 4 additions and 6 deletions

View File

@ -162,12 +162,10 @@ class _Storage(Module, AutoCSR):
self.specials += MultiReg(self.enable.storage, enable, "scope") self.specials += MultiReg(self.enable.storage, enable, "scope")
self.sync.scope += enable_d.eq(enable) self.sync.scope += enable_d.eq(enable)
length = Signal(max=depth) length = Signal().like(self.length.storage)
offset = Signal(max=depth) offset = Signal().like(self.offset.storage)
self.specials += [ self.specials += MultiReg(self.length.storage, length, "scope")
MultiReg(self.length.storage, length, "scope"), self.specials += MultiReg(self.offset.storage, offset, "scope")
MultiReg(self.offset.storage, offset, "scope")
]
# Status re-synchronization # Status re-synchronization
done = Signal() done = Signal()