[go: up one dir, main page]

CN104599227B - DDR3 arbitration controllers and method for high-speed CCD data storage - Google Patents

DDR3 arbitration controllers and method for high-speed CCD data storage Download PDF

Info

Publication number
CN104599227B
CN104599227B CN201310530425.9A CN201310530425A CN104599227B CN 104599227 B CN104599227 B CN 104599227B CN 201310530425 A CN201310530425 A CN 201310530425A CN 104599227 B CN104599227 B CN 104599227B
Authority
CN
China
Prior art keywords
read
module
data
write
fifo
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.)
Expired - Fee Related
Application number
CN201310530425.9A
Other languages
Chinese (zh)
Other versions
CN104599227A (en
Inventor
陈钱
尹春梅
顾国华
隋修宝
高航
孙镱诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Science and Technology
Original Assignee
Nanjing University of Science and Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nanjing University of Science and Technology filed Critical Nanjing University of Science and Technology
Priority to CN201310530425.9A priority Critical patent/CN104599227B/en
Publication of CN104599227A publication Critical patent/CN104599227A/en
Application granted granted Critical
Publication of CN104599227B publication Critical patent/CN104599227B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Input (AREA)

Abstract

用于高速CCD数据存储的DDR3仲裁控制器及方法。本发明的一种DDR3仲裁控制器,包括读写控制模块、DDR3仲裁模块、IP核控制模块、数据格式装换模块、读写存储模块。IP核控制模块主要负责驱动读写存储模块,使读写存储模块能够正确读写数据。读写存储模块负责前端给的数据流和读写存储模块读写速度匹配,读写存储模块的读写速度比前端的数据流和后续电路所需的数据流快很多,因此数据写入读写存储模块和从读写存储模块中读出的数据都要进行速度匹配。仲裁模块负责当多个数据流申请使用读写存储模块时,对申请的先后顺序进行仲裁,决定响应顺序,分配读写存储模块的使用资源。数据格式转换模块负责将从读写存储模块中读出的数据格式转化为后续模块所需的标准格式。

DDR3 arbitration controller and method for high-speed CCD data storage. A DDR3 arbitration controller of the present invention includes a read-write control module, a DDR3 arbitration module, an IP core control module, a data format replacement module, and a read-write storage module. The IP core control module is mainly responsible for driving the read-write storage module, so that the read-write storage module can read and write data correctly. The read-write storage module is responsible for matching the data stream given by the front-end with the read-write speed of the read-write storage module. The read-write speed of the read-write storage module is much faster than the front-end data stream and the data stream required by the subsequent circuit, so data is written to read and write The memory module and the data read from the read-write memory module must be speed-matched. The arbitration module is responsible for arbitrating the order of applications when multiple data streams apply for the use of the read-write storage module, determining the response order, and allocating resources for the use of the read-write storage module. The data format conversion module is responsible for converting the data format read from the read-write storage module into the standard format required by subsequent modules.

Description

用于高速CCD数据存储的DDR3仲裁控制器及方法DDR3 arbitration controller and method for high-speed CCD data storage

技术领域technical field

本发明属于高速CCD图像存储领域,特别是一种用于高速CCD数据存储的DDR3仲裁控制器及方法。The invention belongs to the field of high-speed CCD image storage, in particular to a DDR3 arbitration controller and method for high-speed CCD data storage.

背景技术Background technique

在高速CCD的视频图像显示中,一些算法会用到外部存储器,以往所用的外部存储器都是SRAM,因为SRAM使用简单方便,目前SRAM的使用技术已经接近成熟。作为CCD的外部存储器,SRAM目前的技术能够达到最高的工作频率167兆,已经无法满足高速CCD的存储要求。同时SRAM受到芯片制造的技术限制,在体积方面已经无法再减小,集成度低,无法满足小型化CCD的开发要求。此外,SRAM的功耗较大,这也是目前技术无法解决的问题,因此SRAM无法满足低功耗CCD的开发要求。In the video image display of high-speed CCD, some algorithms will use external memory, and the external memory used in the past is SRAM, because SRAM is easy to use, and the use technology of SRAM is close to maturity at present. As the external memory of CCD, the current technology of SRAM can reach the highest operating frequency of 167M, which cannot meet the storage requirements of high-speed CCD. At the same time, SRAM is limited by the technology of chip manufacturing, and its volume can no longer be reduced, and its integration level is low, so it cannot meet the development requirements of miniaturized CCD. In addition, the power consumption of SRAM is relatively large, which is also a problem that cannot be solved by the current technology, so SRAM cannot meet the development requirements of low-power CCD.

基于SRAM使用的种种局限,高速CCD的外部存储器改用了SDRAM,第一代SDRAM和第二代DDR采用单端时钟信号,工作频率高的时候干扰较大,用在CCD外部存储上很少。第三代DDR2和第四代DDR3工作频率比第一代SDRAM和第二代DDR高,因此采用了可降低干扰的差分时钟信号作为同步时钟。DDR3在作为笔记本的内存技术已经很成熟,由于DDR3工作速度快,更适用于高速存储,体积小便于集成化,功耗低等原因,高速CCD的外部存储器也开始选用DDR3,但是DDR3使用的接口配置复杂,CCD前端给存储器的数据流速度和DDR3的读写速度不匹配等原因,要在高速CCD的系统中使用DDR3作为外部存储器,就必须要解决接口配置和速度匹配等问题。但是现有技术中尚无很好的解决方法。Based on the various limitations of SRAM use, the external memory of high-speed CCD is replaced by SDRAM. The first generation SDRAM and the second generation DDR use single-ended clock signals. When the operating frequency is high, the interference is large, and it is rarely used for CCD external storage. The operating frequency of the third-generation DDR2 and the fourth-generation DDR3 is higher than that of the first-generation SDRAM and the second-generation DDR, so a differential clock signal that can reduce interference is used as a synchronous clock. DDR3 has been very mature as a memory technology for notebooks. Due to the fast working speed of DDR3, it is more suitable for high-speed storage, small in size, easy to integrate, and low in power consumption. The external memory of high-speed CCD has also begun to use DDR3, but the interface used by DDR3 The configuration is complex, the data flow speed of the CCD front-end to the memory does not match the read and write speed of DDR3, etc. To use DDR3 as an external memory in a high-speed CCD system, it is necessary to solve problems such as interface configuration and speed matching. But there is still no good solution in the prior art.

发明内容Contents of the invention

本发明所解决的技术问题在于提供一种用于高速CCD数据存储的DDR3仲裁控制器及方法。The technical problem solved by the invention is to provide a DDR3 arbitration controller and method for high-speed CCD data storage.

实现本发明目的的技术解决方案为:一种用于高速CCD数据存储的DDR3仲裁控制器,包括读写控制模块、DDR3仲裁模块、IP核控制模块、数据格式转换模块和读写存储模块,所述读写控制模块、DDR3仲裁模块、IP核控制模块、读写存储模块依次相连,其中读写控制模块还与数据格式转换模块相连,IP核控制模块和读写存储模块还与读写控制模块相连;The technical solution that realizes the object of the present invention is: a kind of DDR3 arbitration controller that is used for high-speed CCD data storage, comprises read-write control module, DDR3 arbitration module, IP core control module, data format conversion module and read-write storage module, so The read-write control module, DDR3 arbitration module, IP core control module, and read-write storage module are connected sequentially, wherein the read-write control module is also connected with the data format conversion module, and the IP core control module and read-write storage module are also connected with the read-write control module connected;

读写控制模块接收外界输入的写往读写存储模块的数据和对应的地址,以及要从读写存储模块读出的数据对应的地址,读写控制模块根据设定的阈值条件将这三个信号以及读写控制信号传输给后续DDR3仲裁模块;The read-write control module receives the data written to the read-write storage module and the corresponding address input from the outside world, as well as the address corresponding to the data to be read from the read-write storage module. The read-write control module converts the three Signals and read-write control signals are transmitted to the subsequent DDR3 arbitration module;

DDR3仲裁控制模块决定是否将这三个信号给IP核控制模块,当DDR3仲裁控制模块决定将这三个信号给IP核控制模块时,IP核控制模块将上述三个信号传输给读写存储模块,同时将要存入读写存储模块的写数据写进读写存储模块中对应的写地址中;读地址对应的读写存储模块中的数据从读写存储模块传回IP核控制模块,IP核控制模块将读出的数据和读数据使能传输给读写控制模块,由读写控制模块将读出的数据和读数据使能输出给数据格式转换模块,经过数据格式转换后输出给后续电路使用。The DDR3 arbitration control module decides whether to send these three signals to the IP core control module. When the DDR3 arbitration control module decides to give these three signals to the IP core control module, the IP core control module transmits the above three signals to the read-write storage module. At the same time, the write data to be stored in the read-write storage module is written into the corresponding write address in the read-write storage module; the data in the read-write storage module corresponding to the read address is transmitted from the read-write storage module back to the IP core control module, and the IP core The control module transmits the read data and read data enable to the read-write control module, and the read-write control module outputs the read data and read data enable to the data format conversion module, and then outputs to the subsequent circuit after data format conversion use.

所述读写控制模块包括地址格式转化模块、写数据格式转化模块、第一读写控制模块、第二读写控制模块、写地址FIFO模块、写数据FIFO模块、读地址FIFO模块、读数据FIFO模块、第一延时模块、第二延时模块、信号反馈模块、FIFO清零信号产生模块和读数据格式转换模块;The read-write control module includes an address format conversion module, a write data format conversion module, a first read-write control module, a second read-write control module, a write address FIFO module, a write data FIFO module, a read address FIFO module, and a read data FIFO module, a first delay module, a second delay module, a signal feedback module, a FIFO clearing signal generation module and a read data format conversion module;

地址格式转换模块、写数据格式转化模块第一读写模块相连,第一读写模块和写地址FIFO模块、写数据FIFO模块、读地址FIFO模块、信号反馈模块相连;写地址FIFO模块、写数据FIFO模块和第一延时模块相连;读地址FIFO模块和第二延时模块相连;写地址FIFO模块、写数据FIFO模块、读地址FIFO模块还与第二读写模块相连;信号反馈模块和读数据FIFO模块相连;读数据FIFO模块和读数据格式转换模块相连;FIFO清零信号产生模块和写地址FIFO模块、写数据FIFO模块、读地址FIFO模块、读数据FIFO模块相连;The address format conversion module and the write data format conversion module are connected to the first read-write module, and the first read-write module is connected to the write address FIFO module, write data FIFO module, read address FIFO module, and signal feedback module; write address FIFO module, write data The FIFO module is connected with the first delay module; the read address FIFO module is connected with the second delay module; the write address FIFO module, the write data FIFO module, and the read address FIFO module are also connected with the second read-write module; the signal feedback module and the read The data FIFO module is connected; the read data FIFO module is connected with the read data format conversion module; the FIFO clearing signal generation module is connected with the write address FIFO module, write data FIFO module, read address FIFO module, and read data FIFO module;

地址格式转换模块和写数据格式转换模块接收前端数据流输入的写数据和对应的写地址、读地址、以及从仲裁模块反馈会的读写控制信号,将4个连续的地址和数据分别转换为一个地址和一个数据并且输出,同时输出的有写使能信号,该信号标志数据格式转换完毕,可以进行下一步工作,这些信号输出给第一读写控制模块;第一读写控制模块将写地址、写数据、读地址信号分别传输给写地址FIFO模块、写数据FIFO模块、读地址FIFO模块,第一读写控制模块同时将FIFO写使能信号传输给上述三个FIFO模块;第二读写控制模块接收从写地址FIFO模块和写数据FIFO模块输出的写地址和写数据,第二读写控制模块同时接收标志这两个FIFO模块中数据个数的信号,如果写地址FIFO模块和写数据FIFO模块中数据个数达到高阈值,第二读写控制模块响应第一读写控制模块的写请求,否则不响应;第一延时模块接收标志两个FIFO模块是否读空的信号,再将标志两个FIFO模块是否读空的信号连接到写地址FIFO模块和写数据FIFO模块的读使能端,读空信号为低电平的时候即非空时,读使能有效,高电平无效;第一读写控制模块将读地址和FIFO写使能传输到读地址FIFO模块,第二读写控制模块接收从读地址FIFO模块中读出的读地址和标志读地址FIFO模块中数据个数的信号,如果读地址FIFO模块中数据个数达到高阈值,第二读写控制模块响应第一读写控制模块的读请求;标志读地址FIFO模块是否读空的信号经过第二延时模块传输到读地址FIFO模块的读使能端,读空信号为低电平的时候读使能有效,高电平无效;读数据FIFO模块的数据输入端接收从IP核控制模块传输回的读数据,读数据FIFO的写使能端接收从IP核控制模块传输回的读数据,第一读写控制模块接收标志读数据FIFO模块的信号,让读写控制模块根据读地址FIFO模块中的数据个数来决定响应读请求,反馈模块接收标志读数据FIFO模块是否读空的信号,上述是否读空的信号和第一读写控制模块发出的反馈请求信号共同作用决定是否继续将读FIFO模块中的数据读出,即如果读数据FIFO模块已读空,则标志读数据FIFO模块是否读空的信号为高电平,经过非门后成低电平,则无论反馈信号是高电平还是低电平,读数据FIFO模块的FIFO读使能无效,如果标志读数据FIFO模块是否读空的信号为低电平,经过非门后成为高电平,此时就判断第一读写控制模块发出的反馈请求信号,如果该信号高电平,则读数据FIFO模块的FIFO读使能有效,反则无效;读数据格式转换模块接收读数据FIFO模块读出的读数据,将一个数据转换成连续的四个数据,从读数据格式转换模块输出的读数据给后续仲裁模块使用;清零信号产生模块接收前端数据流输入的帧信号、仲裁模块反馈回的读写请求信号、标志读数据FIFO模块是否读空的信号,该模块产生的清零信号供给四个FIFO模块使用,来确保每一帧结束时四个FIFO模块都清零。The address format conversion module and the write data format conversion module receive the write data input by the front-end data stream and the corresponding write address, read address, and the read and write control signals fed back from the arbitration module, and convert the four consecutive addresses and data into An address and a data are output together, and a write enable signal is output at the same time. This signal indicates that the data format conversion is completed, and the next step can be performed. These signals are output to the first read-write control module; the first read-write control module will write The address, write data, and read address signals are respectively transmitted to the write address FIFO module, write data FIFO module, and read address FIFO module. The first read and write control module transmits the FIFO write enable signal to the above three FIFO modules at the same time; the second read The write control module receives the write address and write data output from the write address FIFO module and the write data FIFO module, and the second read and write control module simultaneously receives signals indicating the number of data in the two FIFO modules. If the write address FIFO module and the write In the data FIFO module, the number of data reaches a high threshold, and the second read-write control module responds to the write request of the first read-write control module, otherwise it does not respond; the first delay module receives signals indicating whether the two FIFO modules are empty, and then Connect the signal indicating whether the two FIFO modules are read empty to the read enable terminal of the write address FIFO module and the write data FIFO module. When the read empty signal is low, that is, when it is not empty, the read enable is valid, and the high level Invalid; the first read-write control module transmits the read address and FIFO write enable to the read address FIFO module, and the second read-write control module receives the read address read from the read address FIFO module and the data in the flag read address FIFO module If the number of data in the read address FIFO module reaches a high threshold, the second read-write control module responds to the read request of the first read-write control module; the signal indicating whether the read address FIFO module is empty passes through the second delay module Transmitted to the read enable terminal of the read address FIFO module, when the read empty signal is low, the read enable is valid, and the high level is invalid; the data input terminal of the read data FIFO module receives the read data transmitted back from the IP core control module , the write enable end of the read data FIFO receives the read data transmitted back from the IP core control module, and the first read-write control module receives the signal indicating the read data FIFO module, so that the read-write control module reads according to the data in the address FIFO module Number to decide to respond to the read request, the feedback module receives the signal indicating whether the read data FIFO module is empty. Data readout, that is, if the read data FIFO module has been read empty, the signal indicating whether the read data FIFO module is read empty is high level, and becomes low level after passing through the NOT gate, no matter whether the feedback signal is high level or low level Ping, the FIFO read enable of the read data FIFO module is invalid, if the signal indicating whether the read data FIFO module is empty is low level, and becomes high level after passing through the NOT gate, then it is judged that the first read/write control module sends opposite Feed request signal, if the signal is high level, the FIFO read enable of the read data FIFO module is valid, otherwise it is invalid; the read data format conversion module receives the read data read by the read data FIFO module, and converts one data into continuous Four data, the read data output from the read data format conversion module is used by the subsequent arbitration module; the clear signal generation module receives the frame signal input by the front-end data stream, the read and write request signal fed back by the arbitration module, and whether the flag read data FIFO module Read the empty signal, the clear signal generated by this module is used by the four FIFO modules to ensure that the four FIFO modules are cleared at the end of each frame.

所述读写控制模块中的第一延时模块和第二延时模块均包括一个非门,两个与门和时钟延时模块,上述非门通过一个与门与时钟延时模块相连,时钟延时模块还与另一个与门相连,另一个与门的输出为延时模块的输出;The first delay module and the second delay module in the read-write control module all include a NOT gate, two AND gates and a clock delay module, and the above-mentioned NOT gate is connected with the clock delay module through an AND gate, and the clock The delay module is also connected with another AND gate, and the output of the other AND gate is the output of the delay module;

时钟延时模块接收标志FIFO是否读空的信号经过非门与高电平相与后的信号,时钟延时模块延时一个时钟后输出的信号再次和高电平相与,输出结果作为读写控制模块中读数据FIFO模块的读使能信号。The clock delay module receives the signal indicating whether the FIFO is empty and passes through the NOT gate and the high-level signal. After the clock delay module delays one clock, the output signal is again ANDed with the high level, and the output result is used as a read-write The read enable signal of the read data FIFO module in the control module.

所述数据格式转换模块包括数据缓存FIFO模块和格式转换模块,数据缓存FIFO模块、格式转换模块依次相连,数据缓存FIFO模块接收从读写存储模块中读出的数据以及对应的数据输出使能,格式转换模块接收从数据缓存FIFO模块中输出的数据和前端数据流给的帧信号,格式转换模块最终输出的数据是标准的图像信号。The data format conversion module includes a data buffer FIFO module and a format conversion module, the data buffer FIFO module and the format conversion module are connected in sequence, and the data buffer FIFO module receives the data read from the read-write storage module and the corresponding data output enable, The format conversion module receives the data output from the data buffer FIFO module and the frame signal from the front-end data stream, and the final output data of the format conversion module is a standard image signal.

所述读写存储模块采用DDR3芯片,型号为MT41J128M16-15E。The read-write storage module adopts DDR3 chip, and the model is MT41J128M16-15E.

一种基于上述DDR3仲裁控制器的方法,具体包括以下步骤:A method based on the above-mentioned DDR3 arbitration controller, specifically comprising the following steps:

(1)前端数据流将要写入读写存储模块的数据以及要写入的地址、要读出数据的地址写入读写控制模块,读写控制模块判断写入的数据是否达到阈值条件,当达到阈值条件时,读写控制模块向DDR3仲裁模块发出读写请求;(1) The front-end data stream writes the data to be written into the read-write storage module, the address to be written, and the address to read out to the read-write control module. The read-write control module judges whether the written data meets the threshold condition. When When the threshold condition is reached, the read-write control module sends a read-write request to the DDR3 arbitration module;

(2)DDR3仲裁模块根据多个数据流申请的先后顺序进行仲裁,决定读写存储模块的响应顺序,当决定响应该数据流的申请时,DDR3仲裁模块向IP核控制模块发出读写请求控制;(2) The DDR3 arbitration module performs arbitration according to the order of multiple data stream applications, and determines the response order of the read-write storage module. When it decides to respond to the data stream application, the DDR3 arbitration module sends a read-write request to the IP core control module. ;

(3)IP核控制模块响应DDR3仲裁模块的读写请求,开始驱动读写存储模块,将数据写入读写存储模块对应的地址,或者将读写存储模块中对应地址的数据读出,输入数据格式转换模块;(3) The IP core control module responds to the read-write request of the DDR3 arbitration module, starts to drive the read-write storage module, writes data into the address corresponding to the read-write storage module, or reads out the data corresponding to the address in the read-write storage module, and inputs Data format conversion module;

(4)数据格式转换模块将从读写存储模块读出的数据转化为后续模块所需的标准格式,并且造出与标准图像格式相匹配的行信号和帧信号,供给后续模块使用。(4) The data format conversion module converts the data read from the read-write storage module into the standard format required by the subsequent modules, and creates line and frame signals that match the standard image format for use by the subsequent modules.

本发明与现有技术相比,其显著优点为:1)本发明的DDR3仲裁控制器读写速度快,和以往CCD使的存储器SRAM比读写速度快了很多,SRAM读写速度最高只能达到167兆,DDR3芯片可以达到几百兆。2)DDR3芯片体积要比SRAM小很多,集成度高,节约了设计空间。3)DDR3芯片功耗比SRAM低,可以减轻CCD系统中电源板的工作压力。4)本发明的DDR3仲裁控制器能够实现多个数据流交替使用DDR3芯片。5)DDR3芯片使用接口和配置比SRAM复杂很多,限制条件多,但是本发明给用户的使用接口简单,限制条件少,接口的使用几乎和SRAM一致。Compared with the prior art, the present invention has the remarkable advantages as follows: 1) The DDR3 arbitration controller of the present invention has a fast read and write speed, which is much faster than the memory SRAM made by the previous CCD, and the SRAM read and write speed is the highest. It can reach 167 megabytes, and DDR3 chips can reach hundreds of megabytes. 2) The DDR3 chip is much smaller than the SRAM, and has a high degree of integration, which saves design space. 3) The power consumption of DDR3 chips is lower than that of SRAM, which can reduce the working pressure of the power board in the CCD system. 4) The DDR3 arbitration controller of the present invention can realize the alternate use of DDR3 chips by multiple data streams. 5) The use interface and configuration of DDR3 chips are much more complicated than SRAM, and there are more restrictions, but the use interface provided by the present invention to users is simple, with fewer restrictions, and the use of the interface is almost the same as that of SRAM.

