Skip to content

An Arduino UNO compatible implementation for the iCE40 FPGAs

License

Notifications You must be signed in to change notification settings

INTI-CMNB/Lattuino_IP_Core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lattuino

An Arduino UNO compatible implementation for the iCE40 FPGAs.

Currently oriented to the Kefir I board (iCE40HX4K + Arduino/ChipKit connectors and MCP3008 A/D).

A reduced version (only I/O pins and RS-232, with a small amount of flash and RAM) is available for the iCEStick and IceZum Alhambra is available (iCE40HX1K).

What's needed to synthesize the IP core

You need to install the Lattice iCECube2 tool.

You should also install some of the FPGA Libre tools. The lattuino-tools package will pull all the needed dependencies.

For Ubuntu:

usuario@ubuntu$ curl -sSL http://fpgalibre.sf.net/debian/go | sudo sh
usuario@ubuntu$ sudo apt-get install lattuino-tools

For Debian:

root@debian# curl -sSL http://fpgalibre.sf.net/debian/go | sh
root@debian# apt-get install lattuino-tools

How to run the synthesis

This core depends on various cores from the FPGA Libre project. In order to install the dependencies you'll need to clone the FPGA Cores repo.

Once installed you'll find a script called synth_lattuino_1.sh. Modify the XIL_TOOLS_ICE_DIR variable to point to your iCECube2 installation. Then run the script.

For the iCEStick/IceZum the script is called synth_lattuino_stick.sh. Note that we included a pre-generated bitstream: lattuino/FPGA/lattuino_stick/pre-gen/Lattuino_Stick_bitmap.bin. Also note that the core fits very tightly, so you could have issues if using an iCEcube2 different than version 2017.01.

How to add Lattuino support to the Arduino IDE

You'll need a modern version of Arduino's IDE, I used 1.8.1 (works on 1.8.2 and also on 1.6.13, not in 1.6.9).

  1. Go to File/Preferences menu.
  2. Add the following URL http://fpgalibre.sf.net/Lattuino/package_lattuino_index.json as source of additional boards.
  3. Now enter to the Tool/Board menu and choose the Boards manager option.
  4. Scroll down to bottom and look for the Lattuino 1 by FPGA Libre entry.
  5. Click on More info and press the Install button.
  6. Once installed you'll get a new section under Tool/Board named Lattuino.

How to configure the core

You can manually edit FPGA/lattuino_1/cpuconfig.vhdl or you can use the configuration tool.

To run the configuration tool you need TCL/Tk installed (UNIX wish command or Cygwin's cygwish80). Then run:

make -C tools/tkconfig/ xconfig

Note that this will most probably try to rebuild some tools. If you don't have the GCC compiler installed you can just run:

touch tools/tkconfig/tkparse.o tools/tkconfig/tkcond.o tools/tkconfig/tkgen.o tools/tkconfig/tkparse
touch tools/tkconfig/lattuino.tk 
touch tools/tkconfig/lconfig.tk 
make -C tools/tkconfig/ xconfig

About

An Arduino UNO compatible implementation for the iCE40 FPGAs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published