Skip to main content

Module triggers

Module triggers 

Source
Expand description

GPI-backed awaitables: Timer, edge triggers, NullTrigger (design-doc §4.4). Each future registers its simulator callback lazily on first poll and removes it via RAII when dropped — cancellation of a waiting task cleans up its trigger registration for free (§4.6).

Structs§

Edge
Edge trigger on a signal (ports of RisingEdge/FallingEdge/ValueChange, mapping row 14 — exposed as methods on typed handles).
NullTrigger
Yield once to the scheduler. Kept for parity but documented as a smell — prefer Event (cocotb NullTrigger docstring; book: Coroutines chapter).
Timer
One-shot timed trigger (port of cocotb Timer, mapping row 13). Construction rejects zero durations, as cocotb’s does.