The PCI (Peripheral Component Interconnect) Bus This file is not intended to be a thorough coverage of the PCI standard. It is for informational purposes only, and is intended to give designers and hobbyists an overview of the bus so that they might be able to design their own PCI cards. Thus, I/O operations are explained in the most detail, while memory operations, which will usually not be dealt with by an I/O card, are only briefly explained. Hobbyists are also warned that, due to the higher clock speeds involved, PCI cards are more difficult to design than ISA cards or cards for other slower busses. Many companies are now making PCI prototyping cards, and, for those fortunate enough to have access to FPGA programmers, companies like Xilinx are offering PCI compliant designs which you can use as a starting point for your own projects. For a copy of the full PCI standard, contact: PCI Special Interest Group (SIG) PO Box 14070 Portland, OR 97214 1-800-433-5177 1-503-797-4207 There is also a spec for CompactPCI, which uses the same timing and signals, but uses a eurocard connector and format. This is not presently covered in any detail within this document. Pinout (5 volt and 3.3 volt boards) -12V 01 *TRST TCK +12V GND TMS TDO TDI +5V +5V +5V *INTA *INTB *INTC *INTD +5V *PRSNT1 reserved reserved 10 +I/O V (+5 or +3.3) *PRSNT2 reserved GND Key3.3 GND GND Key3.3 GND reserved reserved GND *RST CLK +I/O V (+5 or +3.3) GND *GNT REQ GND +I/O V (+5 or +3.3) 20 reserved AD31 AD30 AD29 +3.3V GND AD28 AD27 AD26 AD25 GND +3.3V AD24 C/BE3 IDSEL AD23 +3.3V GND AD22 AD21 AD20 AD19 30 GND +3.3V AD18 AD17 AD16 C/BE2 +3.3V GND *FRAME *IRDY GND +3.3V *TRDY *DEVSEL GND GND *STOP *LOCK +3.3V *PERR 40 SDONE +3.3V *SBO *SERR GND +3.3V PAR C/BE1 AD15 AD14 +3.3V GND AD13 AD12 AD11 AD10 49 AD9 GND Key5 GND GND Key5 GND AD8 52 C/BE0 AD7 +3.3V +3.3V AD6 AD5 AD4 AD3 GND GND AD2 +I/O V (+5 or +3.3) +I/O V (+5 or +3.3) *ACK64 60 *REQ64 +5V +5V +5V 62 +5V (64 Bit Bus Extension Only) reserved 63 GND GND C/BE7 C/BE6 C/BE5 C/BE4 +I/O V (+5 or +3.3) GND PAR64 AD63 AD62 AD61 GND +I/O V (+5 or +3.3) 70 AD60 AD59 AD58 AD57 GND GND AD56 AD55 AD54 AD53 +I/O V (+5 or +3.3) GND AD52 AD51 AD50 AD49 GND +I/O V (+5 or +3.3) AD48 AD47 80 AD46 AD45 GND GND AD44 AD43 AD42 AD41 +I/O V (+5 or +3.3) GND AD40 AD39 AD38 AD37 GND +I/O V (+5 or +3.3) AD36 AD35 AD34 AD33 90 GND reserved reserved reserved GND GND 94 reserved * - Active Low PCI slots are keyed so that a 3.3 volt card cannot be plugged into a 5 volt slot, and a 5.5 volt card cannot be plugged into a 3 volt card. Dual voltage cards are possible. Key3.3 - At this location, a key is present on 3.3 volt boards. On 5 volt boards, these pins are GND. Key5 - At this location, a key is present on 5 volt boards. On 3.3 volt boards, these pins are GND. Signal Descriptions: AD(x): Address/Data Lines. CLK: Clock. 33 MHz maximum. C/BE(x): Command, Byte Enable. FRAME: Used to indicate whether the cycle is an address phase or or a data phase. DEVSEL: Device Select. IDSEL: Initialization Device Select INT(x): Interrupt IRDY: Initiator Ready LOCK: Used to manage resource locks on the PCI bus. REQ: Request. Requests a PCI transfer. GNT: Grant. indicates that permission to use PCI is granted. PAR: Parity. Used for AD0-31 and C/BE0-3. PERR: Parity Error. RST: Reset. SBO: Snoop Backoff. SDONE: Snoop Done. SERR: System Error. Indicates an address parity error for special cycles or a system error. STOP: Asserted by Target. Requests the master to stop the current transfer cycle. TCK: Test Clock TDI: Test Data Input TDO: Test Data Output TMS: Test Mode Select TRDY: Target Ready TRST: Test Logic Reset The PCI bus treats all transfers as a burst operation. Each cycle begins with an address phase followed by one or more data phases. Data phases may repeat indefinately, but are limited by a timer that defines the maximum amount of time that the PCI device may control the bus. This timer is set by the CPU as part of the configuration space. Each device has its own timer (see the Latency Timer in the configuration space). The same lines are used for address and data. The command lines are also used for byte enable lines. This is done to reduce the overall number of pins on the PCI connector. The Command lines (C/BE3 to C/BE0) indicate the type of bus transfer during the address phase. C/BE Command Type 0000 Interrupt Acknowledge 0001 Special Cycle 0010 I/O Read 0011 I/O Write 0100 reserved 0101 reserved 0110 Memory Read 0111 Memory Write 1000 reserved 1001 reserved 1010 Configuration Read 1011 Configuration Write 1100 Multiple Memory Read 1101 Dual Address Cycle 1110 Memory-Read Line 1111 Memory Write and Invalidate The three basic types of transfers are I/O, Memory, and Configuration. PCI timing diagrams: ___ ___ ___ ___ ___ ___ CLK ___| |___| |___| |___| |___| |___| |___ _______ _________ FRAME |_________________________________| ______ _______ ______ ______ ______ AD -------<______><_______><______><______><______>--- Address Data1 Data2 Data3 Data4 ______ _______________________________ C/BE -------<______><_______________________________>--- Command Byte Enable Signals ____________ ___ IRDY |_________________________________| _____________ ___ TRDY |________________________________| ______________ ___ DEVSEL |_______________________________| PCI transfer cycle, 4 data phases, no wait states. Data is transferred on the rising edge of CLK. [1] [2] [3] ___ ___ ___ ___ ___ ___ ___ ___ CLK ___| |___| |___| |___| |___| |___| |___| |___| |__ _______ _________ FRAME |________________________________________________| A B C ______ ______________ ______ _____________ AD -------<______>---------<______________><______><_____________>--- Address Data1 Data2 Data3 ______ ______________________________________________ C/BE -------<______><______________________________________________>--- Command Byte Enable Signals Wait ____________ _____ ___ IRDY |__________________________________| |_______| Wait Wait ______________________ ______ ___ TRDY |_______| |_______________________| ______________ ___ DEVSEL |______________________________________________| PCI transfer cycle, with wait states. Data is transferred on the rising edge of CLK at points labled A, B, and ...
fred1144