Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need advice on building a PCI card

Status
Not open for further replies.

chiptoxic

Newbie level 3
Newbie level 3
Joined
Nov 17, 2005
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,412
pci board

Hi all

I really want to learn how to interface to the PCI bus and am trying to collect information on how to go about designing and building a simple card. What I'm aiming for at first is a very simple I/O card that can do something like control some leds and maybe read some ttl input pins. It would be great if i can build this using simple ttl logic and PIC micro as main controller as i have this stuff laying around at home.

* I'm going to be developing under linux
* will probably use C to write a simple driver
* Need to build as cheap as possible (don't really have the cash at the moment to go out and buy fpga development kits and such)
* most likely i will keep to 33MHz/32-bit card as this should make things a little more simple (think 33MHz slowest i can go??)
* really want to have the card follow the specs so OS will detect and use this card just like any standard card

After seeing the project at http://elm-chan.org/works/pci/report_e.html I'm sure i can get something simple working even if its does make normal PCI card designers want to shoot me.


Some questions i have:
======================
1) Does anyone know if its possible to build a simple PCI card using for example a PIC microcontroler and/or simple TTl logic. Hhow basic can a pci card be made. Will i need to use something like a FPGA?

2) If i have to use a FPGA or simaler device. Does anyone have any suggestions on cheap products. Ideal solution would be for me to buy a fpga and find a free open source software package to design logic with and beable to build a cheap programmer (JTAG interface?). I have thought about getting something like this High Volume Starter Kit Bundle (HW-SPAR3-CPLD-DK) Xilinx Development Boards from
**broken link removed**. to playwith in the past so something like this may be worth me investing in.

3) I have managed to get hold of the "PCI local bus spec 2.2 and 2.3". Is there any other documents i should try and get my hands on to help me design this system. The PCI-SIG site lists lots of diffrent specs such as
* Conventional PCI 2.2
* Mini PCI
* PCI to PCI Bridge Architecture
* PCI Hot Plug Specifications
* PCI Bus Power Management Interface 1.2
* PCI Mobile Design Guide 1.1
* PCI Firmware 3.0
so whats the bare minimum documentation i should have/will need.

4) Anyone know of any good examples of people doing/done a simular project. (Most projects i have seem give almost no information how they actuly did it). If it looks like i will possible for me build a PCI card i think ill also buy the book "PCI Bus Demystified" as it seems cheap and it gives one possible design application developing an interface card for controlling a robot from a PC from the reviews i have read.

6)If i cant create a spec compliant card and use hacks such as setting card address using switches. How can i read/write to my card and make sure im using the correct address etc. Will system show a card at that adderess just with no vendor id information etc.

I cant seem to find any good programming tutorials / info so looks like ill have to just diveinto the lspci/setpci tools code and the linux kernel. No idea but i may beable to access data via /dev/mem. If i find a way of getting port address guess i can use inp() and outp() too

Any help/advice, any of you could give me would be greatly apriatiated. As this will be alot harder than the old ISA ports. I now have lots of reading todo with the matirial i have found so far.

If anyone is intrested i have posted a page on my site with all the resources i have found so far. See **broken link removed**
 

developing own pci card

Hi chiptoxic,

