Bit Specification Using an Unsigned Integer Expression

This example shows how to specify the Number of bits in the Counter Free-Running block as an unsigned integer expression.

At t = 254, the counter reaches the maximum value of uint8(2^(uint8(8))-1). If you increase the stop time of the simulation to 255, the counter wraps to zero.