git clone https://github.com/black-parrot/pre-alpha-release.git # make tools will clone, build and install toolchains needed for BlackParrot # For faster builds, make tools -j is parallelizable! make tools # make tidy_tools will remove all tool build directories, while leaving the installation # make progs will build all open source test programs that ship with BlackParrot make progs # make ucode will build the CCE microcode used for BlackParrot's coherence engine # This is necessary whenever changes are made to CCE ucode. Eventually, CCE ucode # will be built 'on demand' and so this command may become unnecessary make ucode
The master branch contains most recent stable version. This is the recommended branch for someone wishing to try out BlackParrot.
The dev branch contains the most recent development version, being tested internally. This branch may have bugfixes or improvements not yet propagated to master.
Other branches are used for internal development and are not recommended for casual usage.
cd bp_top/syn make build.sc sim.sc PROG=hello_world
BlackParrot requires Python, Verilator and a RISCV GNU toolchain in order to build and run tests. The easiest way to get these and ensure compatibility is by using the tools in external/, which the Makefiles are automatically set up to use. One can also override these paths in Makefile.common. Dependencies for riscv-gnu-toolchain are listed below:
yum install autoconf automake libmpc-devel mpfr-devel gmp-devel gawk bison flex texinfo patchutils gcc gcc-c++ zlib-devel expat-devel
sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev
BlackParrot has been tested extensively on CentOS 7. Please raise issues with problems found on this or other platforms!
BlackParrot is designed to be modular. The main testbenches are at the FE, BE, ME and TOP levels. The general syntax for running a testbench is:
cd bp_<end>/syn make <ACTION>.<TOOL> [TB=] [CFG=] [PROG=] [DUMP=] [COV=] [<TRACER>_P=]
NOTE: Verilator is the free, open-source tool used to evaluate BlackParrot. VCS and DC are used for simulation and synthesis. If you wish to use these tools, set up the appropriate environment variables in Makefile.common
make build.v sim.v PROG=hello_world DUMP=1 # Run hello_world in VCS with dumping make dve.v PROG=hello_world # Open hello_world waveform in dve make build.sc sim.sc PROG=hello_world COV=1 # Run hello_world in Verilator with coverage make regress.sc -j 10 # Run riscv-tests in Verilator with 10 threads make regress_beebs.v -j 5 # Run beebs suite in VCS with 5 threads
NOTE: pardon our dust as we update our testbenches. The main testbench bp_top testbench is well supported.
Running a test will generate a ton of subdirectories in bp_<end>/syn/
bp_<end>/syn/results/<tool>/<tb>.<cfg>.build/sim{v,sc}
bp_<end>/syn/results/<tool>/<tb>.<cfg>.sim.<prog>/(symlink to sim{v,sc})
bp_<end>/syn/results/<tool>/<tb>.<cfg>.sim.<prog>/dump.vcd
bp_<end>/syn/results/<tool>/<tb>.<cfg>.sim.<prog>/testbench.v
bp_<end>/syn/results/<tool>/<tb>.<cfg>.sim.<prog>/etc.
bp_<end>/syn/results/<tool>/<tb>.<cfg>.cov/*.dat
bp_<end>/syn/logs/<tool>/<tb>.<cfg>.build.log
bp_<end>/syn/logs/<tool>/<tb>.<cfg>.sim.<prog>.log
bp_<end>/syn/logs/<tool>/<tb>.<cfg>.cov.log
bp_<end>/syn/reports/<tool>/<tb>.<cfg>.build.{rpt,err}
bp_<end>/syn/reports/<tool>/<tb>.<cfg>.sim.<prog>.{rpt,err}
bp_<end>/syn/reports/<tool>/<tb>.<cfg>.cov.<prog>.{rpt,err}
Run directory for tools, generating output artifacts
Full output of tool runs
Summary of tool runs. For example, whether tests pass or fail