A question about PCI

The last time I designed a board to fit into a PC was in the early

1980s, and it used the original 8-bit ISA bus. Now we're looking at designing a board for the conventional PCI bus.

If we go ahead and do the product, we will buy the official standards documents from PCI-SIG, but for the moment I'm hoping somebody here might be able to answer one question.

I am looking to combine the functionality of two PCI bus boards onto one physical PCI board. This would allow us to reduce board cost, and change the embedded PC from a normal motherboard which must be changed frequently to a long-life embedded form factor like Mini-ITX, which has only one PCI slot.

It would be a plus if the new board could be made transparent to the OS, drivers, and application running on the embedded PC.

So what I really want to know is if it is possible to have a physical PCI board with the appropriate logic respond as two different boards. In other words, can I make a PCI board with a serial and a parallel section, that appears to the processor as though it were two separate boards, depending on which section the processor accesses at any give time?

I know this would have been simple to do on an ISA board, does anyone know if it's possible for PCI?

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
Reply to
Jack Klein
Loading thread data ...

As far as I know the only pins specific to each individual pci slot are the IRQ lines. All the rest are shared. There are 4 IRQ lines in each slot. Those may be shared with IRQ lines in other slots. But I think IRQ routing would be the only issue you need to deal with. This would be if you wanted 2 independent pci devices to share one physical slot. I'd have to study to know whether this is feasable.

A better approach would be to have one pci device have multiple functions. Each would be completely independent, with their own address ranges + pci configuration spaces. PCI was designed for this sort of thing.

During bootup the BIOS or equivalent configures all the pci cards and devices and functions, and allocates regions for memory and io as required.

You can find all you need to know about PCI for free on the internet, google is your friend.

-Dave

--
David Ashley                http://www.xdr.com/dash
Embedded linux, device drivers, system architecture
Reply to
David Ashley

That's what PCI-PCI bridges are for. One PCI bus to the PC, one or more busses to the devices. The BIOS should initialize the bridge properly, unless the PC is _very_ old.

Mit freundlichen Grüßen

Frank-Christian Krügel

Reply to
Frank-Christian Kruegel

The most important rule up front here is that your board may only present one load to the external PCI-Bus (i.e. the PCI-signals from the connector can only be led to one component on the board)

After that there are two typical solutions:

1) A PCI-Bridge at the connector side. Multiple pci devices on the board-internal PCI bus.

2) PCI also supports the concept of multi-function devices (up to 8 sub-functions). As far as I remember there was a SCSI/Ethernet board available years ago which was built this way. I haven't seen it used a lot recently though. This might however be the way to go if you are porting low-bandwidth legacy hardware etc. You could probably use something like one of the I/O accelerators von PLX

formatting link
to interface to PCI and connect your legacy hardware to the local-bus side. You may well need some microcontroller / FPGA solution on the local-bus side as well.

From the software/firmware side, your board can support up to six distinct memory blocks in system PCI memory space.

Hope this was of some help.

Best of luck with your project, Charles

Reply to
Charles, NG

Multiple (sub) functions for PCI devices are actually quite common, especially on things like motherboard chipsets and support devices.

PCI devices are addressed with a sixteen bit number, consisting of an eight bit bus number, a five bit slot number and a three bit function number.

Note that *each* function gets its own set of BARs. Other than having to share access to the four interrupt pins, multiple functions on a single board are almost completely independent of one another.

For some devices, especially where you want to put several single-chip PCI solutions on a single card (for example, several Ethernet chips), the bridge approach is quite common.

In most cases firmware and OS's make little distinction in handling devices with different/same bus, slot and function numbers. The basic process is to step through all the possible device address (bus/slot/function), looking to see if a device exists there. There are a couple of shortcuts to speed that up (non-existent busses can be detected, a multi-function device must always implement function zero), and eliminate the need to check all 65536 possible devices.

That being said, I've seen broken firmware that refused to enumerate any functions other than zero, and firmware that did not support setting up bridges. Thankfully both are rare.

Reply to
robertwessel2

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.