Beethoven Software
The host-side companion to Beethoven-Hardware.
Three deliverables out of one repo:
- libbeethoven — the user-facing C++ API (
fpga_handle_t, allocator,
command/response handles). Installed once globally; per-platform
variants (libbeethoven-discrete.so, libbeethoven-zynq.so) coexist
in a single install.
- BeethovenRuntime — the per-design daemon that owns the simulator
(Verilator / Icarus / VCS) or talks to a real FPGA over UIO/PCIe. Built
per project, never globally installed (the daemon is design-coupled).
- libbeethoven_baremetal — static library for Cortex-M55 testbenches.
Separate cmake package, separate toolchain, no daemon.
End users do not run this repo's cmake directly after the one-time install
— the beethoven CLI orchestrates per-project builds. See
docs/cli-integration.md for the contract.
Dependencies
- cmake ≥ 3.20
- A C++17/20 compiler (gcc 9+ / clang 10+)
- For simulation: one of Verilator ≥ 5.0, Icarus Verilog, or VCS
# Debian/Ubuntu
sudo apt-get install cmake build-essential verilator iverilog
# RHEL/Fedora
sudo dnf install cmake gcc-c++ verilator iverilog
# macOS
brew install cmake verilator
VCS is licensed; install per Synopsys docs and ensure vcs is on PATH.
Install (no sudo)
Default prefix is ~/.local. The CMake user package registry takes care
of discovery — downstream find_package(beethoven) works with no env
vars and no CMAKE_PREFIX_PATH.
The simplest path is the wrapper script:
./install.sh # ~/.local, Release
./install.sh --prefix /opt/foo # different prefix
./install.sh --debug # -O0 -g
./install.sh --clean # wipe build/ first
./install.sh --help
Or the cmake commands directly:
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=$HOME/.local -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
cmake --install build
To remove an install: ./uninstall.sh (lists what would be removed,
asks for confirmation; --yes skips the prompt, --dry-run skips the
removal). It removes the libs, headers, cmake configs, the runtime
source-package, and the matching cmake user-package-registry entry,
but only entries that point inside the prefix you pass.
The exact file layout depends on your distro's GNUInstallDirs
convention (lib/ on Debian/macOS, lib64/ on RHEL/Fedora):
~/.local/
├── lib[64]/
│ ├── libbeethoven-discrete.so # built artifact
│ ├── libbeethoven-zynq.so # built artifact
│ └── cmake/beethoven/
│ ├── beethovenConfig.cmake
│ ├── beethovenConfigVersion.cmake
│ ├── BeethovenBuildHelpers.cmake # internal: shared by both Configs
│ ├── beethoven-discrete-targets.cmake
│ ├── beethoven-discrete-targets-release.cmake
│ ├── beethoven-zynq-targets.cmake
│ └── beethoven-zynq-targets-release.cmake
├── include/beethoven/ # public headers
│ ├── allocator/{alloc,alloc_baremetal,device_allocator}.h
│ ├── arm_cache.h
│ ├── beethoven_consts.h
│ ├── fpga_handle.h
│ ├── response_handle.h
│ ├── rocc_cmd.h
│ ├── rocc_response.h
│ ├── runtime_ipc.h
│ └── util.h
└── share/beethoven/runtime-src/ # runtime cmake project, source-package
├── CMakeLists.txt (cmake'd per-project by the CLI)
├── DRAMsim3/ (vendored DRAM model, full source)
├── include/{core,frontends/{axi,chipkit},fpga}/
├── src/{core,frontends/{axi,chipkit},fpga}/
├── scripts/{tab.tab, kria_alloc_pages.py}
└── verilog_resources/BUFG.v
Two convenience pointers are also written:
~/.cmake/packages/beethoven/<md5(prefix)> # registry breadcrumb;
makes find_package(beethoven) zero-config
…and beethovenConfig.cmake exports BEETHOVEN_RUNTIME_SRC_DIR
(absolute path to share/beethoven/runtime-src/) so consumers reading
the package config — the CLI in particular — can find the runtime
cmake project without hardcoding paths.
What's installed vs cached vs not installed
- Installed (copied to
~/.local): libbeethoven-*.so, public
headers, cmake configs, the runtime cmake project. After
cmake --install build, you can rm -rf your dev clone and a
downstream beethoven build still works.
- Per-project (built by the CLI, not installed): the
BeethovenRuntime daemon binary itself, lands at
<your-project>/target/<mode>/runtime/BeethovenRuntime. The runtime
is design-coupled (templated on the user's verilator output), so
it's never globally cached.
Verify the install