Click here for the answer.

Let’s return to our counter example. (No pun intended initially, but now I can’t seem to avoid it.)

In this case, we want to build a counter that will count down from 21, but only upon request (i_start_signal). Once this counter gets to zero, the counter stops counting down and waits for the next request. Such counters can be used in a whole variety of circumstances, my favorite being the clk_ctr in my updated QSPI flash controller.

If you are an ASIC engineer and don’t like initial values, then feel free to add reset logic to this example.

What do you think, will the assertion above pass?