下面结合附图对本发明作进一步详细描述。The present invention will be described in further detail below in conjunction with the accompanying drawings.

附图说明Description of drawings

图1是读写控制模块的基本流程图。Figure 1 is a basic flow chart of the read and write control module.

图2是图1中的延时模块结构示意图。FIG. 2 is a schematic structural diagram of the delay module in FIG. 1 .

图3是数据格式转换模块的结构图。Fig. 3 is a structural diagram of the data format conversion module.

图4是DDR3仲裁控制器完整的对外接口图。Figure 4 is a complete external interface diagram of the DDR3 arbitration controller.

图5是本发明的DDR3仲裁控制器结构图。FIG. 5 is a structural diagram of the DDR3 arbitration controller of the present invention.

图6是IP核控制模块的引脚接口图。Figure 6 is a pin interface diagram of the IP core control module.

图7是本发明具体实施例读写的数据流格式图。Fig. 7 is a format diagram of the data stream read and written according to the specific embodiment of the present invention.

具体实施方式detailed description

本发明的一种DDR3仲裁控制器,包括读写控制模块、DDR3仲裁模块、IP核控制模块、数据格式装换模块、读写存储模块。IP核控制模块主要负责驱动读写存储模块,使读写存储模块能够正确读写数据。读写存储模块主要负责前端给的数据流和读写存储模块读写速度匹配问题,读写存储模块的读写速度高达几百兆,前端的数据流达不到这个速度,后续的模块也不需要这么快的速度,因此数据写入读写存储模块和从读写存储模块中读出的数据都要进行速度匹配。仲裁模块主要负责当多个数据流申请使用读写存储模块时,对申请的先后顺序进行仲裁,决定先响应哪个数据流的申请,分配读写存储模块的使用资源。数据格式转换模块主要负责将从读写存储模块中读出的数据格式转化为后续模块所需的标准格式。A DDR3 arbitration controller of the present invention includes a read-write control module, a DDR3 arbitration module, an IP core control module, a data format replacement module, and a read-write storage module. The IP core control module is mainly responsible for driving the read-write storage module, so that the read-write storage module can read and write data correctly. The read-write storage module is mainly responsible for matching the data flow provided by the front-end with the read-write speed of the read-write storage module. The read-write speed of the read-write storage module is as high as hundreds of megabytes. The front-end data stream cannot reach this speed, and subsequent modules cannot. Such a fast speed is required, so the data written into the read-write storage module and the data read from the read-write storage module must be matched in speed. The arbitration module is mainly responsible for arbitrating the order of applications when multiple data streams apply for the use of the read-write storage module, deciding which data stream application to respond to first, and allocating resources for the read-write storage module. The data format conversion module is mainly responsible for converting the data format read from the read-write storage module into the standard format required by subsequent modules.

