implement bitfifo (software only for now)