From: Sebastien Bourdeauducq Date: Wed, 15 Feb 2012 15:42:05 +0000 (+0100) Subject: bus: fix simple interconnect X-Git-Tag: 24jan2021_ls180~2099^2~1018 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af5230c8eee77b3049ed41f60a5f9bdcb83ec6ce;p=litex.git bus: fix simple interconnect --- 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]