下面结合附图对本发明作进一步阐述。The present invention will be further elaborated below in conjunction with the accompanying drawings.

结合图1,本发明用于高速CCD数据存储的DDR3仲裁控制器发明的读写控制模块,包括地址格式转化模块、写数据格式转化模块、第一读写控制模块、第二读写控制模块、写地址FIFO模块、写数据FIFO模块、读地址FIFO模块、读数据FIFO模块、第一延时模块、第二延时模块、信号反馈模块、FIFO清零信号产生模块、读数据格式转换模块。In conjunction with Fig. 1, the read-write control module invented by the DDR3 arbitration controller of the present invention for high-speed CCD data storage includes an address format conversion module, a write data format conversion module, a first read-write control module, a second read-write control module, Write address FIFO module, write data FIFO module, read address FIFO module, read data FIFO module, first delay module, second delay module, signal feedback module, FIFO clear signal generation module, read data format conversion module.

地址格式转化模块和写数据格式转化模块是将输入的连续的4个地址和数据转化为一个地址和数据,因此对于前段数据流给的地址和数据一行的个数必须是4的整数倍。读数据格式转化模块是将一个数据转化成4个地址连续的数据。因此输出的数据一行的个数也是4的整数倍,因此结合图5,从DDR3中输出的数据要经过数据格式转化为标准的数据格式才能供给后续模块使用。The address format conversion module and the write data format conversion module convert 4 consecutive input addresses and data into one address and data, so the number of addresses and data lines provided for the previous data stream must be an integer multiple of 4. The read data format conversion module converts one data into data with 4 consecutive addresses. Therefore, the number of output data lines is also an integer multiple of 4, so combined with Figure 5, the data output from DDR3 must be converted into a standard data format through the data format before it can be used by subsequent modules.

