Ask HN: Has anyone here ever built their own PCI device?

13 points by non-entity ↗ HN
I thought it'd be a kinda cool project to do so, even if it's just something super simple like an echo device, but from my understanding many microcontrollers aren't fast enough to support a PCI bus and the general advice I've found is to use an FPGA (unfortunately, which I have zero understanding of at the time). FPGA dev boards seem to be relatively expensive, except cheaper chinese ones which seem to run a little over $100.

Has anyone done this before. Did you write about it? What sort of hardware did you use?

10 comments

[ 2.8 ms ] story [ 35.4 ms ] thread
I don't have direct experience, but I work in video production and have researched building an SDI capture device that would use an FPGA on a PCI card.

There's a lot here: - VHDL for the FPGA - DSP algorithm - A driver for the OS you are building for - Scopes and measurement devices for the hardware bits

If you tried to do it yourself you'd spend more money and have a bad time. I'd recommend getting an FPGA dev board and start there.

IIRC the Blackmagic Design Intensity Pro [4K] is exactly what you describe here. I remember seeing a picture of one somewhere with a Xilinx FPGA under the heatsink fan.
I haven't had experience with PCI but yes with FPGA, even though at a hobby level.

Learning digital design was extremely rewarding for me and I absolutely recommend it.

The main reason for FPGA is that you use A LOT of parallel communication so even though the clock speed of the FPGA might be 200MHz, multiply that for 16, 32 or more lines and you get GBit speeds.

You can get affordable FPGA boards for learning with Lattice iCE40 family. When you jump into Altera or Xilinx things change a little, but you can still get a VERY decent development board from Terasic for a little over $100.

For learning I personally recommend the book "Digital Design and Computer Architecture" by Harris & Harris

Even if you don't become a full FPGA pro, knowing your computer down to a logic gate level brings huge advantages to how you see it, interact with it and write software for it!

Upvote for the iCE40. Last i heard it's one of the only devices to have a fully open source toolchain. I had a good experience learning on altera, and they had a pretty comprehensive dev environment, but my impression is that every aspect of their "university program" is ultimately geared towards extracting money from people in exchange for use of ip cores regardless of whether it's really appropriate for the users needs. That being said, i can vouch for cheap terasic boards. I might reccommend buying a sub $50 altera board to get over the initial learning curve, and then expanding into less commercially oriented stuff for more complex projects.

Edit: the iCE40 is a popular choice at CERN, and you should be able to find materials geared towards young physics grad students and other fpga non-experts.

I did it once at a startup I was working for. I used a Xilinx FPGA and did my own PCB design. I designed my own PCI state machine in VHDL.

Surely, if you look around enough you can find some kind of a development board at a reasonable cost.

I have some tangential experience, I was a software engineer on a project that had an FPGA based PCIe card. You can do some cool stuff, but development can be very frustrating. PCIe enumeration happens early in startup. Until things are basically working, you have to have a computer that you are ok restarting every few minutes. A test cycle is like: flash image, restart computer, try to determine why it failed.
People in Blind are sharing their experiences about building their own PCI devices.
Check out Fomu? https://tomu.im

It’s cheaper and tiny, not sure if powerful enough for what you’re looking at.