Mod-7 up-down counter

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.

Specification

module updown_mod7(up, count, clk, rst);
    input up, clk, rst;
    output [2:0] count;

Input

Output

Problem information

Author: Jordi Cortadella

Generation: 2026-02-03T12:24:34.568Z

© Jutge.org, 2006–2026.
https://jutge.org