From e97ff4aaa027d011c593bc0f868f455322fa12eb Mon Sep 17 00:00:00 2001 From: Andrew Butt Date: Sat, 1 May 2021 17:42:07 -0400 Subject: [PATCH] Fix adapter sel Signed-off-by: Andrew Butt --- litedram/frontend/adapter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litedram/frontend/adapter.py b/litedram/frontend/adapter.py index 1a887c0..dd9b9c3 100644 --- a/litedram/frontend/adapter.py +++ b/litedram/frontend/adapter.py @@ -204,7 +204,9 @@ class LiteDRAMNativePortUpConverter(Module): ).Else( # Acknowledge incomming commands, while filling `sel`. port_from.cmd.ready.eq(port_from.cmd.valid), NextValue(cmd_last, port_from.cmd.last), - NextValue(sel, sel | 1 << port_from.cmd.addr[:log2_int(ratio)]), + If(port_from.cmd.valid, + NextValue(sel, sel | 1 << port_from.cmd.addr[:log2_int(ratio)]) + ) ) ) fsm.act("COMMIT",