RTL Design #27 · 2026-10-20 · Timers · Easy · about 10 min

A timer that restarts when poked

timer is a one-shot timer. A start sampled at a rising edge, with len in 1 to 15, begins a run.

  • busy rises after that edge and stays high for exactly len cycles.
  • done is a one-cycle pulse that rises as busy falls.
  • start is ignored while busy is high. A start with len = 0 is ignored too.
  • Reset (synchronous, active low) clears everything.

len is only looked at on the edge that takes a start. Fix timer.sv.

Write and run your answer in the browser. The hidden tests check it, and it’s free.