updates clk_counter and top