当需要写数据时,算法基本模块不停地将欲写的地址和数据发送至写地址FIFO和写数据FIFO;当写数据FIFO和写地址FIFO的数量超过设定的高阈值(该阈值根据需要进行设定,比如512字节)时,向DDR3仲裁控制器申请开始对写地址FIFO和写数据FIFO进行读操作,将写数据FIFO中的数据写入DDR3中相对应地址,当写地址FIFO数量低于设定的低阈值(该阈值根据需要进行设定,比如256字节)时向DDR3仲裁控制器申请停止对写地址FIFO和写数据FIFO的读操作;在算法基本模块中对已经写入写地址FIFO内的地址个数计数,当快满一帧个数时,给出一个写帧结束信号wf_end(在倒数第二次读停止信号后,最后一次读停止信号之前给出高电平,最后一次读停止信号之后置零)到仲裁控制器,该信号屏蔽最后一次读停止信号,使仲裁模块能够一直分别读取两个FIFO中的地址和数据,直到两个FIFO为空(可将FIFO的empty信号接入到仲裁模块中监视FIFO是否为空)时停止读操作,此时完成一整帧图像的地址和数据读取操作,将整幅图像写入了DDR3。When data needs to be written, the algorithm basic module continuously sends the address and data to be written to the write address FIFO and write data FIFO; when the number of write data FIFO and write address FIFO exceeds the set high threshold (the threshold is determined according When setting, such as 512 bytes), apply to the DDR3 arbitration controller to start reading the write address FIFO and write data FIFO, write the data in the write data FIFO to the corresponding address in DDR3, when the number of write address FIFO When it is lower than the set low threshold (the threshold is set according to needs, such as 256 bytes), it applies to the DDR3 arbitration controller to stop reading the write address FIFO and write data FIFO; The number of addresses in the write address FIFO is counted. When the number of frames is almost full, a write frame end signal wf_end is given (after the penultimate read stop signal, a high level is given before the last read stop signal, Set to zero after the last read stop signal) to the arbitration controller, this signal shields the last read stop signal, so that the arbitration module can read the address and data in the two FIFOs respectively until the two FIFOs are empty (the FIFO can be set to The empty signal is connected to the arbitration module to monitor whether the FIFO is empty), and the read operation is stopped. At this time, the address and data read operation of a whole frame of image is completed, and the entire image is written into DDR3.

当算法需要读某个存储器空间的数据之前,需要将想读的数据的地址存储进读地址FIFO,算法基本模块在读控制信号的控制下,不停地将读地址写入读地址FIFO中;当读地址FIFO的存储器空间多于设定的高阈值时(该阈值根据需要进行设定,比如896字节),向DDR3仲裁控制器申请开始对读地址FIFO进行读操作,从DDR3中读取对应地址的数据写入到读数据FIFO中。当读地址FIFO的存储器空间少于设定的低阈值时(该阈值根据需要进行设定,比如768字节),向DDR3仲裁控制器申请停止对读地址FIFO的读操作;在算法基本模块中对已经写入读地址FIFO内的地址个数计数,当快满一帧个数时,给出一个读帧结束信号rf_end(在倒数第二次读停止信号后,最后一次读停止信号之前给出高电平,最后一次读停止信号之后置零)到仲裁控制器,该信号屏蔽最后一次读地址FIFO的读停止信号,使仲裁模块能够一直分别读取读地址FIFO中的地址,直到其为空(可将读地址FIFO的empty信号接入到仲裁模块中监视其是否为空)。读数据FIFO则为:如果读数据FIFO数据超过设定的高阈值时(比如768字节),由算法基本模块连续读取读数据FIFO中的数据,并对其进行计数,当读取够一帧时停止读取。通过FIFO的缓冲使帧间的消隐时间相同。Before the algorithm needs to read data in a certain memory space, it needs to store the address of the data to be read into the read address FIFO, and the basic module of the algorithm continuously writes the read address into the read address FIFO under the control of the read control signal; When the memory space of the read address FIFO is more than the set high threshold (the threshold is set according to the need, such as 896 bytes), apply to the DDR3 arbitration controller to start the read operation of the read address FIFO, and read the corresponding The data at the address is written to the read data FIFO. When the memory space of the read address FIFO is less than the set low threshold (the threshold is set according to needs, such as 768 bytes), apply to the DDR3 arbitration controller to stop the read operation of the read address FIFO; in the algorithm basic module Count the number of addresses that have been written into the read address FIFO. When the number of frames is almost full, a read frame end signal rf_end is given (after the penultimate read stop signal and before the last read stop signal) High level, set to zero after the last read stop signal) to the arbitration controller, this signal shields the read stop signal of the last read address FIFO, so that the arbitration module can always read the addresses in the read address FIFO until it is empty (The empty signal of the read address FIFO can be connected to the arbitration module to monitor whether it is empty). The read data FIFO is: if the read data FIFO data exceeds the set high threshold (such as 768 bytes), the algorithm basic module continuously reads the data in the read data FIFO and counts them. Stop reading at frame time. The blanking time between frames is made the same by FIFO buffering.

所有FIFO在读写操作完成后需要清空。从读写控制模块输出的数据输出使能信号是和从读数据FIFO中输出的数据同步的,当数据从读数据FIFO输出时,数据输出使能就置为高电平,反之置为低电平。All FIFOs need to be emptied after read and write operations are complete. The data output enable signal output from the read-write control module is synchronized with the data output from the read data FIFO. When the data is output from the read data FIFO, the data output enable is set to high level, otherwise it is set to low power. flat.

结合图2,本发明用于高速CCD数据存储的DDR3仲裁控制器发明的读写控制模块,标志FIFO是否读空的信号经过非门与高电平相与后的信号输出给延时模块,延时模块延时一个时钟后输出的信号再次和高电平想与,输出结果作为FIFO的读使能信号。In conjunction with Fig. 2, the read-write control module invented by the DDR3 arbitration controller used for high-speed CCD data storage in the present invention, the signal indicating whether the FIFO is read empty is output to the delay module through the signal of the NOT gate and the high-level phase AND, and the delay The signal output by the timing module after a delay of one clock is ANDed with the high level again, and the output result is used as the read enable signal of the FIFO.

