2-bit counter X81362


Statement
 

pdf   zip

Design a 2-bit counter. The counter starts at zero and increments once at every rising edge when input incinc is 11. If rst is active during a rising edge, the clock goes back to 0, ignoring incinc for that cycle.

Specification

module counter(clk, rst, inc, count);
    input clk, rst;
    input inc;
    output [1:0] count;

Input

  • clk is the clock signal.

  • rst is the synchronous reset signal.

  • inc is the increment signal.

Output

  • count is the 2-bit output.

Information
Author
Javier de San Pedro Martín
Language
English
Official solutions
Verilog
User solutions
Verilog