1
\$\begingroup\$

I am new to FPGA. While doing calculations I found that I can not input number in real time to FPGA. My instructor told me to write my numbers (or data) in a text file on PC and tranfer it to FPGA in real time through any communication link (USB, Serial or Ethernet).

After searching on internet, I found nothing but ugly new terms which I dont know. A lot is there but no one talks about which software to use or how to program FPGA.

USB transfer. This one talks about USB but with Visual Express 2010 which I am not doing. I am simply learning and making adders and multipliers.

I have found this but its for vertix 5 board. If I can get any link like this for Spartan 6 then it will be of great help.

\$\endgroup\$
7
  • \$\begingroup\$ Is this your board: Digilent Atlys Spartan-6 FPGA Development Board? If so, it looks like the Digilent Adept Software may be of use. \$\endgroup\$
    – Tut
    Commented Nov 19, 2014 at 15:04
  • \$\begingroup\$ @Tut I am using Xilinx xc6slx45 on Atlys board. Adept is useful. But I want to use data stored in computer in a file and process it (in realtime). \$\endgroup\$
    – user263210
    Commented Nov 19, 2014 at 16:22
  • \$\begingroup\$ How fast should your data be transferred? The on-board Exar XR21V1410 USB-UART chip supports up to 12 MBit/s, most software can handle up to 912 kBit/s. You can use a terminal program or open a raw connection to your COM-port to write data to it. I don't know Adept, yet, but the presentation on the Digilent website looks good. \$\endgroup\$
    – Paebbels
    Commented Nov 19, 2014 at 19:38
  • \$\begingroup\$ @Paebbels For now I only want to go through it. I want to load merely some bytes to FPGA and then to PC. And again you pointed out USB but how? Any tutorial to use COM port with FPGA? \$\endgroup\$
    – user263210
    Commented Nov 20, 2014 at 2:13
  • \$\begingroup\$ This Exar chip is a usb to uart bridge. So your OS emulates a new COM port as COMx or /dev/ttyUSBx in your system. Under linux you can use cat, less and pipes as usual to write a file to the device. In windows you can use a terminal Program like putty to open a connetion. Most terminals have the ability to send and receive files. Send meens open a file and copy all bytes to the Destination. Or you can just write a program in C# -> a serialport instance provides an iostream. The fpga needs a little fsm to receive and send bytes via uart. A good uart can be found in xilinx picoblaze examples. \$\endgroup\$
    – Paebbels
    Commented Nov 20, 2014 at 3:38

2 Answers 2

1
\$\begingroup\$

I would choose the Serial method as the easiest one to implement. I am talking about Asynchronous Serial protocol, which is logically compatible with computer's serial port (COM1, COM2, etc). Electrically it should be converted to the levels computer uses. The standard is called RS-232. You should look up for UART(Universal Asynchronous Receiver/Transmitter) implementation for your FPGA, or implement one by yourself (which is not that easy, but easiest among the options you have).

\$\endgroup\$
3
  • \$\begingroup\$ ...or download a free implementation, such as from opencores.org. \$\endgroup\$ Commented Nov 20, 2014 at 4:29
  • \$\begingroup\$ @JerryCoffin Open cores has codes mainly in VHDL and I am using Verilog with Xilinx ISE. You hinted exactly what I was seeking but unable to convey. \$\endgroup\$
    – user263210
    Commented Nov 20, 2014 at 7:28
  • \$\begingroup\$ @user263210: They have quite a bit that's in Verilog as well (and you can filter on the language you want). Looking through communication controllers written in Verilog, I see at least 2 or 3 that would probably work for you. \$\endgroup\$ Commented Nov 20, 2014 at 15:08
0
\$\begingroup\$

The Atlys board has a USB UART chip on it. This is probably the simplest interface to use. There is an open source UART IP core with an example design for the ATLYS board here: https://github.com/alexforencich/verilog-uart . If this isn't fast enough, then you could look in to bringing up the Ethernet port and using that, but that is a significantly more complicated project.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.