CircuitGraph
CircuitGraph: A Python package for Boolean circuits - Published in JOSS (2020)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
2 of 6 committers (33.3%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Repository
Tools for working with circuits as graphs in python
Basic Info
- Host: GitHub
- Owner: circuitgraph
- License: mit
- Language: Verilog
- Default Branch: main
- Homepage: https://circuitgraph.github.io/circuitgraph/
- Size: 10.5 MB
Statistics
- Stars: 123
- Watchers: 2
- Forks: 13
- Open Issues: 13
- Releases: 8
Topics
Metadata Files
README.md

CircuitGraph
CircuitGraph is a library for working with hardware designs as graphs. CircuitGraph provides an interface to do this built on NetworkX, along with integrations with other useful tools such as sat solvers and the Yosys synthesis tool, and input/output to verilog.
Overview
The Circuit class is at the core of the library and it is essentially a wrapper around a NetworkX graph object. This graph is accessable through the graph member variable of Circuit and can be used as an entrypoint to the robust NetworkX API.
Here's a simple example of reading in a verilog file, adding a node to the graph, and writing back to a new file.
```python import circuitgraph as cg
c = cg.from_file('/path/to/circuit.v')
Add an AND gate to the circuit that takes as input nets o0, o1, o2, o3
c.add('g', 'and', fanin=[f'o{i}' for i in range(4)]) cg.to_file(c, '/path/to/output/circuit.v') ```
The documentation can be found here.
Installation
CircuitGraph requires Python3.7 or greater
The easiest way to install is via PyPi:
shell
pip install circuitgraph
To install from the release, download and:
shell
pip install circuitgraph-<release>.tar.gz
Finally, to install in-place with the source, use:
shell
cd <install location>
git clone https://github.com/circuitgraph/circuitgraph.git
cd circuitgraph
pip install -r requirements.txt
pip install -e .
Optional Packages
In addition to the packages enumerated in requirements.txt, there are a few tools you can install to enable additional functionality.
If you would like to use the satisfiability functionality, install PySAT.
Open source synthesis can be perofmred by installing Yosys and adding it to your path.
Alternatively, Genus or DesignCompiler can be used by providing the path to a generic library to use by setting the CIRCUITGRAPH_GENUS_LIBRARY_PATH and CIRCUITGRAPH_DC_LIBRARY_PATH environment variables.
Contributing
If you have ideas on how to improve this library we'd love to hear your suggestions. Please open an issue. If you want to develop the improvement yourself, please consider the information below.
Coverage is computed using Codecov.
If you would like to generate coverage information locally, install coverage and codecov.
shell
pip install coverage codecov
make coverage
Documentation is built using pdoc3.
shell
pip install pdoc3
make doc
Tests are run using the builtin unittest framework. Some basic linting is performed using flake8.
shell
pip instsall flake8
make test
Code should be formatted using black.
Pre-commit is used to automatically run black on commit.
shell
pip install black pre-commit
pre-commit install
Pre-commit also runs a few other hooks, including a docstring formatter and linter. Docs follow the numpy documentation convention.
Citation
If you use this software for your research, we ask you cite this publication: https://joss.theoj.org/papers/10.21105/joss.02646
@article{sweeney2020circuitgraph,
title={CircuitGraph: A Python package for Boolean circuits},
author={Sweeney, Joseph and Purdy, Ruben and Blanton, Ronald D and Pileggi, Lawrence},
journal={Journal of Open Source Software},
volume={5},
number={56},
pages={2646},
year={2020}
}
Acknowledgements
Circuitgraph icon designed by ncasti.
Owner
- Name: circuitgraph
- Login: circuitgraph
- Kind: organization
- Repositories: 4
- Profile: https://github.com/circuitgraph
JOSS Publication
CircuitGraph: A Python package for Boolean circuits
Authors
Department of Electrical and Computer Engineering, Carnegie Mellon University, Pittsburgh, PA 15213
Department of Electrical and Computer Engineering, Carnegie Mellon University, Pittsburgh, PA 15213
Department of Electrical and Computer Engineering, Carnegie Mellon University, Pittsburgh, PA 15213
Department of Electrical and Computer Engineering, Carnegie Mellon University, Pittsburgh, PA 15213
Tags
Boolean circuits satisfiability graph electronic design automationGitHub Events
Total
- Watch event: 14
Last Year
- Watch event: 14
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Ruben Purdy | r****y@a****u | 142 |
| Joe Sweeney | j****y@g****m | 79 |
| Daniel S. Katz | d****z@i****g | 2 |
| Ruben Purdy | r****y@R****l | 2 |
| Natalia Castillejo | n****c@m****m | 1 |
| Joe Sweeney | j****y@j****n | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 26
- Total pull requests: 11
- Average time to close issues: 4 months
- Average time to close pull requests: about 12 hours
- Total issue authors: 8
- Total pull request authors: 6
- Average comments per issue: 1.04
- Average comments per pull request: 0.0
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jpsety (10)
- rbnprdy (7)
- prw99r (4)
- jenila19 (1)
- zyk101177 (1)
- erblum (1)
- Flians (1)
- roy-pstr (1)
Pull Request Authors
- rbnprdy (4)
- jpsety (2)
- danielskatz (2)
- tamood (1)
- ncasti (1)
- gsburmaster (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 328 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 2
(may contain duplicates) - Total versions: 16
- Total maintainers: 2
proxy.golang.org: github.com/circuitgraph/circuitgraph
- Documentation: https://pkg.go.dev/github.com/circuitgraph/circuitgraph#section-documentation
- License: mit
-
Latest release: v0.2.1
published over 2 years ago
Rankings
pypi.org: circuitgraph
Tools for working with boolean circuits as graphs.
- Homepage: https://github.com/circuitgraph/circuitgraph
- Documentation: https://circuitgraph.github.io/circuitgraph/
- License: MIT License
-
Latest release: 0.2.1
published over 2 years ago
Rankings
Dependencies
- lark *
- actions/checkout v2 composite
- actions/setup-python v2 composite
