Event-driven Verilog-A Simulator — pure-Python behavioral simulation
Project description
EVAS — Event-driven Verilog-A Simulator
EVAS is a lightweight, pure-Python behavioral simulator for digital/control-class Verilog-A models. It provides fast event-driven simulation with zero external EDA dependencies — no C compiler, no ngspice.
📖 Documentation: evas.tokenzhang.com | English
Target Use Cases
- Rapid behavioral verification of clocked digital blocks (comparators, ADCs, DACs, dividers, LFSRs, DFFs)
- Event-driven models using
@cross,@above,transition(),@initial_step - Voltage-mode contributions (
V() <+)
Installation
pip install evas-sim
No C compiler, no ngspice. NumPy, Matplotlib, and Pandas are installed automatically.
Quickstart
# List all 15 bundled examples
evas list
# Run the clock divider example
evas run clk_div
# Run a specific testbench in a multi-testbench example
evas run digital_basics --tb tb_not_gate.scs
# Simulate your own netlist
evas simulate path/to/tb.scs -o output/mydesign
evas run clk_div copies the Verilog-A model and Spectre testbench into
./clk_div/, simulates it, and saves waveform data + a PNG plot to
./output/clk_div/.
Bundled Examples
| Name | Description |
|---|---|
clk_div |
Clock divider (ratio = 4) |
clk_burst_gen |
Clock burst generator |
digital_basics |
Basic gates: AND, NOT, OR, DFF, inverter chain |
lfsr |
Linear feedback shift register |
noise_gen |
Noise signal generator |
ramp_gen |
Ramp signal generator |
edge_interval_timer |
Edge-interval timer |
d2b_4b |
4-bit thermometer-to-binary decoder |
dac_binary_clk_4b |
4-bit binary DAC (clocked) |
dac_therm_16b |
16-bit thermometer DAC |
adc_dac_ideal_4b |
4-bit ideal ADC + DAC with sample-hold |
cmp_strongarm |
StrongARM comparator |
cmp_offset_search |
Comparator offset search algorithm |
dwa_ptr_gen |
DWA pointer generator |
sar_adc_dac_weighted_8b |
8-bit weighted SAR ADC + DAC |
CSV Output Format
All signals default to 6-digit scientific notation (:.6e). The save statement
accepts an optional :fmt suffix per signal:
| Suffix | Format | Example value |
|---|---|---|
:6e |
:.6e (default) |
4.500000e-01 |
:10e |
:.10e |
4.5000000000e-01 |
:2e |
:.2e |
4.50e-01 |
:4f |
:.4f |
0.4500 |
:d |
integer | 7 |
// With format hints
save vin:10e vout:6e clk:2e dout_code:d
Supported Verilog-A Features
- Module declarations with parameters and port arrays
@(cross(...)),@(above(...))zero-crossing events@(initial_step)initialization; combined eventstransition()operator with delay, rise/fall timesV(node),V(a, b)voltage access;V(node) <+voltage contributions- Arithmetic, logical, bitwise, shift, ternary operators
forloops,if/else,begin/endblocks- Integer and real variables, arrays, parameters with ranges
`include,`define,`default_transitionpreprocessor directives- SI suffixes; math functions:
ln,log,exp,sqrt,pow,abs,sin,cos,floor,ceil,min,max - String parameters with
.substr()method calls
Spectre Netlist Support
vsourcewithdc,pulse,pwl,sintypesahdl_includefor VA model filesparameterswith expression evaluationtrananalysis withstopandmaxstepsavesignal selection with optional per-signal format specifiers
Limitations
- No
I() <+current contributions - No
ddt(),idt()calculus operators - No MNA matrix solve (no KCL/KVL enforcement)
- No transistor-level simulation
- No AC or DC analysis (transient only)
- No subcircuit hierarchy
Project Structure
EVAS/
├── evas/
│ ├── cli.py # CLI entry point (evas simulate / run / list)
│ ├── compiler/ # Verilog-A front-end (lexer, parser, AST)
│ ├── simulator/ # Event-driven simulation engine + backend
│ ├── netlist/ # Spectre .scs parser + orchestration runner
│ ├── vams/ # VAMS include files (constants, disciplines)
│ └── examples/ # 15 bundled example circuits
├── docs/ # Sphinx documentation (Chinese, default)
├── docs_en/ # Sphinx documentation (English)
├── tests/
└── pyproject.toml
Development
git clone https://github.com/Arcadia-1/EVAS.git
cd EVAS
pip install -e ".[dev]"
pytest tests/ -v
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evas_sim-0.1.0.tar.gz.
File metadata
- Download URL: evas_sim-0.1.0.tar.gz
- Upload date:
- Size: 81.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
345f20a3544fc39eec9ac51d35c098709eec5933f5837967548f5bb10901c456
|
|
| MD5 |
257b1314a6bc39a063531dd27e657752
|
|
| BLAKE2b-256 |
fa454211661fc605e30014c9075f47664c4caab36136b28011bed9ebd3a414d8
|
Provenance
The following attestation bundles were made for evas_sim-0.1.0.tar.gz:
Publisher:
publish.yml on Arcadia-1/EVAS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
evas_sim-0.1.0.tar.gz -
Subject digest:
345f20a3544fc39eec9ac51d35c098709eec5933f5837967548f5bb10901c456 - Sigstore transparency entry: 1101543064
- Sigstore integration time:
-
Permalink:
Arcadia-1/EVAS@750adc053914b4da4d87f99d6d90ddfc2254eefc -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Arcadia-1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@750adc053914b4da4d87f99d6d90ddfc2254eefc -
Trigger Event:
push
-
Statement type:
File details
Details for the file evas_sim-0.1.0-py3-none-any.whl.
File metadata
- Download URL: evas_sim-0.1.0-py3-none-any.whl
- Upload date:
- Size: 114.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58dcf0a91127d83fed42185d70a899b368d8decd4ef206338f7602c124ef7dc8
|
|
| MD5 |
23f82e85ccb9cea50f6b4b80608746a2
|
|
| BLAKE2b-256 |
04fb15b7e4d4f7d9c278d58ae4acca0f8bf6b413f4b702bbd8134d80a3106c13
|
Provenance
The following attestation bundles were made for evas_sim-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Arcadia-1/EVAS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
evas_sim-0.1.0-py3-none-any.whl -
Subject digest:
58dcf0a91127d83fed42185d70a899b368d8decd4ef206338f7602c124ef7dc8 - Sigstore transparency entry: 1101543067
- Sigstore integration time:
-
Permalink:
Arcadia-1/EVAS@750adc053914b4da4d87f99d6d90ddfc2254eefc -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Arcadia-1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@750adc053914b4da4d87f99d6d90ddfc2254eefc -
Trigger Event:
push
-
Statement type: