Skip to main content

Event-driven Verilog-A Simulator — pure-Python behavioral simulation

Project description

EVAS — Event-driven Verilog-A Simulator

PyPI CI Docs License: MIT

A lightweight, pure-Python behavioral simulator for digital/mixed-signal Verilog-A models. Event-driven. No C compiler, no ngspice, no KCL/KVL solver.

📖 Docs: evas.tokenzhang.com  |  中文


If you're a human — install with pip and jump to Quickstart.

If you're an AI agent — copy skills/evas-sim/ into your .claude/skills/ (Claude Code) or equivalent skills directory for your agent framework. The skill file gives you built-in knowledge of EVAS commands, supported Verilog-A features, and common failure modes so you can simulate and debug without guessing.


Installation

pip install evas-sim

Verify:

evas list        # prints all bundled examples

If evas is not on PATH, use python -m evas.

Quickstart

# Run a bundled example
evas run clk_div

# Run with a specific testbench (for multi-TB examples)
evas run digital_basics --tb tb_not_gate.scs

# Simulate your own netlist
evas simulate path/to/tb.scs -o output/mydesign

Output lands in ./output/<name>/ (bundled) or the -o directory (custom). Each run produces tran.csv (waveforms), one or more .png plots, and strobe.txt (log messages).

Bundled Examples

Name Description
clk_div Clock divider
clk_burst_gen Clock burst generator
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
comparator StrongARM comparator + binary-search offset calibration
dwa_ptr_gen DWA pointer generator — overlap variant (100 MHz, v2b_4b input)
dwa_ptr_gen_no_overlap DWA pointer generator — no-overlap variant
sar_adc_dac_weighted_8b 8-bit weighted SAR ADC + DAC
digital_basics AND / OR / NOT gates, D flip-flop, inverter chain

Supported Verilog-A

Feature Status
V(node) <+, V(a,b) differential
@(cross(...)), @(above(...)), @(initial_step)
@(timer(period)), @(final_step)
transition() with delay / rise / fall
for, if/else, case/endcase, begin/end
arrays, parameters, string parameters
`include, `define, `default_transition
SI suffixes, math functions (sin, cos, exp, ln, …)
$temperature, $vt, $abstime
$bound_step()
$fopen(), $fclose(), $fstrobe(), $fwrite(), $fdisplay()
$display, $strobe, $random, $dist_uniform(), $rdist_normal()
I() <+, ddt(), idt(), q() <+
AC/DC analysis, subcircuit hierarchy, transistors

CSV Output Format

The save statement accepts optional per-signal format hints:

save vin:10e vout:6e clk:2e dout_code:d
Suffix Format
:6e (default) 4.500000e-01
:Nf fixed-point, N decimal places
:d integer

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

evas_sim-0.3.0.tar.gz (110.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evas_sim-0.3.0-py3-none-any.whl (149.7 kB view details)

Uploaded Python 3

File details

Details for the file evas_sim-0.3.0.tar.gz.

File metadata

  • Download URL: evas_sim-0.3.0.tar.gz
  • Upload date:
  • Size: 110.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for evas_sim-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ed55cc666fcf01d15f44c3b05893b8281b1de499ee5bd49dee6f82027f2c70c8
MD5 5fd630c4a4a9851ae21a486f3c81f3f1
BLAKE2b-256 a2c1515a0777ceb15aa8870c6007b9bc3186c4889dc0e981dba0a0aae9a56f29

See more details on using hashes here.

Provenance

The following attestation bundles were made for evas_sim-0.3.0.tar.gz:

Publisher: publish.yml on Arcadia-1/EVAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file evas_sim-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: evas_sim-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 149.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for evas_sim-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ea75f88ba8d3dd547b8564eb06a8581a7f6e6afde1f00af1dda8cc19816e2d7
MD5 c91439053298c9a36bac7bbe53b069d6
BLAKE2b-256 36e26d2c40f9a2ca214a10842190bcfe41ccecba25000bcb25b350f06f4e550d

See more details on using hashes here.

Provenance

The following attestation bundles were made for evas_sim-0.3.0-py3-none-any.whl:

Publisher: publish.yml on Arcadia-1/EVAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page