Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to divide 25M crystal oscillator into 1HZ signal on fpga and find the complete program of Verilog HDL?
How to divide 25M crystal oscillator into 1HZ signal on fpga and find the complete program of Verilog HDL?
Module div(clk25M, clkout); //frequency division to generate 1HZ frequency.

Input clk25M// input 24MHz, output 1Hz.

Output register clkout

Integer A = 0;; //counter

Always @ (posedgclk10m)

If (a< =12500000) a < = A+ 1; //clk flips every time the counter records12.5m..

Otherwise, start clkout < = ~ clkouta < = 0; end

Terminal module