Skip to content

Conversation

@olofk
Copy link

@olofk olofk commented Aug 18, 2018

Add support for building and simulating picosoc for TinyFPGA-BX with FuseSoC

To test this the core libraries must first be available. Create a workspace directory and run

fusesoc library add picosoc https://github.com/cliffordwolf/picorv32
fusesoc library add tinyfpga-bx https://github.com/tinyfpga/TinyFPGA-BX

or, alternatively if the repos are already on disk and you want to use those instead, run

fusesoc library add picosoc /path/to/picorv32_repo
fusesoc library add tinyfpga-bx /path/to/TinyFPGA-BX_repo

Picosoc for TinyFPGA-BX can now be built with

fusesoc build tinyfpga:bx:picosoc

This uses nextpnr by default. To use arachne-pnr, change pnr : next to pnr : arachne in the .core file

To simulate, first create firmware.hex (make -C examples/picosoc/firmware.hex). It is recommended to decrease the blink period tme as simulation takes a long time otherwise (e.g. change to reg_leds = led_timer >> 6; in firmware.c. With the newly created firmware.hex run

fusesoc run --target=sim tinyfpga:bx:picosoc --spi_flash_file=/path/to/firmware.hex

To use modelsim instead of icarus add --tool=modelsim after --target=sim

To find out all available simulation options (e.g. to generate a VCD file or set a simulation timeout) run

fusesoc run --target=sim tinyfpga:bx:picosoc --help

FuseSoC 1.8.4 or later is required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant