FPGA and Nios II code for the openPET support board