altera-host-control provides C and C++ APIs for reading and writing memory-mapped registers over pluggable transports.
The core library includes a transport abstraction, a register access layer, UDP and UIO transports, optional Python bindings, and optional higher-level drivers and sensor helpers built on top of the register interface.
- C transport abstraction via
hcl_register_transport - C register access layer via
hcl_register_interface - C++ transport abstraction via
hcl::RegisterTransport - C++ register helper via
hcl::RegisterInterface
- UDP register transport
- UIO register transport
- Hololink APB register transport
Default build:
cmake -S . -B build
cmake --build build
ctest --test-dir buildDocker builds:
docker build -t altera-host-control .
docker build -f Dockerfile.hololink -t altera-host-control:hololink .Use Dockerfile.hololink when you need the optional NVIDIA Hololink transport, drivers and examples.
Useful CMake options:
HCL_BUILD_CPP=ON|OFF: build C++ wrappers, C++ examples, and C++ testsHCL_BUILD_EXAMPLES=ON|OFF: build example programsHCL_BUILD_TESTS=ON|OFF: build testsHCL_BUILD_DRIVERS=ON|OFF: build optional driver librariesHCL_BUILD_SENSORS=ON|OFF: build optional sensor helpers when drivers are enabledHCL_BUILD_PYTHON=ON|OFF: build Python bindings when dependencies are availableHCL_BUILD_HOLOLINK=ON|OFF: build the optional Hololink-backed register transport; requires a Hololink SDK package exposinghololink::core
Example: build core library, drivers, and sensors without tests:
cmake -S . -B build -DACL_BUILD_TESTS=OFF -DACL_BUILD_DRIVERS=ON -DACL_BUILD_SENSORS=ON
cmake --build buildEnable bindings with:
cmake -S . -B build -DACL_BUILD_PYTHON=ON -DACL_BUILD_DRIVERS=ON -DACL_BUILD_SENSORS=ON
cmake --build buildBindings require:
- Python 3 interpreter and development headers
pybind11
The Python package is split into a small core API and optional grouped namespaces:
altera_host_control: core interfaces, result/status types, and transportsaltera_host_control.drivers: hardware driversaltera_host_control.sensors: sensor drivers
By default, install places the package in the selected interpreter's site-packages directory when available. You can override the install destination with -DACL_PYTHON_INSTALL_PACKAGE_DIR=/path/to/site-packages/altera_host_control.
magic(u32):0x41434C4B("HCLK")version(u8):1op(u8):1=read,2=writereserved(u16):0sequence_id(u32): request ID echoed by the responsebase_address(u32): register block base address in network byte orderoffset(u32): register offset from base address in network byte ordervalue(u32): write value forop=2, ignored for reads
magic(u32):0x41434C4Bversion(u8):1op(u8): mirrors request opstatus(u16):0=ok, non-zero indicates device-side failuresequence_id(u32): same as request correlation IDbase_address(u32): same as request base address in network byte orderoffset(u32): same as request offset in network byte ordervalue(u32): read value forop=1, ignored for writes
See examples/README.md for runnable example commands.