Metadata-Version: 2.4
Name: digsim-engine
Version: 1.14.0
Summary: The simulator of DigSim: digital logic circuits in Python, and Verilog with Yosys
Author-email: Fredrik Andersson <freand@gmail.com>
Maintainer-email: Fredrik Andersson <freand@gmail.com>
Project-URL: homepage, https://github.com/freand76/digsim
Project-URL: documentation, https://freand76.github.io/digsim/
Keywords: educational,simulation,digital,verilog
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: pyvcd==0.5.0
Requires-Dist: platformdirs==4.9.4
Requires-Dist: pydantic==2.14.1
Requires-Dist: yowasp-yosys==0.70.0.0.post1259
Requires-Dist: yowasp-runtime==1.96
Requires-Dist: wasmtime==47.0.1
Requires-Dist: digsim-native==0.5.0; (sys_platform == "linux" and platform_machine in "x86_64 aarch64") or (sys_platform == "win32" and platform_machine in "AMD64 ARM64") or sys_platform == "darwin"
Dynamic: license-file

# digsim-engine

The simulator of [DigSim](https://github.com/freand76/digsim), without its GUI: digital
logic circuits in Python, Verilog synthesized by Yosys (which runs in-process, nothing
else to install), VCD files for GTKWave, and the circuit files of the GUI.

```sh
pip install digsim-engine
```

```python
from digsim.circuit import Circuit
from digsim.circuit.components import AND, PushButton

circuit = Circuit(vcd="and.vcd")
a = PushButton(circuit, "a")
b = PushButton(circuit, "b")
gate = AND(circuit, "gate")
a.O.wire = gate.A
b.O.wire = gate.B
circuit.init()
a.push()
b.push()
circuit.run(ns=10)
print(gate.Y.value)  # 1
```

The GUI application, `pip install digsim-logic-simulator`, uses this package. See the
[documentation](https://freand76.github.io/digsim/) for the Python API, Verilog components
and testbenches with pytest.
