You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Embench Integration & Workflow Enhancement [compiling workloads using QEMU and BBVs generation] (#273)
# Overview
This pull request significantly enhances the `QEMU-BBVS-Flow` by
integrating the **Embench IoT benchmark suite** and streamlining the
entire analysis workflow. The primary goal is to provide a more
powerful, efficient, and flexible tool for computer architecture
research, addressing the critical challenge of long simulation times by
automating SimPoint analysis for a wider range of standard benchmarks.
By containerizing a pre-built RISC-V toolchain and pre-compiling the
Embench suite, this update drastically reduces setup and execution
times, allowing researchers to focus on analysis rather than environment
configuration.
## Key Features & Enhancements
### 1. Full Embench IoT Suite Integration
- **Pre-built Workloads**: The `Dockerfile` now clones and pre-builds
all 19 Embench workloads for the `riscv32` architecture. This ensures
that the benchmarks are ready for immediate analysis without any
compilation overhead during runtime.
- **Standalone Embench Runner**: A new `run_embench_simple.sh` script
allows for fine-grained control, enabling users to:
- List all available Embench workloads.
- Run individual workloads with or without timing.
- Generate Basic Block Vector (BBV) traces for specific benchmarks on
demand.
- **Integrated Analysis Pipeline**: The main `run_workload.sh` script
now recognizes `embench` as a workload type, automating the end-to-end
SimPoint analysis for the entire suite.
### 2. Improved Generic Workload Support
- **Flexible Workload Naming**: The system now supports any custom
workload name (minimum 3 characters), replacing the previously hardcoded
`"custom"` type.
- **Automatic Build System Detection**: The `setup_workload.sh` script
intelligently builds the user-provided source code by looking for either
a `Makefile` or a `build.sh` script within the source directory.
### 3. Massive Efficiency Gains
- **Pre-built RISC-V Toolchain**: The Docker image is now based on
`ribeirovsilva/riscv-toolchain:latest` (by @vinicius-r-silva ), which
includes a pre-compiled RISC-V toolchain. This single change cuts the
Docker build time from over an hour to just a few minutes.
- **Optimized Analysis Scripts**: The `run_analysis.sh` script now
filters binaries based on the selected workload type, ensuring that only
relevant benchmarks are processed, which speeds up batch analysis.
### 4. Robust Orchestration and Testing
- **Unified Scripts**: The `build_docker.sh`, `run_workload.sh`, and
`setup_workload.sh` scripts work in harmony to provide a seamless user
experience, from building the environment to generating final results.
- **Comprehensive Demo**: A new `integration_demo.sh` script is included
to showcase and verify all new features, including Embench integration,
BBV generation, backward compatibility with Dhrystone, and the enhanced
generic workload handling.
## How to Test
### 1. Clone the repository and make all scripts executable
```bash
chmod +x *.sh
````
### 2. Run the complete integration demo
This script will build the image and test all key functionalities
automatically.
```bash
./integration_demo.sh
```
### 3. Manual Verification Steps
#### Build the Docker image
```bash
./build_docker.sh
```
#### List available Embench workloads
```bash
docker run --rm qemu-simpoint-unified /run_embench_simple.sh --list
```
#### Run a single Embench workload and generate its BBV trace
```bash
# Create an output directory on the host
mkdir -p simpoint_output
docker run --rm -v "$(pwd)/simpoint_output:/output" qemu-simpoint-unified /run_embench_simple.sh crc32 --bbv
docker run --rm -v "$(pwd)/simpoint_output:/output" qemu-simpoint-unified /run_embench_simple.sh [workload_name] --bbv
# Verify that the BBV file was created
ls -lh simpoint_output/crc32_bbv.0.bb
```
#### Test the enhanced generic workload handler
(The `integration_demo.sh` script creates a temporary `test_workload`
directory to test this, or you can use your own.)
```bash
# Assuming you have a project in ./my-riscv-project with a Makefile
./run_workload.sh my-riscv-project "$(pwd)/my-riscv-project" "-static" "riscv64"
```
---------
Signed-off-by: Aditi Mehta <[email protected]>
Copy file name to clipboardExpand all lines: traces/qemu-bbvs-flow/README.md
+34-17Lines changed: 34 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# QEMU BBVs Flow
1
+
# QEMU SimPoint Unified Analysis
2
2
3
3
A unified, containerized workflow for running various workloads on QEMU with SimPoint analysis for program phase detection and basic block vector generation.
4
4
@@ -27,24 +27,40 @@ This project provides a unified Docker-based environment for:
0 commit comments