HDLBits刷题笔记9:Circuits.Sequential Logic.Counters + Shift Registers
CountersFour-bitbinarycountermoduletop_module(inputclk,inputreset,//Synchronousactive-highresetoutputreg[3:0]q);always@(posedgeclk)beginif(reset)q<=0;elseq<=q+1;endendmoduleDecadecounter建立一个计数器,从0计数到9