From my experience of developing a Xilinx (TM) LogiCORE (TM) PCI compatible PCI IP core, I will say that the documentation you need for the hardware logic design part of PCI design is the PCI Specification. (Rev. 2.2 is new enough.)
I don't recommend buying PCI System Architecture or PCI Hardware and Software because all those books do is trying to explain the how the bus works, but don't go into how one implement a PCI interface.
I don't recommend trying to learn PCI bus (I have tried that, but I got discouraged.), instead try to learn PCI bus through implementing a PCI interface.
Assuming that this is a personal project, using BDS XPCI PCI IP core might help you at least with the PCI interface part of the design.
BDS XPCI PCI IP core is a Xilinx (TM) LogiCORE (TM) PCI compatible (replacement) PCI IP core.
32-bit version BDS XPCI32 PCI IP core is available for as little as $100 for non-commercial, non-profit, personal use, and the same 64-bit version BDS XPCI64 PCI IP core (Includes BDS XPCI32 PCI IP core) goes for $200.
Since the pricing starts at only $100, it is ideal for HDL learners, FPGA beginners, FPGA hobbyists, computer hardware enthusiasts, or student graduation projects.
BDS XPCI PCI IP core comes with a PCI testbench for Verilog HDL which allows the user to simulate the design extensively on several HDL simulators before firing up the FPGA.
BDS XPCI PCI IP core fully supports free Xilinx ISE WebPACK design software (http://www.xilinx.com/ise/logic_design_prod/webpack.htm).
For an HDL simulator, ModelSim including ModelSim XE is supported by BDS XPCI PCI IP core, and the next release of BDS XPCI PCI IP core will support a $50 Verilog HDL simulator called Veritak by Sugawara Systems (http://www.sugawara-systems.com) as a low cost alternative to ModelSim XE.
VHDL support is currently poor, but VHDL porting of reference designs and PCI testbench should be available in December.
BDS XPCI PCI IP core officially supports the following PCI boards.

- Insight Electronics Spartan-II 150 PCI (Already discontinued)

- Insight Electronics Spartan-II 200 PCI Development Kit
**broken link removed**


BDS XPCI PCI IP core "unofficially" supports the following PCI boards.

- Avnet Xilinx Spartan-3 Evaluation Kit
http://www.em.avnet.com/evk/home/0,...8806%26PVW%3D%26BID%3DDF2%26CTP%3DEVK,00.html
http://www.em.avnet.com/ctf_shared/evk/df2df2usa/Xilinx Spartan-3 Evaluation Kit - Brief 022504F.pdf

- Enterpoint Raggedstone1 Spartan-3 FPGA Development Board
http://www.enterpoint.co.uk/moelbryn/raggedstone1.html

- Enterpoint MINI-CAN Development Board
http://www.enterpoint.co.uk/moelbryn/minican.html

- Enterpoint Broaddown2 Development Board
http://www.enterpoint.co.uk/moelbryn/broaddown2.html


BDS XPCI PCI IP core currently supports Spartan-II and Virtex-E, and will support Spartan-IIE and Spartan-3 (ISE 7.1i is not supported for Spartan-3. Must use ISE 6.xi for Spartan-3 instead.) in the next release.
So with BDS XPCI PCI IP core, almost anyone can make their own PCI device for about $475 to $575. ($300 to $400 for the board + $25 for a JTAG cable + $100 for BDS XPCI32 PCI IP core + $0 for ISE WebPACK + $50 for Veritak.)
For commercial users who want to modify a Xilinx LogiCORE PCI or want to convert a design that uses Xilinx LogiCORE PCI to an ASIC (FPGA to ASIC conversion), BDS XPCI PCI IP core is also available in Verilog HDL RTL.
For more information, visit Brace Design Solutions website at http://www.bracedesignsolutions.com.


Kevin Brace


chiptoxic said:
Hi all

I really want to learn how to interface to the PCI bus and am trying to collect information on how to go about designing and building a simple card. What I'm aiming for at first is a very simple I/O card that can do something like control some leds and maybe read some ttl input pins. It would be great if i can build this using simple ttl logic and PIC micro as main controller as i have this stuff laying around at home.

* I'm going to be developing under linux
* will probably use C to write a simple driver
* Need to build as cheap as possible (don't really have the cash at the moment to go out and buy fpga development kits and such)
* most likely i will keep to 33MHz/32-bit card as this should make things a little more simple (think 33MHz slowest i can go??)
* really want to have the card follow the specs so OS will detect and use this card just like any standard card

After seeing the project at h**p://elm-chan.org/works/pci/report_e.html I'm sure i can get something simple working even if its does make normal PCI card designers want to shoot me.


Some questions i have:
======================
1) Does anyone know if its possible to build a simple PCI card using for example a PIC microcontroler and/or simple TTl logic. Hhow basic can a pci card be made. Will i need to use something like a FPGA?

2) If i have to use a FPGA or simaler device. Does anyone have any suggestions on cheap products. Ideal solution would be for me to buy a fpga and find a free open source software package to design logic with and beable to build a cheap programmer (JTAG interface?). I have thought about getting something like this High Volume Starter Kit Bundle (HW-SPAR3-CPLD-DK) Xilinx Development Boards from
h**p://www.xilinx.com/xlnx/xebiz/designResources/ip_product_details.jsp?key=DO-SPAR3-DK. to playwith in the past so something like this may be worth me investing in.

3) I have managed to get hold of the "PCI local bus spec 2.2 and 2.3". Is there any other documents i should try and get my hands on to help me design this system. The PCI-SIG site lists lots of diffrent specs such as
* Conventional PCI 2.2
* Mini PCI
* PCI to PCI Bridge Architecture
* PCI Hot Plug Specifications
* PCI Bus Power Management Interface 1.2
* PCI Mobile Design Guide 1.1
* PCI Firmware 3.0
so whats the bare minimum documentation i should have/will need.

