A square wave generator based on a Field Programmable Gate Array (FPGA), comprising: a bus control module , configured to receive a playing instruction and a playing address which are sent by a master computer, and output the playing instruction and the playing address; a waveform playing management module , configured to receive the playing instruction and the playing address, read raw waveform data from a storage module according to the playing instruction and the playing address, decode the raw waveform data to obtain waveform data, generate delay data according to the waveform data, and output the waveform data and the delay data; and a square wave outputting module, configured to perform time interpolation on a high-speed clock through a delay time chain method, wherein the square wave outputting module comprises a parallel-in serial-out conversion unit , a delay chain unit , and a multiplex controller , wherein the parallel-in serial-out conversion unit is configured to receive the waveform data inputted in parallel, output in serial a square wave signal at both a rising edge and a falling edge of the high-speed clock, and send the square wave signal to the delay chain unit ; the delay chain unit is configured to delay the square wave signal; and the multiplex controller is configured to receive the delay data, determine, according to the inputted delay data in real time, a sequence number of an output node of the delay chain unit , obtain a delayed square wave signal corresponding to the output node from the output node, and output the delayed square wave signal, wherein different output nodes in a delay chain correspond to different delays, and a time precision of the delayed square wave signal is equal to a time delay of a single delay unit in the delay chain unit . a bus control module , configured to receive a playing instruction and a playing address which are sent by a master computer, and output the playing instruction and the playing address; a waveform playing management module , configured to receive the playing instruction and the playing address, read raw waveform data from a storage module according to the playing instruction and the playing address, decode the raw waveform data to obtain waveform data, generate delay data according to the waveform data, and output the waveform data and the delay data; and a square wave outputting module, configured to perform time interpolation on a high-speed clock through a delay time chain method, wherein the square wave outputting module comprises a parallel-in serial-out conversion unit , a delay chain unit , and a multiplex controller , wherein the parallel-in serial-out conversion unit is configured to receive the waveform data inputted in parallel, output in serial a square wave signal at both a rising edge and a falling edge of the high-speed clock, and send the square wave signal to the delay chain unit ; the delay chain unit is configured to delay the square wave signal; and the multiplex controller is configured to receive the delay data, determine, according to the inputted delay data in real time, a sequence number of an output node of the delay chain unit , obtain a delayed square wave signal corresponding to the output node from the output node, and output the delayed square wave signal, wherein different output nodes in a delay chain correspond to different delays, and a time precision of the delayed square wave signal is equal to a time delay of a single delay unit in the delay chain unit . <EOS>