soc: Don't create a share intercon with only one master and one slave
This creates a lot of useless churn in the resulting verilog. Instead use a point to point interconnect in that case. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
3ce9010083
commit
dcc881db92
|
@ -824,7 +824,14 @@ class SoC(Module):
|
||||||
# SoC Bus Interconnect ---------------------------------------------------------------------
|
# SoC Bus Interconnect ---------------------------------------------------------------------
|
||||||
bus_masters = self.bus.masters.values()
|
bus_masters = self.bus.masters.values()
|
||||||
bus_slaves = [(self.bus.regions[n].decoder(self.bus), s) for n, s in self.bus.slaves.items()]
|
bus_slaves = [(self.bus.regions[n].decoder(self.bus), s) for n, s in self.bus.slaves.items()]
|
||||||
if len(bus_masters) and len(bus_slaves):
|
# One master and one slave, use a point to point interconnect, this is useful for
|
||||||
|
# generating standalone components such as LiteDRAM whose external control
|
||||||
|
# interface is a wishbone.
|
||||||
|
if len(bus_masters) == 1 and len(bus_slaves) == 1:
|
||||||
|
self.submodules.bus_interconnect = wishbone.InterconnectPointToPoint(
|
||||||
|
master = list(bus_masters)[0],
|
||||||
|
slave = list(self.bus.slaves.values())[0])
|
||||||
|
elif len(bus_masters) and len(bus_slaves):
|
||||||
self.submodules.bus_interconnect = wishbone.InterconnectShared(
|
self.submodules.bus_interconnect = wishbone.InterconnectShared(
|
||||||
masters = bus_masters,
|
masters = bus_masters,
|
||||||
slaves = bus_slaves,
|
slaves = bus_slaves,
|
||||||
|
|
Loading…
Reference in New Issue