API Reference¶
High-level interactive API¶
from dau_sim import Simulator
sim = Simulator.from_sv_file("design.sv", top="top_module")
result = sim.run(cycles=1000, inputs={"en": 1})
print(result.latest("count"))
rows = result.to_rows(signals=["count"])
sim.write_vcd("out.vcd", result)
Frontends¶
Function |
Description |
|---|---|
|
Lower an Amaranth |
|
Parse SystemVerilog source string to IR |
|
Parse SystemVerilog file to IR |
|
Bridge from a |
Compiler¶
Function / Method |
Description |
|---|---|
|
Compile IR |
|
Simulate and return traces |
|
Write traces to VCD file |
|
Convert traces to VCD string |
Backends¶
Function / Class |
Description |
|---|---|
|
Run cocotb testbench against Amaranth design or IR |
|
Low-level engine with NBA-correct event scheduling |
IR types¶
Type |
Description |
|---|---|
|
Top-level container with ports, signals, clock domains, blocks |
|
Named bit-vector with shape and initial value |
|
Signal with direction ( |
|
Bit-width and signedness |
|
Clock signal, edge polarity, optional reset |
|
Combinational / sequential logic blocks |
|
Statement types |
|
Expression types |