4) Anyone know of any good examples of people doing/done a simular project. (Most projects i have seem give almost no information how they actuly did it). If it looks like i will possible for me build a PCI card i think ill also buy the book "PCI Bus Demystified" as it seems cheap and it gives one possible design application developing an interface card for controlling a robot from a PC from the reviews i have read.

6)If i cant create a spec compliant card and use hacks such as setting card address using switches. How can i read/write to my card and make sure im using the correct address etc. Will system show a card at that adderess just with no vendor id information etc.

I cant seem to find any good programming tutorials / info so looks like ill have to just diveinto the lspci/setpci tools code and the linux kernel. No idea but i may beable to access data via /dev/mem. If i find a way of getting port address guess i can use inp() and outp() too

Any help/advice, any of you could give me would be greatly apriatiated. As this will be alot harder than the old ISA ports. I now have lots of reading todo with the matirial i have found so far.

If anyone is intrested i have posted a page on my site with all the resources i have found so far. See h**p://chiptoxic.geekcoalition.co.uk/index.php?q=pci

--


Brace Design Solutions
Xilinx (TM) LogiCORE (TM) PCI compatible BDS XPCI PCI IP core available for as little as $100 for non-commercial, non-profit, personal use.
http://www.bracedesignsolutions.com

Xilinx and LogiCORE are registered trademarks of Xilinx, Inc.
 

    chiptoxic

    Points: 2
    Helpful Answer Positive Rating
pci card + prototype

Thanks for your reply/advice, i have not had a chance to fully read in detail all the information/links you supplied but from what i have had a chance to look at so far it seems like it will help me. I will defently be reading up more on the BDS XPCI PCI IP core over the next few days when i get more time as well as the xilinx tools/kits in general.

You are right this is a personal project and thats one of the reasons i need to keep the cost down. Im trying to make a PCI card firstly to see if i can, the cool factor and the fact i have always wanted to try and build one.

The good thing is it looks like i will be able to build a working card as long as i put in enought time and effort in. The only thing thats worries me abit is the cost to actualy build this thing. You say a ruff cost of $475 to $575 to build a PCI device, $300 to $400 being for the board. What do you mean by board. Is that a development board or you mean for me to get my PCI pcb design eched, componets mounted on board etc as I will probely build the PCI card either on a prototypeing board or more likly etch my own board at home and mount all the i/o headers fpga etc myself. Im not aiming for a professionl quality board just a basic card that works and that i could later maybe use with hobbyist robotic projects or something simular.

Also im going to be looking more closely at what the open graphics project is doing **broken link removed**.
I also belive they are using xilinx fpga for there project.
 

+developing a pci card hobbyist

Hi chiptoxic,

What I mean by "the board" is the cost of purchasing an FPGA-based PCI prototype board.
For example, Insight Electronics Spartan-II 200 PCI Development Kit costs $250 for the card itself, and $275 with a parallel port JTAG cable.
Avnet Xilinx Spartan-3 Evaluation Kit costs $399.
Enterpoint Raggedstone1 Spartan-3 FPGA Development Board seems to be the cheapest one, costing around $90, but the shipping cost seems to be pretty high.
I guess the I personally prefer purchasing a finished PCI prototype board because I can be pretty certain that the hardware portion is solid, and that way, I am less likely to have electrical problems.
Perhaps, testing out a PCI prototype board before developing your own might make your goal of developing your own PCI card easier.


Kevin Brace


chiptoxic said:
Thanks for your reply/advice, i have not had a chance to fully read in detail all the information/links you supplied but from what i have had a chance to look at so far it seems like it will help me. I will defently be reading up more on the BDS XPCI PCI IP core over the next few days when i get more time as well as the xilinx tools/kits in general.

