From 269525862b76ac46d0ed363c1885d99eb8139cc9 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 14 Nov 2022 09:34:10 +0100 Subject: [PATCH] interconnect/axi/axi_lite_to_simple: Avoid combinatorial loop on ax.valid/ax.ready. --- litex/soc/interconnect/axi/axi_lite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litex/soc/interconnect/axi/axi_lite.py b/litex/soc/interconnect/axi/axi_lite.py index 1bfad55eb..37385e897 100644 --- a/litex/soc/interconnect/axi/axi_lite.py +++ b/litex/soc/interconnect/axi/axi_lite.py @@ -147,16 +147,16 @@ def axi_lite_to_simple(axi_lite, port_adr, port_dat_r, port_dat_w=None, port_we= do_read.eq(axi_lite.ar.valid), ), # Start reading/writing immediately not to waste a cycle. + axi_lite.aw.ready.eq(last_was_read | ~axi_lite.ar.valid), + axi_lite.ar.ready.eq(~last_was_read | ~axi_lite.aw.valid), If(do_write, port_adr.eq(axi_lite.aw.addr[adr_shift:]), If(axi_lite.w.valid, - axi_lite.aw.ready.eq(1), axi_lite.w.ready.eq(1), NextState("SEND-WRITE-RESPONSE") ) ).Elif(do_read, port_adr.eq(axi_lite.ar.addr[adr_shift:]), - axi_lite.ar.ready.eq(1), NextState("SEND-READ-RESPONSE"), ) )