[HDLBits] Countslow

Build a decade counter that counts from 0 through 9, inclusive, with a period of 10. The reset input is synchronous, and should reset the counter to 0. We want to be able to pause the counter rather than always incrementing every clock cycle, so the slowena input indicates when the counter should increment.

复制代码
module top_module (
    input clk,
    input slowena,
    input reset,
    output [3:0] q);
	always@(posedge clk) begin
        if(reset||(slowena&&q>=9))
            q<=4'b0;
        else if(q<9&&slowena)
            q<=q+1;
        else;
    end
endmodule
相关推荐
brave and determined15 小时前
可编程逻辑器件学习(day26):低主频FPGA为何能碾压高主频CPU?
人工智能·嵌入式硬件·深度学习·学习·fpga开发·云计算·fpga
邮专薛之谦16 小时前
Verilog 语言基础学习
fpga开发
the sun3417 小时前
数电基础:移位寄存器、顺序脉冲、序列信号发生器
单片机·嵌入式硬件·fpga开发·数电
brave and determined2 天前
可编程逻辑器件学习(day24):异构计算:突破算力瓶颈的未来之路
人工智能·嵌入式硬件·深度学习·学习·算法·fpga·asic
海涛高软2 天前
yolov8目标检测训练在rk3588上部署
fpga开发
第二层皮-合肥2 天前
USB3.0专题-硬件的测试
fpga开发
hexiaoyan8272 天前
高速数据采集卡设计方案:886-基于RFSOC的8路5G ADC和8路9G的DAC PCIe卡
fpga开发·高速数据采集卡·光纤pcie卡·通用pcie卡·xc7a100t板卡
坏孩子的诺亚方舟2 天前
FPGA系统架构设计实践7_时序收敛作业概述
fpga·xilinx·时序收敛·作业流程
嵌入式软硬件攻城狮3 天前
2.FPGA板卡通过电脑映射连接上网
fpga开发·电脑
brave and determined3 天前
可编程逻辑器件学习(day22):“让ARM穿上FPGA的马甲“:赛灵思Zynq的命名哲学与技术革命
arm开发·嵌入式硬件·fpga开发·zynq·fpga设计·嵌入式设计·fpga开发流程