This is the booksim implementation of RCA1D algorithm.