结合图3,本发明用于高速CCD数据存储的DDR3仲裁控制器发明的数据格式转换模块,包括数据缓存FIFO模块、格式转换模块。当数据输出使能为高电平时,表示DDR3开始有数据读出,从DDR3读出的数据在数据缓存FIFO模块中缓存3行,从FIFO中读出的数据和前端数据流给的帧信号(标志一帧图像的开始)输入格式转换模块,最后输出后续模块所需的标准数据格式、行信号(标志图像一行开始)、帧信号。In conjunction with FIG. 3 , the data format conversion module invented by the DDR3 arbitration controller for high-speed CCD data storage of the present invention includes a data buffer FIFO module and a format conversion module. When the data output is enabled at a high level, it means that DDR3 starts to read data. The data read from DDR3 is cached in the data buffer FIFO module for 3 lines, and the data read from the FIFO and the frame signal given by the front-end data stream ( mark the beginning of a frame image) input format conversion module, and finally output the standard data format, line signal (marking the beginning of a line of image image) and frame signal required by subsequent modules.

结合图5,是单一数据流申请使用DDR3信号连接结构,包括读写控制模块、仲裁模块、IP核控制模块、数据格式转换模块,前端数据流将要写往DDR3的数据和对应的地址,以及要读出数据对应的地址写到读写控制模块中,读写控制模块根据阈值条件决定是否将这三个信号以及读写控制信号给后续仲裁模块,由仲裁模块决定是否将这三个信号给DDR3控制器IP核。当仲裁模块决定将着三个信号给控制器IP核时,DDR3控制器IP核才将这三个信号传输给DDR3芯片。要存入DDR3的写数据就写进了DDR3中对应的写地址。读地址对应的DDR3中的数据从DDR3芯片传回DDR3控制器IP核,IP核将读出的数据和读数据使能传输给读写控制模块,由读写控制模块输出给数据格式转换模块,经过数据格式转换后输出给后续电路使用。Combined with Figure 5, it is a single data stream application to use the DDR3 signal connection structure, including the read-write control module, arbitration module, IP core control module, data format conversion module, the data and corresponding addresses that the front-end data stream will write to DDR3, and the required The address corresponding to the read data is written to the read-write control module, and the read-write control module decides whether to send these three signals and the read-write control signal to the subsequent arbitration module according to the threshold condition, and the arbitration module decides whether to send these three signals to DDR3 Controller IP core. When the arbitration module decides to send the three signals to the controller IP core, the DDR3 controller IP core transmits these three signals to the DDR3 chip. The write data to be stored in DDR3 is written into the corresponding write address in DDR3. The data in the DDR3 corresponding to the read address is sent back from the DDR3 chip to the IP core of the DDR3 controller. The IP core transmits the read data and the read data enable to the read-write control module, and the read-write control module outputs to the data format conversion module. After the data format is converted, it is output to the subsequent circuit for use.

仲裁模块的工作过程以两个数据流为例,将数据流1标记为‘01’,数据流2标记为‘10’,当两个算法都不申请时,当前状态标记为‘00’,当数据流1申请时当前状态标记为‘01’,当数据流1还未执行完时,此时如果数据流2也申请使用DDR3,则此刻DDR3继续相应数据流1的申请,而将数据流2排在申请队伍里。当数据流1执行完后,再将当前标记记为‘10’,执行数据流2。如果当数据流1和数据流2同时申请时,则根据顺序,DDR3先响应数据流1的申请,执行完后再响应数据流2的申请。The working process of the arbitration module takes two data streams as an example. Data stream 1 is marked as '01' and data stream 2 is marked as '10'. When neither algorithm is applied, the current state is marked as '00'. When When data stream 1 is applied for, the current state is marked as '01'. When data stream 1 has not been executed, if data stream 2 also applies for DDR3 at this time, DDR3 will continue to apply for data stream 1 at this moment, and data stream 2 will be Be in the application queue. After data flow 1 is executed, mark the current mark as '10' and execute data flow 2. If data stream 1 and data stream 2 apply at the same time, according to the sequence, DDR3 responds to the application of data stream 1 first, and then responds to the application of data stream 2 after execution.

单一数据流申请的情况下,其实仲裁模块并没有发挥作用,只有多个数据流申请使用DDR3时仲裁模块才会起到实质性作用。In the case of a single data stream application, the arbitration module does not actually play a role. Only when multiple data streams apply for DDR3 will the arbitration module play a substantial role.

结合图6,IP核控制模块的引脚接口图,IP核控制模块是由quartus生成软核,生成步骤:Combined with Figure 6, the pin interface diagram of the IP core control module, the IP core control module is a soft core generated by quartus, and the generation steps are:

TOOLS->MegaWizard Plug-In Manager。IP核的设置根据DDR3的型号,参考该DDR3芯片的datasheet选择参数配置。参数配置完后,点Finish,后点击Generate。生成IP核后需要对模块的引脚进行配置,部分引脚定义如下:TOOLS->MegaWizard Plug-In Manager. The setting of the IP core is based on the DDR3 model, refer to the datasheet of the DDR3 chip to select the parameter configuration. After the parameters are configured, click Finish, and then click Generate. After generating the IP core, you need to configure the pins of the module. Some pins are defined as follows:

(1)mem开头的引脚是直接和DDR3芯片相连的,不需要配置。(1) The pins beginning with mem are directly connected to the DDR3 chip and do not need to be configured.

(2)pll_ref_clk是IP核的参考时钟,有别于afi_clk和afi_half_clk,afi_clk和afi_half_clk是DDR3读出数据的时钟,用哪个时钟读出数据需要在生成IP核的时候设置。(2) pll_ref_clk is the reference clock of the IP core, which is different from afi_clk and afi_half_clk. Afi_clk and afi_half_clk are the clocks for DDR3 to read data. Which clock to use to read data needs to be set when generating the IP core.

(3)global_reset_n和soft_reset_n是复位信号,一般都是置为高电平。(3) global_reset_n and soft_reset_n are reset signals, which are generally set to high level.

(4)avl_ready类似于使能信号,是DDR3告诉用户已经准备好可以开始读写数据。(4) avl_ready is similar to the enable signal, it is DDR3 telling the user that it is ready to start reading and writing data.

(5)avl_rdata_valid是读有效信号,为高电平的时候读出的数据有效,该信号是作为DDR3数据输出的使能端给数据格式转换模块使用。(5) avl_rdata_valid is a read valid signal. When it is high level, the read data is valid. This signal is used as the enable port of DDR3 data output for the data format conversion module.

(6)avl_be是位使能信号,一般置为1。(6) avl_be is a bit enable signal, generally set to 1.

(7)avl_size是一次读写的数据个数。(7) avl_size is the number of data read and written at one time.

(8)avl_addr、avl_wdata、avl_write_req分别是写地址、写数据、写使能。(8) avl_addr, avl_wdata, and avl_write_req are the write address, write data, and write enable respectively.

(9)avl_rdata和avl_read_req分别是读数据和读使能。(9) avl_rdata and avl_read_req are read data and read enable respectively.

(10)local_init_done、local_cal_success、local_cal_fail是DDR3初始化标志信号,当local_init_done、local_cal_success为高电平,local_cal_fail为低电平,则DDR3初始化成功,否则初始化不成功。(10) local_init_done, local_cal_success, and local_cal_fail are DDR3 initialization flag signals. When local_init_done, local_cal_success is high and local_cal_fail is low, DDR3 initialization is successful, otherwise initialization is unsuccessful.

(11)oct_rzqin是DDR3的阻抗匹配引脚,需要和FPGA的某个引脚相连。(11) oct_rzqin is the impedance matching pin of DDR3, which needs to be connected to a certain pin of FPGA.

