High-level FPGA programming for nanosecond timing in terabit communication