frontend/avalon: Avoid byteenable clear (data) and clear cmd_ready_seen in START.

This commit is contained in:
Florent Kermarrec 2023-05-31 10:52:48 +02:00
parent c482eaa08e
commit 94f8c5c258
1 changed files with 2 additions and 6 deletions

View File

@ -76,6 +76,7 @@ class LiteDRAMAvalonMM2Native(LiteXModule):
self.fsm = fsm = FSM(reset_state="START") self.fsm = fsm = FSM(reset_state="START")
fsm.act("START", fsm.act("START",
avalon.waitrequest.eq(1), avalon.waitrequest.eq(1),
NextValue(cmd_ready_seen, 0),
# Start of Access. # Start of Access.
If(avalon.read | avalon.write, If(avalon.read | avalon.write,
latch.eq(1), latch.eq(1),
@ -136,12 +137,9 @@ class LiteDRAMAvalonMM2Native(LiteXModule):
NextValue(writedata, avalon.writedata), NextValue(writedata, avalon.writedata),
port.flush.eq(1), port.flush.eq(1),
If((downconvert == True), If((downconvert == False),
NextValue(cmd_ready_seen, 0)
).Else(
NextValue(port.cmd.last, 1) NextValue(port.cmd.last, 1)
), ),
NextValue(byteenable, 0),
NextState("START") NextState("START")
) )
) )
@ -171,7 +169,6 @@ class LiteDRAMAvalonMM2Native(LiteXModule):
If((downconvert == True), If((downconvert == True),
port.cmd.valid.eq(0), port.cmd.valid.eq(0),
avalon.waitrequest.eq(0), avalon.waitrequest.eq(0),
NextValue(cmd_ready_seen, 0),
), ),
NextState("START") NextState("START")
@ -236,7 +233,6 @@ class LiteDRAMAvalonMM2Native(LiteXModule):
If(port.rdata.valid, If(port.rdata.valid,
If(burst_count == 1, If(burst_count == 1,
NextValue(cmd_ready_seen, 0),
NextState("START") NextState("START")
), ),
NextValue(burst_count, burst_count - 1) NextValue(burst_count, burst_count - 1)