UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor hynese
Visitor
5,896 Views
Registered: ‎10-07-2012

FPGA: 16-port Rx/Tx UART on PCIe card

I'm designing a PCIe card.

Basically, I have sixteen Rx/Tx lines that I want to expose to the Linux kernel as /dev/ttyS0, /dev/ttyS1, /dev/ttyS2, ... , /dev/ttyS15

Here's some similar hardware that I want to re-create:

http://www.sealevel.com/store/serial/asynchronous-serial/pci/7161-db9-pci-16-port-rs-232-serial-interface-with-db-9m-cable.html

What is the best way to go about doing this?

Many thanks in advance,

0 Kudos
5 Replies
Advisor joelby
Advisor
5,887 Views
Registered: ‎10-05-2010

Re: FPGA: 16-port Rx/Tx UART on PCIe card

That should be fairly simple - just use an FPGA with a PCIe transciever (e.g. the XC6SLX25T) and a bunch of appropriate level translators so that you can comply with the RS-232 voltage standard.

 

The only mildly complex bit will be the HDL and Linux driver.

0 Kudos
Visitor hynese
Visitor
5,881 Views
Registered: ‎10-07-2012

Re: FPGA: 16-port Rx/Tx UART on PCIe card

Many thanks for your very helpful reply.

 

I'm glad to hear this is "fairly simple" (to you maybe!) I'm very inexperienced with FPGA design.

 

I'm going to buy a PCI-e board. I only have a Digilent Altys Spartan 6 board (no PCI-e). Do you think this one would be suitable? http://www.mesanet.com/fpgacardinfo.html (Search for 6I25)

 

I understand I'll have 16 Tx pins and 16 Rx pins going into my FPGA (9600 baud). Then I'll have the PCI-e interface pins and I'm guessing I'll only need to use one transmit lane (i.e. PCI-e x1). I think I can do this bit.

 

However, I don't really have any idea how to present these Rx/Tx lines to the Linux kernel. I was wondering if you knew where I might start my research? For every one of my PCI-e boards plugged into the motherboard, 16 new /dev/ttySx's should appear.

 

I will eventually have a 46U cabinet full of these PCI-e cards (http://www.magma.com/expressbox-16-basic -- 16 PCI-e cards in each 4U), so I need to get it right!

 

Many thanks again,

0 Kudos
Advisor joelby
Advisor
5,853 Views
Registered: ‎10-05-2010

Re: FPGA: 16-port Rx/Tx UART on PCIe card

Yes, that Mesa board looks okay and it's pretty inexpensive.

 

Have a look at the Linux kernel source to see if there are any existing drivers for PCI-e serial cards. I'm sure there are some!

 

0 Kudos
Observer rloader
Observer
5,849 Views
Registered: ‎01-22-2011

Re: FPGA: 16-port Rx/Tx UART on PCIe card

Just one thing to be aware of, it looks like the FPGA on the 6I25 is a Spartan-6 LX-9 in a QFP package. That doesn't have a PCIe interface built-in, so presumably there is a interface chip of some sort (PCIe to PCI converter?) connecting to the PCIe.

 

It shouldn't stop you from doing what you need, but obviously you'll need to take it into account - e.g., will the bridge chip be flexible enough to allow you to emulate standard 16550 UARTs with standard kernel drivers or will you need to do something custom on the kernel side.

0 Kudos
Advisor joelby
Advisor
5,847 Views
Registered: ‎10-05-2010

Re: FPGA: 16-port Rx/Tx UART on PCIe card

Good point - according to the manual there is some sort of PCIe-PCI bridge. If I were designing your product I'd be inclined to just use Spartan-6 with the PCIe interface (the bridge will introduct other complications).

 

For development I'd just get something like the Xilinx SP605. It's not too expensive, relatively, and it has plenty of other goodies.

 

0 Kudos