You are right this is a personal project and thats one of the reasons i need to keep the cost down. Im trying to make a PCI card firstly to see if i can, the cool factor and the fact i have always wanted to try and build one.

The good thing is it looks like i will be able to build a working card as long as i put in enought time and effort in. The only thing thats worries me abit is the cost to actualy build this thing. You say a ruff cost of $475 to $575 to build a PCI device, $300 to $400 being for the board. What do you mean by board. Is that a development board or you mean for me to get my PCI pcb design eched, componets mounted on board etc as I will probely build the PCI card either on a prototypeing board or more likly etch my own board at home and mount all the i/o headers fpga etc myself. Im not aiming for a professionl quality board just a basic card that works and that i could later maybe use with hobbyist robotic projects or something simular.

Also im going to be looking more closely at what the open graphics project is doing h**p://wiki.duskglow.com/index.php/Open-Graphics.
I also belive they are using xilinx fpga for there project.


-

Brace Design Solutions
Xilinx (TM) LogiCORE (TM) PCI compatible BDS XPCI PCI IP core available for as little as $100 for non-commercial, non-profit, personal use.
https://www.bracedesignsolutions.com

Xilinx and LogiCORE are registered trademarks of Xilinx, Inc.
 

developing a pci card hobbyist

Thanks for your reply, i guessed you meant a development board. Also spending more time reading the specs and other information it does look like you are right about it being easier to develop using a purchased PCI prototype board. As from the looks of things i cant buy a part in a package that i can hand solder or find a converter/socket that the chip could just drop into and allow me to solder. (If I'm wrong here please tell me)

Guess in the future i can either get someone else to produce a board for me or look into something like the toaster oven reflow soldering technique (sounds and look cool). Due to costs it looks like Raggedstone1 Spartan-3 FPGA Development Board will be my best bet. But if the open graphics card allows me to experiment with PCI design which i believe it does i may go that route instead (still researching).

I think for now ill spend my time learning how to:
* write a linux PCI driver/tools
* getting to know Verilog and other related software better (only used fpga's briefly this year in my college electronics course i just finished this year)
* making sure i understand the PCI specs / electrical specs
* looking into the stuff at www.opencores.org

This means i still get to learn alot about the whole PCI architecture and will not cost me anything just lots of time and effort. Then a few months down the line i can go out and buy what i need to construct my own board or a prototype to test my designs on. Any way thanks for all your help so far its been a great help. I have only been working on this in my spare time but cant believe how much I'm learning already even if i fail to build a board this project will have been worth wild.
 

designing a logicore pci system

Look there :


and may be this one is built based on above.
**broken link removed**
 

    chiptoxic

    Points: 2
    Helpful Answer Positive Rating
ispmach isa

I started working with PCI developement, hw+sw for embedded systems some time ago and the spec is rather hard to read from the beginning. The book "PCI bus demystified" was much easier to understand and did give a great overview, then the spec can be used just as a ref.

I also found some document "PCI programming under linux (pcip).pdf" that migh be of help. search on google...

After some time I concluded that it was almos impossible to work with the bus without a logical analyzer, in the end I did get one from https://www.pctestinstruments.com/ that worked for me, great functionality for that price.

There is an article in the latest number of circuicellar that did some small project with the PCI bus. Migh be something to check...

regards Me
 

    chiptoxic

    Points: 2
    Helpful Answer Positive Rating
simple pci prototype

Thanks for your reply i finally found that pdf here
**broken link removed**
and it looks useful. that link also has lots of other useful documentation and not just for the PCI bus so I'm glad you got me to search for it.

I'm currently reading the book "Linux Device Drivers, Third Edition" which is a really nice book from what i have read so far. I have the "PCI bus demystified" book and it does make things abit simpler to understand. Also I'm teaching myself verilog now which i quite like.

Thanks to all the help people have given me i believe i have all the information i need to allow me to design a PCI card now it will just take time. But it does looks like ill have to use a existing PCI prototype board. Because as a hobbyist/amateur i cant see how i can build my own board when fpga's such as the spartan 3 for example come in such small packages that i cant hand solder them. Its the only real thing ill have to look into further as i believe any other questions i have i can solve myself by reading through all the material i have gathered so far.

I hope i can do without tools like a logic analyser, but if not I'm sure my tutor from the college course i just completed this year will be happy to let me come in and use their equipment. They may even find this project intresting themselves.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top