[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
相关推荐
Saniffer_SH8 小时前
【每日一题】一台可编程的PCIe 6.0主机 + 一套自动化CTS验证平台 + 一个轻量级链路分析系统
运维·服务器·测试工具·fpga开发·自动化·计算机外设·硬件架构
9523611 小时前
计算机组成原理 - 主存储器
单片机·嵌入式硬件·学习·fpga开发
简简单单做算法12 小时前
【第2章>第1节】基于FPGA的图像放大和插值处理概述
计算机视觉·fpga开发·双线性插值·线性插值·图像放大·均值插值·最邻近插值
木心术113 小时前
OpenClaw FPGA资源利用率优化深度指南
人工智能·fpga开发
发光的沙子13 小时前
FPGA----zynq 7000与zynqMP内存区域保留方法
fpga开发
minglie114 小时前
c和hdl对偶关系
fpga开发
verse_armour16 小时前
【FPGA】在PYNQ开发板上搭建卷积神经网络实现交通标志识别
fpga开发
Aaron15881 天前
RFSOC+VU13P/VU9P+GPU通用一体化硬件平台
人工智能·算法·fpga开发·硬件架构·硬件工程·信息与通信·基带工程
XINVRY-FPGA2 天前
XC7VX485T-2FFG1157I Xilinx Virtex-7 FPGA
arm开发·嵌入式硬件·fpga开发·硬件工程·fpga
鄙人菜鸡2 天前
Xilinx IP Aurora 8B/10B 多级光纤串联复位时序
fpga开发