From af5230c8eee77b3049ed41f60a5f9bdcb83ec6ce Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 15 Feb 2012 16:42:05 +0100 Subject: [PATCH] bus: fix simple interconnect --- migen/bus/simple.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/migen/bus/simple.py b/migen/bus/simple.py index 07c1bb36..f0f10490 100644 --- a/migen/bus/simple.py +++ b/migen/bus/simple.py @@ -33,11 +33,12 @@ class SimpleInterconnect: self.slaves = slaves def get_fragment(self): - s2m = master.desc.get_names(S_TO_M) - m2s = master.desc.get_names(M_TO_S) - comb = [getattr(slave, name).eq(getattr(master, name)) - for name in m2s for slave in self.slave] - comb += [getattr(master, name).eq( + desc = self.master.desc + s2m = desc.get_names(S_TO_M) + m2s = desc.get_names(M_TO_S) + comb = [getattr(slave, name).eq(getattr(self.master, name)) + for name in m2s for slave in self.slaves] + comb += [getattr(self.master, name).eq( optree("|", [getattr(slave, name) for slave in self.slaves]) ) for name in s2m] -- 2.30.2