Skip to main content

dau sim

dau simulator

Build Status codecov License PyPI

Overview

dau-sim simulates digital hardware designs on csp's reactive stream processing engine. Hardware signals become CSP time-series edges, combinational logic becomes CSP nodes, and clock domains become CSP clock processes. The result is a cycle-accurate simulator with deterministic event scheduling and multi-clock support.

Supported inputs:

Output formats: VCD (IEEE 1364-2001) waveform files. FST and live streaming are planned.

Installation

pip install dau-sim

For development:

git clone https://github.com/dau-dev/dau-sim.git
cd dau-sim
pip install -e ".[develop]"

Quick Start

from amaranth.lib import wiring
from amaranth.lib.wiring import In, Out
from amaranth.hdl import Module

from dau_sim.frontends import from_amaranth
from dau_sim.compiler import compile_module


class Counter(wiring.Component):
    en: In(1)
    count: Out(8)

    def elaborate(self, platform):
        m = Module()
        with m.If(self.en):
            m.d.sync += self.count.eq(self.count + 1)
        return m


cm = compile_module(from_amaranth(Counter()))
traces = cm.run(cycles=20, inputs={"en": 1})
cm.write_vcd("counter.vcd", traces)

In the DAU stack

dau-sim is a general simulator. It knows nothing about DAU contracts or tiles. The rest of the stack uses it through composition: the simulate task in dau-build drives it from the same declarative build spec as synthesis, so one description both simulates and builds:

# in a dau-build checkout, which carries the identity example
dau-build task=tasks/sim/simulate model.module=dau_identity_top model.spec_path=examples/identity/dau-build.yaml

Design-specific verification, such as the golden-equal cocotb benches for the DAU operator tiles, lives with the tiles in dau-core.

Documentation

Topic Description
Amaranth Simulating Amaranth HDL designs
Verilog / SystemVerilog Simulating SV/V designs and hand-built IR
cocotb Running cocotb testbenches against dau-sim
CLI Command-line interface reference
Architecture Pipeline and internal design
API Reference Full API tables
Benchmarks Performance numbers and execution modes

License

This project is licensed under the Apache 2.0 License. See LICENSE for details.

Metadata

Release files for dau-sim 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dau-sim 0.4.0
File Size Uploaded Provenance Actions
dau_sim-0.4.0.tar.gz 144.7 kB Without provenance Details for dau_sim-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dau-sim 0.4.0
File Interpreter ABI Platform Actions
dau_sim-0.4.0-py3-none-any.whl Python 3 none any Details for dau_sim-0.4.0-py3-none-any.whl

Total release size: 321.9 kB

Release files / dau_sim-0.4.0.tar.gz

Download URL dau_sim-0.4.0.tar.gz
Size 144.7 kB
Tags Source
SHA-256 checksum
How to use checksums
aaf08ce65dae2483102334b95a19a4cc25995ab21c4cf0cdf9a2b291da85c52e
BLAKE2b-256 checksum
How to use checksums
898b7f788dfb6d177112778ddded209b6da463079b6efb189989636ca0a1d532
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / dau_sim-0.4.0-py3-none-any.whl

Download URL dau_sim-0.4.0-py3-none-any.whl
Size 177.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9eb669a47d8e1c255aa1920e3ec26ef0927acd20f543b402873511b4ef4cf85
BLAKE2b-256 checksum
How to use checksums
d996f9e435b6ae9f1ed5a5c0f259d0e61d11ebd36590bc86eb19b961971f5a48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for dau-sim 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page