core/bankmachine: remove specific case for small cmd_buffer_depth

This commit is contained in:
Florent Kermarrec 2018-07-06 14:49:12 +02:00
parent d150e3b1ca
commit 3255a33b9e
1 changed files with 3 additions and 12 deletions

View File

@ -44,21 +44,12 @@ class BankMachine(Module):
# Row Change buffer
# Note: This would be a lot better if we could instead peek at the next value from cmd_buffer
rowchg_buffer_layout = [("differentRow", 1)]
if (settings.cmd_buffer_depth-1) < 2:
rowchg_buffer = stream.Buffer(rowchg_buffer_layout)
else:
rowchg_buffer = stream.SyncFIFO(rowchg_buffer_layout,
settings.cmd_buffer_depth-1)
rowchg_buffer = stream.SyncFIFO(rowchg_buffer_layout, settings.cmd_buffer_depth-1)
self.submodules += rowchg_buffer
# Command buffer
cmd_buffer_layout = [("we", 1), ("adr", len(req.adr))]
if settings.cmd_buffer_depth < 2:
cmd_buffer = stream.Buffer(cmd_buffer_layout)
else:
cmd_buffer = stream.SyncFIFO(cmd_buffer_layout,
settings.cmd_buffer_depth)
cmd_buffer = stream.SyncFIFO(cmd_buffer_layout, settings.cmd_buffer_depth)
self.submodules += cmd_buffer
self.comb += [
req.connect(cmd_buffer.sink, omit=["wdata_valid", "wdata_ready",