Generating a Microwatt-compatible Libre-SOC core with SVP64

Useful links (Libre-SOC):

Other Tutorials (Libre-SOC):

  • First steps for working with PowerISA instructions Libre-SOC page: firststeps

Development environment scripts

If you haven't already, clone Libre-SOC's development environment setup scripts. These are bash scripts, and greatly simplify the time it takes to create a:

  • Stable environment
  • With all software and libraries at specific versions (which are known to work).

These attributes are absolutely critical, and no support will be provided, unless you use these scripts to setup a development environment. This helps us fix any bugs in the scripts, and make sure everyone runs on the same page.

Setting up chroot for core generation

Scripts we will be using for the setup are:

  • mk-deb-chroot, cp-scripts-to-chroot for chroot setup
  • install-hdl-apt-reqs, hdl-dev-repos, hdl-tools-yosys for working with soc repo.

(Current limitation for mk-deb-chroot, is that you must be the first user on the host machine, having user ID 1000.)

Commands to run in terminal to setup a new chroot environment for generating LS soc cores.

Currently, need to checkout an older commit of openpower-isa, for details see Bug #1127 comment #0

$ cd dev-env-setup
$ sudo bash
# ./mk-deb-chroot gen_cores
# ./cp-scripts-to-chroot gen_cores
# exit
$ schroot -c gen_cores
(gen_cores):$ cd dev-env-setup
(gen_cores):$ sudo bash
(gen_cores):# ./install-hdl-apt-reqs
(gen_cores):# ./hdl-tools-yosys
(gen_cores):# ./hdl-dev-repos
(gen_cores):# exit
(gen_cores):$ cd ~/src/openpower-isa/
(gen_cores):$ git checkout 1bbfcce929c9a1d6b1dc0fc68c84296bcc58eea1
(gen_cores):$ sudo python3 setup.py develop
(gen_cores):$ make svanalysis
(gen_cores):$ make pywriter
(gen_cores):$ make pyfnwriter
(gen_cores):$ cd ../soc/
(gen_cores):$ make microwatt_external_core_svp64

At this point you should end up with external_core_top.v verilog file, which contains the Libre-SOC core (with Microwatt-compatible interfaces).

Setting up chroot for simulation in Microwatt SoC

Using the microwatt repo's soc for verilator simulation works well, so this is a good option if you just need to run/test programs compiled for POWER SFFS.

Please see microwatt page for details how to setup a microwatt chroot.

Setting up chroot for FPGA synthesis with ls2 SoC peripheral fabric

At the moment this is not working yet. TODO:

Please see ls2 page for details how to setup a ls2 chroot.