Skip to main content

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.

PyPI Tests Docs License: MIT


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

📖 axion-hdl.readthedocs.io

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, verilator must be installed on your system (sudo apt install verilator) for make test to 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

axion_hdl-1.4.0.tar.gz (337.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

axion_hdl-1.4.0-py3-none-any.whl (208.1 kB view details)

Uploaded Python 3

File details

Details for the file axion_hdl-1.4.0.tar.gz.

File metadata

  • Download URL: axion_hdl-1.4.0.tar.gz
  • Upload date:
  • Size: 337.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for axion_hdl-1.4.0.tar.gz
Algorithm Hash digest
SHA256 c851bc8daf385ca12c47ad93f4d33081f708d4cfb9d979d2bcf3207f6d6fa75e
MD5 c66a44dd0103be836a5ef1c4307ad9be
BLAKE2b-256 8a4675921c329661ce397aedc14479ad0ef735e727d300b4a2cdaf95ed02cd37

See more details on using hashes here.

Provenance

The following attestation bundles were made for axion_hdl-1.4.0.tar.gz:

Publisher: publish.yml on bugratufan/axion-hdl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file axion_hdl-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: axion_hdl-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 208.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for axion_hdl-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0be1896d00132e54471c9e39b0e4d9bc0736388ff05f0dc8db024ab54be78813
MD5 a38bfa423266abeb1a64f27321af5e44
BLAKE2b-256 ab87e851e06898a13d08ac12b4c0f02f0d566203a8dc8164effac666bc252f1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for axion_hdl-1.4.0-py3-none-any.whl:

Publisher: publish.yml on bugratufan/axion-hdl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page