Writing counters in VHDL