From 566295dea30f18c5524e25b1c0859abf57af7b8f Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 22 Dec 2011 19:36:56 +0100 Subject: [PATCH] csr: use optree --- migen/bus/csr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migen/bus/csr.py b/migen/bus/csr.py index 8e5af9a6..740fcb30 100644 --- a/migen/bus/csr.py +++ b/migen/bus/csr.py @@ -1,4 +1,5 @@ from migen.fhdl.structure import * +from migen.corelogic.misc import optree from migen.bus.simple import Simple _desc = [ @@ -23,11 +24,10 @@ class Interconnect: def get_fragment(self): comb = [] - rb = Constant(0, BV(8)) for slave in self.slaves: comb.append(slave.a_i.eq(self.master.a_o)) comb.append(slave.we_i.eq(self.master.we_o)) comb.append(slave.d_i.eq(self.master.d_o)) - rb = rb | slave.d_o + rb = optree('|', [slave.d_o for slave in self.slaves]) comb.append(self.master.d_i.eq(rb)) return Fragment(comb) -- 2.30.2