I'm following viewtopic.php?f=19&t=2657 (http://dangerousprototypes.com/forum/viewtopic.php?f=19&t=2657) thread with envy for a while now as I remember how easy was to develop ISA cards back in the day. It gets even simpler nowdays with fast and cheap devices (cpld/fpga/mcu's), but unfortunately getting hold of a ISA port on a computer is getting harder and harder. My last computer where I used some (E)ISA cards I worked with was some old VLB pentium1 board that died year ago ..
So to the point... I'm interested in some PCI or PCI-E (x1) dev tools. I seen some online but they go from 1000US$ and up, are packed up with stuff and are mostly unusable as a "blank slate dev tool".
I have no clue on how exactly PCI/PCI-E works. (e)isa was simple... Is there a "BLINK LED" example for pci-e x1 somewhere that could be then expanded to a "blank slate" dev tool. With "blank slate" I mean something that would have the connector on (to plug into MB) and only devices necessary to "work the" protocol. So that the rest of the board is "empty" for the test project.
I have seen a few dev kits with the newer Spartan (6?) PGAs that have PCIEx built in.
I would actually like to go the other way :) A simple education "PC" like an XT or similar, with a simple bus (ISA?) for learning about computers and hacking. I learned so much working on the XTIDE CPLD board. DOS compat would open op a ton of apps, but even a PIC 32 running BSD/unix would be fun :)
KNJN (http://http://www.knjn.com/ShopBoards_PCI.html) have some cheaper FPGA dev boards with PCI and PCI-E.
From the software side of tinges PCI and PCI-E are basically the same.
A quick google search showed up with an complete ebook about PCI-E (http://http://www.mindshare.com/files/ebooks/PCI%20Express%20System%20Architecture.pdf)
here (http://http://www.lisha.ufsc.br/teaching/ish/busses/pci/) are some more ebooks on PCI.
And even modern PC's still have a form of ISA bus inside them, its the LPC (http://http://en.wikipedia.org/wiki/Low_Pin_Count) bus now and is software compatible with ISA.
If you have an FPGA you can hook it op onto an TPM (http://http://en.wikipedia.org/wiki/Trusted_Platform_Module) header with carry the LPC signals and make an real ISA slot on the other side.
thx for dragon link, I haven't found anything as cheap as this but 300$ is still big on a heavy side for a pcb+fpga on board :( for pci and 600$ for pci-e ... I mean, if it will take me 600$ to make a pci-e card (custom one), there's really no use for it, I'll hack a laptop and attach my electronics directly on a main bus, it's cheaper ..
as for the LPC I'm seriously thinking of trying to use it with some alix boards I have ...
wrt TPM - I never heard about it, I will have to read a little bit about it .. but this might be the cheap replacement solution I was looking for
[quote author="ian"], but even a PIC 32 running BSD/unix would be fun :)[/quote]
ironic you should mention this. . .http://http://dangerousprototypes.com/forum/viewtopic.php?f=2&t=2683 (although I'm sure you've already seen it)!
[quote author="ian"]I have seen a few dev kits with the newer Spartan (6?) PGAs that have PCIEx built in.[/quote]
yes just they are all too expensive to be useful :(
[quote author="ian"]I would actually like to go the other way :) A simple education "PC" like an XT or similar, with a simple bus (ISA?) for learning about computers and hacking.[/quote]
I built more then one 8bit computer from scratch, not to mention one of them had cpu made in discreet components :D .. it's interesting learning experience but not very useful project :).
What would be useful is creating a whole XT board inside a fpga chip. That would be doable (for someone that knows fpga way better then me) ... 1M of address space, i8088, few peripherals, ide controller, hercules display .. should fit even a low end fpga like spartan 3 imho.. Now that would be a project one could learn a great deal on. Then you make it boot from CF card and run freedos :D, then you upgrade to 80286 and 2M of ram :)
It would be a super interesting project imho (I know there's amiga 500 fpga version (http://http://en.wikipedia.org/wiki/Minimig) out there, and guy reverse engineered almost everything as no real data existed for some things, XT is 100% cracked so I do not believe there is a piece where we are unsure how it works).
[quote author="ian"] PIC 32 running BSD/unix would be fun :)[/quote]
there's bunch of dev boards running linux out there .. not sure what is the actual "interesting" part with them. They do work, development is pure unix programming, not much is required in terms of electronics .. being (among other things) a developer by vocation I hate to do that as my hobby too :D
Off topic now, but related to your last post... I looked for 8088 and 8086 FPGA cores. Here's some links:
On Spartan2:
http://www.youtube.com/watch?v=v072CTgciOY (http://www.youtube.com/watch?v=v072CTgciOY)
Wiki list of soft processors:
http://en.wikipedia.org/wiki/Soft_microprocessor (http://en.wikipedia.org/wiki/Soft_microprocessor)
This appears to be a FPGA board performing backup functions for a read 8088:
http://www.jrok.com/ (http://www.jrok.com/)
http://www.jrok.com/xfer/msf/ (http://www.jrok.com/xfer/msf/)
Pac-man with 8088 core:
http://en.pudn.com/downloads105/doc/pro ... 75_en.html (http://en.pudn.com/downloads105/doc/project/detail431075_en.html)
A few various processors:
http://klabs.org/richcontent/software_content/ip/ip.htm (http://klabs.org/richcontent/software_content/ip/ip.htm)
Complete 8088 under GPL (jackpot!):
http://www.ht-lab.com/freecores/cpu8086/cpu86.html (http://www.ht-lab.com/freecores/cpu8086/cpu86.html)
Zet processor can boot dos, freedos, windows, etc:
http://zet.aluzina.org/index.php/Zet_processor (http://zet.aluzina.org/index.php/Zet_processor)
i have access to some Intel doc books for their early processors and support chips, if this is a project that picks up speed ill see if i can get them on an extended loan.
cool bunch of links :) I'll surely check out "8086 ip in vhdl" .. might be a best source to learn vhdl from :D
zet looks like maybe even better platform to start a project like this from :) .. anyhow attm running already 3 things in the same time so first I'll concentrate on LPC and alix board .. that might solve more issues then I hope it to solve :D
Just to keep you from getting any planned work done I found a project that does what you asks
http://http://xillybus.com/
looks linteresting. The only issue I see with it is a
The licensing fee for a base level core is 50,000 USD. Each additional FIFO or memory interface interface adds 10,000 USD to the licensing fee.
Argh. The forum ate my reply twice. DO NEVER USE QUICK REPLY, IT WILL BITE YOU.
Speaking with my x86 firmware developer (coreboot) hat on, here are a few comments:
LPC may be software compatible with ISA, but it's totally different on the bus and you have to build a huge state machine for it. Take a look at http://ww1.microchip.com/downloads/en/D ... S71235.pdf (http://ww1.microchip.com/downloads/en/DeviceDoc/S71235.pdf) Table 5 LPC Read Cycle to see how complicated it is.
PCIe is a serial protocol with a 2.5 GHz symbol rate per line, and I doubt you really can handle that in cheap programmable logic.
PCI is electrically pretty simple (almost as simple as ISA), has reasonable frequencies and people regularly use it with CPLDs (see most $5 PCI POST diagnostic cards on ebay).
If you really want to handle PCIe (whichever form factor you want, e.g. ExpressCard), use a cheap PCIe/PCI bridge chip, and then attach your logic to the PCI side.
I fully agree with biosflasher.
However, if you've got your heart set on PCIe, you might be able to swing something with a 2.5Gbps to 32-bit XGMII transceiver. You'd still need an fpga I suspect, since you'd have to implement a PCIe core to handle the 8b/10b encoding, retries, error handling, etc...
-- IED
I'm definitely not going to use pci-e as 2.5 GHz require more layers and better design software then I can handle because at those speeds you need to tie signal to the traces, you need to be sure to watch out for trace length etc etc ... too much hassle really for what I want (I want to be able to for e.g. make a card with for e.g. 10 LPT ports or for e.g. 100 IO pins directly addressable by kernel .. but looks like PCI is better way to do it and interpreters linked via usb even more universal .
As has been said a few times earlier, PCI-E is not too easy to interface with. And yes, you do need to keep the timings correct for routing all the differential pairs in the bus.
Can you make or use a surface mount board? If so, then you might be be able to use eagle to make a pcb with a Xilinx chip with an embedded PCI-E core. You would have to route the traces carefully keeping track of the length manually, this is definitely not a job for the auto router. Once you get the traces from PCIE to the FPGA and properly decouple the power pins for the FPGA, as well as do a proper ground connection, the rest should not be that difficult, hardware wise.
Doing the software for PCIE I have not the faintest idea how to do. Xilinx does have app notes for connecting to PCIE for sure. FPGA's are not THAT complicated, none come in DIP though, but you would have to use SMD for this type of project anyways, so it is inevitable that SMD will be used. I know that PCIE is much much faster than PCI, but I am presuming that they otherwise are not much different, so feel free to substitute PCI/PCIE in my post.
If you ever get around to implementing such a PCI device (could be a Cardbus device as well), I offer to help with my PCI knowledge (and if you have to look at the spec directly, I can point you in the right direction to get it for free).
A PCI device would be so much more awesome (and ~1000x lower latency) than USB.
i would like to see a simple pci card with flash and ram plus an gpio connector maybe a db25. i have an interest in supplementation of the CPU with a soft processor.
The major thing I would like this cards for is GPIO. For e.g. I do a lot of embedded designs with mcu's and some of the tasks are fairly complex so boards end up costing over 100eur. For 100eur I can get a PC board with amd geode running on 800MHz bunch of ram and CF card running linux (or windows or whatever you want). problem is this boards have ethernet and usb, there's i2c interface and that's it (I think they have LPC will have to check). So I end up making stuff where I have alix board and to alix board is connected a GPIO board via USB, and that's SLOW as you can imagine, but far from it being slow, it is not real time. I can't know for sure the timing on the GPIO board. That is something that USB cannot provide. Now I handle that problem by implementing a small interpretter on GPIO board that receives packages of commands via USB and then executes them but then everything get's increasingly complicated so then it's simpler to scrap the pc board and implement full logic on the gpio board using some stronger mcu ... Now if I had a GPIO card (minipci for e.g.) that I could access directly from kernel (like LPT for e.g.) that would solve a lot of hassle, but there's no point if that gpio card cost 100eur as it is just not worth it ..
example use - EMC2 application that drives a CNC machine. You really need tight timing there. The throughput is not high, you don't send more then few kHz trough step lines but the problem is that latency need to be as low as possible, as you are controlling 20 steppers in the same time for e.g. and they all need to move in sync. Attm EMC2 works great trough LPT ports, problem is that often you don't have LPT port at all on your computer and you sometimes need more pins then LPT ports you have on board. It is just one example for that type of GPIO card ... imagine all types of acquisition cards you could make based on that card (logic analyzer, scope ..)
access to the interrupts on the pci bus would be a huge help.
Rather than interfacing directly with the PCI bus, it would be easier to use the chips designed for PCI LPT port cards. I've got a 2 LPT + 2 RS232 card that only uses a half-dozen chips, and I think most of the PCI to LPT is done on the single large chip.
This is assuming the chips are available without huge purchases.
[quote author="blarson"]I think most of the PCI to LPT is done on the single large chip.[/quote]
I seen some of those cards but I was unable to find any info on the chips on board :( ...
worse of all, i was unable to find a "few lpt ports on a card" boards in minipci format :(
There are dozens of cheap PCI POST cards out there, and they handle all of PCI (well, the parts which matter) in a single cheap CPLD. Why deal with a slow PCI->LPT->5V-microcontroller design with hard to source PCI->LPT chips if you can have full speed PCI with a pure CPLD (or CPLD with microcontroller) solution. You could even make the CPLD design act like LPT from a software POV.
Side note: Some PCI POST cards handle a useful subset of PCI and a bunch of LEDs with a total of 3 PALs and no other logic. A nice CPLD should really be able to handle PCI in a totally conformant way.
any links to some sources?
[quote author="arhi"]any links to some sources?[/quote]
i've always heard about open cores (never been the site before now) - this might be something worth looking at: http://http://opencores.org/project,pcie_mini. Looks like you'll have to create an account to download anything. . .again, never used open cores - was just curious:)
looks like there's a spartan 6 in a leaded package as well http://http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=122-1745-ND - didn't look into the details
wow spartan 6 with legs :D that's a nice find :)
I'll check opencores, I should have user there
[quote author="arhi"]wow spartan 6 with legs :D that's a nice find :)[/quote]
DigiKey parametric search is your friend ;-) . . . it's even in stock - I assume you normally don't source through them, though; at least you have a pn and know that this rare breed does exist
I'll be curious to hear about what open cores has to offer, if you look into it more deeply.
I will not try it out for few weeks for sure ... but as soon as I get some free time :)
I've got some on a dev-board here.I'm game to make a prototype if there are testers ;)
it's not a small work, you need to prepare a pci-e capable motherboard for easy access to the pci-e slot, you need to write some software to talk to pci-e port and eventually your card too .. it's not going to be easy one to test :( ... I'm prepared to start testing that all as soon as I get my head out of this mess I'm in attm (capable of doing only very small projects during breaks .. nothing major like pci-e attm :( )
Indeed, the testing is always the hard part :) That's why I asked if you wanted to do it ;)
Maybe we should agree on a feature list, interface (PCI/PCIe) form factor (MiniPCI/PCCard?) and chips (CPLD/FPGA/microcontroller) before we start building something?
Features I'd like to see:
- Lots of fast (33+ MHz) GPIOs
- 33 MHz SPI master+slave capability (some GPIOs could be used for that)
- 33 MHz LPC master+slave capability (may need more logic than a small CPLD can handle, maybe some microcontroller can help out)
- Optional software compatibility with a standard LPT (from a driver POV)
Admittedly that is a feature set which is centered on my flashrom/coreboot needs and would result in a really fast Bus Pirate replacement.
By the way, if we decide to go for the CardBus/PCCard route, there is an adaptor for modern laptop ExpressCard slots: http://www.ebay.com/itm/NEW-EXPRESS-CAR ... 0636487790 (http://www.ebay.com/itm/NEW-EXPRESS-CARD-TO-PCMCIA-CARDBUS-CARD-VISTA-WINDOWS-7-/160636487790) (untested, should work) and an adaptor for normal PCI slots: http://www.ebay.com/itm/PCI-PCMCIA-Adap ... 0570761035 (http://www.ebay.com/itm/PCI-PCMCIA-Adapter-Cardbus-Controller-PC-Card-/280570761035) (untested, should work)
arhi: I think I found the single-chip CPLD based MiniPCI POST card I mentioned earlier: http://www.ebay.com/itm/3-1-Mini-PCI-PC ... 0663707698 (http://www.ebay.com/itm/3-1-Mini-PCI-PCI-E-LPC-PC-Analyzer-Tester-Post-Card-/280663707698)
That said, the one I have is completely unmarked and the chip may be anything. If you look on ebay for PCI POST cards and limit the search to a price below $10, you're guaranteed to find lots of simple devices interfacing with PCI.
NOTE: Some POST cards claim to be able to handle PCIe, but that is not true. They use non-PCIe signals available in ExpressCard/PCIe slots and are utterly incapable of handling PCIe.
[quote author="arhi"]So to the point... I'm interested in some PCI or PCI-E (x1) dev tools. I seen some online but they go from 1000US$ and up, are packed up with stuff and are mostly unusable as a "blank slate dev tool".[/quote]
I, too, am interested in hooking up some custom FPGA logic to the PCIe bus, and wondering whether you eventually figured this out, after this thread?
[quote author="biosflasher"]If you really want to handle PCIe (whichever form factor you want, e.g. ExpressCard), use a cheap PCIe/PCI bridge chip, and then attach your logic to the PCI side.[/quote]
From looking into this a bit, it does seem like the best way to go here would be to rely on a bridge ASIC. As far as I can tell, two available chips that would seem suited to the task are the PLX PEX 8311 and the NXP PX1011B. Does anyone here have experience with these, or other options?