core/bankmachine: rename cmd_bufferPre to cmd_buffer_lookahead
This commit is contained in:
parent
23358b5d29
commit
6d234219b4
|
@ -38,18 +38,19 @@ class BankMachine(Module):
|
||||||
self.cmd = cmd = stream.Endpoint(cmd_request_rw_layout(a, ba))
|
self.cmd = cmd = stream.Endpoint(cmd_request_rw_layout(a, ba))
|
||||||
|
|
||||||
# # #
|
# # #
|
||||||
|
|
||||||
auto_precharge = Signal()
|
auto_precharge = Signal()
|
||||||
|
|
||||||
# Command buffer
|
# Command buffer
|
||||||
cmd_buffer_layout = [("we", 1), ("adr", len(req.adr))]
|
cmd_buffer_layout = [("we", 1), ("adr", len(req.adr))]
|
||||||
cmd_bufferPre = stream.SyncFIFO(cmd_buffer_layout, settings.cmd_buffer_depth)
|
cmd_buffer_lookahead = stream.SyncFIFO(cmd_buffer_layout, settings.cmd_buffer_depth)
|
||||||
cmd_buffer = stream.Buffer(cmd_buffer_layout) # 1 depth buffer to detect row change
|
cmd_buffer = stream.Buffer(cmd_buffer_layout) # 1 depth buffer to detect row change
|
||||||
self.submodules += cmd_buffer, cmd_bufferPre
|
self.submodules += cmd_buffer_lookahead, cmd_buffer
|
||||||
self.comb += [
|
self.comb += [
|
||||||
req.connect(cmd_bufferPre.sink, omit=["wdata_valid", "wdata_ready",
|
req.connect(cmd_buffer_lookahead.sink, omit=["wdata_valid", "wdata_ready",
|
||||||
"rdata_valid", "rdata_ready",
|
"rdata_valid", "rdata_ready",
|
||||||
"lock"]),
|
"lock"]),
|
||||||
cmd_bufferPre.source.connect(cmd_buffer.sink),
|
cmd_buffer_lookahead.source.connect(cmd_buffer.sink),
|
||||||
cmd_buffer.source.ready.eq(req.wdata_ready | req.rdata_valid),
|
cmd_buffer.source.ready.eq(req.wdata_ready | req.rdata_valid),
|
||||||
req.lock.eq(cmd_buffer.source.valid),
|
req.lock.eq(cmd_buffer.source.valid),
|
||||||
]
|
]
|
||||||
|
@ -91,8 +92,8 @@ class BankMachine(Module):
|
||||||
|
|
||||||
# Auto Precharge
|
# Auto Precharge
|
||||||
self.comb += [
|
self.comb += [
|
||||||
If(cmd_bufferPre.source.valid & cmd_buffer.source.valid,
|
If(cmd_buffer_lookahead.source.valid & cmd_buffer.source.valid,
|
||||||
If(slicer.row(cmd_bufferPre.source.adr) != slicer.row(cmd_buffer.source.adr),
|
If(slicer.row(cmd_buffer_lookahead.source.adr) != slicer.row(cmd_buffer.source.adr),
|
||||||
auto_precharge.eq(self.precharge_timer.done & (track_close == 0))
|
auto_precharge.eq(self.precharge_timer.done & (track_close == 0))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue