From 6f35465c0b4cd5219a8cc35ee07e1df28dead35d Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 13 Jan 2020 13:19:25 +0100 Subject: [PATCH] frotend/wishbone: avoid NextValue(count, 0) duplication --- litedram/frontend/wishbone.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/litedram/frontend/wishbone.py b/litedram/frontend/wishbone.py index bfe9ab9..c914c54 100644 --- a/litedram/frontend/wishbone.py +++ b/litedram/frontend/wishbone.py @@ -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") ) )