lasmicon: fix FSM reset state with delayed_enter

This commit is contained in:
Sebastien Bourdeauducq 2013-07-15 00:57:37 +02:00
parent 2f662bf8ab
commit d753c52225
2 changed files with 4 additions and 4 deletions

View File

@ -93,8 +93,6 @@ class BankMachine(Module):
# Control and command generation FSM # Control and command generation FSM
fsm = FSM() fsm = FSM()
self.submodules += fsm self.submodules += fsm
fsm.delayed_enter("TRP", "ACTIVATE", timing_settings.tRP-1)
fsm.delayed_enter("TRCD", "REGULAR", timing_settings.tRCD-1)
fsm.act("REGULAR", fsm.act("REGULAR",
If(self.refresh_req, If(self.refresh_req,
NextState("REFRESH") NextState("REFRESH")
@ -140,3 +138,5 @@ class BankMachine(Module):
track_close.eq(1), track_close.eq(1),
If(~self.refresh_req, NextState("REGULAR")) If(~self.refresh_req, NextState("REGULAR"))
) )
fsm.delayed_enter("TRP", "ACTIVATE", timing_settings.tRP-1)
fsm.delayed_enter("TRCD", "REGULAR", timing_settings.tRCD-1)

View File

@ -149,8 +149,6 @@ class Multiplexer(Module, AutoCSR):
# Control FSM # Control FSM
fsm = FSM() fsm = FSM()
self.submodules += fsm self.submodules += fsm
fsm.delayed_enter("RTW", "WRITE", timing_settings.read_latency-1)
fsm.delayed_enter("WTR", "READ", timing_settings.tWTR-1)
fsm.act("READ", fsm.act("READ",
read_time_en.eq(1), read_time_en.eq(1),
choose_req.want_reads.eq(1), choose_req.want_reads.eq(1),
@ -180,6 +178,8 @@ class Multiplexer(Module, AutoCSR):
steerer.sel[0].eq(STEER_REFRESH), steerer.sel[0].eq(STEER_REFRESH),
If(~refresher.req, NextState("READ")) If(~refresher.req, NextState("READ"))
) )
fsm.delayed_enter("RTW", "WRITE", timing_settings.read_latency-1)
fsm.delayed_enter("WTR", "READ", timing_settings.tWTR-1)
# FIXME: workaround for zero-delay loop simulation problem with Icarus Verilog # FIXME: workaround for zero-delay loop simulation problem with Icarus Verilog
fsm.finalize() fsm.finalize()
self.comb += refresher.ack.eq(fsm.state == fsm.encoding["REFRESH"]) self.comb += refresher.ack.eq(fsm.state == fsm.encoding["REFRESH"])