+/EE316
digital logic
git clone https://git.julia.blue/+/EE316
91885ad
master
1`timescale1 ns/ 1 ps 2 3module clkdiv ( 4input clk , 5input reset , 6output clk_out 7); 8 9reg [ 15 : 0 ] COUNT ; 10 11assign clk_out = COUNT [ 15 ]; 12 13initial 14COUNT = 0 ; 15 16always @( posedge clk ) 17begin 18if ( reset ) 19COUNT = 0 ; 20else 21COUNT = COUNT + 1 ; 22end 23 24endmodule