A counter register is a
sequential circuit with n + 1 inputs and n
outputs. It differs from an
ordinary counter in that it can also function as a
register. It differes from a register in that when not explictly
loaded, it works as a counter, rather than maintaining its previous
value.
Here is a
state table (abbreviated) for a 4-bit counter register:
ld i3 i2 i1 i0 o3 o2 o1 o0 | o3' o2' o1' o0'
--------------------------------------------
0 - - - - 0 0 0 0 | 0 0 0 1
0 - - - - 0 0 0 1 | 0 0 1 0
0 - - - - 0 0 1 0 | 0 0 1 1
0 - - - - 0 0 1 1 | 0 1 0 0
0 - - - - 0 1 0 0 | 0 1 0 1
0 - - - - 0 1 0 1 | 0 1 1 0
0 - - - - 0 1 1 0 | 0 1 1 1
0 - - - - 0 1 1 1 | 1 0 0 0
0 - - - - 1 0 0 0 | 1 0 0 1
0 - - - - 1 0 0 1 | 1 0 1 0
0 - - - - 1 0 1 0 | 1 0 1 1
0 - - - - 1 0 1 1 | 1 1 0 0
0 - - - - 1 1 0 0 | 1 1 0 1
0 - - - - 1 1 0 1 | 1 1 1 0
0 - - - - 1 1 1 0 | 1 1 1 1
0 - - - - 1 1 1 1 | 0 0 0 0
1 c3 c2 c1 c0 - - - - | c3 c2 c1 c0
As you can see, the counter register behaves like an ordinary
counter when the ld signal is 0 and as a
register when the ld signal is 1. |