2f9b8ea121 | ||
---|---|---|
.. | ||
bm | ||
cf-base | ||
hardcoded | ||
.gitignore | ||
README.md | ||
cf-buildroot.json | ||
vadd_rocc.json | ||
vadd_tl.json |
README.md
FireMarshal Workloads for Centrifuge
Hardcoded Linux Examples
The hardcoded/
directory contains a number of hand-written benchmarks for
linux that use various centrifuge-generated accelerators. Most can be built
simply by running make
in their respective directories. However, to actually
use the benchmark you will need add it to a linux-based workload (i.e. kernel +
root filesystem). The FireMarshal tool (included with chipyard) helps automate
this process.
Vadd Example Quickstart
If you simply want to try out the example vector add workload, you can use the following commands:
First, build the workload
../../tools/firemarshal/marshal build vadd_tl.json vadd_rocc.json
This command builds two Linux-based workloads that can be booted on a RISC-V SoC. They include a simple test that uses the vector addition accelerators that were generated by centrifuge.
Next, you will want to install them:
../../tools/firemarshal/marshal install vadd_tl.json vadd_rocc.json
This generates a FireSim workload description for the provided benchmarks. You may now use FireSim normally to launch the workloads. They will simply run the benchmark automatically and shutdown (you do not need to interact with the running workload at all).
FireMarshal Workload Description Details
vadd_tl.json and vadd_rocc.json are FireMarshal workload descriptions. These include all the information needed to build a working Linux-based benchmark. Here is the workload description for the tilelink-based accelerator:
{
"name" : "vadd_tl",
"base" : "cf-buildroot.json",
"workdir" : "hardcoded/vadd_tl",
"host-init" : "build.sh",
"files" : [["vadd_tl", "/root/"]],
"command" : "/root/vadd_tl"
}
These options have the following effects:
- name: A unique name identifying this benchmark.
- base: We have provided you with a base workload that includes the necessary changes to Linux and other common setup tasks. FireMarshal inherits this configuration before building your workload.
- workdir: All file paths in this configuration file will be relative to this directory
- host-init: This script is run automatically before constructing the Linux
root filesystem. In this case,
hardcoded/vadd_tl/build.sh
simply cross-compiles the vector add example benchmark. - files: This instructs FireMarshal to copy the benchmark into the target root filesystem.
- command: FireMarshal will configure the workload to automatically run this command whenver it boots up. This allows for hands-free testing.
You can find more information on FireMarshal workloads in its documentation.