Picorv32 SoC on the TinyFPGA BX, for games etc.
Clone or download
Latest commit 50898d6 Sep 22, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples More pacman2 Sep 22, 2018
firmware Use Gundy's picosoc and firmware Sep 20, 2018
games Yet more Pacman Sep 22, 2018
hdl New video files from tinyfpga-bx-game-soc Sep 21, 2018
libraries More pacman2 Sep 22, 2018
.gitignore Removed log file Sep 17, 2018
LICENSE Changed structure to more like tinyfpga_bx_game_soc Sep 17, 2018
README.md Updated README Sep 17, 2018

README.md

Overview

The idea behind this project is to use PicoSoC (from Clifford Wolf), and add some verilog peripherals to make it suitable for writing simple games on the TinyFPGA BX..

The PicoRV CPU variant chosen will be, by necessity, very cut-down in functionality - along the lines of the "small" profile. Unfortunately the larger profiles with support for things like multipliers/dividers would be impossible to fit into the space available on the ice40hx8k part.

The planned peripherals are:

  • On-board LED
  • GPIO inputs (buttons, switches)
  • Serial UART
  • [planned] an IRQ-based timer/counter
  • [planned] a 3-channel audio synthesizer
  • [planned] Graphics output
  • 320x240 resolution LCD or 128x128 OLED
  • palette of 16 colours from ~262k
  • tile/map based support
  • sprites
  • Game controller (currently Wii Nunchuk)

Planned IO locations for the devices are:

MEM_ADDR (hex) Peripheral
0x0000_0000 -> 0x0000_0400 SRAM
0x0005_0000 -> 0x0010_0000 SPI Flash (usable region)
0x0005_0000 reset vector (when the CPU is reset it starts executing code here)
0x0005_0010 IRQ vector (when an IRQ is triggered, CPU jumps here)
0x0200_0000 SPI config
0x0200_0004 UART divider
0x0200_0008 UART data register
0x0300_0000 On-board LED
0x0300_0004 GPIO buttons
0x0400_0000 Audio device
0x05xx_xxxx Video device
0x06xx_xxxx Timer/counter
0x0700_0000 I2C write
0x0700_0004 I2C read

Documentation for each of the peripherals, including more detailed register mappings will be placed in their respective folders under hdl/picosoc (as they are developed).

Discussion

This project was kicked off by a discussion on the TinyFPGA forums.

Feel free to join in there!

Credits

Of course, none of this would be possible without the amazing work of a great number of people.

Clifford Wolf (PicoRV32 & PicoSOC)

Clifford Wolf is the author of the icestorm toolchain, and creator of the PicoRV32 RISC-V CPU core used in this project.

PicoRV32 is free and open hardware licensed under the ISC license (a license that is similar in terms to the MIT license or the 2-clause BSD license).

Source code can be found here: https://github.com/cliffordwolf/picorv32

Luke Valenty (Tiny FPGA)

Luke is the mastermind behind the breadboard-friendly "Tiny" FPGA series that this project is designed to use. You can order your TinyFPGA from crowdsupply.