Diodes Incorporated
Back to Technical Articles

Top 3 Uses for PCI Express Switches

By Chris A. Ciufo, Editor-in-Chief, Embedded; Extension Media

Here’s where you’re going to use a PCIe switch.
I’ll bet on every digital designer’s desk you’ll find a stapler, coffee mug (usually with a weeks’ worth of crust to add flavor), paper clips and a PCI Express switch IC. And if it’s not an actual IC, it’s a design that either has or needs one.

My point: PCIe Gen2 (Gen3 is still ramping up) is about as common on digital PCBs as is a terminal block or pin header. Nearly every CPU, MCU, fast peripheral, bus or nonvolatile (NV) memory sports PCIe. To connect all of these “dots” together requires a PCI Express switch or one of the creative variations thereof.

Here are three really common uses for the lowly PCIe switch.

Reason #1: Port Expansion and Fanout
This has nothing to do with dredging the harbor to make room for luxury condos. Fanout is needing more PCIe connections in your design than are available on your CPU, SoC, MCU, Southbridge or multi-I/O controller.

CPU vendor Intel is pretty good about having two or three PCIe ports on its x86 Core i7 and Atom devices. Not so from Freescale on i.MX ARM-based SoCs: there’s only one on some devices.
The answer is to use a PCIe switch to increase fanout as shown in Figure 1. Here, there’s one upstream PCIe Gen2 port and five downstream ports using Pericom Semiconductor’s PI7C9X2G612GP packet switch. Myriad permutations offer all kinds of ports and features.

Fig 1 Packet switch App
Figure 1: A six-port (12 lane) PCI Express switch increases fanout from one x4 to five additional multiplexed/switched devices. (Courtesy: Pericom.)

Practical examples of this kind of fanout improvement include host bus adapters, where the CPU/SoC uses the switch to talk to local resources or bus/backplane-based resources. As well, a PCIe switch can be used between a CPU and two memory controllers (RAID, SSD, etc.) to switch between different memory arrays or banks and increase density or improve speed through memory striping (by ping-ponging memory banks). Figure 2 shows a multi-function printer that switches between the SoC, scan and print engines, and four PCIe endpoints.

Fig 2
Figure 2: PCIe Gen2 switch expands one port on the SoC to six peripherals.
(Courtesy: Pericom.)

Reason #2: Lane Swapping
Not going to make the obvious joke with this one. Suffice it to say, this is sort of like Endian conversion or the old-style connector gender changers: converting from one type of PCIe configuration to another type.

This one’s easy to understand. It’s like having a drawer full of USB cables but none of them have the right end connector to fit your device. PCI Express host adapters such as CPUs come configured only one way: say, one x8. But suppose you need two sets of x4? Eight sets of x1 (one lane per device)? A PCIe switch can do this “lane swapping” for you.

Figure 3 shows a six-port, eight-lane switch that lane-swaps from a single x4 to four or five x1 ports, where port #5 is available under specific conditions. Although shown on a PC add-in card, the architecture could easily be embedded and the decoders could be peripherals or coprocessors. Table 1 shows the huge range of lane-swapping options on several PCIe switches from Pericom.

TableTable 1. Lane-swapping options made possible by the use of PCIe switches from Pericom.

Fig 3 Lane Swapping

 Figure 3: An example of lane swapping, from one x4 to four x1’s. (Courtesy: Pericom.)

Reason #3: Bridging, Conversion and Advanced Functions
Beyond the available port permutations and lane-swapping capabilities, switches offer other benefits to designers. The switch shown in Figure 1, for example, includes device power management and a built-in clock buffer to save external components. It supports isochronous traffic to some of the ports for guaranteed latency to time-critical data devices like network data planes. These kinds of advanced functions make up the final reason for choosing a PCIe switch.

Most PCIe switches merely move data from one port to another, but some include packet routing functions. As the name implies, a routing criteria supplied by the local host tells the switch that only certain types of packets can be routed between ports—making the switch more than just a fanout improvement; rather, the switch functions as an intelligent local controller. Another variation on this theme is a bridge/switch, called a “SWIDGE” by supplier Pericom. One example of a SWIDGE, the PI7C9X442SL, bridges between USB 2.0 and PCIe 2.0. This device turns an I/O- or resource-limited system into a multi-port multiplexer that moves data between dissimilar bus types.

The device shown in Figure 4, for example, functions as a fanout improver with one upstream and two downstream PCIe 2.0 ports. Additionally, there are four USB 2.0 host controller ports, a feature that essentially turns a single PCIe x1 lane CPU into a one that has two PCIe and four USB 2.0 ports.
No USB 2.0 drivers or software are needed when the switch/bridge implements USB 2.0.
Intelligent routing functions are also added with non-blocking bridging and “store and forward” packet switching—all with minimal CPU intervention. Collectively, the switch/bridge becomes a flexible I/O controller with DMA boasting a full 16 Gbps when all ports are running flat out.

Fig 4 packet switch App

Figure 4: A bridge/switch combination called a “SWIDGE” that increases fanout, adds USB 2.0 I/O and has local intelligent packet forwarding. (Courtesy: Pericom).

Besides USB 2.0, other I/O conversions are possible in a PCIe switch such as between PCIe and RS-232/RS-422/and RS-485. Pericom’s PI7C9X7952 converts between PCIe 1.1 and serial ports via on-board dual UART blocks. Truly, the permutations are limitless.

Switch Your Thinking
|
We’ve presented a short list of three reasons to consider PCIe switches, and each of them should convince you that if there’s not a PCIe switch on your desk right now—or in your design—there should be.

This article was sponsored by Diodes Incorporated