From f2c20e4af0266be64aada64d413845e48083b836 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 30 Apr 2012 17:11:42 -0500 Subject: [PATCH] bus/asmibus/hub: hack to prevent comb loops --- migen/bus/asmibus.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migen/bus/asmibus.py b/migen/bus/asmibus.py index ec34a6f51..4bae4ef7c 100644 --- a/migen/bus/asmibus.py +++ b/migen/bus/asmibus.py @@ -102,10 +102,11 @@ class Port: choose_slot = None for s in reversed(self.slots): choose_slot = If(s.state == SLOT_EMPTY, - self.ack.eq(1), s.allocate.eq(self.stb) ).Else(choose_slot) comb.append(choose_slot) + comb.append(self.ack.eq(optree("|", + [s.state == SLOT_EMPTY for s in self.slots]))) # call comb += [s.call.eq(self.get_call_expression(n))