A2 FPGA code