Automated AXI4-Lite Register Interface Generator for VHDL modules
Project description
Axion-HDL
AXI4-Lite register interfaces from VHDL, SystemVerilog, YAML, TOML, XML, or JSON. One command.
Install
For users:
pip install axion-hdl
For development:
git clone https://github.com/bugratufan/axion-hdl.git
cd axion-hdl
python3 -m venv venv
source venv/bin/activate
pip install -e ".[dev]" # Includes pytest, cocotb, etc.
Use
# From VHDL with @axion annotations
axion-hdl -s my_module.vhd -o output/
# From SystemVerilog with @axion annotations
axion-hdl -s my_module.sv -o output/
# From YAML/TOML/XML/JSON
axion-hdl -s registers.yaml -o output/
axion-hdl -s registers.toml -o output/
Output: VHDL/SystemVerilog modules, C headers, documentation, YAML/TOML/XML/JSON exports.
Define Registers
VHDL — embed in your code:
-- @axion_def BASE_ADDR=0x1000 CDC_EN
signal status : std_logic_vector(31 downto 0); -- @axion RO
signal control : std_logic_vector(31 downto 0); -- @axion RW W_STROBE
SystemVerilog — same annotations, different syntax:
// @axion_def BASE_ADDR=0x1000 CDC_EN
logic [31:0] status; // @axion RO
logic [31:0] control; // @axion RW W_STROBE
YAML — standalone file:
module: my_module
base_addr: "0x1000"
config:
cdc_en: true
registers:
- name: status
access: RO
- name: control
access: RW
w_strobe: true
TOML — clean, readable syntax:
module = "spi_master"
base_addr = "0x0000"
[config]
cdc_en = true
cdc_stage = 2
[[registers]]
name = "control"
addr = "0x00"
access = "RW"
w_strobe = true
description = "SPI control register"
[[registers]]
name = "status"
addr = "0x04"
access = "RO"
r_strobe = true
description = "SPI status register"
Output — one command:
axion-hdl -s spi_master.toml -o output --all
Generates: VHDL + SystemVerilog modules, C header, HTML docs, YAML/TOML/XML/JSON exports
Features
- Multi-format input — VHDL/SystemVerilog annotations, YAML, TOML, XML, JSON
- Multi-HDL output — Generate both VHDL and SystemVerilog register interfaces
- CDC support — built-in clock domain crossing synchronizers
- Subregisters — pack multiple fields into one address
- Wide signals — auto-split 64-bit+ signals across addresses
- Tested — 307+ tests, GHDL simulation verified
Documentation
Development & Testing
Quick start:
git clone https://github.com/bugratufan/axion-hdl.git
cd axion-hdl
make test # Auto-installs dependencies and runs all tests
The make test command automatically:
- Creates a virtual environment if needed
- Installs all test dependencies
- Runs 307+ tests (Python + VHDL + cocotb)
Note: For SystemVerilog linting tests,
verilatormust be installed on your system (sudo apt install verilator) formake testto pass.
Manual setup (optional):
make setup-dev # Create venv + install dependencies
source venv/bin/activate
CI/Automated environments:
AXION_AUTO_INSTALL=1 make test # Skip prompt, auto-install
Contributing:
git checkout develop
git checkout -b feature/your-feature
# Make changes
make test # Dependencies auto-installed on first run
# Submit PR to develop branch
License
MIT — Bugra Tufan
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file axion_hdl-1.5.1.tar.gz.
File metadata
- Download URL: axion_hdl-1.5.1.tar.gz
- Upload date:
- Size: 350.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2883075e415dfc08b97e0d8293ad3eb034cfa75fb1d28c6b74012c59259f6e1b
|
|
| MD5 |
6b2fe01c7ecfc4b80f3f1125b33137c3
|
|
| BLAKE2b-256 |
268a07376087f3772267b1bc2410627ee1563e69e37d8021bb23a1aa19d6ba3f
|
Provenance
The following attestation bundles were made for axion_hdl-1.5.1.tar.gz:
Publisher:
publish.yml on bugratufan/axion-hdl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
axion_hdl-1.5.1.tar.gz -
Subject digest:
2883075e415dfc08b97e0d8293ad3eb034cfa75fb1d28c6b74012c59259f6e1b - Sigstore transparency entry: 1458716370
- Sigstore integration time:
-
Permalink:
bugratufan/axion-hdl@13fec2a02f3eeffa3a318be4f03df04f1fb9edd1 -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/bugratufan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@13fec2a02f3eeffa3a318be4f03df04f1fb9edd1 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file axion_hdl-1.5.1-py3-none-any.whl.
File metadata
- Download URL: axion_hdl-1.5.1-py3-none-any.whl
- Upload date:
- Size: 215.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
611046518df6dbd1a3e5df5125f4c54016a64c4f45ec0ab1475c0ae3a7fafbae
|
|
| MD5 |
cd95828f9582cf723a9e46e48a292fa7
|
|
| BLAKE2b-256 |
ec732f406795b7cfed413584f1dac9190302a45d29efd1cade930fe97a6c9d2d
|
Provenance
The following attestation bundles were made for axion_hdl-1.5.1-py3-none-any.whl:
Publisher:
publish.yml on bugratufan/axion-hdl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
axion_hdl-1.5.1-py3-none-any.whl -
Subject digest:
611046518df6dbd1a3e5df5125f4c54016a64c4f45ec0ab1475c0ae3a7fafbae - Sigstore transparency entry: 1458716605
- Sigstore integration time:
-
Permalink:
bugratufan/axion-hdl@13fec2a02f3eeffa3a318be4f03df04f1fb9edd1 -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/bugratufan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@13fec2a02f3eeffa3a318be4f03df04f1fb9edd1 -
Trigger Event:
workflow_run
-
Statement type: