diff --git a/src/lessons/sv/tasks-functions/description.html b/src/lessons/sv/tasks-functions/description.html index d281958..0040949 100644 --- a/src/lessons/sv/tasks-functions/description.html +++ b/src/lessons/sv/tasks-functions/description.html @@ -15,6 +15,8 @@ Calling a task write_word(addr, data) is blocking. If you want to "spawn and forget" you can use fork.

+

Clock and delay together. Sometimes you need both an edge and a small delay: e.g. @(posedge clk); #1; waits for the rising edge, then advances 1 time unit so that combinational outputs and setup are settled before you drive or sample signals. That pattern keeps stimulus and sampling aligned with the clock while avoiding glitches at the edge.

+

Simulation hang disclaimer. In some environments, using @(posedge clk); #1; (or similar) in a task can cause the simulation to hang or run indefinitely — for example when the clock seen by the testbench is not the same as the one driving the DUT. If that happens, use the clock from the virtual interface instead: @(posedge vif.clk) (and if needed @(posedge vif.clk); #1;), so that your waits are tied to the same clock the interface and DUT use.

Your task: In tb.sv implement the three routine stubs: