e012010
e012010
PCI Bus
Prototyping Card (1)
Explore the PCI-Bus
By H. Kolter (Kolter Electronic)
The Peripheral Component Interconnect or address/data bus. One of the original expansion cards fitted to the com-
PCI Bus is a relative newcomer to the com- aims of this bus standard was to puter system and will initialise them
puter interface world but has rapidly replaced ensure that it would not become during the BIOS set-up procedure.
the older and well known ISA Bus. One attrac- obsolete overnight and would still be Once the card has been configured
tive feature for peripheral designers is that in use after many generations of under BIOS, it is assigned an access
this bus is used not only for IBM compatible processor have come and gone. address. There are different PCI rou-
PCs but also for workstations and Apple Mac- The PCI bus is independent of the tines that allow this information to
intosh systems. Basically, the interface is a system processor and is almost a be read or altered.
very powerful multiplexed 32/64 bit wide stand-alone system bus capable of a
relatively high data transfer rate. PCI Controller
Modern PC motherboards use PCI
slots and no longer provide any of
and Vendor ID
the older ISA slots. The disadvan- The central core of the PCI expan-
PCI board features: tage for the designer of a PCI plug-in sion card is the PCI decoder or con-
– 32-bit PCI Controller implemented with card is that the design process is a troller chip. This chip forms the link
ispLSI bit more complex. It is no longer pos- between the PCI bus of the com-
– 16 bit User Interface similar to ISA-Bus
sible to fiddle with hardware puter and your custom circuitry.
– Accessible Decoder GAL22V10 (Synario)
jumpers to select the address space Most commercial PCI controller
– Large 2.54-mm matrix of through-plated
of the expansion card — instead, the chips on the market are not only very
holes
card configuration is performed with complex (and expensive) but are also
– DC/DC converter +/- 15 volts
– Suitable for prototyping digital or analogue
software. The PCI card contains its relatively unwieldy beasts because
circuits own operating system that is ini- of their large package outlines. For
– Selectable Product ID tialised by writing to internal regis- our PCI experimentation card in this
– 8/16 bit Bus with CS signals ters over the PCI interface. The PCI project, the PCI controller has been
BIOS will recognise each of the PCI implemented in an ispLSI1032 pro-
Card features
The PCI prototyping card provides an area of
through-plated holes of 87 × 37 solder points
(minus 46 × 21 for the PCI decoder). This
breadboard area provides a useful space to
lay out prototype hardware rapidly and eas-
ily for your specific PCI application, e.g., A/D
or D/A converters, TTL I/O circuitry or gen-
eral-purpose interfaces. A power supply pro-
viding ±15 V from a separate DC/DC con-
verter is also included on the card and a 16
bit data bus together with a series of port
addresses ensures that you will be able to
access your hardware in under 90 ns. All the
necessary components are provided on the
card and configured to transfer data to and
from the PCI bus.
Configuration of the card address occurs
automatically with Plug and Play (PNP).
Extensive PCI tools running under Windows
95/98/NT and 2000 enable the address I/O
address range of the card to be determined.
No further initialisation of the components is
necessary to be able to read and write to the
card at register level.
The circuit
A quick look at the block diagram in Figure 1
shows that the PCI prototyping card consists
of four main parts: Figure 1. Overview of the functional blocks of the PCI prototyping card. An expla-
IC1: PCI bus adapter chip type ISPLSI1032 nation of the abbreviations used is given in the inset.
with ID switch. quency Interference (RFI) suppres- K4 is a sub D type connector providing con-
IC2: address decoder gate array sion components. nections to external signals.
type GAL 22V10. K2 to K10: these rows of pin strips
IC4: DC/DC voltage converter and connectors are free to be wired Looking (ahead) at the circuit diagram (Fig-
chip together with its Radio Fre- to the prototyping area of the card. ure 2) and the PCB layout in Figure 3 you’ll
C5 K2
CS1
22k
GNT GND +5V
A18 B18 PERR 45 ispLSI1032 3 D9
GND REQ I/O 16 I/O 48
A19 B19 SERR 46 4 D10 100µ
Reserved (5V/3V3)VCC I/O 17 I/O 49
AD30 A20 B20 AD31 PAR 47 5 D11
AD30 AD31 R5 1 8x 10k
I/O 18 I/O 50
* C6 R1
1k
A21 B21 AD29 AD15 48 6 D12
+3V3 AD29 I/O 19 I/O 51
AD28 A22 B22 C/BE1 49 7 D13
AD28 GND I/O 20 I/O 52 100µ
AD26 A23 B23 AD27 AD14 50 8 D14
AD26 AD27 I/O 21 I/O 53
A24 B24 AD25 AD13 51 9 D15
GND AD25 I/O 22 I/O 54 2 3 4 5 6 7 8 9 K3 +5V
AD24 A25 B25 AD12 52 10 PCI-ALE D0
AD24 +3V3 I/O 23 I/O 55
IDSEL A26 B26 C/BE3 AD11 53 11 PCI-RW D1
IDSEL C/BE[3] I/O 24 I/O 56
A27 B27 AD23 AD10 54 12 AD31 D2 IC3
+3V3 AD23 I/O 25 I/O 57 1 8
AD22 A28 B28 AD9 55 13 AD30 D3
AD22 GND I/O 26 I/O 58 EN
AD20 A29 B29 AD21 AD8 56 14 AD29 D4
AD20 AD21 I/O 27 I/O 59 OSC
A30 B30 AD19 C/BE0 57 15 AD28 D5 5
GND AD19 I/O 28 I/O 60 CLK
AD18 A31 B31 AD7 58 16 AD27 D6
AD18 +3V3 I/O 29 I/O 61 4 / 8MHz
AD16 A32 B32 AD17 AD6 59 17 AD26 D7
AD16 AD17 I/O 30 I/O 62
A33 B33 C/BE2 AD5 60 18 AD25 D8
+3V3 C/BE[2] I/O 31 I/O 63 4
FRAME A34 B34 D9
FRAME GND
A35 B35 IRDY ISPSDI 25 20 CLKPCI D10
GND IRDY SDI/IN0 Y0
TRDY A36 B36 ISPMODE 42 66 D11
TRDY +3V3 MODE/IN1 Y1
A37
GND DEVSEL
B37 DEVSEL ISPSDO 44
SDO/IN2 Y2
63 D12
* zie tekst
A38
STOP GND
B38 ISPSCLK 61
SCLK/IN3 Y3
62 D13
* see text
voir texte
A39
+3V3 LOCK
B39 PSW0 67
IN4 K6 *
D14
* siehe Text
A40
A41
SDONE PERR
B40
B41
PERR PSW1
PSW2
84
2
IN5
24 ISPRES
D15
*
SBO +3V3 IN6 RESET 2 3 4 5 6 7 8 9
A42 B42 SERR RST 19 23 ISPEN +5V K4
GND SERR IN7 ispEN
PAR A43 B43
PAR +3V3 1
AD15 A44 B44 C/BE1
AD15 C/BE[1] 1 22 43 64 20
A45 B45 AD14
+3V3 AD14 +5V R6 1 8x 10k DIGI 2
AD13 A46 B46
AD13 GND ST34 21
AD11 A47 B47 AD12 S1
AD11 AD12 ST1 3
A48 B48 AD10 PSW0 8 1 R3
GND AD10 DIGI ST2 22
AD9 A49 B49 PSW1 7 2 C8
3k9
10n ST7 6
AD6 A54 B54 ISPSDI
AD6 +3V3 ST8 25
AD4 A55 B55 AD5 +5V
AD4 AD05 C1 C2 C3 C4 ST9 7
A56 B56 AD3
AD2 A57
GND AD03
B57 ISPSDO 2
K7 * 1
ST10 26
AD2 GND 100n 100n 100n 100n
ST11 8
AD0 A58 B58 AD1 ISPEN 4 3
AD0 AD01 ST12 27
A59 B59 ISPMODE 6 5
+5V VCC(5V/3V3) (5V/3V3)VCC ST13 9
A60 B60 ISPSCLK 8 7
REQ64 ACK64 ST14 28
A61 B61
+5V +5V ST15 10
A62 B62 ISPRES K5
+5V +5V ST1 1 2 ST2 ST16 29
ST3 3 4 ST4 ST17 11
K8
INTA ST5 5 6 ST6 ST18 30
INTB ST7 7 8 ST8 ST19 12
INTC ST9 9 10 ST10 ST20 31
INTD ST11 11 12 ST12 ST21 13
RST ST13 13 14 ST14 ST22 32
CLKPCI ST15 15 16 ST16 ST23 14
+5V
ST17 17 18 ST18 ST24 33
L1 +5V ST19 19 20 ST20 ST25 15
14 +VCC 11
-VOUT -15V ST21 21 22 ST22 ST26 34
2µH7
C13 C10 -15V K9 K10 ST23 23 24 ST24 ST27 16
IC4 ST25 25 26 ST26 ST28 35
100n L3 100n AGND
C12 NMH0515S ST27 27 28 ST28 ST29 17
8
COM AGND ST29 29 30 ST30 ST30 36
2µH7
220µ DCDC C14 C11 +15V ST31 31 32 ST32 ST31 18
ST33 33 34 ST34 ST32 37
100n L2 100n
ST33 19
1 9
GND +VOUT +15V
2µH7
+5V 010009 - 11
Figure 2. Circuit diagram of the PCI prototyping card. The biggest part of the circuit, the PCI bridge which links the PCI bus to the proto-
typing area circuits, is implemented in the ispLSI-Chip.
R4
D1
R6 R5
K9 K10
010009 C10
K3
K5 C11 S1
K4
L1
L3
L2
K8
IC2
C2 C7
C1 K2
IC1
C14
C13
K6
K7
C4 C6 C5
C9 R2
IC4 R3
R1
C12 C8 IC3
C3
010009
notice that the most complex function of the the ‘PCI target bridge’. A key to the and in this case has the value
circuit is performed by IC1, the pre-pro- abbreviations used on this diagram 0x1001. This is the VID of Kolter Elec-
grammed LSI chip ispLSI1032 from Lattice. is given at the end of the text. tronic, Germany, and can be used on
The block diagram for the present PCI card The Vendor ID code mentioned all the applications in which the
in shown in Figure 1. IC1 is shown here as earlier is pre-programmed into IC1 ispLSI-chip from Kolter is employed.
HWT
The Hardware Test Program HWT is
a PCI diagnosis program running
under windows. Besides the manu-
facturer’s vendor ID and the equip-
ment device ID it also shows the I/O
base address of the card. The dis-
played base address has been incre-
mented by one so that for example a
address shown as E001 is actually
E000. The address space of the PCI
card extends from this base address
over a 256-byte area. In our example,
the actual address range would be
from E000 to E0FF. Using the base
address, it is possible to access the Figure 5. Overview of the pinheaders and main elements on the board.
ports using 8- or 16-bit data width.
The functions Read*106 and
Write*106 are included and can be
used to determine the maximum can then be launched from Explorer. Use with Linux
data flow through the port of your Users of the Linux operating system will find
computer. Clicking on this function Example Program it generally very simple to program hardware
will perform 1000000 Port cycles. This program, complete with the cards such as I/O cards, A/D and D/A con-
Measuring the time taken will give Delphi source code, allows you to verters using the GNU-C compiler. Compar-
the throughput of your system. The rapidly test your own circuitry in the ing it with the MS operating system you will
hardware table is a standard text file breadboard area of the PCI prototyp- find that there are no hidden access mecha-
and can be easily expanded to your ing card. It also allows you to see if nisms or tricks that you normally find neces-
requirements. the PCI card itself is functioning cor- sary with MS operating system program-
With Windows 95/98/ME you rectly by flashing the test LED on the ming. The Linux operating system and Linux
don’t need any further registration to card. application software is openly available and
use HWT — all the data files can be more often than not free. Programming in
stored in any subdirectory. If you are An NT driver is available for Win- Linux is so much simpler that anyone famil-
using Windows NT4/2000 then it is dows 2000/NT. Details are available iar with ANSI-C should have no problems.
necessary to copy SYS data into the at the web address http://www.pci- The instructions ioperm and iopl give the
directory c:\Winnt\system32\drivers card.com. (see web links at the end program permission to access the I/O ports
and then re-boot the system. HWT of this article). without the need for any additional device
drivers or the need for any extra cryptic figuration and the PCI bus connec-
include statements in the compilation tor pin assignments in 5 V and 3.3 V Supplier reference:
process. The programming process is similar systems. Kolter Electronic,
to ANSI-C running in DOS but instead of only (010009-1) PO Box 1127,
an 8-bit wide data access you can also use 16 D-50362 Erftstadt,
or 32 bit. To actually move data through the Germany.
ports, instructions such as Tel. (+49) 2235 76707,
outb(value,address) and Suggested literature: Fax (+49) 2235 72048.
inb(address) are contained in the directory PCI Bus Demystified, by Doug Abbott,
/usr/include/asm/io.h. These routines are all LLH Technology Publishing, ISBN 1-
inline macros so it is only necessary to 878707-54-x.
#include<asm/io.h>. No additional
libraries are required. Compilation of the pro-
gram can be performed with XWPE under
KDE or with gcc from the Linux ‘bash’ shell.
Other compilers can also be used to compile
the code and they generally seem to suffer
fewer problems than when under other oper- Web Links
ating systems. Extensive information on the Links for the PCI prototyping card and PCI decoder:
use of the Linux operating system is available
http://www.pci-card.com/pcintern.htm
as a download from the Elektor Electronics http://www.pci-card.com/neuep.htm#proto3
website. http://www.pci-card.com/Prototim.pdf
http://www.pci-card.com/pcideko.pdf
Data transfer, timing and http://www.pci-card.com/pcideko.html
addressing http://www.pci-card.com/pciversion.html
http://www.pci-card.com/pciboards.html
The second instalment of this article will http://www.pci-card.com/Hwt.zip
explore in detail the high speed data trans- http://www.pci-card.com/pci_pins.htm
fer, timing and addressing of the PCI bus http://www.pci-card.com/pro3pci.zip
architecture, it will also look at the BIOS con-