This repository tracks releases of the HammerBlade source code and infrastructure. It can be used to simulate HammerBlade Nodes of diverse sizes and memory types.
HammerBlade is an open-source manycore architecture for performing efficient computation on large general-purpose workloads. A HammerBlade is composed of nodes attached to a general purpose host, simliar to a general-purpose GPU. Each node is a single an array of tiles interconnected by a 2-D mesh network attached to a flexible memory system.
HammerBlade is a Single-Program, Multiple-Data (SPMD) architecture: All tiles execute the same program on a different set of input data to complete a larger computation kernel. Programs are written in the CUDA-Lite lanaguage (C/C++) and executed on the tiles in parallel "groups", and sequential "grids". The CUDA-Lite host runtime (C/C++) manages execution parallel and sequential execution.
The HammerBlade is being integrated with higher-level parallel frameworks and Domain-Specific Languages. A Pytorch Pytorch backend is being developed to accelerate Machine Learning and a Graphit code-generator is being developed to support Graph Computations.
C/C++, Python, and Pytorch programs can interact with a Cooperatively Simulated (Cosimulated) HammerBlade Node using Synopysis VCS or Verilator. The HammerBlade Runtime and Cosimulation top levels are in BSG Replicant repository.
For a more in-depth overview of the HammerBlade architecture, see the HammerBlade Overview.
The architectural HDL for HammerBlade is in the BSG Manycore Repository and the BaseJump STL repositories. For technical details about the HammerBlade architecture, see the HammerBlade Technical Reference Manual
To run applications on HammerBlade follow the instructions below:
-
To simulate with VCS you must have VCS-MX installed. (After 2019, VCS-MX is included with VCS)
-
Verilator is built as part of the setup process.
The Makefiles will warn/fail if it cannot find the appropriate tools.
Building the RISC-V Toolchain requires several distribution packages. The following are required for CentOS/RHEL-based distributions:
libmpc autoconf automake libtool curl gmp gawk bison flex texinfo gperf expat-devel dtc cmake3 python3-devel
On debian-based distributions, the following packages are required:
libmpc-dev autoconf automake libtool curl libgmp-dev gawk bison flex texinfo gperf libexpat-dev device-tree-compiler cmake build-essential python3-dev
On macOS, install the Xcode Command Line Tools and Homebrew, then install:
brew install autoconf automake libtool gawk bison flex texinfo gperf expat dtc cmake make python wget argp-standalone gmp mpfr libmpc pkgconf gnu-sed m4HammerBlade's makefiles do not support whitespace in the checkout path. Use a
path such as ~/hammerblade/bsg_bladerunner rather than a directory whose name
contains spaces. Homebrew installs current GNU Make as gmake; use gmake for
the commands below on macOS.
Non Bespoke Silicon Group (BSG) users MUST have VCS installed on PATH before these steps
The default VCS environment simulates the manycore architecture, without any closed-source or encrypted IP.
-
Initialize the submodules:
git submodule update --init --recursive -
(BSG Users Only:
git clone git@github.com:bespoke-silicon-group/bsg_cadenv.git) -
Run
make -f amibuild.mk riscv-tools
Verilator simulates the HammerBlade architecture using C/C++ transpilation.
-
Initialize the submodules:
git submodule update --init --recursive -
Run
make verilator-exe -
Run
make -f amibuild.mk riscv-tools
The repository pins a tested release from the authoritative Verilator repository and builds it from source. A GitHub SSH key is not required for this setup:
mkdir -p ~/hammerblade
git clone https://github.com/bespoke-silicon-group/bsg_bladerunner.git \
~/hammerblade/bsg_bladerunner
cd ~/hammerblade/bsg_bladerunner
git -c url.https://github.com/.insteadOf=git@github.com: \
submodule update --init --recursive
gmake verilator-exe
./verilator/bin/verilator --versionBuild the customized GCC and newlib toolchain needed by the examples. This is the longest setup step:
gmake -f amibuild.mk riscv-gccThe broader riscv-tools target also builds Spike and the customized LLVM tree;
those components are not required for the Verilator warmup.
For a conservative first application run, build the execution model with one Verilator worker thread:
gmake VERILATOR_THREADS=1 exec.logThe default is 16 threads. The setting is fixed when a machine model is
generated, so run gmake platform.link.clean before rebuilding that machine
with a different thread count.
Makefile targets
-
setup: Build all tools and updates necessary for cosimulationYou can also run
make helpto see all of the available targets in this repository.
-
Makefile provides targets cloning repositories and setting up the repository. See the section on Makefile Targets for more information.
-
project.mk defines paths to each of the submodule dependencies
-
scripts: Scripts used to upload Amazon FPGA images (AFIs) and configure Amazon Machine Images (AMIs).
AWS FPGA support has been deprecated, though the files remain for posterity.