引脚配置好后,先编译,当编译进行到Fitter(Place&Route)时会报错,当所报错误是700多个相同的错误时,再需要运行一个自动分配引脚的程序,步骤:Tools->TclScripts->Pin assignment,然后再次编译,才能编译成功。经过实验调试发现,必需按照这两个步骤先后顺序进行才能编译通过。After the pins are configured, compile first. When the compilation proceeds to Fitter (Place&Route), an error will be reported. When the reported errors are more than 700 identical errors, you need to run a program that automatically allocates pins. Steps: Tools->TclScripts ->Pin assignment, and then compile again to compile successfully. After experimental debugging, it is found that these two steps must be followed in order to compile and pass.

结合图4,是本发明完整的对外接口示意图,一共是和5个数据流的接口,每个算法的接口包括写时钟、写使能、写数据、写地址、读使能、读地址、读数据,使用方法和RAM一样。每个算法对应一组输出接口,分别是场信号、行信号、数据输出。In conjunction with Fig. 4, it is a schematic diagram of a complete external interface of the present invention, which is an interface with 5 data streams in total, and the interface of each algorithm includes write clock, write enable, write data, write address, read enable, read address, read Data is used in the same way as RAM. Each algorithm corresponds to a set of output interfaces, which are field signal, line signal, and data output.

结合图7,本发明的具体实施例:本发明使用软件是quartus12.1,使用的FPGA是Cyclone V,采用的DDR3芯片型号为MT41J128M16-15E,CCD采用的数据格式如图示7。该数据格式每行前面有236个无效数据,后面也有426个无效数据,只有中间是1920个有效数据,为了满足写入数据的地址是连续的4的整数倍,将数据写入DDR3时只写入每行的有效数据即1920*1150,经过数据格式转化后输数据格式如图7,是2583*1150,每行前面236个无效数据,后面也有426个无效数据。CCD前端输出的数据流是四路数据,要将这路数据拼成一幅完整的图像需要用到DDR3存储。先将四路数据通过RAM拼成了两路数据,即上半幅图像和下半幅图像,将这两幅图像信号的有效数据分别存到了DDR3对应的地址,然后输一路完整的图像信号,该图像信号只包含每行信号的有效数据,该图像信号经过数据格式转化模块后可以得到图7所示的标准格式。In conjunction with Fig. 7, specific embodiments of the present invention: the software used by the present invention is quartus12.1, the FPGA used is Cyclone V, the DDR3 chip model adopted is MT41J128M16-15E, and the data format adopted by the CCD is shown in Figure 7. In this data format, there are 236 invalid data in front of each line, and 426 invalid data in the back, and only 1920 valid data in the middle. In order to meet the address of writing data is a continuous integer multiple of 4, only write when writing data into DDR3 The valid data entered in each line is 1920*1150. After the data format conversion, the input data format is shown in Figure 7, which is 2583*1150. There are 236 invalid data in the front of each line, and 426 invalid data in the back. The data stream output by the front end of the CCD is four channels of data, and DDR3 storage is required to combine these channels of data into a complete image. First, the four channels of data are combined into two channels of data through RAM, namely the upper half image and the lower half image, and the valid data of these two image signals are stored in the corresponding addresses of DDR3, and then a complete image signal is input. The signal only contains valid data of each line of signal, and the image signal can be obtained in the standard format shown in Figure 7 after passing through the data format conversion module.

Claims (5)

