Skip to content

mmaroti/machxo2-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

machxo2-dev

This repository contains FPGA and driver examples for the MachXO2 Breakout Board, but the code should work on any FPGA. The reusable verilog modules are under the src directory. The following example projects are provided:

  • Blink application
  • Reset application introducing debouncing
  • Pipeline project introducing AXI streams
  • RS232 transmitter application with hardware flow control and C driver
  • RS232 receiver application with hardware flow control, close to 1.2 mbyte/sec throughput in loopback mode

Linux setup notes

Install the Lattice Diamond software

I have followed steps 1 and 2 from these instructions with the following differences:

  • I used sudo apt-get install python-libusb1 instead of sudo pip install libusb1
  • I have moved the diamond directory to /opt instead of /usr/local with the command sudo cp -Rva --no-preserve=ownership ./usr/local/diamond /opt/
  • I have added the line $PATH="$PATH:/opt/diamond/3.10_x64/bin/lin64/" to the end of my .profile
  • When you first run diamond it will ask for your license file. You can get a free license from lattice, and I have copied that to the /opt/diamond/3.10_x64/license/ directory.
  • You have to grant read-write access to the FTDI USB device and prevent the kernel from loading its default ftdi_sio driver. Copy the 49-lattice.rules udev script with sudo cp 49-lattice.rules /etc/udev/rules.d and reload the rules with sudo udevadm control --reload-rules && sudo udevadm trigger.

Installing the FTDI N2xx drivers (needed to read/write EEPROM and to use advanced modes)

  • Download the latest drivers from http://www.ftdichip.com/Drivers/D2XX.htm
  • Follow the instructions in the ReadMe.txt by copying the libftd2xx.so file to /usr/lib/local
  • Use the provided sudo ./read program to verify that you can read the EEPROM. After plugging in your device you need to unload the default drivers by sudo rmmod ftdi_sio and sudo rmmod usbserial.

Install the libftdi1-dev package

Useful links

About

Playground for MachXO2 FPGA development

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published