frotend/wishbone: avoid NextValue(count, 0) duplication

This commit is contained in:
Florent Kermarrec 2020-01-13 13:19:25 +01:00
parent 721c84bad0
commit 6f35465c0b

View file

@ -56,11 +56,10 @@ class LiteDRAMWishbone2Native(Module):
If(port.cmd.valid & port.cmd.ready,
NextValue(count, count + 1),
If(count == (ratio - 1),
NextValue(count, 0),
If(wishbone.we,
NextValue(count, 0),
NextState("WAIT-WRITE")
).Else(
NextValue(count, 0),
NextState("WAIT-READ")
)
)