Coder Social home page Coder Social logo

ice40-rs's Introduction

CI

ice40-rs

This is an embedded-hal driver for configuration of iCE40 series FPGAs from Lattice.

See technical note TN1248 - iCE40 Programming and Configuration on how the slave configuration interfaceworks.

Quickstart

[dependencies]
ice40-rs = "0.2.0"

Features

  • lzss - Support bitestreams compressed using LZSS using lzss.

Example

// Configure device with bitstream
let mut device = ice40::Device::new(spi, ss, done, reset, DummyDelay);
device
    .configure(&bitstream[..])
    .expect("Failed to configure FPGA");

The examples folder contains a utility for configuring a device using linux and ftdi embedded-hal.

You can use them with the following commands:

FTDI

Assumes the FTDI circuit is connected like the ice40-breakout board.

cargo run --example ftdi -- my_image.bin

ice40-rs/ftdi 0.1.0
FTDI demo

USAGE:
    ftdi [OPTIONS] <binary>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -f, --frequency <frequency>    Bus frequency [default: 3000000]

ARGS:
    <binary>    Binary file

Linux

Default arguments are for a Raspberry pi Model 4.

cargo run --example linux -- my_image.bin

ice40-rs/linux 0.1.0
Linux demo

USAGE:
    linux [OPTIONS] <binary>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --cdone <cdone>            CDONE pin [default: 24]
        --creset <creset>          CRESET pin [default: 25]
    -f, --frequency <frequency>    Bus frequency [default: 3000000]
        --spi <spi>                SPI bus [default: /dev/spidev0.0]
        --ss <ss>                  SS pin [default: 8]

ARGS:
    <binary>    Binary file

Limitations

The library only support volatile configuration of the device, not external nonvolatile memory.

ice40-rs's People

Contributors

atmelfan avatar dependabot[bot] 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.