[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
相关推荐
s09071368 小时前
FPGA中同步与异步复位
fpga开发·verilog·xilinx·zynq
tiantianuser14 小时前
RDMA设计15:连接管理模块设计2
网络协议·fpga开发·rdma·高速传输·cmac
民乐团扒谱机15 小时前
十字路口交通信号灯控制器设计(Multisim 电路 + Vivado 仿真)
单片机·fpga开发·verilog·状态机·仿真·时序逻辑·multism
乌恩大侠16 小时前
一文讲解 USRP X410
fpga开发·usrp
s090713618 小时前
多波束声呐 FPGA 信号处理链路介绍
算法·fpga开发·信号处理·声呐
坏孩子的诺亚方舟18 小时前
FPGA系统架构设计实践11_FPGA开机
fpga开发·系统架构·xilinx·fpga配置
晓晓暮雨潇潇2 天前
Diamond基础6:LatticeFPGA配置流程
fpga开发·diamond·lattice·latticeecp3
江蘇的蘇2 天前
基于7系列FPGA实现万兆网通信
fpga开发
GateWorld2 天前
FPGA实战:一段让我重新认识时序收敛的FPGA迁移之旅
fpga开发·实战经验·fpga时序收敛·建立保持时间
GateWorld2 天前
性能飞跃:DDR4特性解析与FPGA实战指南
fpga开发·信号完整性·ddr3·ddr4