Modular synthesis, recognition, and sizing of analog op-amp circuits.
CircuitGenome is a Python toolkit for analog circuit topology synthesis and recognition, focused on op-amp design. It takes a modular approach: a complete circuit is assembled from independent functional building blocks — differential pair, load, tail current, bias, compensation, and output stage. By enumerating every valid combination of block implementations, the tool can quickly generate thousands of structurally distinct op-amp netlists for dataset generation, automated design exploration, or topology studies.
The toolkit works in both directions of the design problem. Going forward, it constructs and sizes op-amps from building blocks and a performance specification. Going backward, it reads a flat SPICE netlist and recovers its structure — identifying subcircuits (differential pairs, current mirrors, cascode loads, bias generators, CMFB, compensation) and assigning each to its functional role. An end-to-end designer chains these layers together, keeping only the circuits whose ngspice-measured metrics meet the spec.
Key Features
- Topology synthesis — enumerate every valid op-amp from modular building blocks and emit flat or hierarchical SPICE netlists.
- Subcircuit & functional-block recognition — recover structure and slot assignments from a flat SPICE netlist.
- Initial sizing — compute minimum transistor W/L values that satisfy DC specs (gain, GBW, phase margin, slew rate, CMRR) via an OR-Tools CP-SAT solver and a gm/Id flow.
- End-to-end designer — enumerate, size, simulate, and keep only the designs that pass ngspice-measured metrics.
- One-, two-, and three-stage op-amps, single-ended and fully differential, including nested-Miller (NMC) and reversed-nested-Miller (RNMC) compensation.
- Extensible with no code — add new module variants by editing a YAML file.
Have a question? Start a discussion or open an issue on GitHub.
📖 Documentation
Full user guide, API reference, and design theory live in the Sphinx docs:
Installation
pip install circuitgenome
Or install from source:
git clone https://github.com/analog-ml/CircuitGenome.git
cd CircuitGenome
pip install -e .
Requires Python 3.9+. PyYAML and OR-Tools (for the sizer) are installed automatically.
Getting Started
Run the end-to-end designer: enumerate a topology, size each candidate, simulate with ngspice, and export the designs that meet your spec.
circuitgenome design --spec spec_gf180.yaml --topology two_stage_opamp_single_ended \
--output-dir designs/ --limit 200 --workers 4
For the full CLI reference, Python API, and worked examples, see the documentation.
Contributing
CircuitGenome is an open research project and contributions are very welcome — new module variants, topology templates, recognizer patterns, sizing heuristics, bug fixes, and documentation improvements.
- Browse or open issues: https://github.com/analog-ml/CircuitGenome/issues
- Fork the repo, create a feature branch, and open a pull request against
main. - Run the test suite before submitting:
python3 -m pytest tests/ -v. - Adding a new module variant usually needs no code changes — just edit
opamp_modules.yaml(see the docs for details).
References
- A Data-Driven Analog Circuit Synthesizer with Automatic Topology Selection and Sizing — S. Poddar, A. F. Budak, L. Zhao, C.-H. Hsu, S. Maji, K. Zhu, Y. Jia, D. Z. Pan. Design, Automation & Test in Europe (DATE), 2024.
- FUBOCO: Structure Synthesis of Basic Op-Amps by FUnctional BlOck COmposition — I. Abel, H. Graeb. ACM Transactions on Design Automation of Electronic Systems (TODAES), 2022.
- A Functional Block Decomposition Method for Automatic Op-Amp Design — I. Abel, M. Neuner, H. Graeb. Integration, the VLSI Journal (Elsevier), 2022.
- Constraint-Programmed Initial Sizing of Analog Operational Amplifiers — I. Abel, M. Neuner, H. Graeb. IEEE International Conference on Computer Design (ICCD), 2019.
PDFs of all four papers are in docs/papers/.
Metadata
Release files for circuitgenome 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| circuitgenome-0.3.0.tar.gz | 1.8 MB | Without provenance | Details for circuitgenome-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| circuitgenome-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for circuitgenome-0.3.0-py3-none-any.whl |
Total release size: 3.6 MB
Release files / circuitgenome-0.3.0.tar.gz
| Download URL | circuitgenome-0.3.0.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
792ef4c928fd7aa251ff594509fbb55d259db1808396a1d63ea7e79ba79aa608
|
|
BLAKE2b-256 checksum How to use checksums |
10524d82463f64ce012c0a10b72e92cfd5794518efbbc15f40e14089a6a74b79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / circuitgenome-0.3.0-py3-none-any.whl
| Download URL | circuitgenome-0.3.0-py3-none-any.whl |
|---|---|
| Size | 1.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebc29e4b097eaa0a731ac0a6d17774e0b7aa3a802a1d43195c504d88ee57a0fe
|
|
BLAKE2b-256 checksum How to use checksums |
fa4561cb01ef1ec2f67cafb41b7960ebf7a2fb7ff68d763ea887ae2f581cefcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for circuitgenome 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.