GENIAL is a research toolkit for exploring how signal encodings impact hardware characteristics such as switching activity, area, and power. It automates the full exploration loop:
- ๐งฌ Generate combinational designs from encoding specs
- โ๏ธ Synthesize with Yosys/ABC or Flowy pipelines
- ๐ Simulate and collect switching activity
- ๐ Extract power using OpenROAD/OpenSTA
- ๐ Analyze results and train encoding recommenders
๐ฌ GENIAL was built for leading research on generative encoding for low-activity logic, at the Huawei Von Neumann Research Center in Zurich in Switzerland. ๐ You can find the related article at the following link:
If you use GENIAL in work, please give us a star โญ, and cite it! Thank you, and enjoy!
- GENIAL โ Generative Design Space Exploration via Network Inversion for Low Power Algorithmic Logic Units
- Design families: Adders, multipliers, encoders, decoders, FSMs
- Encoding schemes: Twoโs complement, unsigned, mixed, one-hot, permuted, etc.
- Backends: Yosys, Mockturtle, ABC, Verilator/Cocotb, OpenROAD/OpenSTA
- Extra: Flowy (optional) for advanced logic synthesis
- Toolkit features: Experiment templating, batching, tracking, analysis, and model training
%%{init: {'flowchart': {'htmlLabels': false}} }%%
flowchart LR
A["Encoding Specs (Templates + Config)"] --> B["Design Generator"]
B --> C{"Synthesis"}
C --> C1["Gate-Level Netlists"]
C --> C2["Optimized Netlists (Flowy)"]
C1 --> D["Simulation + SwAct"]
C2 --> D
D --> E["Power Extraction (OpenROAD/OpenSTA)"]
E --> F["Analyzer + DB"]
F --> G["Trainer / Recommender"]
G -. "feedback" .-> B
- ๐งช Modular experiment templates โ Configurable by design family, encoding scheme, toolchain
- โก Parallelized runners โ For synthesis, simulation (SwAct), power extraction
- ๐ Efficient state tracking โ Resume, skip, or re-run steps as needed
- ๐ค Analysis and ML-ready โ Rich output database, training hooks for recommender models
# 1. Clone the repository without its submodules
git clone https://github.com/huawei-csl/GENIAL.git
# 2. Enter the repo
cd GENIAL
# 3. Initialize submodules manually:
git -c submodule.ext/flowy.update=none submodule update --init --recursiveNote: for now, Flowy is not yet open-source. We thus specifically avoid cloning it.
Copy and edit your .env:
cp .env.template .env
# Then edit: set SRC_DIR, WORK_DIRGet the pre-trained weights from the release files and put them in the resources:
curl -L -o resources/pretrained_model/embedding/117_0.0102_000.ckpt https://github.com/huawei-csl/GENIAL/releases/download/v0.1.0/117_0.0102_000.ckpt2. Set up Python environment with uv
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
uv venv --python 3.13 envs/313_genial
source envs/313_genial/bin/activateIf it's the first time you install uv, you'll have to restart your shell.
# 0. For fresh ubuntu installs [Optional]:
# sudo apt-get update
# sudo apt-get install -y build-essential gcc g++ make
# 1. Install GENIAL with dev dependencies:
uv pip install -e .
# 2. [Optional] If you have access to flowy:
# uv pip install -e ext/flowy
This will take a while. While it's running, you can read this repository documentation further. We recommend reading it in the order suggested as in the usage documentation section.
You can also read the GENIAL paper to get a better idea of what this repository will enable you to do.
./.devcontainer/docker/build_dockers.sh --build-base --no-downloadThe --no-download flag is used to force the oss_eda_base docker image to be built from scratch instead of downloading the pre-built one.
pre-commit install๐ See docs/setup.md for additional instructions.
python -m genial.experiment.task_launcher \
--experiment_name multiplier_3bi_6bo_permuti_allcells_notech_fullsweep_only \
--output_dir_name demo \
--only_gener --nb_new_designs 50python -m genial.experiment.task_launcher \
--experiment_name multiplier_3bi_6bo_permuti_allcells_notech_fullsweep_only \
--output_dir_name demo_run \
--debug --nb_workers 1| Path | Description |
|---|---|
src/genial/ |
Core logic: generator, launcher, analyzer, ML training |
src/genial/templates_and_launch_scripts/ |
Experiment templates and launch scripts |
scripts/ |
Ad-hoc loop helpers and automation scripts |
tests/ |
Unit tests, fixtures, and CI-related testing |
docs/ |
Setup guides, architecture explanations, usage examples |
Here, you will find all you need to understand how to use GENIAL, module by module. We highly recommend to have a look at the different READMEs to find useful commands and what GENIAL can do for you.
- Setup
- Launcher
- Analyzer
- Training
- Recommender / Network Inversion
- Loop Execution
- Utility Scripts
- Switching Activity Model
@inproceedings{genial2026,
author = {Maxence Bouvier and Ryan Amaudruz and Felix Arnold and Renzo Andri and Lukas Cavigelli},
title = {{GENIAL}: Generative Design Space Exploration via Network Inversion for Low Power Algorithmic Logic Units},
booktitle = {Proceedings of the 31st Asia and South Pacific Design Automation Conference (ASPDAC)},
year = {2026},
note = {To appear},
url = {https://arxiv.org/abs/2507.18989}
}
GENIAL builds upon a vibrant open-source ecosystem, all licenses and copyright notices have been kept intact:
- ๐ง Yosys โ Logic synthesis
- ๐ง ABC โ Logic optimization
- ๐ธ๏ธ Mockturtle โ MIG-based Logic optimization
- ๐๏ธ OpenROAD, OpenSTA โ PnR and STA
- ๐ Verilator, Cocotb โ Simulation
- ๐งฎ PyTorch, Pytorch Lightning โ Surrogate model training
- ๐ SOAP, LAMB
- GENIAL is distributed under the BSD 3-Clause Clear License.
- Third-party components bundled or referenced by the project remain under their respective licenses; ensure you review and honor those requirements.
The following graph shows the dependencies between the different repositories used for running the full flow.
โก๏ธ Note: The flowy submodule is optional and not available yet.
graph TD
GENIAL["GENIAL"]
Flowy["Flowy (optional)"]
OSSBase["oss_eda_base"]
OSSFlow["oss_eda_flowscripts"]
Mockturtle["mockturtle"]
GENIAL -.-> Flowy
GENIAL --> OSSBase
OSSBase --> OSSFlow
Flowy --> OSSBase
Flowy --> Mockturtle
click GENIAL "https://github.com/huawei-csl/GENIAL" _blank
click Flowy "https://github.com/huawei-csl/FLOWY" _blank
click OSSBase "https://github.com/huawei-csl/oss_eda_base" _blank
click OSSFlow "https://github.com/huawei-csl/oss_eda_flowscripts" _blank
click Mockturtle "https://github.com/huawei-csl/mockturtle" _blank
We welcome contributions of all kinds! To get started:
- Environment: Use Python 3.13 with
uv. Install the repo in editable mode with dev dependencies using:uv pip install -e . - Pre-commit: Install hooks with
pre-commit installto enable automatic linting and formatting (viaruff). - Tests: Add or modify tests under
tests/. Prefer fast, hermetic tests. For heavy flows (e.g. Docker-based), mark them appropriately and skip if Docker is unavailable (seetests/conftest.py). - Branching & PRs: Work in a feature branch. Keep changes focused, write clear commit messages, and include a short rationale and any user-facing changes in your PR description.
- Docs: Update
README.mdand relevantdocs/files if your contribution changes usage, behavior, or setup.
For larger features or architectural changes, please open an issue first to discuss scope and design.
See docs/developer/contributing.md for full contribution guidelines.
