Hardware interview practice
Non-blocking global timeout
Start a background timer that ends the test after a fixed number of clock cycles.
Reviewed example
Work through one case
Input
start global_timeout(name="smoke",cycles=50)Expected output
caller returns immediately; detached timer reports smoke fatal after 50 positive edgesThe forked background branch counts clock cycles without blocking test setup and identifies its configured timer in the failure.
What to cover
Requirements
- Do not block the caller.
- Count positive clock edges.
- Include the timer name and cycle count in the fatal message.
