Frequency counter programmed in VHDL