Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/augustunderground/pyspectre
Python interface for Cadence Spectre
https://github.com/augustunderground/pyspectre
cadence-spectre circuit-simulation python
Last synced: about 6 hours ago
JSON representation
Python interface for Cadence Spectre
- Host: GitHub
- URL: https://github.com/augustunderground/pyspectre
- Owner: AugustUnderground
- License: mit
- Created: 2022-09-29T16:28:41.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-11T08:03:19.000Z (5 days ago)
- Last Synced: 2024-11-11T09:19:01.670Z (5 days ago)
- Topics: cadence-spectre, circuit-simulation, python
- Language: Python
- Homepage: https://augustunderground.github.io/pyspectre
- Size: 103 KB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PySpectre
Python interface to Cadence Spectre.
## Dependencies and Requirements
- Python 3.9
- [pynut](https://github.com/augustunderground/pynut).
- [Cadence Spectre](https://www.cadence.com/en_US/home/tools/custom-ic-analog-rf-design/circuit-simulation/spectre-simulation-platform.html), the `spectre` command should be available in you shell## Installation
```sh
$ pip install git+https://github.com/augustunderground/pyspectre.git
```## Example
Simulate a netlist and retrieve simulation results:
```python
import pyspectre as psnetlist = 'path/to/netlist.scs'
includes = ['path/to/pdk/libs']results = ps.simulate(netlist, includes)
```Start an interactive session:
```python
import pyspectre as psnetlist = 'path/to/netlist.scs'
includes = ['path/to/pdk/libs']# Start Interactive session
session = ps.start_session(netlist, includes)# Retrieve simulation analyses defined in the netlist
analyses = ps.get_analyses(session)# Get values for parameters defined in the netlist
params = ps.get_parameters(session, ['Wcm2', 'Ld'])# Set netlist parameters
ps.set_parameters(session, {'Wcm2': 2.0e-6, 'Ld': 1.0e-6})# Simulate
results = ps.run_all(session)# End Interactive session
ps.stop_session(session)
```Check `./test/example.py` and `./notebooks/introduction.ipynb` for more.