FPGA and Nios II code for the openPET coincidence board