hyperbus: check if cyc is active during every state

This commit is contained in:
Franck Jullien 2022-04-28 10:42:07 +02:00
parent 5220984df8
commit a66af6343e
1 changed files with 6 additions and 2 deletions

View File

@ -159,7 +159,9 @@ class HyperRAM(Module):
# Wait for 6*2 cycles...
If(cycles == (6*2 - 1),
NextState("WAIT-LATENCY")
)
),
# Always check if bus cycle is still active
If(~bus.cyc, NextState("IDLE"))
)
fsm.act("WAIT-LATENCY",
# Set CSn.
@ -171,7 +173,9 @@ class HyperRAM(Module):
# Early Write Ack (to allow bursting).
bus.ack.eq(bus.we),
NextState("READ-WRITE-DATA0")
)
),
# Always check if bus cycle is still active
If(~bus.cyc, NextState("IDLE"))
)
states = {8:4, 16:2}[dw]
for n in range(states):