[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
相关推荐
zlinear数据采集卡1 天前
单点接地设计电路深度解析:从理论原理到ZLinear采集卡的低噪声实战
c语言·单片机·嵌入式硬件·fpga开发
湉湉家的小虎子1 天前
【科普贴】浅谈UFS接口——偏硬件解析
驱动开发·嵌入式硬件·fpga开发·硬件工程
2301_809049421 天前
phase3_note_vivado_2020_ip_packager_revision
linux·fpga开发
GateWorld1 天前
LCD显示技术完全指南:原理·制造·驱动·FPGA实现之点屏二
fpga开发·lcd显示·fpga点亮屏幕·minilvds
汽车仪器仪表相关领域2 天前
南华 NHA-604/605 汽车排放气体测试仪:国六b全适配高精度便携检测设备
大数据·人工智能·功能测试·深度学习·安全·fpga开发·压力测试
一口一口吃成大V2 天前
使用PLL的lock信号作为复位信号
fpga开发
hexiaoyan8272 天前
图像分析与测试卡学习资料第216篇:基于FMC接口的1路full Camera Link输入 1路HDMI(DVI)输出子卡
fpga开发·图像分析与测试·数字成像
zlinear数据采集卡3 天前
电源纹波杀手:LDO线性稳压电路的“降噪哲学”——基于ZLinear数据采集卡的深度解析
单片机·嵌入式硬件·fpga开发·硬件架构
lf2824814313 天前
08 AD9361自发自收PS工程搭建
fpga开发