An interconnect is the part of a chip that connects all masters to all slaves. Its structure decides how much traffic can flow at once. A shared bus lets one transfer through at a time, a crossbar lets every slave serve a different master in parallel, and a network-on-chip sends packets through routers like a small internet. This article compares the three, and measures the difference between a shared bus and a crossbar in a simulation.
8 min read | Intermediate
What You'll Learn
- Describe shared-bus, crossbar and network-on-chip interconnects
- Explain why a crossbar raises bandwidth, and when it does not
- Measure shared bus against crossbar in a simulation
- Know which interconnects AHB and AXI systems use
Three Topologies
- Shared bus: one set of wires that all masters and slaves use in turn. An arbiter grants it to one master at a time. Cheap and simple, but the total bandwidth is one transfer per cycle, however many slaves there are. Classic AHB systems are built this way.
- Crossbar: every master has a path to every slave. Each slave has its own arbiter, so two masters can talk to two different slaves in the same cycle. AHB multi-layer systems and AXI interconnects are crossbars. Their cost grows with masters times slaves.
- Network-on-chip (NoC): transfers become packets that travel through routers connected by links. It scales to dozens of masters and slaves, and large SoCs use it for the main interconnect, with AXI interfaces at its edges.
Shared Bus Against Crossbar
The model has two masters and two slaves. Each master wants four single-cycle transfers. The interconnect grants requests every cycle; the only difference is what counts as a conflict:
wire conflict = CROSSBAR ? (req == 2'b11 && tgt0 == tgt1) // same slave
: (req == 2'b11); // one shared bus
always @(*) begin
if (conflict)
gnt = last ? 2'b01 : 2'b10;
else
gnt = req;
end
On a shared bus, any two requests conflict. In a crossbar, two requests only conflict when they go to the same slave. In the first test, master 0 talks to slave 0 and master 1 to slave 1:
shared bus: 8 transfers took 8 cycles crossbar: 8 transfers took 4 cycles
Quick Check
Q: A crossbar has 3 masters and 4 slaves. What is the most transfers it can complete in one cycle?
Show Answer
Three: one per master, as long as each master targets a different slave. A slave serves one master at a time, and a master issues one transfer at a time.
When a Crossbar Does Not Help
A crossbar only adds bandwidth when masters use different slaves. If both masters target the same slave, they conflict exactly as on a shared bus, and the eight transfers take eight cycles again. In real systems, most traffic goes to one place, the DRAM controller, so that slave becomes the bottleneck no matter how the interconnect is built. That is why memory controllers have several ports and deep queues, and why caches matter so much.
Quick Check
Q: A processor and a DMA engine both copy data to and from DRAM. Does replacing the shared bus with a crossbar speed them up?
Show Answer
Hardly, if DRAM is the only slave they use: every transfer still goes through the single DRAM port. A crossbar helps when they work on different slaves, such as the processor on its local SRAM while the DMA engine uses DRAM.
Interconnects in AMBA Systems
- An AHB system with one master needs only a decoder and a multiplexer; with several masters, an arbiter, or a multi-layer interconnect with one layer per master.
- An AXI interconnect is usually a crossbar, with arbitration per slave, address decoding per master, and often width conversion, clock conversion and buffering built in.
- APB is always behind a bridge, so the APB side has a single master, the bridge, and needs no arbitration at all.
Running It in ChipVerify Lab
The example contains both interconnects and the testbench. Run it, then try the exercise to see the crossbar lose its advantage.
Common Mistakes
Mistake #1: Expecting a crossbar to fix a hot spot
When all masters target the same slave, a crossbar serializes them just like a shared bus. Find the bottleneck slave first.
Mistake #2: Ignoring the cost of a full crossbar
A full crossbar needs a path from every master to every slave. With many masters and slaves, designers use partial crossbars, cascaded interconnects or a network-on-chip.
Practice Exercise
Challenge: Both Masters to One Slave
Open the example. Change the crossbar instance so that master 1 also targets slave 0 (.tgt1 (1'b0)). Predict the cycle count for the crossbar, then run it.
Hint
In the crossbar, what is a conflict?
Solution
The crossbar now also needs 8 cycles: every cycle with two requests is a conflict for slave 0, and its arbiter alternates between the masters, exactly like the shared bus. A crossbar's extra bandwidth only exists when the masters spread their traffic over different slaves.
Open the ready-made example in the lab and run the simulation.
Summary
- A shared bus carries one transfer at a time; a crossbar one transfer per slave; a network-on-chip routes packets for large systems.
- With two masters on different slaves, the crossbar finished in 4 cycles what the shared bus needed 8 for.
- When all masters target the same slave, a crossbar is no faster than a shared bus.
- AXI interconnects are usually crossbars; APB sits behind a bridge with a single master.