Skip to content

Peripheral library ๐Ÿ“š for open source FPGAs based on iCE40. (Configured for ICESugar-Nano)

Notifications You must be signed in to change notification settings

Archfx/ice40lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

36 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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

About

Peripheral library ๐Ÿ“š for open source FPGAs based on iCE40. (Configured for ICESugar-Nano)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published