| .gitignore | ||
| .gitlab-ci.yml | ||
| bus_arbiter.sv | ||
| clk_div.sv | ||
| ice40hx8k-b-evn.pcf | ||
| ice40up5k-upduino.pcf | ||
| LICENSE | ||
| Makefile | ||
| progmem.c | ||
| progmem.lds | ||
| ram.sv | ||
| README.md | ||
| rv32.sv | ||
| rv32_alu.sv | ||
| rv32_branch.sv | ||
| rv32_control.sv | ||
| rv32_csrs.sv | ||
| rv32_decode.sv | ||
| rv32_execute.sv | ||
| rv32_fetch.sv | ||
| rv32_hazard.sv | ||
| rv32_imm.sv | ||
| rv32_mem.sv | ||
| rv32_opcodes.sv | ||
| rv32_regs.sv | ||
| start.s | ||
| sync.sv | ||
| top.sv | ||
| top.tcl | ||
| uart.sv | ||
Icicle
Introduction
Icicle is a 32-bit RISC-V system on chip for iCE40 HX8K FPGAs. It can be built with the open-source Project IceStorm toolchain and currently targets the iCE40-HX8K breakout board.
Current features
- RV32I core with a classic 5-stage RISC pipeline, static branch
prediction, bypassing and interlocking. It currently implements the entire
user ISA (except
ECALLandEBREAK) and parts of the privileged ISA. - Shared instruction and data memory (8 KiB, implemented with FPGA block RAM).
- Memory-mapped UART and LEDs.
Dependencies
Building and testing
- Run
make syntaxto check the syntax with Icarus, which has a stricter parser than Yosys. - Run
maketo synthesize the design, place and route, compile the demo program inprogmem.cand create the bitstream. - Connect the iCE40-HX8K breakout board and configure the jumpers for direct SRAM programming.
- Run
make flashto program the bitstream.icetimeis used to check that the design meets timing closure. The target fails if it does not. - 4 of the 8 LEDs should turn on (with an on, off, on, off pattern). Run
picocom /dev/ttyUSBN(replacingttyUSBNwith the name of the serial port) to connect to the serial port.Hello, world!should be printed once per second.
The make stat target runs icebox_stat and the make time target prints the
icetime report.
The Makefile runs the IceStorm toolchain in quiet mode. Unset the
QUIET variable to run the toolchain in verbose mode - e.g. make QUIET=.
Planned features
- Use remaining block RAM tiles to eke out as much memory as possible.
- Implement remaining bits of the user ISA.
- Implement machine mode from the privileged ISA.
- Interrupts/exceptions.
- Unaligned memory access support.
- Memory-mapped GPIOs.
- Memory-mapped XIP/SPI flash.
- Improved reset support (a reset signal + boot ROM to zero all the registers).
- Automated tests.
- Multiply/divide support.
- Compressed instruction support.
Size and performance
The entire system on chip currently occupies around 2,000 LUTs on an iCE40 when synthesized with Yosys.
It's currently clocked at 24 MHz but icetime estimates it could be clocked at
~30-35 MHz (depending on how lucky arachne-pnr is).
The core is capable of issuing and retiring one instruction per clock cycle, although the actual number of instructions per cycle will be slightly less than this in practice due to interlocking, branch mispredictions and the shared memory bus.
License
This project is available under the terms of the ISC license, which is similar
to the 2-clause BSD license. See the LICENSE file for the copyright
information and licensing terms.