[HDLBits] Dff8ar

Create 8 D flip-flops with active high asynchronous reset. All DFFs should be triggered by the positive edge of clk.

module top_module (
    input clk,
    input areset,   // active high asynchronous reset
    input [7:0] d,
    output [7:0] q
);
    always@(posedge clk or posedge areset) begin
        if(areset)
            q<=8'd0;
        else
            q<=d;
    end
endmodule

异步就是在always敏感列表里加上对应的reset,同步不用加

相关推荐
XiaoChaoZhiNeng1 小时前
基于Zynq SDIO WiFi移植二(支持2.4/5G)
5g·fpga·zynq·sdio
apple_ttt3 小时前
从零开始讲PCIe(6)——PCI-X概述
fpga开发·fpga·pcie
水饺编程5 小时前
【英特尔IA-32架构软件开发者开发手册第3卷:系统编程指南】2001年版翻译,1-2
linux·嵌入式硬件·fpga开发
apple_ttt6 小时前
从零开始讲PCIe(5)——66MHZ的PCI总线与其限制
fpga开发·fpga·pcie
最好有梦想~8 小时前
FPGA时序分析和约束学习笔记(2、FPGA时序传输模型)
fpga开发
IM_DALLA9 小时前
【Verilog学习日常】—牛客网刷题—Verilog企业真题—VL76
学习·fpga开发
诚实可靠小郎君952715 小时前
FPGA IO延迟的约束与脚本
fpga开发·fpga·数字电路
日晨难再1 天前
AMBA:APB的历史(从APB1到APB5)
arm开发·arm·硬件工程·fpga·数字ic
GGGLF1 天前
FPGA-UART串口接收模块的理解
fpga开发
北京太速科技股份有限公司1 天前
太速科技-495-定制化仪器户外便携式手提触摸一体机
fpga开发