Dynamic switching of a packaged photonic integrated network-on-chip using an FPGA controller