Clock Generator in a FPGA: Full code