This repository is meant to be a starting point for going through the SAIL to JSON workflow. The goal for the repo is to provide the necessary tools and instructions to go through the workflow in a organized and streamlined manner.
Most of the below instructions are from the JSON.md inside the sail-riscv repo but expanded upon to give more detail and clarity
- Clone the necessary repos
- The necessary repos can cloned by running the provided clone.sh script
./clone.sh
- The necessary repos can cloned by running the provided clone.sh script
- Install SAIL through opam if not yet installed
- Follow the "How to install Sail" instructions in INSTALL.md in the sail repo up until "Installing development versions of Sail" section (next step will go over installing development version)
- Change SAIL version to the one in the sail repository to add json functionality
- Make sure you are in the top directory of this repo which by default should be named sail-json-flow
- To change the SAIL version to have JSON functionality run:
opam pin add sail - Later if you want to remove the pin and revert to latest released opam package run:
opam pin remove sail
- Build the json output from the RISC-V SAIL specification
- Set up the environment for running the SAIL compiler
eval $(opam env) - Navigate into the sail-riscv direcotory, which contains the RISC-V
.sailfiles, by running:cd sail-riscv - Use the Makefile to build the RISC-V json file:
make json - An example of the json output is in the included file sail-riscv-out.json
- Set up the environment for running the SAIL compiler