PCIe also helps simplify software design when upgrading systems. Its compatibility with older PCI designs means that applications, drivers, and operating system software for PCI devices run unmodified when using comparable PCIe devices. Further, PCIe allows additional software capabilities, such as an ability to offer quality-of-service controls on data transfers, that simplify the addition of new functions if the operating system supports them.

Figure 3: PCIe connections are downward compatible, so a 4-lane card can plug into an 8-lane slot and the PCIe protocol will negotiate lane usage to re-configure the slot for 4-lane operation.
Peripherals with a native PCIe interface are also positioned to support the expanded memory space of newer 64-bit operating system software such as Windows XP and Vista. Most PCI system cards were designed with older versions of Windows that only supported 32-bit addressing, so they restrict their DMA addressing to 4 Gbytes, of which half is reserved for system use. This leaves only a 2 Gbyte block that can be directly accessed, forcing the use of virtual memory (see Figure 2) to handle larger data sets such as the output of a line-scan camera. PCIe peripherals designed to work with 64-bit operating systems are able to stream data into an address range that runs to thousands of terabytes.

PCIe Implementation Challenges

Implementing a PCIe system is not without its challenges, however. One of the problems that system developers face is that most commercially-available PCIe motherboards were designed for desktop computer use and have limited PCIe functionality. A typical desktop motherboard offers one or two 16-lane PCIe slots for high performance, such as graphics functions, and a few 1-lane slots.

This arrangement causes problems for developers needing better performance than the 256 Mbyte/second bandwidth that the 1-lane slots provide or wishing to use cards developed for 4- or 8-lane slots. While PCIe hardware will negotiate a link to use fewer lanes when there is a mismatch, the slots themselves will not accept cards designed for more lanes (see Figure 3). So in a typical commercial motherboard a 4-lane machine vision card could only be installed in the 16-lane graphics card slot.

Because the intended use for the 16-lane slot is graphics, however, the use of another card type in that slot has caused problems with some motherboards. The BIOS expects a graphics card and may not properly handle system resource allocation for another card type. As a result, the system may not achieve the performance levels that the card can support.

The solution to this dilemma is for developers to use motherboards that target the server market. While not typically available from consumer sources, they can be obtained from industrial sources. These server motherboards usually incorporate 4-lane or 8-lane PCIe slots allowing system developers to readily achieve the performance levels they require.

The Right Design Approach

The design of a peripheral card for a PCIe system can follow one of two approaches. Because of software compatibility, it is possible to take an existing PCI or PCI-X design and simply connect it to a PCIe slot through a bridge chip. This approach has the advantage that it offers a low-cost upgrade path to the new bus structure, but results in a design that is limited to the performance that the original bus interface provided. This includes being limited to the 32-bit addressing of the original PCI DMA controller.