1.一种用于高速CCD数据存储的DDR3仲裁控制器,其特征在于,包括读写控制模块、DDR3仲裁模块、IP核控制模块、数据格式转换模块和读写存储模块,所述读写控制模块、DDR3仲裁模块、IP核控制模块、读写存储模块依次相连,其中读写控制模块还与数据格式转换模块相连,IP核控制模块和读写存储模块还与读写控制模块相连;1. a DDR3 arbitration controller for high-speed CCD data storage, is characterized in that, comprises read-write control module, DDR3 arbitration module, IP core control module, data format conversion module and read-write storage module, described read-write control Module, DDR3 arbitration module, IP core control module, and read-write storage module are connected sequentially, wherein the read-write control module is also connected with the data format conversion module, and the IP core control module and read-write storage module are also connected with the read-write control module; 读写控制模块接收外界输入的写往读写存储模块的数据和对应的地址,以及要从读写存储模块读出的数据对应的地址,读写控制模块根据设定的阈值条件将这三个信号以及读写控制信号传输给后续DDR3仲裁模块;The read-write control module receives the data written to the read-write storage module and the corresponding address input from the outside world, as well as the address corresponding to the data to be read from the read-write storage module. The read-write control module converts the three Signals and read-write control signals are transmitted to the subsequent DDR3 arbitration module; DDR3仲裁控制模块决定是否将这三个信号给IP核控制模块,当DDR3仲裁控制模块决定将这三个信号给IP核控制模块时,IP核控制模块将上述三个信号传输给读写存储模块,同时将要存入读写存储模块的写数据写进读写存储模块中对应的写地址中;读地址对应的读写存储模块中的数据从读写存储模块传回IP核控制模块,IP核控制模块将读出的数据和读数据使能传输给读写控制模块,由读写控制模块将读出的数据和读数据使能输出给数据格式转换模块,经过数据格式转换后输出给后续电路使用;The DDR3 arbitration control module decides whether to send these three signals to the IP core control module. When the DDR3 arbitration control module decides to give these three signals to the IP core control module, the IP core control module transmits the above three signals to the read-write storage module. At the same time, the write data to be stored in the read-write storage module is written into the corresponding write address in the read-write storage module; the data in the read-write storage module corresponding to the read address is transmitted from the read-write storage module back to the IP core control module, and the IP core The control module transmits the read data and read data enable to the read-write control module, and the read-write control module outputs the read data and read data enable to the data format conversion module, and then outputs to the subsequent circuit after data format conversion use; 所述读写控制模块包括地址格式转化模块、写数据格式转化模块、第一读写控制模块、第二读写控制模块、写地址FIFO模块、写数据FIFO模块、读地址FIFO模块、读数据FIFO模块、第一延时模块、第二延时模块、信号反馈模块、FIFO清零信号产生模块和读数据格式转换模块;The read-write control module includes an address format conversion module, a write data format conversion module, a first read-write control module, a second read-write control module, a write address FIFO module, a write data FIFO module, a read address FIFO module, and a read data FIFO module, a first delay module, a second delay module, a signal feedback module, a FIFO clearing signal generation module and a read data format conversion module; 地址格式转换模块、写数据格式转化模块分别与第一读写模块相连,第一读写模块和写地址FIFO模块、写数据FIFO模块、读地址FIFO模块、信号反馈模块相连;写地址FIFO模块、写数据FIFO模块和第一延时模块相连;读地址FIFO模块和第二延时模块相连;写地址FIFO模块、写数据FIFO模块、读地址FIFO模块还与第二读写模块相连;信号反馈模块和读数据FIFO模块相连;读数据FIFO模块和读数据格式转换模块相连;FIFO清零信号产生模块和写地址FIFO模块、写数据FIFO模块、读地址FIFO模块、读数据FIFO模块相连;The address format conversion module and the write data format conversion module are respectively connected to the first read-write module, the first read-write module is connected to the write address FIFO module, the write data FIFO module, the read address FIFO module, and the signal feedback module; the write address FIFO module, The write data FIFO module is connected to the first delay module; the read address FIFO module is connected to the second delay module; the write address FIFO module, the write data FIFO module, and the read address FIFO module are also connected to the second read-write module; the signal feedback module It is connected with the read data FIFO module; the read data FIFO module is connected with the read data format conversion module; the FIFO clearing signal generation module is connected with the write address FIFO module, write data FIFO module, read address FIFO module, and read data FIFO module; 地址格式转换模块和写数据格式转换模块接收前端数据流输入的写数据和对应的写地址、读地址、以及从仲裁模块反馈会的读写控制信号,将4个连续的地址和数据分别转换为一个地址和一个数据并且输出,同时输出的有写使能信号,该信号标志数据格式转换完毕,可以进行下一步工作,这些信号输出给第一读写控制模块;第一读写控制模块将写地址、写数据、读地址信号分别传输给写地址FIFO模块、写数据FIFO模块、 读地址FIFO模块,第一读写控制模块同时将FIFO写使能信号传输给上述三个FIFO模块;第二读写控制模块接收从写地址FIFO模块和写数据FIFO模块输出的写地址和写数据,第二读写控制模块同时接收标志这两个FIFO模块中数据个数的信号,如果写地址FIFO模块和写数据FIFO模块中数据个数达到高阈值,第二读写控制模块响应第一读写控制模块的写请求,否则不响应;第一延时模块接收标志两个FIFO模块是否读空的信号,再将标志两个FIFO模块是否读空的信号连接到写地址FIFO模块和写数据FIFO模块的读使能端,读空信号为低电平的时候即非空时,读使能有效,高电平无效;第一读写控制模块将读地址和FIFO写使能传输到读地址FIFO模块,第二读写控制模块接收从读地址FIFO模块中读出的读地址和标志读地址FIFO模块中数据个数的信号,如果读地址FIFO模块中数据个数达到高阈值,第二读写控制模块响应第一读写控制模块的读请求;标志读地址FIFO模块是否读空的信号经过第二延时模块传输到读地址FIFO模块的读使能端,读空信号为低电平的时候读使能有效,高电平无效;读数据FIFO模块的数据输入端接收从IP核控制模块传输回的读数据,读数据FIFO的写使能端接收从IP核控制模块传输回的读数据,第一读写控制模块接收标志读数据FIFO模块的信号,让读写控制模块根据读地址FIFO模块中的数据个数来决定响应读请求,反馈模块接收标志读数据FIFO模块是否读空的信号,上述是否读空的信号和第一读写控制模块发出的反馈请求信号共同作用决定是否继续将读FIFO模块中的数据读出,即如果读数据FIFO模块已读空,则标志读数据FIFO模块是否读空的信号为高电平,经过非门后成低电平,则无论反馈信号是高电平还是低电平,读数据FIFO模块的FIFO读使能无效,如果标志读数据FIFO模块是否读空的信号为低电平,经过非门后成为高电平,此时就判断第一读写控制模块发出的反馈请求信号,如果该信号高电平,则读数据FIFO模块的FIFO读使能有效,反则无效;读数据格式转换模块接收读数据FIFO模块读出的读数据,将一个数据转换成连续的四个数据,从读数据格式转换模块输出的读数据给后续仲裁模块使用;清零信号产生模块接收前端数据流输入的帧信号、仲裁模块反馈回的读写请求信号、标志读数据FIFO模块是否读空的信号,该模块产生的清零信号供给四个FIFO模块使用,来确保每一帧结束时四个FIFO模块都清零。The address format conversion module and the write data format conversion module receive the write data input by the front-end data stream and the corresponding write address, read address, and the read and write control signals fed back from the arbitration module, and convert the four consecutive addresses and data into An address and a data are output together, and a write enable signal is output at the same time. This signal indicates that the data format conversion is completed, and the next step can be performed. These signals are output to the first read-write control module; the first read-write control module will write Address, write data, and read address signals are respectively transmitted to the write address FIFO module, write data FIFO module, and read address FIFO module, and the first read-write control module transmits the FIFO write enable signal to the above-mentioned three FIFO modules; the second read The write control module receives the write address and write data output from the write address FIFO module and the write data FIFO module, and the second read and write control module simultaneously receives signals indicating the number of data in the two FIFO modules. If the write address FIFO module and the write In the data FIFO module, the number of data reaches a high threshold, and the second read-write control module responds to the write request of the first read-write control module, otherwise it does not respond; the first delay module receives signals indicating whether the two FIFO modules are empty, and then Connect the signal indicating whether the two FIFO modules are read empty to the read enable terminal of the write address FIFO module and the write data FIFO module. When the read empty signal is low, that is, when it is not empty, the read enable is valid, and the high level Invalid; the first read-write control module transmits the read address and FIFO write enable to the read address FIFO module, and the second read-write control module receives the read address read from the read address FIFO module and the data in the flag read address FIFO module If the number of data in the read address FIFO module reaches a high threshold, the second read-write control module responds to the read request of the first read-write control module; the signal indicating whether the read address FIFO module is empty passes through the second delay module Transmitted to the read enable terminal of the read address FIFO module, when the read empty signal is low, the read enable is valid, and the high level is invalid; the data input terminal of the read data FIFO module receives the read data transmitted back from the IP core control module , the write enable end of the read data FIFO receives the read data transmitted back from the IP core control module, and the first read-write control module receives the signal indicating the read data FIFO module, so that the read-write control module reads according to the data in the address FIFO module Number to decide to respond to the read request, the feedback module receives the signal indicating whether the read data FIFO module is empty, the above-mentioned signal whether to read empty and the feedback request signal sent by the first read-write control module work together to determine whether to continue to read the data in the FIFO module Data readout, that is, if the read data FIFO module has been read empty, the signal indicating whether the read data FIFO module is read empty is high level, and becomes low level after passing through the NOT gate, no matter the feedback signal is high level or low level Ping, the FIFO read enable of the read data FIFO module is invalid. If the signal indicating whether the read data FIFO module is empty is low level and becomes high level after passing through the NOT gate, it is judged at this time that the first read/write control module sends Feedback request signal, if the signal is high level, the FIFO read enable of the read data FIFO module is valid, otherwise it is invalid; the read data format conversion module receives the read data read by the read data FIFO module, and converts one data into continuous Four data, the read data output from the read data format conversion module is used by the subsequent arbitration module; the clear signal generation module receives the frame signal input by the front-end data stream, the read and write request signal fed back by the arbitration module, and whether the flag read data FIFO module Read the empty signal, the clear signal generated by this module is used by the four FIFO modules to ensure that the four FIFO modules are cleared at the end of each frame. 2.根据权利要求1所述的用于高速CCD数据存储的DDR3仲裁控制器,其特征在于,所述读写控制模块中的第一延时模块和第二延时模块均包括一个非门,两个与门和时钟延时模块,上述非门通过一个与门与时钟延时模块相连,时钟延时模块还与另一个与门 相连,另一个与门的输出为延时模块的输出;2. the DDR3 arbitration controller for high-speed CCD data storage according to claim 1, is characterized in that, the first delay module and the second delay module in the read-write control module all comprise a NOT gate, Two AND gates and a clock delay module, the NOT gate is connected to the clock delay module through an AND gate, the clock delay module is also connected to another AND gate, and the output of the other AND gate is the output of the delay module; 时钟延时模块接收标志FIFO是否读空的信号经过非门与高电平相与后的信号,时钟延时模块延时一个时钟后输出的信号再次和高电平相与,输出结果作为读写控制模块中读数据FIFO模块的读使能信号。The clock delay module receives the signal indicating whether the FIFO is empty and passes through the NOT gate and the high-level signal. After the clock delay module delays one clock, the output signal is again ANDed with the high level, and the output result is used as a read-write The read enable signal of the read data FIFO module in the control module. 3.根据权利要求1所述的用于高速CCD数据存储的DDR3仲裁控制器,其特征在于,所述数据格式转换模块包括数据缓存FIFO模块和格式转换模块,数据缓存FIFO模块、格式转换模块依次相连,数据缓存FIFO模块接收从读写存储模块中读出的数据以及对应的数据输出使能,格式转换模块接收从数据缓存FIFO模块中输出的数据和前端数据流给的帧信号,格式转换模块最终输出的数据是标准的图像信号。3. the DDR3 arbitration controller for high-speed CCD data storage according to claim 1, is characterized in that, described data format conversion module comprises data buffer FIFO module and format conversion module, and data buffer FIFO module, format conversion module are sequential Connected, the data cache FIFO module receives the data read from the read-write storage module and the corresponding data output enable, the format conversion module receives the data output from the data cache FIFO module and the frame signal given by the front-end data stream, the format conversion module The final output data is a standard image signal. 4.根据权利要求1所述的用于高速CCD数据存储的DDR3仲裁控制器,其特征在于,所述读写存储模块采用DDR3芯片,型号为MT41J128M16-15E。4. The DDR3 arbitration controller for high-speed CCD data storage according to claim 1, wherein the read-write storage module adopts a DDR3 chip, and the model is MT41J128M16-15E. 5.一种基于权利要求1所述DDR3仲裁控制器的处理方法,其特征在于,包括以下步骤:5. a processing method based on the described DDR3 arbitration controller of claim 1, is characterized in that, comprises the following steps: (1)前端数据流将要写入读写存储模块的数据以及要写入的地址、要读出数据的地址写入读写控制模块,读写控制模块判断写入的数据是否达到阈值条件,当达到阈值条件时,读写控制模块向DDR3仲裁模块发出读写请求;(1) The front-end data stream writes the data to be written into the read-write storage module, the address to be written, and the address to read the data into the read-write control module, and the read-write control module judges whether the written data reaches the threshold condition. When the threshold condition is reached, the read-write control module sends a read-write request to the DDR3 arbitration module; (2)DDR3仲裁模块根据多个数据流申请的先后顺序进行仲裁,决定读写存储模块的响应顺序,当决定响应该数据流的申请时,DDR3仲裁模块向IP核控制模块发出读写请求控制;(2) The DDR3 arbitration module performs arbitration according to the sequence of multiple data stream applications, and determines the response sequence of the read-write storage module. When it decides to respond to the application of the data stream, the DDR3 arbitration module sends a read-write request control to the IP core control module ; (3)IP核控制模块响应DDR3仲裁模块的读写请求,开始驱动读写存储模块,将数据写入读写存储模块对应的地址,或者将读写存储模块中对应地址的数据读出,输入数据格式转换模块;(3) The IP core control module responds to the read-write request of the DDR3 arbitration module, starts to drive the read-write storage module, writes the data into the address corresponding to the read-write storage module, or reads out the data corresponding to the address in the read-write storage module, input Data format conversion module; (4)数据格式转换模块将从读写存储模块读出的数据转化为后续模块所需的标准格式,并且造出与标准图像格式相匹配的行信号和帧信号,供给后续模块使用。(4) The data format conversion module converts the data read from the read-write storage module into the standard format required by the subsequent modules, and creates row signals and frame signals matching the standard image format for use by the subsequent modules.
CN201310530425.9A 2013-10-30 2013-10-30 DDR3 arbitration controllers and method for high-speed CCD data storage Expired - Fee Related CN104599227B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310530425.9A CN104599227B (en) 2013-10-30 2013-10-30 DDR3 arbitration controllers and method for high-speed CCD data storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310530425.9A CN104599227B (en) 2013-10-30 2013-10-30 DDR3 arbitration controllers and method for high-speed CCD data storage

