Bus PCI J. P. Oliver Instituto de Ingeniería Eléctrica Facultad de Ingeniería Universidad de la República ISA EISA VESA Micro Channel 32 bits, 33MHz PCI 64 bits, 66MHz PCI PCI-X 64 bits 133MHz PCI Special Interest Group. PCI Local Bus Specification Rev 2.2, Dec. 1998. PCI to PCI Bridge Architecture Specification Rev 1.1, Dec. 1998. PCI System Design Guide PCI BIOS Specification www.pcisig.com Introducción
!" #$%& '()*'( ) % +, - -.-+ %$ %$ / -+ ( + 01 + -+-+ + + + -+
Intel 430HX PCIset System Block Diagram /2333**%/ &456758*-#9 Memory Space Organization
Name Type Description AD[31:0] Address/Data: The standard PCI address and data lines. Address is driven with FRAME# assertion, data is driven or received in following clocks. C/BE[3:0]# FRAME# DEVSEL# IRDY# TRDY# STOP# LOCK# REQ[3:0]# GNT[3:0]# PHLD# PHLDA# PAR SERR# I O I O O Command/Byte Enable: The command is driven with FRAME# assertion, byte enables corresponding to supplied or requested data is driven on following clocks. Frame: Assertion indicates the address phase of a PCI transfer. Negation indicates that one more data transfer is desired by the cycle initiator. Device Select: This signal is driven by the TXC when a PCI initiator is attempting to access DRAM. DEVSEL# is asserted at medium decode time. Initiator Ready: Asserted when the initiator is ready for a data transfer. Target Ready: Asserted when the target is ready for a data transfer. Stop: Asserted by the target to request the master to stop the current transaction. Lock: Used to establish, maintain, and release resource locks on PCI. PCI Request: PCI master requests for PCI. Weak external pull-up resistors are Required on these signals. PCI Grant: Permission is given to the master to use PCI. Weak external pull-up resistors are required on these signals. PCI Hold: This signal comes from the expansion bridge. It is the bridge request for PCI. The PHLD# protocol supports passive release. A weak external pull-up resistor is required on this signal. PCI Hold Acknowledge: This signal is driven by the TXC to grant PCI to the expansion bridge. The PHLDA# protocol supports passive release. A weak external pull-up resistor is required on this signal. Parity: A single parity bit is provided over AD[31:0] and C/BE[3:0]. SYSTEM ERROR: The TXC asserts SERR# to signal a system error. A system error can be optionally generated for either single bit error (correctable) events or any ECC bit error (correctable or uncorrectable), or for parity error. 6
Master (Iniciator) Master / Target pide el bus inicia transferencias RD o WR Target acepta transf. si es direccionado RD o WR puede terminar PCI bus commands cben[3..0] Bus Command cben[3..0] Bus Command 0000 Interrupt acknowledge 0001 Special cycle 0010 read 0011 write 0100 Reserved 0101 Reserved 0110 Memory read 0111 Memory write 1000 Reserved 1001 Reserved 1010 Configuration read 1011 Configuration write 1100 Memory read multiple 1101 Dual address cycle (DAC) 1110 Memory read line 1111 Memory write and invalidate '
PCI configuration registers Address Byte 3 2 1 0 00h Device ID Vendor ID 04h Status Register Command Register 08h Class Code Revision ID 0Ch BIST Header Type Latency Timer Cache Line size 10h 14h 18h 1Ch 20h 24h 28h 2Ch Subsystem ID Base Address Register 0 Base Address Register 1 Base Address Register 2 Base Address Register 3 Base Address Register 4 Base Address Register 5 Card Bus CIS Pointer Subsystem Vendor ID 30h Expansion ROM Base Address Register 34h Reserved Capabilities Pointer 38h Reserved 3Ch Maximum Latency Minimun Grant Interrupt Pin Interrupt Line Configuration cycle 7
Burst-Read cycle Burst-Write cycle 5
3 ;)%<-+= >?!%%% >.$+, @$ * >-+ >.$ -+A%% %%A-+ 3 %@BC20&D1 >?#, %% >#- + #,- +" >/2333**%E :
Problemas Lograr burst en ambos sentidos en plataformas PC Velocidad del diseño Target solo ó Master Target? DMA? Software: si usamos un SO de verdad es necesario implementar un DEVICE DRIVER Guías para un diseño eficiente Las elecciones en el diseño de la interfaz PCI son de vital importancia para determinar la performance del sistema. Las diferencias de performance en diferentes placas PCI son causadas por diferencias en la implementación de la interfaz PCI. Hay reglas a seguir que determinan un sistema eficiente y de alta performance. 4
Reglas Para Un Diseño PCI Eficiente Implementar comandos PCI avanzados. Usar Memory Read Line (MRL) para lecturas menores a 1 línea de cache y de más de 4 bytes (en lugar de realizar una Lectura Común). En porcesadores Pentium y Pentium pro una línea de cache es de 32 bytes (8 Dwords). Usar Memory Read Multiple (MRM) para lecturas de un tamáño mayor a 1 línea de cache. Usar Memory Write Invalidate (MWI) para escrituras a múltiples líneas de cache (deben estar alineadas). No terminar un comando Memory Write (MW) largo para empezar un comando MWI. Reglas Para Un Diseño PCI Eficiente Usar bursts largos. Para lecturas, es necesario utiliar bursts de al menos 64 Dwords (32 bit words) para obtener buena performance en algunas plataformas. Para escrituras, los bursts deben ser al menos tan largos como el cache line. Usar comandos de memoria, no comandos de. 8
Reglas Para Un Diseño PCI Eficiente Minimizar Latencia. Responder a accessos lo más rápido posible y tratar de evitar insertar estados de WAIT en de las transferencias de bloques. Seguir las reglas, NO experimentar. Es posible obtener sistemas de buena performance sin seguir las reglas, pero este sistema puede no comportarse bien en sistemas futuros. PCI Core de Altera
Placa ARC-PCI Placa ARC-PCI
Placa ARC-PCI Algunas Conclusiones PCI no es fácil (comparado con ISA) Un core PCI requiere gran cantidad de celdas Diseño cuidadoso para cumplir requisitos de tiempos (con los chips de la ARC-PCI) Para lograr buena velocidad es necesario Master/Target con DMA
En Qué Estamos? ARC-PCI Desarrollar una interfaz PCI que pueda transferir burts sin wait en ambos sentidos Desarrollar una biblioteca hardware transparente al programador Desarrollar un driver Linux Desarrollar un core PCI propio Diseñar una nueva placa PCI con chips más rápidos y SDRAM 6