correct fifo write and read signals synchronization