This quick start guide will walk you through installation of Chisel and necessary dependencies:
-
sbt: which is the preferred Scala build system and what Chisel uses.
-
Verilator:, which compiles Verilog down to C++ for simulation. The included unit testing infrastructure uses this.
Install Java
sudo apt-get install default-jdk
Install sbt, which isn't available by default in the system package manager:
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823
sudo apt-get update
sudo apt-get install sbt
We currently recommend Verilator version 4.016.
Follow these instructions to compile it from source.
-
Install prerequisites (if not installed already):
sudo apt-get install git make autoconf g++ flex bison libfl2 libfl-dev zlibc zlib1g zlib1g-dev
-
Clone the Verilator repository:
git clone http://git.veripool.org/git/verilator
-
In the Verilator repository directory, check out a known good version:
git pull git checkout verilator_4_016
-
In the Verilator repository directory, build and install:
unset VERILATOR_ROOT # For bash, unsetenv for csh autoconf # Create ./configure script ./configure make sudo make install
Please remember that verialtor should be installed in the default system path, otherwise, chisel-iotesters won't find Verilator and the simulation can not be executed
git clone --recurse-submodules
For defining the coroutine execution model of the targeted DSA, the next few steps should be taken:
- Defining events:
src/main/scala/memory/cache/events.scala
- Defining states:
src/main/scala/memory/cache/States.scala
- Defining Routines:
src/main/scala/memory/cache/Routine.scala
- Defining the mapping between (event,state) and the executed Routine:
src/main/scala/memory/cache/nextRoutine.scala
Recursively clone:
https://github.com/sfu-arch/muir-sim/tree/memGen
In the build.sh
script, change the cofigurations and build the hardware.
Then in the test.sh
, change the configurations same as the previous script and run the scripts as below.
./test.sh [TRACE_FILE]