Skip to content

huawei-csl/GENIAL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GENIAL โ€” Generative Design Space Exploration via Network Inversion for Low Power Algorithmic Logic Units

Python License Docker Tests

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:

GENIAL: Generative Design Space Exploration via Network Inversion for Low Power Algorithmic Logic Units (arXiv:2507.18989)

If you use GENIAL in work, please give us a star โญ, and cite it! Thank you, and enjoy!

GENIAL Framework Overview

๐Ÿ Table of Content


๐Ÿ” Available Features

  • 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

โš™๏ธ Pipeline

%%{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
Loading

โœจ Key Features

  • ๐Ÿงช 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

๐Ÿš€ Quick Start

0. Clone the repo and its submodules

# 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 --recursive

Note: for now, Flowy is not yet open-source. We thus specifically avoid cloning it.

1. Configure environment

Copy and edit your .env:

cp .env.template .env
# Then edit: set SRC_DIR, WORK_DIR

Get 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.ckpt

2. 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/activate

If it's the first time you install uv, you'll have to restart your shell.

3. Install GENIAL as a package

# 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

4. Build Docker images

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-download

The --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.

5. [Developper] Enable pre-commit hooks

pre-commit install

๐Ÿ“„ See docs/setup.md for additional instructions.


๐Ÿงช Examples

Generate 1 design (no synthesis/simulation):

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 50

Run a minimal endโ€‘toโ€‘end loop (debug mode):

python -m genial.experiment.task_launcher \
  --experiment_name multiplier_3bi_6bo_permuti_allcells_notech_fullsweep_only \
  --output_dir_name demo_run \
  --debug --nb_workers 1

๐Ÿ—‚๏ธ Repository Structure

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

๐Ÿ“š Documentation

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.


๐Ÿ“– Citation

@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}
}

๐Ÿ™ Acknowledgements

GENIAL builds upon a vibrant open-source ecosystem, all licenses and copyright notices have been kept intact:


โš–๏ธ Legal

  • 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.

๐ŸŽก Interdependency Graph

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
Loading

๐Ÿค Contributing

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 install to enable automatic linting and formatting (via ruff).
  • 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 (see tests/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.md and relevant docs/ 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.


About

Code for the Paper GENIAL: Generative Design Space Exploration via Network Inversion for Low Power Algorithmic Logic Units

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors