[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
相关推荐
Hi202402176 小时前
Cortex-A53 + GIC700 + Boot BRAM Vivado 全流程复现
arm·fpga·vivado
ALINX技术博客6 小时前
【黑金云课堂】FPGA技术教程Linux开发:系统定制
linux·运维·fpga开发
塔能物联运维9 小时前
**塔能两相液冷:量化交易场景下的硬核验证,±1.5℃控温如何转化为真金白银**
人工智能·fpga开发·两相液冷
Eloudy10 小时前
Holoscan Sensor Bridge 入门指南(Getting Started)
gpu·fpga·rdma
西安景驰电子1 天前
PCIe 授时卡原理及应用
运维·服务器·windows·单片机·嵌入式硬件·fpga开发
落chen1 天前
基于Vivado的FIFO-IP核-强化篇
fpga开发
X_xcccc1 天前
2026智能硬件核心:顶尖SOM方案与开发服务深度解析
fpga开发·智能硬件
公众号:fuwuqiBMC1 天前
(转自“服务器BMC”)服务器BMC芯片——AST1840
运维·服务器·fpga开发
国科安芯1 天前
还是4位?ASC8T245S 与 ASC4T245S 的双向电平转换选型实战
单片机·嵌入式硬件·物联网·fpga开发·机器人·云计算
思尔芯S2C1 天前
白皮书|从RTL适配到硅前验证:如何构建有价值的FPGA原型平台
fpga开发·soc·芯片·验证·asic·prototyping·原型验证