Jutge.org
The Virtual Learning Environment for Computer Programming
Mod-7 up-down counter
X47159 en
Design a mod-7 up-down counter. The counter must count-up when the input signal up is 1.
Otherwise, the counter must count-down. After reset, the counter must be initialized at zero.
The top module must be called updown mod7.
module
updown mod7(up, count, clk, rst );
input
up, clk , rst ;
output
[2:0] count;
Input
• up is the input signal that indicates when the counter must count-up (1) or count-down
(0).
• clk is the clock signal.
• rst is the synchronous reset signal.
Output
• count is the 3-bit output.
Problem information
Author : Jordi Cortadella
Generation : 2013-07-17 16:32:26
© Jutge.org, 2006–2013.
http://www.jutge.org