The invention discloses a
system for debugging FPGA (
field programmable gate array) in real time, comprising an SPI (serial
peripheral interface) transceiving module, an SFR (
special function register) decoding module, a
data storing unit and a logic detection unit, wherein the SPI transceiving module is used for receiving
external data to form a detection command and detection data and sending an internal detection result and internal storage data; the SFR decoding module is used for decoding a register command with special functions; the
data storing unit is used for storing specified sampled data; and the logic detection unit is used for being connected with at least one group of logic units to be detected and carrying out real-time
verification to obtain a
verification result; and the modules and the units are sequentially connected for carrying out data communication. A real-time debugging method of the
system comprises the following steps that: the SPI transceiving module receives data of a
monitoring system, the data received by the SPI transceiving module is converted into a detection instruction or detection data by virtue of the SFR module, is stored by the
data storing unit and then is sent to the logic detection unit, the logic detection unit judges the logic units to be detected, and judgement data and result are stored and then are transmitted by the SPI transceiving module. The
system disclosed by the invention takes an SPI
bus protocol as a protocol used for realizing data interaction between a basic debugging device and equipment, and high-speed product debugging and verifying design and dynamic check debugging are realized.