adding graycounter for simulation fifo