Git Product home page Git Product logo

ice40lib's Introduction

iCE40lib : FPGA peripheral Library

This repository contains various peripheral drivers written in Verilog for open-source ICE40 FPGAs. iCESuger nano FPGA ships with several PMOD accessories. This repository contains Verilog IPs to work with them.

docker

Content

  1. blinky : LED blink example
  2. lcd : Examples for PMOD 0.96in LCD
  3. st7735 : Driver for PMOD 0.96in LCD

LCD driver is configured for ICESugar nano default clock rate of 12MHz and this driver can save your SPI pins for SPI stuff.

Sublime's custom image
Checkered demo on 0.96 oled

Build Yosys toolchain is required to build the binary files. For this, you can use the following docker container with all the dependencies

Sublime's custom image

Follow the steps to build using the docker environment. (You should have the docker daemon installed on your system)

  1. Clone the repository
git clone https://github.com/Archfx/ice40lib
  1. Pull the docker image from docker-hub
docker pull archfx/ice40tools
  1. Set the expected location to mount with the container
export LOC=/ice40lib
  1. Run the Docker image
docker run -t -p 6080:6080 -v "${PWD}/:/$LOC" -w /$LOC --name ice40tools archfx/ice40tools

This will open up a browser window with

  1. Connect to the docker image
docker exec -it ice40tools /bin/bash
  1. Compile the design and upload

Note change the --pl1k parameter with the chip model that you have. iCESugar Nano uses ice40LP1k-CM36 chip

cd ice40/examples/blinky

yosys -p 'synth_ice40 -top blinky -json blinky.json' blinky.v               # synthesize into blinky.json

nextpnr-ice40 --lp1k --json blinky.json --pcf blinky.pcf --asc blinky.asc --package cm36  # run place and route
icepack blinky.asc blinky.bin                                               # generate binary bitstream file

iceprog blinky.bin                                                       

Relevant Docs

ice40lib's People

Contributors

archfx avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.