Start adding BRAM support and add unit tests for machine.