Code Monkey home page Code Monkey logo

ice40_ultraplus_examples's Introduction

iCE40 UltraPlus FPGA examples on the Breakout Board

Collection of examples for the ice40 ultraplus fpga, each example tests a feature of the fpga (such as spram) and is independent from the others.

All the examples are running on the ice40 ultraplus breakout board from lattice (https://www.latticesemi.com/Products/DevelopmentBoardsAndKits/iCE40UltraPlusBreakoutBoard) which contains a ice40 ultraplus fpga (iCE40UP5K), a flash, a ftdi usb-to-spi chip and a rgb led.

Some of the examples include:

  • Blinking of the RGB led
  • PWM on the RGB led
  • Read and write to SPRAM modules from the FPGA
  • SPI communication with a host computer
    • Using a soft-IP module
    • Using the hardware SPI module on the iCE40
  • Read and write to BRAM
  • Reading the flash (N25Q032A) from the FPGA
  • DSP (SB_MAC16) example with MAC (multiply and accumulate) operations
  • A RISC-V implementation running on the FPGA
    • the RISC-V groups all of the above examples to make a complete working system able to do matrix multiplications, fibonacci and multiplcations, all on a RISC-V soft CPU communicating with a Linux computer. For more info about the system including how to build FW and host SW, please see the riscv README.
  • PLL and use of internal clock

All the examples are synthetized and programmed on the breakout board using the open souce tools from the icestorm project (http://www.clifford.at/icestorm/).

Most of the examples use the 12MHz external clock from the breakout board. The PLL example shows how to use the internal 48MHz clock.

How to build

Each example can be compiled with a make which will create the bitstream using the icestorm opensource tools, once the breakout board is plugged.

make prog will program the fpga using the internal sram based condiguration memory in the Ice40 Ultraplus device. Since this memory is volatile, it will get erased every time the board is powered down.

make prog_flash will write the FPGA configuration to the separate flash chip on the breakout board. However the FPGA will not be able to communicate with the host through the USB using the SPI in this mode. A power cycle may be also be needed for the FPGA to read the configuration from the flash memory.

Note that the access to the Flash memory and the SPI interface is controlled by jumpers on the breakout board. The jumper settings are described in the Lattice iCE40 UltraPlus Breakout Board User Guide (pdf).

For make prog to work, the jumpers at J6 should be in vertically oriented. For make prog_flash to work, the jumpers at J6 should be in horizontal orientation.

Versions used

  • Yosys 0.9
  • arachne-pnr 0.1+325+0
  • nextpnr-ice40 (git sha1 c365dd1)
  • gcc version 5.4.0

Built on Linux Mint 18.2

ice40_ultraplus_examples's People

Contributors

damdoy avatar secworks avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.