1 from ..hdl.ast import (Signal, Statement, Delay as Delay,
2 Tick as Tick, Passive as Passive, Assign, Value)
3 from typing import Any, Iterable, Generator, Union, Callable, Optional
5 __all__ = ["Simulator", "Delay", "Tick", "Passive", "DeadlineError"]
7 ProcessCommand = Union[Delay, Tick, Passive, Assign, Value]
8 ProcessGenerator = Generator[ProcessCommand, Union[int, None], None]
9 Process = Union[ProcessGenerator, Callable[[], ProcessGenerator]]
16 gtkw_file: Any = None,
17 traces: Iterable[Signal] = ()):
20 def __enter__(self) -> 'Simulator':
23 def __exit__(self, *args: Any) -> None:
26 def add_process(self, process: Process) -> None:
29 def add_sync_process(self, process: Process) -> None:
34 phase: Optional[float] = None,
35 domain: Any = "sync") -> None:
38 def step(self, run_passive: bool = False) -> bool:
41 def run(self) -> None:
44 def run_until(self, deadline: float, run_passive: bool = False) -> bool: