项目场景:
Design a 1-12 counter with the following inputs and outputs:
Reset Synchronous active-high reset that forces the counter to 1
Enable Set high for the counter to run
Clk Positive edge-triggered clock input
Q[3:0] The output of the counter
c_enable, c_load, c_d[3:0] Control signals going to the provided 4-bit counter, so correct operation can be verified.
You have the following components available:
the 4-bit binary counter (count4) below, which has Enable and synchronous parallel-load inputs (load has higher priority than enable). The count4 module is provided to you. Instantiate it in your circuit.
logic gates
module count4(
input clk,
input enable,
input load,
input [3:0] d,
output reg [3:0] Q
);
The c_enable, c_load, and c_d outputs are the signals that go to the internal counter’s enable, load, and d inputs, respectively. Their purpose is to allow these signals to be checked for correctness.

本文介绍了一种基于4位二进制计数器实现1-12计数器的方法。通过控制信号c_load和c_d,在计数器达到12或接收到reset信号时,将计数器强制复位到1。使用了Verilog HDL进行描述。
最低0.47元/天 解锁文章
802