Publications (2)

Publication Number Publication Date
CN104599227A CN104599227A (en) 2015-05-06
CN104599227B true CN104599227B (en) 2017-09-22

Family

ID=53124979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310530425.9A Expired - Fee Related CN104599227B (en) 2013-10-30 2013-10-30 DDR3 arbitration controllers and method for high-speed CCD data storage

Country Status (1)

Country Link
CN (1) CN104599227B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603172A (en) * 2016-11-24 2017-04-26 中国电子科技集团公司第四十研究所 Time stamp data time sharing reading-writing method applied to radio monitoring receiver
CN108897511B (en) * 2018-07-05 2021-03-05 四川长九光电科技有限责任公司 Method for receiving and displaying images with different frame frequencies
CN109062538B (en) * 2018-07-10 2020-11-20 豪威科技(上海)有限公司 Circular FIFO buffer and data transmission interface, system and method
CN109766285A (en) * 2019-01-10 2019-05-17 中国科学院长春光学精密机械与物理研究所 A burst mode SDRAM access control system and control method
CN112732603B (en) * 2019-10-14 2024-08-27 广州飒特红外股份有限公司 Multichannel VDMA control method and application thereof
CN111124317B (en) * 2020-01-07 2024-11-22 华南理工大学 Asynchronous alternating receiving and sending method, receiving and sending system and device for writing data stream
CN111581132B (en) * 2020-04-27 2022-03-25 武汉中科牛津波谱技术有限公司 Extensible multiport DDR3 controller based on FPGA
CN111722827B (en) * 2020-05-28 2022-07-15 江苏方天电力技术有限公司 Efficient DDR access method
CN111949577B (en) * 2020-07-30 2023-03-14 电子科技大学 High-speed high-precision sampling data large-capacity storage and rapid transmission method
CN112052206B (en) * 2020-08-31 2023-03-28 浙江双成电气有限公司 Multi-port data storage system based on arbitration
CN112241390B (en) * 2020-10-22 2022-08-30 上海兆芯集成电路有限公司 Host interconnection apparatus and method thereof
CN113051195A (en) * 2021-03-02 2021-06-29 长沙景嘉微电子股份有限公司 Memory, GPU and electronic equipment
CN113220620B (en) * 2021-05-21 2024-05-07 北京旋极信息技术股份有限公司 System for converting data stream format and data stream transmission system
CN118708526B (en) * 2024-08-28 2024-11-22 成都凯天电子股份有限公司 A parallel ARINC818 bus to serial storage system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019645A (en) * 2013-01-08 2013-04-03 江苏涛源电子科技有限公司 Arbitration control method of CCD signal processing circuit high speed data flow
CN103279309A (en) * 2013-05-15 2013-09-04 清华大学 DDR control device and method based on FPGA

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8447908B2 (en) * 2009-09-07 2013-05-21 Bitmicro Networks, Inc. Multilevel memory bus system for solid-state mass storage

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019645A (en) * 2013-01-08 2013-04-03 江苏涛源电子科技有限公司 Arbitration control method of CCD signal processing circuit high speed data flow
CN103279309A (en) * 2013-05-15 2013-09-04 清华大学 DDR control device and method based on FPGA

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
DDR3内存控制器的IP核设计及FPGA验证;王正宇;《中国优秀硕士学位论文全文数据库 信息科技辑》;20130115(第01期);第I137-40页正文第20页倒数第一段,第21页,第23页第3.4节,第30页第3.4.6节,第41页第4.3.1节,图3.2 *
Method to implement the CCD timing generator based on FPGA;Binhua Li等;《Proceedings of SPIE》;20100720;第7742卷;正文第2页倒数第2段,第3页第3节,图2 *
基于Stratix Ⅲ的DDR3 SDRAM控制器设计;方勇等;《微计算机信息》;20090205;第25卷(第2-2期);第308-309页 *
基于统计时分复用技术的三维片上网络;王佳文等;《电子与信息学报》;20121015;第34卷(第10期);第2501-2507页 *

Also Published As

Publication number Publication date
CN104599227A (en) 2015-05-06

Similar Documents

Publication Publication Date Title
CN104599227B (en) DDR3 arbitration controllers and method for high-speed CCD data storage
CN105224482B (en) A kind of FPGA accelerator cards high-speed memory system
CN100498806C (en) Device and method for outputting signal of emulation infrared detector
CN110471872B (en) A system and method for realizing M-LVDS bus data interaction based on ZYNQ chip
CN108536642B (en) Big data computing acceleration systems and chips
CN105335326A (en) PCIE-SATA interface array device based on FPGA
CN104915303B (en) High speed digital I based on PXIe buses/O systems
CN101344870B (en) FIFO control module with strong reusability and method for managing internal memory
CN108268414B (en) SD card driver and its control method based on SPI mode
CN106951379A (en) A kind of high-performance DDR controller and data transmission method based on AXI protocol
CN101694609A (en) Structure and method for improving speed of external memory interface of high-definition image real-time collecting system DSP
CN111736115B (en) MIMO millimeter wave radar high-speed transmission method based on improved SGDMA + PCIE
CN116225990A (en) Multi-channel DDR read and write arbitration device based on FPGA
CN103853642A (en) Injection type simulation system for infrared digital image based on USB3.0 and method thereof
CN104714907B (en) A kind of pci bus is converted to ISA and APB bus design methods
CN112948295A (en) FPGA and DDR high-speed data packet transmission system and method based on AXI4 bus
CN101625635A (en) Method, system and equipment for processing circular task
CN201378851Y (en) A CCD image data acquisition device
CN115129657B (en) Programmable logic resource expansion device and server
CN116662240A (en) A protocol conversion circuit and method, chip, test device, storage medium
CN115599719A (en) An FPGA-based FIFO interface multi-channel DMA controller
CN104535194A (en) Simulation device and method of infrared detector based on DMD
CN101901278A (en) A high-speed data acquisition card and data acquisition method
CN218068843U (en) Bridging circuit structure for converting AXI master port into APB slave port and SOC system
CN104156907A (en) FPGA-based infrared preprocessing storage system and FPGA-based infrared preprocessing storage 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
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170922

Termination date: 20191030