reference should work now, still working on BIST and clock
merged