User`s guide
Counter
5-108
You can see that the seventh input samples to both the Clk and Rst ports of the
Counter block represent trigger events (rising edges), so at this time step the
block first resets the counter to its initial value of 5, and then immediately
decrements the count to 4. When the counter reaches its minimum value of 0,
it rolls over to its maximum value of 20 with the following trigger event at the
Cnt port.
[1]
[0]
[1]
[0]
[1]
[0]
[1]
[0]
[1]
[0]
[1]
[0]
[1]
[0]
[1]
[0]
[1]
[0]
[1]
[0]
[1]
[0]
Clk Rst
...
...
Simulation time
Cnt Hit
...
...
[0]
[0]
[0]
[0]
[0]
[0]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[5]
[5]
[4]
[4]
[3]
[3]
[4]
[4]
[3]
[3]
[2]
[2]
[1]
[1]
[0]
[0]
[20]
[20]
[19]
[19]
[18]
[18]
[0]
[0]
[1]
[1]
[0]
[0]
[1]
[1]
[0]
[0]
[0]
[0]
[0]
[0]
[0]
[0]
[0]
[0]
[0]
[0]
[0]
[0]
reset
initial value
max value
hit
hit