Linux driver design hardware foundation (4) PCI and PCI-E of interface and bus

2.3.6 PCI 和 PCI-E

PCI (Peripheral Component Interconnect) is a local bus introduced by Intel in 1991. As a general bus interface standard, it has been widely used in current computer systems. The PCI bus has the following characteristics.

The data bus is 32 bits, expandable to 64 bits.

Burst mode transfers are possible. Burst mode transmission refers to the continuous transmission of multiple data after obtaining bus control. During burst transmission, only the first address of the destination needs to be given. After accessing the first data, the second to n data will be automatically addressed and transmitted according to certain rules based on the first address. Corresponding to the burst mode is the single-cycle mode, which transmits only one data in one bus cycle.

Bus operations run in parallel with processor-memory subsystem operations.

Centralized bus arbitration is adopted.

It supports automatic configuration and resource allocation. There is a device information register group in the PCI card to provide the system with card information, which can realize plug and play.

The PCI bus specification is independent of the microprocessor and has good generality.

A PCI device can control the bus entirely as a master device.

Figure 2.16 shows the logic diagram of a typical PCI bus based computer system, SCSI ( Small Computer System Interface ) card


Figure 2.16 Schematic diagram of computer system based on PCI bus

    The various parts of the system are connected together by PCI bus and PCI-PCI bridge. The CPU and RAM are connected to PCI bus 0 (that is, the main PCI bus) through a PCI bridge, and a graphics card with a PCI interface can be directly connected to the main PCI bus. PCI-PCI bridge is a special PCI device, which is responsible for connecting PCI bus 0 and PCI bus 1 (that is, from the PCI main line), usually PCI bus 1 is called the downstream (Downstream) of the PCI-PCI bridge, and the PCI bus 0 is called the upstream of the PCI-PCI bridge. In order to be compatible with the old ISA bus standard, the PCI bus can also be connected to the ISA bus through a PCI-ISA bridge to support previous ISA devices.

    When the PCI card is just powered on, the configuration space on the card can be accessed. The PCI configuration space saves all the information required for the card to work, such as the manufacturer, card function, resource requirements, processing capacity, number of functional modules, and the capability of the main control card. By reading and programming this space information, the configuration of the PCI card can be completed. As shown in Figure 2.17, the PCI configuration space is 256 bytes in total, including the following information.


Vendor ID: Assigned to the manufacturer by the PCI organization.

Device ID: The number assigned to the card by product classification.

Class Code: The classification code of the function of this card, such as picture card, display card, decompression card, etc.

Apply for memory space: The PCI card has memory or registers and I/O space addressed by memory. In order to enable drivers and applications to access them, it is necessary to apply for a storage area of ​​the CPU for positioning. The base address register of the configuration space is used for this purpose.

Apply for I/O space: The base address register in the configuration space is used to apply for system I/O space.

Interrupt resource application: The interrupt pins and interrupt lines in the configuration space are used to apply for interrupt resources to the system.

    PCI-E (PCI Express) is a new generation of bus interface proposed by Intel Corporation. PCI Express adopts the current popular point-to-point serial connection in the industry. Compared with the shared parallel architecture of PCI and earlier computer buses, each device has Its own dedicated connection, using serial transmission of data, does not need to request bandwidth from the entire bus, and can increase the data transmission rate to a very high frequency, and can increase the data transmission rate to a very high frequency, reaching PCI high bandwidth that cannot be provided.

    PCI Express is compatible with current PCI technologies and devices at the software level, and supports the initialization of PCI devices and memory modules. That is to say, PCI Express devices can be supported without knocking down the current drivers and operating systems.









Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325984958&siteId=291194637