CN102841305A - System and method for debugging FPGA (field programmable gate array) in real time - Google Patents
System and method for debugging FPGA (field programmable gate array) in real time Download PDFInfo
- Publication number
- CN102841305A CN102841305A CN2011101924412A CN201110192441A CN102841305A CN 102841305 A CN102841305 A CN 102841305A CN 2011101924412 A CN2011101924412 A CN 2011101924412A CN 201110192441 A CN201110192441 A CN 201110192441A CN 102841305 A CN102841305 A CN 102841305A
- Authority
- CN
- China
- Prior art keywords
- data
- spi
- fpga
- debugging
- logic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Logic Circuits (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
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.
Description
Technical field
Invention relates to the technical field of FPGA design being carried out real-time debug and dynamic authentication, specifically belong to a kind of through SPI (Serial Peripheral Interface) interface to the system and method for FPGA real-time debug purpose with the realization design verification.
Background technology
FPGA (Field-Programmable Gate Array), i.e. field programmable gate array, it is the product that on the basis of programming devices such as PAL, GAL, CPLD, further develops.It occurs as a kind of semi-custom circuit in special IC (ASIC) field, has both solved the deficiency of custom circuit, has overcome the limited shortcoming of original programming device gate circuit number again.
FPGA has adopted the notion of logical cell array LCA (Logic Cell Array), and inside comprises configurable logic blocks CLB (Configurable Logic Block), output load module IOB (Input Output Block) and three parts of interconnector (Interconnect).The basic characteristics of FPGA: 1) adopt FPGA ASIC design circuit (special IC), the user need not throw sheet production, the chip that just can obtain share; 2) FPGA can do the middle coupons of other full customization or semi-custom ASIC circuit; 3) there are abundant trigger and I/O pin in FPGA inside; 4) FPGA is one of device that the design cycle is the shortest in the ASIC circuit, development cost are minimum, risk is minimum; 5) FPGA adopts high speed CHMOS technology, and is low in energy consumption, can be compatible with CMOS, Transistor-Transistor Logic level.Therefore, fpga chip is one of optimal selection of short run system raising level of integrated system, reliability.
FPGA is provided with its duty by the program that leaves in the ram in slice, need the RAM in the sheet be programmed during work.The user can adopt the different programming mode according to different configuration modes.When powering up, fpga chip reads in data among the EPROM among the RAM that programmes in the sheet, and after configuration was accomplished, FPGA got into duty.After the power down, FPGA reverts to white, and the internal logic relation disappears, and therefore, FPGA can use repeatedly.The programming of FPGA need not be special-purpose the FPGA programmable device, need only use general EPROM, PROM programmable device to get final product.When needs are revised the FPGA function, only need change a slice EPROM and get final product.Like this, with a slice FPGA, the different programming data can produce the different circuits function.Therefore, the use of FPGA is very flexible.
FPGA has the various configurations pattern: parallel holotype adds the mode of a slice EPROM for a slice FPGA; Master slave mode can be supported a slice PROM programming multiple FPGA; Serial mode can adopt serial PROM programming FPGA; The peripheral hardware pattern can be programmed by microprocessor the peripheral hardware of FPGA as microprocessor to it.
Before the FPGA system design is accomplished, arranged: design phase and debugging, testing stage 2 different stages.The main task of design phase is input, emulation and realization; The main task of debugging, testing stage is the check design, proofreaies and correct the mistake of finding.
Because modern science and technology has higher requirement to system reliability, and that the FPGA technology is used in electronic system is very extensive, so the Easy Test property of FPGA just becomes very important.The FPGA internal signal that obtains is very limited, and the particularly existence of FPGA encapsulation and printed circuit board (PCB) (PCB) electrical noise makes debugging, check become a most difficult flow process in the total system design.On the other hand; Current nearly all bus as high-speed chips such as CPU, DSP, ASIC; Except the high speed parallel bus interface was provided, the direction to HSSI High-Speed Serial Interface developed just rapidly, and these technical progresses force the designer that the overwhelming majority time is placed in debugging, the check design.
Comparatively common debugging, the method for inspection of FPGA has: use the external logic analyser, in this method, useful internal signal is routed to FPGA not to be had to be connected on the logic analyser then on the stitch of use.This method provides very dark internal memory, and suitable debugging is broken down and the actual reason that causes this fault problem of wide apart in time; The designer who carries out post analysis for needs collection mass data is also very necessary.In addition, it can also associate other activity times in inner FPGA signal and the Circuits System.External logic analyser method adopts considerably less logical resource, does not use the FPGA memory source.It has discharged these resources, realizes required function.Its contradiction is, like 1 pair 1 connection and measurement: the corresponding internal signal node of each FPGA debugging pin; The stationary inner signal node will change new measured node, must design again, not only wastes time and energy but also can change original sequential of signal thus; Each change measured signal and all will stop and connect instrument again, the pin positions of definition signal and title again, this is very loaded down with trivial details work.And the pin of FPGA is valuable resource, and the pin that is exclusively used in debugging is considerably less usually, generally is several to about 32, and this port becomes the critical piping that route output internal signal is measured.Be exclusively used in each pin of debugging, only corresponding inner single measured signal.If will increase or change tested signal, need to change design, synthesize again, rearrange the position of pin, rewiring not only can consume great amount of time, also may change original sequential of circuit.
Another kind of debugging, the method for inspection are to use embedded logic analyzer; Common main FPGA manufacturer all provides the embedded logic analyzer kernel, like SignalTap
II of Altera and the ChipScopeTM ILA of Xilinx.These modules are inserted in the FPGA design, provide simultaneously to trigger function and memory function.The fpga logic resource is used for realizing trigger circuit, and the FPGA memory module then is used for realizing memory function.JTAG is used for disposing core operation, is used in addition the data transmission that captures to PC, so that check.Because embedded logic analyzer uses inner FPGA resource, they can use with the large-scale FPGA that can absorb the core expense better usually.In the ordinary course of things, the resource that takies of core had better not be higher than 5% of available FPGA resource.Yet only rely on JTAG to come the data transmission that captures to PC, can not satisfy of the requirement of present complication system, in a plurality of FPGA system, be subject to the JTAG agreement, also can not realize the configuration and the debugging of full duplex for debugging speed.
Summary of the invention
The present invention is directed to the defective in existing FPGA debugging, the checkout procedure, propose a kind of system and method the FPGA real-time debug.
The technical scheme that realizes the foregoing invention purpose does, a kind of system to the FPGA real-time debug, and this system comprises:
The SPI transceiver module forms sense command and detects data thereby be used to receive external data, sends inner testing result and storage inside data;
The SFR decoding module is used for the register command of specific function is deciphered;
Data storage cell is used for preserving the appointment sampled data;
The logic detection unit is used to connect at least one group logical block to be measured and carry out real-time verification, obtains check results;
Above-mentioned module, unit connect successively and carry out data communication.
Said data storage cell comprises order register, data register and storage unit.
The logical block to be measured that is connected with the logic detection unit can be directly and storage unit carry out data communication.
The signal that the SPI transceiver module receives is that SDI is the inputs of main equipment data, the output of slave unit data; SCLK is by the main equipment clocking; CS is by the enable signal of main equipment control slave unit; The signal that sends is SDO, the output of main equipment data, the input of slave unit data.
The invention still further relates to a kind of method to the FPGA real-time debug; Said method comprising the steps of: the SPI transceiver module receives the supervisory system data; Through the SFR module SPI is accepted data conversion for detecting instruction or detection data and through being sent to the logic detection unit after the data storage cell storage, through the logic detection unit judgement of logical block to be measured being stored the back with decision data, result and send through the SPI transceiver module.
System of the present invention is the agreement of basic debugging apparatus and equipment interaction data with SPI (Serial Peripheral Interface) bus protocol, thereby has realized debugging checking product design at a high speed, dynamic check debugging.
Description of drawings
Fig. 1 is the system architecture diagram of FPGA real-time debug of the present invention;
Fig. 2 is a FPGA real-time debug schematic flow sheet of the present invention.
Embodiment
For ease of the understanding of technical scheme of the present invention, introduce below in conjunction with concrete embodiment.Like Fig. 1 is the system architecture diagram of FPGA real-time debug; As shown in the figure; This system comprises the SPI transceiver module, forms sense command and detects data thereby be used to receive external data, sends inner testing result and storage inside data; The signal of its reception is that SDI is the inputs of main equipment data, the output of slave unit data; SCLK is by the main equipment clocking; CS is by the enable signal of main equipment control slave unit; The signal that sends is SDO, the output of main equipment data, the input of slave unit data; The SFR decoding module is used for the register command of specific function is deciphered; Data storage cell is used for preserving and specifies sampled data, and in the present embodiment, this unit is made up of command register, data register, storage element; The logic detection unit is used to connect at least one group logical block to be measured and carry out real-time verification, obtains check results; Above-mentioned module, unit connect successively and carry out data communication.
Fig. 2 is a FPGA real-time debug schematic flow sheet; Like figure; The SPI transceiver module receives the outside monitor data that sends through SPI; Through the SFR module with SPI accept data conversion for detect instruction or detect data and order register through data storage cell or data register storage after be sent to the logic detection unit, through the RAM of logic detection unit to data sampling, debugging, to after the judgement of logical block to be measured with decision data, result's storage and send through the SPI transceiver module once more.
The above; Be preferable case study on implementation of the present invention; Be not that the present invention is done any restriction, every technical spirit changes any simple modification, change and the equivalent structure that above embodiment did according to the present invention, all still belongs in the protection domain of technical scheme of the present invention.
Claims (5)
1. the system to the FPGA real-time debug is characterized in that, this system comprises:
The SPI transceiver module forms sense command and detects data thereby be used to receive external data, sends inner testing result and storage inside data;
The SFR decoding module is used for the register command of specific function is deciphered;
Data storage cell is used for preserving the appointment sampled data;
The logic detection unit is used to connect at least one group logical block to be measured and carry out real-time verification, obtains check results;
Above-mentioned module, unit connect successively and carry out data communication.
2. the system to the FPGA real-time debug according to claim 1 is characterized in that data storage cell comprises order register, data register and storage unit.
3. the system to the FPGA real-time debug according to claim 2 is characterized in that, the logical block to be measured that is connected with the logic detection unit can be directly and storage unit carry out data communication.
4. the system to the FPGA real-time debug according to claim 1 is characterized in that, the signal that the SPI transceiver module receives is that SDI is the inputs of main equipment data, the output of slave unit data; SCLK is by the main equipment clocking; CS is by the enable signal of main equipment control slave unit; The signal that sends is SDO, the output of main equipment data, the input of slave unit data.
5. method to the FPGA real-time debug; It is characterized in that; Said method comprising the steps of: the SPI transceiver module receives the supervisory system data; Through the SFR module SPI is accepted data conversion for detecting instruction or detection data and through being sent to the logic detection unit after the data storage cell storage, through the logic detection unit judgement of logical block to be measured being stored the back with decision data, result and send through the SPI transceiver module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011101924412A CN102841305A (en) | 2011-07-11 | 2011-07-11 | System and method for debugging FPGA (field programmable gate array) in real time |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011101924412A CN102841305A (en) | 2011-07-11 | 2011-07-11 | System and method for debugging FPGA (field programmable gate array) in real time |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102841305A true CN102841305A (en) | 2012-12-26 |
Family
ID=47368845
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011101924412A Pending CN102841305A (en) | 2011-07-11 | 2011-07-11 | System and method for debugging FPGA (field programmable gate array) in real time |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102841305A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103049361A (en) * | 2013-01-11 | 2013-04-17 | 加弘科技咨询(上海)有限公司 | FPGA (Field Programmable Gata Array) with embedded logical analysis function and logical analysis system |
CN107481595A (en) * | 2016-06-08 | 2017-12-15 | 龙芯中科技术有限公司 | FPGA brassboard debugging systems |
CN107991947A (en) * | 2017-12-29 | 2018-05-04 | 上海应用技术大学 | A kind of solenoid-driven and its control method based on FPGA |
CN112231160A (en) * | 2020-10-16 | 2021-01-15 | 上海国微思尔芯技术股份有限公司 | FPGA board dynamic debugging method and FPGA board dynamic debugging device |
CN112255534A (en) * | 2020-10-14 | 2021-01-22 | 天津津航计算技术研究所 | IP core module debugging system based on FPGA |
CN112349336A (en) * | 2019-12-18 | 2021-02-09 | 成都华微电子科技有限公司 | Memory testing device |
CN113489415A (en) * | 2021-07-26 | 2021-10-08 | 深圳市航顺芯片技术研发有限公司 | Motor debugging method, device, module, motor and motor debugging system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080116919A1 (en) * | 2006-11-21 | 2008-05-22 | Yu Li | Fpga and method and system for configuring and debugging a fpga |
CN101354657A (en) * | 2008-09-09 | 2009-01-28 | 京信通信系统(中国)有限公司 | Method and circuit for loading on site programmable gate array |
CN101369001A (en) * | 2008-10-17 | 2009-02-18 | 北京星网锐捷网络技术有限公司 | Apparatus used for debugging programmable chip and field programmable gate array chip |
CN101651673A (en) * | 2009-09-17 | 2010-02-17 | 山东大学 | Method for connecting system on programmable chip to Ethernet |
CN102103186A (en) * | 2009-12-18 | 2011-06-22 | 上海贝尔股份有限公司 | Debug method of FPGA and equipment thereof |
-
2011
- 2011-07-11 CN CN2011101924412A patent/CN102841305A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080116919A1 (en) * | 2006-11-21 | 2008-05-22 | Yu Li | Fpga and method and system for configuring and debugging a fpga |
CN101354657A (en) * | 2008-09-09 | 2009-01-28 | 京信通信系统(中国)有限公司 | Method and circuit for loading on site programmable gate array |
CN101369001A (en) * | 2008-10-17 | 2009-02-18 | 北京星网锐捷网络技术有限公司 | Apparatus used for debugging programmable chip and field programmable gate array chip |
CN101651673A (en) * | 2009-09-17 | 2010-02-17 | 山东大学 | Method for connecting system on programmable chip to Ethernet |
CN102103186A (en) * | 2009-12-18 | 2011-06-22 | 上海贝尔股份有限公司 | Debug method of FPGA and equipment thereof |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103049361A (en) * | 2013-01-11 | 2013-04-17 | 加弘科技咨询(上海)有限公司 | FPGA (Field Programmable Gata Array) with embedded logical analysis function and logical analysis system |
CN107481595A (en) * | 2016-06-08 | 2017-12-15 | 龙芯中科技术有限公司 | FPGA brassboard debugging systems |
CN107481595B (en) * | 2016-06-08 | 2023-10-03 | 龙芯中科技术股份有限公司 | FPGA experiment board debugging system |
CN107991947A (en) * | 2017-12-29 | 2018-05-04 | 上海应用技术大学 | A kind of solenoid-driven and its control method based on FPGA |
CN112349336A (en) * | 2019-12-18 | 2021-02-09 | 成都华微电子科技有限公司 | Memory testing device |
CN112349336B (en) * | 2019-12-18 | 2023-09-15 | 成都华微电子科技股份有限公司 | Memory testing device |
CN112255534A (en) * | 2020-10-14 | 2021-01-22 | 天津津航计算技术研究所 | IP core module debugging system based on FPGA |
CN112255534B (en) * | 2020-10-14 | 2023-03-24 | 天津津航计算技术研究所 | IP core module debugging system based on FPGA |
CN112231160A (en) * | 2020-10-16 | 2021-01-15 | 上海国微思尔芯技术股份有限公司 | FPGA board dynamic debugging method and FPGA board dynamic debugging device |
CN113489415A (en) * | 2021-07-26 | 2021-10-08 | 深圳市航顺芯片技术研发有限公司 | Motor debugging method, device, module, motor and motor debugging system |
CN113489415B (en) * | 2021-07-26 | 2023-04-07 | 深圳市航顺芯片技术研发有限公司 | Motor debugging method, device, module, motor and motor debugging system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102841305A (en) | System and method for debugging FPGA (field programmable gate array) in real time | |
US5983379A (en) | Test access port controller and a method of effecting communication using the same | |
CN105842615B (en) | The System on Chip/SoC and its adjustment method that can be debugged under abnormality | |
CN105553754B (en) | Wireless communication equipment testability design method | |
CN102621483B (en) | Multi-link parallel boundary scanning testing device and method | |
CN100425999C (en) | Circuit board fault self-positioning device and method based on programmable logic device | |
CN102590733B (en) | Circuitry built-in test device based on boundary scanning mechanism | |
CN1818912A (en) | Scalable reconfigurable prototyping system and method | |
EP0862115B1 (en) | Trigger sequencing controller | |
CN101071155A (en) | Device and method for realizing border-scanning multi-link test | |
CN102135920A (en) | Fault injection system for embedded spaceborne computer and injection method thereof | |
CN104133171A (en) | Simple boundary scan test system and method based on single-chip microcomputer | |
CN101923133A (en) | System for testing system internuclear wiring fault on integrated circuit chip and method thereof | |
CN103412810A (en) | System packaging chip capable of testing internal signals and test method | |
CN101183139A (en) | Board based on JTAG interface and design method thereof | |
CN110007217A (en) | A kind of low-power consumption boundary scanning test method | |
CN101140314B (en) | On-site programmable gate array wire laying channel verification method and system thereof | |
CN101102566A (en) | A design method and debugging method for mobile phone JTAG debugging interface signals | |
CN105334452A (en) | Testing system for boundary scan | |
CN103365749B (en) | Multi-core processor debugging system | |
CN103645435B (en) | The software module design for Measurability method of multi-signal model programmable logic device (PLD) | |
CN112067978A (en) | FPGA screening test system and method based on FPGA | |
CN114113990B (en) | Embedded boundary scan controller | |
CN105334451A (en) | Boundary scanning and testing system | |
CN102508758B (en) | Double-bus parallel test realization method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20121226 |