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.
toml
[dependencies]
ice40-rs = "0.2.0"
rust
// 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:
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]
FLAGS: -h, --help Prints help information -V, --version Prints version information
OPTIONS:
-f, --frequency
ARGS:
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]
FLAGS: -h, --help Prints help information -V, --version Prints version information
OPTIONS:
--cdone
ARGS:
The library only support volatile configuration of the device, not external nonvolatile memory.