CN102508798A - CPU (Central Processing Unit) and FPGA (Field Programmable Gate Array) interface method based on BURST and flow line - Google Patents
CPU (Central Processing Unit) and FPGA (Field Programmable Gate Array) interface method based on BURST and flow line Download PDFInfo
- Publication number
- CN102508798A CN102508798A CN2011103154686A CN201110315468A CN102508798A CN 102508798 A CN102508798 A CN 102508798A CN 2011103154686 A CN2011103154686 A CN 2011103154686A CN 201110315468 A CN201110315468 A CN 201110315468A CN 102508798 A CN102508798 A CN 102508798A
- Authority
- CN
- China
- Prior art keywords
- fpga
- cpu
- read
- data
- burst
- 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.)
- Granted
Links
Images
Landscapes
- Advance Control (AREA)
Abstract
The invention discloses a CPU (Central Processing Unit) and FPGA (Field Programmable Gate Array) interface method based on BURST and a flow line. The method is applied to various occasions in the need of interacting mass data between the CPU and the FPGA. The method is mainly characterized by comprising the following steps: the CPU is used for reading and writing the FPGA in a BUSRT manner; the FPGA is in a form of an internal address register; and an actual read-write address is in a form of the internal address register of the FPGA. According to the method disclosed by the invention, the problems of lower exchange efficiency between the CPU and the FPGA and incapability of satisfying the actual use requirement when mass data between the CPU and the FPGA needs to be interacted in the prior art are solved; a method for reading and writing the FPGA by the CPU by adopting the BURST manner with the help of a flow line technology is provided; and, by means of the manner, the time required for reading and writing the FPGA by the CPU can be greatly reduced, and the efficiency for reading and writing the FPGA by the CPU can be increased.
Description
Technical field
The present invention relates to a kind of CPU and FPGA interface method, can be used in CPU and FPGA and need mass data and carry out mutual various occasions based on BURST and streamline.
Background technology
Along with the application of FPGA (Field Programmable Gate Array) is day by day extensive, a lot of systems have adopted the framework mode of CPU+FPGA.Have lot of data need carry out alternately between CPU and the FPGA, the efficient that how to improve CPU read-write FPGA has become a bottleneck problem in the plurality of applications.
At present, FPGA generally carries out alternately through dual port RAM and CPU, and the buffering through dual port RAM is with problems such as the speed that solves FPGA and CPU and concurrencys.The dual port RAM that dual port RAM can adopt special-purpose dual port RAM chip or utilize the logic simulation of FPGA to come out, the former is because cost is high, and capacity is little, so general more be the mode that adopts the latter.
For the ease of explanation, sequential discussion below is an example with certain MPC8247 application system, the read-write frequency 100MHz of CPU, but concrete principle goes for the CPU of other various frequencies.Compiling information according to FPGA can know, the output time-delay that the logical resource of FPGA simulates out dual port RAM generally at 12ns between the 17ns.Consider the Time Created of address, the factors such as retention time of data, CPU reads the FPGA dual port RAM at every turn should need at least 4 clock period, and just 40ns can carry out normal read-write to the dual port RAM of FPGA.Fig. 1 is the synoptic diagram of FPGA being read and write with traditional approach CPU, and each read-write of CPU all need be waited for the time of about 40ns.The output procedure of whole FPGA does not have overlapping, reads 8 needed times continuously to be at least 320ns.
Even CPU has read FPGA The data dma mode; Because when CPU reads and writes FPGA; Address data bus is taken by DMA; CPU can't operate peripheral hardwares such as SDRAM and FLASH, so this moment, CPU was equivalent to be in waiting status, so the efficient of CPU is still lower at this moment.
Summary of the invention
Have lot of data need carry out alternately in order solving in the prior art between the CPU and FPGA, but exchange efficiency between the two to be lower, can not to satisfy the problem of actual use needs.The present invention proposes the method that a kind of CPU adopts BURST mode incorporating pipeline technology that FPGA is read and write; There is mass data to carry out mutual occasion at CPU and FPGA; Adopt this mode can reduce the CPU read-write needed time of FPGA greatly, improve the efficient of CPU read-write FPGA.
In order to address the above problem, the technical scheme that the present invention taked is:
A kind of CPU and FPGA interface method based on BURST and streamline is characterized in that: may further comprise the steps:
(1), CPU adopts the mode of BURST to read and write to FPGA, adopt this mode after, CPU can carry out the continuous several times read-write to FPGA;
(2), adopted the mode of home address register in FPGA inside, when CPU began to read and write, FPGA was latched into current read/write address in the inner address register of FPGA;
(3), for read operation, FPGA adds 1 to the value of address register before accomplishing in current read cycle automatically, exports next data; For write operation, then after current write cycle time is accomplished, add 1 to the value of address register;
(4), the back process in, each clock period, FPGA adds 1 to address register automatically.
Aforesaid a kind of CPU and FPGA interface method based on BURST and streamline is characterized in that: for read operation, CPU has adopted the BURST mode to carry out repeatedly read operation to FPGA continuously; In the time of the CPU read data first time; The whole cycle needs 40ns, and FPGA begins output data in 20ns, because the data of FPGA output time-delay is 20ns; So in the time of 40ns, CPU can read first data; In the inside of FPGA, design logic adds 1 to the current address automatically in 30ns, begins to export the content of next address; Because the data of FPGA output time-delay is 20ns; In 50ns, CPU can read second data, in the time afterwards; The rest may be inferred, and FPGA can export data in each clock period.
Aforesaid a kind of CPU and FPGA interface method based on BURST and streamline is characterized in that: need not consider the data output delay time of FPGA for write operation, the value of the address register that FPGA is inner only need add 1 again after this write cycle time is accomplished.
Aforesaid a kind of CPU and FPGA interface method based on BURST and streamline is characterized in that: for continuous 8 read operations, it is 110ns that CPU reads the needed time of FPGA data.
The invention has the beneficial effects as follows: the BURST mode is a kind of continuous read-write mode that CPU adopts in order to improve read-write efficiency, and generally according to the difference of CPU, the length of BURST can be configured to 4 or 8.Present this technology generally only be applied to CPU and SDRAM between read-write, CPU adopts the BURST mode to read and write a plurality of addresses of SDRAM, has improved the read-write efficiency of CPU to SDRAM.The present invention has been incorporated into the read-write process of CPU to FPGA to the BURST mode, in FPGA, has adopted pipelining, has improved the speed of CPU read-write FPGA greatly.
Description of drawings
Fig. 1 is the synoptic diagram that adopts traditional approach CPU that FPGA is read and write.
Fig. 2 is the synoptic diagram that FPGA adopts the pipeline system read procedure.
Fig. 3 is that FPGA adopts pipeline system to write the synoptic diagram of process.
Embodiment
Below in conjunction with accompanying drawing the present invention is done further description.
Enforcement of the present invention comprises the design of two aspects, and first is that CPU reads and writes FPGA according to the BUSRT mode; Second portion is the realization of the employing pipeline system reading and writing operation of FPGA.
CPU reads and writes according to the mode of similar BURST FPGA.After adopting this mode, CPU can carry out the continuous several times read-write to FPGA.
Adopted the mode of home address register in FPGA inside, when CPU began to read and write, FPGA was latched into current read/write address in the inner address register of FPGA.
For read operation, FPGA adds 1 to the value of address register before accomplishing in the current read cycle, exports next data; For write operation, then after current write cycle time is accomplished, add 1 to the value of address register.
In the process of back, each clock period, FPGA adds 1 to address register automatically.
According to such process, need experience the long stand-by period when first data are got in the CPU reading and writing, but in the process of back, CPU can improve efficient greatly in data of each clock period reading and writing.
Fig. 2 adopts BURST and pipelining to realize that CPU reads sequential to FPGA.Read procedure with FPGA is an example below, and the course of work of FPGA is described.
Because CPU has adopted the BURST mode, so CPU can carry out repeatedly read operation to FPGA continuously.In the time of the CPU read data first time; The whole cycle approximately needs 40ns, and FPGA begins output data about time about 20ns greatly, because the data of FPGA output time-delay is generally between 10ns and 16ns; So in the time of 40ns, CPU can read first data.In the inside of FPGA, design logic adds 1 to the current address automatically in 30ns, begins to export the content of next address; Because the data of FPGA output time-delay is 20ns; In 50ns, CPU can read second data, in the time afterwards like this; The rest may be inferred, and FPGA can export data in each clock period.In whole process, the time-delay of FPGA output data is overlapped, and the mode of similar streamline is carried out continuous data output, can improve the read-write efficiency of FPGA greatly.
After adopting this mode, for continuous 8 read operations, the needed time is about 110ns.Improved greatly the CPU read-write efficient and and FPGA between the data interaction bandwidth.
Fig. 3 adopts BURST and pipelining to realize that CPU writes sequential to FPGA.Compare with read procedure, main difference is because ablation process need not considered the data output time-delay of FPGA, so the inner address of FPGA only need add 1 again after this read-write is accomplished.In conjunction with the BURST mode, improved the writing speed of data greatly.
More than show and described ultimate principle of the present invention, principal character and advantage.The technician of the industry should understand; The present invention is not restricted to the described embodiments; That describes in the foregoing description and the instructions just explains principle of the present invention; Under the prerequisite that does not break away from spirit and scope of the invention, the present invention also has various changes and modifications, and these variations and improvement all fall in the scope of the invention that requires protection.The present invention requires protection domain by appending claims and equivalent circle thereof.
Claims (4)
1. CPU and FPGA interface method based on a BURST and a streamline is characterized in that: may further comprise the steps:
(1), CPU adopts the mode of BURST to read and write to FPGA, adopt this mode after, CPU can carry out the continuous several times read-write to FPGA;
(2), adopted the mode of home address register in FPGA inside, when CPU began to read and write, FPGA was latched into current read/write address in the inner address register of FPGA;
(3), for read operation, FPGA adds 1 to the value of address register before accomplishing in current read cycle automatically, exports next data; For write operation, then after current write cycle time is accomplished, add 1 to the value of address register;
(4), the back process in, each clock period, FPGA adds 1 to address register automatically.
2. a kind of CPU and FPGA interface method based on BURST and streamline according to claim 1 is characterized in that: for read operation, CPU has adopted the BURST mode to carry out repeatedly read operation to FPGA continuously; In the time of the CPU read data first time; Suppose that the whole cycle needs 40ns, FPGA begins output data in 20ns, because the data of FPGA output time-delay is 20ns; So in the time of 40ns, CPU can read first data; In the inside of FPGA, design logic adds 1 to the current address automatically in 30ns, begins to export the content of next address; Because the data of FPGA output time-delay is 20ns; In 50ns, CPU can read second data, in the time afterwards; The rest may be inferred, and FPGA can export data in each clock period.
3. a kind of CPU and FPGA interface method according to claim 2 based on BURST and streamline; It is characterized in that: need not consider the data output delay time of FPGA for write operation, the value of the address register that FPGA is inner only need add 1 again after this write cycle time is accomplished.
4. according to claim 2 or 3 described a kind of CPU and FPGA interface methods based on BURST and streamline, it is characterized in that: for continuous 8 read operations, it is 110ns that CPU reads the needed time of FPGA data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110315468.6A CN102508798B (en) | 2011-10-18 | 2011-10-18 | CPU (Central Processing Unit) and FPGA (Field Programmable Gate Array) interface method based on BURST and flow line |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110315468.6A CN102508798B (en) | 2011-10-18 | 2011-10-18 | CPU (Central Processing Unit) and FPGA (Field Programmable Gate Array) interface method based on BURST and flow line |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102508798A true CN102508798A (en) | 2012-06-20 |
CN102508798B CN102508798B (en) | 2014-12-31 |
Family
ID=46220889
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110315468.6A Active CN102508798B (en) | 2011-10-18 | 2011-10-18 | CPU (Central Processing Unit) and FPGA (Field Programmable Gate Array) interface method based on BURST and flow line |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102508798B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104239247A (en) * | 2014-09-04 | 2014-12-24 | 成都锐成芯微科技有限责任公司 | SPI (Serial Peripheral Interface)-based register fast read-write method |
CN105892988A (en) * | 2016-04-26 | 2016-08-24 | 广州致远电子股份有限公司 | Operation circuit based on FPGA (Field Programmable Gate Array), oscilloscope and measuring instrument |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060294344A1 (en) * | 2005-06-28 | 2006-12-28 | Universal Network Machines, Inc. | Computer processor pipeline with shadow registers for context switching, and method |
CN1908885A (en) * | 2006-08-11 | 2007-02-07 | 华为技术有限公司 | Static memorizer interface device and data transmitting method thereof |
CN100423081C (en) * | 2004-12-03 | 2008-10-01 | 深圳迈瑞生物医疗电子股份有限公司 | Hardware acceleration display horizontal line section device and method |
CN101834723A (en) * | 2009-03-10 | 2010-09-15 | 上海爱信诺航芯电子科技有限公司 | RSA (Rivest-Shamirh-Adleman) algorithm and IP core |
-
2011
- 2011-10-18 CN CN201110315468.6A patent/CN102508798B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100423081C (en) * | 2004-12-03 | 2008-10-01 | 深圳迈瑞生物医疗电子股份有限公司 | Hardware acceleration display horizontal line section device and method |
US20060294344A1 (en) * | 2005-06-28 | 2006-12-28 | Universal Network Machines, Inc. | Computer processor pipeline with shadow registers for context switching, and method |
CN1908885A (en) * | 2006-08-11 | 2007-02-07 | 华为技术有限公司 | Static memorizer interface device and data transmitting method thereof |
CN101834723A (en) * | 2009-03-10 | 2010-09-15 | 上海爱信诺航芯电子科技有限公司 | RSA (Rivest-Shamirh-Adleman) algorithm and IP core |
Non-Patent Citations (1)
Title |
---|
罗海波等: "基于FPGA CPU数据通路的设计与实现", 《微计算机信息》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104239247A (en) * | 2014-09-04 | 2014-12-24 | 成都锐成芯微科技有限责任公司 | SPI (Serial Peripheral Interface)-based register fast read-write method |
CN104239247B (en) * | 2014-09-04 | 2017-04-19 | 成都锐成芯微科技有限责任公司 | SPI (Serial Peripheral Interface)-based register fast read-write method |
CN105892988A (en) * | 2016-04-26 | 2016-08-24 | 广州致远电子股份有限公司 | Operation circuit based on FPGA (Field Programmable Gate Array), oscilloscope and measuring instrument |
CN105892988B (en) * | 2016-04-26 | 2019-03-01 | 广州致远电子股份有限公司 | A kind of computing circuit based on FPGA, oscillograph and measuring instrument |
Also Published As
Publication number | Publication date |
---|---|
CN102508798B (en) | 2014-12-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102831090B (en) | Address line for space-borne DSP (Digital Signal Processor) and FPGA (Field Programmable Gate Array) communication interfaces and optimization method for address line | |
CN103077132B (en) | A kind of cache handles method and protocol processor high-speed cache control module | |
US8898415B2 (en) | Simultaneous read and write data transfer | |
CN105468547A (en) | AXI bus based convenient configurable frame data access control system | |
CN103336745A (en) | FC HBA (fiber channel host bus adapter) based on SSD (solid state disk) cache and design method thereof | |
CN104317770A (en) | Data storage structure and data access method for multiple core processing system | |
CN102981801B (en) | A kind of conversion method of local bus data bit width and device | |
CN104750644A (en) | DSP EMIF reading-writing time sequence and FPGA AVALON reading-writing time sequence conversion method | |
CN108052750A (en) | SPI FLASH controllers and its design method based on FPGA | |
WO2016070668A1 (en) | Method, device, and computer storage medium for implementing data format conversion | |
WO2017148221A1 (en) | Transmission control method, apparatus and system for serial peripheral interface | |
CN112948295A (en) | FPGA and DDR high-speed data packet transmission system and method based on AXI4 bus | |
CN102117193B (en) | Method for implementing pre-read FIFO and pre-read FIFO | |
CN104679681A (en) | High-speed bridge device for AHB (advanced high-performance bus) accessing on-chip SRAM (static random access memory) and operating method of high-speed bridge device | |
CN102508798B (en) | CPU (Central Processing Unit) and FPGA (Field Programmable Gate Array) interface method based on BURST and flow line | |
CN106055496A (en) | Signal generation circuit of EEPROM controller and control method | |
CN103777894A (en) | Method and device for eliminating read-write conflict of memorizer | |
CN104035898A (en) | Memory access system based on VLIW (Very Long Instruction Word) type processor | |
CN103631314B (en) | The method for removing burr in level signal | |
CN107943413A (en) | A kind of method of solid state hard disc lifting reading performance | |
CN103020535A (en) | Data encryption and decryption system with comparing function | |
CN104615503B (en) | Reduce the flash memory error-detecting method and device influenced on memory interface performance | |
CN101923524B (en) | Memory interface method based on CLB (Central Logic Bus) bus | |
CN102831078B (en) | The method of memory access data is returned in advance in a kind of cache | |
CN101980140B (en) | SSRAM access control system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20120620 Assignee: Nanjing Guodian Nanjing Grid Automation Co., Ltd. Assignor: Nanjing Automation Co., Ltd., China Electronics Corp. Contract record no.: 2012320000943 Denomination of invention: CPU (Central Processing Unit) and FPGA (Field Programmable Gate Array) interface method based on BURST and flow line License type: Common License Record date: 20120911 |
|
LICC | Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |