A project to communicate a FPGA board (miniSpartan6+) and a PC via USB in 12Mbit/s. One byte takes 12 bits (2 start bits, 8 data bit and 2 stop bits), so It may goes 1.0MByte/s.
This FPGA program waits signal from serial port. If it received some data, it returns same data.
# After you create bit file by ISE
cd ./ise/work
sudo xc3sprog -c ftdi mojo_top.bitOriginal: https://github.com/roman3017/miniSpartan6-plus/tree/master/projects/mojo-uart
You can communicate with Spartan6 by the following command.
python ./python/serial_communication.pyYou can communicate with Spartan6 with using libftdi or ioctl.
libftdi ver1 or more is needed. Ubuntu apg-get supports ver 0.2 so installing latest libftdi from source is needed.
https://www.intra2net.com/en/developer/libftdi/download.php
cd ./cpp
make
sudo ./bin/serial_with_libftdicd ./cpp
make
sudo ./bin/serial_with_ioctlI also wrote program with using libusb but it does not run correctry only that. Libusb can't set baudrate so this program needs to run another program to set baudrate.
cd ./cpp
make
sudo ./bin/serial_with_ioctl # run to set baudrate
sudo ./bin/serial_with_libusbMIT