CN101187896B - On-spot programmable gate array data cache management method - Google Patents

On-spot programmable gate array data cache management method Download PDF

Info

Publication number
CN101187896B
CN101187896B CN200710125017XA CN200710125017A CN101187896B CN 101187896 B CN101187896 B CN 101187896B CN 200710125017X A CN200710125017X A CN 200710125017XA CN 200710125017 A CN200710125017 A CN 200710125017A CN 101187896 B CN101187896 B CN 101187896B
Authority
CN
China
Prior art keywords
data
fifo
operation module
read
fragment
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
CN200710125017XA
Other languages
Chinese (zh)
Other versions
CN101187896A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN200710125017XA priority Critical patent/CN101187896B/en
Publication of CN101187896A publication Critical patent/CN101187896A/en
Application granted granted Critical
Publication of CN101187896B publication Critical patent/CN101187896B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention discloses a managing method for gate array data cache which can be programmed on site, when data is written, firstly, a writing operating module writes slicing data into a data memory, and records the length of the slicing data and gains the starting address in the data memory of the slicing data, and secondly, the writing operating module writes the length of the slicing data and the staring address in the data memory into the a storing controller. When data is read, firstly, a reading operating module reads the length of the slicing data which is gained by the storing controller and the staring address in the data memory, and secondly, the reading operating module reads the slicing data after giving the reading address of the data memory according to the staring address. The position of each massage slicing in the data memory is led to gain explicit mark by the technical proposal of the invention.

Description

A kind of management method of on-spot programmable gate array data cache
Technical field
The present invention relates to a kind of management method of metadata cache, the management method of especially a kind of FPGA (FieldProgrammable Gate Array, field programmable gate array) metadata cache.
Background technology
After FPGA receives pending data, data are write data FIFO (FirstInput First Output, First Input First Output), i.e. data-carrier store, and control information write control FIFO, i.e. memory controller; When control FIFO non-NULL, expression has data.Downstream module reads to control the controlled information of FIFO0, reads corresponding data then and handled from data FIFO.
Message with different passages in this patent carries out buffer memory by passage, require each passage that one group of FIFO control information must be arranged, as read/write address pointer, empty full state indication, individual counter etc., number of channels will cause managing the waste of inconvenience and logical resource more for a long time; Moreover, needing to set a DCON in this patent, a plurality of passages just need a plurality of different DCON.
The patent No. has been described a kind of method of packet buffer for the United States Patent (USP) of " US5664116 ", it is data cached promptly to adopt independent FIFO of each channel allocation to come, but the position of each message fragment in data FIFO do not have clear and definite sign, when in case read-write operation has a side to make a mistake, the data of whole buffer area all can read confusion, cause the mistake that can't recover.
Summary of the invention
The technical problem to be solved in the present invention provides a kind of management method of FPGA metadata cache, make the position of each message fragment in data FIFO obtain clear and definite sign, guaranteed the correctness of certain message fragment subsequent packet buffer memory when read-write operation makes a mistake.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of management method of FPGA metadata cache,
May further comprise the steps during write data:
A: the write operation module receives message data, and obtains data channel number, start of message (SOM) sign and ENMES sign;
B: the write operation module is divided message data and is obtained burst by regular length, and with each burst respectively together with data channel number, start of message (SOM) sign and the ENMES sign form each fragment data;
C: the write operation module is handled whole fragment datas in the following manner one by one: a fragment data is all write data FIFO, write down the length of this fragment data and obtain the start address of this fragment data in data FIFO, this start address is to be transferred to the write operation module by data FIFO by default Wr_addr interface; The write operation module writes control FIFO with the length of this fragment data and the start address in data FIFO thereof;
May further comprise the steps during read data:
A, read operation module judge whether non-NULL of control FIFO, read control FIFO and obtain the length of a fragment data and the start address in data FIFO thereof;
B, read operation module provide the address of reading of data FIFO by default Rd_addr interface according to this start address;
C, read operation module are read the address according to this data FIFO are carried out a read operation, control initial value among the FIFO simultaneously and are 0 reading times counter and add 1;
D, judge according to the value of the length of this fragment data and reading times counter whether this fragment data reads and finish that if both are identical, promptly fragment data has read and finished, and gets back to steps A and carries out decision operation once more; Otherwise this is read the address increases by 1, and gets back to step C.
In the such scheme, described fragment data comprises by regular length divides burst that message data obtains and data channel number, start of message (SOM) sign and ENMES sign.
Beneficial effect of the present invention mainly shows: the address of the present invention return data FIFO when write operation, and when read operation, provide the start address of data FIFO, make the position of each message fragment in data FIFO obtain clear and definite sign, even certain message fragment makes a mistake when read-write operation, it is chaotic not cause that also whole data FIFO takes place, and guarantees the correctness of subsequent packet buffer memory; Moreover the present invention writes data FIFO with channel number together in company with data, only manages a data FIFO, just can the buffer memory multi-channel data, greatly simplified the complexity that realizes, and saved logical resource.
Description of drawings
Fig. 1 is the method flow diagram of write data FIFO in the management of FPGA metadata cache of the present invention;
Fig. 2 is the method flow diagram of read data FIFO in the management of FPGA metadata cache of the present invention.
Embodiment
The invention will be further described in conjunction with Fig. 1 and Fig. 2 respectively below.
With reference to Fig. 1, when the up-stream module of FPGA sent message data, the management method of metadata cache may further comprise the steps:
Step 101: the write operation module judges whether control FIFO and data FIFO be all non-full, if both are all non-full, then showing can also the buffer memory message data, enters step 102; Otherwise, show and can not receive data that execution in step 101 once more from up-stream module;
Step 102: the write operation module receives message data, and obtains data channel number, start of message (SOM) sign and ENMES sign;
Step 103: the write operation module is divided message data and is obtained burst by regular length, and with each burst respectively together with data channel number, start of message (SOM) sign and the ENMES sign form each fragment data;
Step 104: the write operation module all writes data FIFO with a fragment data, writes down the length of this fragment data and obtains the start address of this fragment data in data FIFO; Wherein, this start address is to be transferred to the write operation module by data FIFO by default Wr_addr interface; The length of record fragment data is because the length of message is fixing, often is not the integral multiple of the regular length set when dividing, and this makes the regular length that the curtailment of last burst of message data is set;
Step 105: the write operation module writes control FIFO with the length of this fragment data and the start address in data FIFO thereof;
Step 106: the write operation module judges whether that fragment data need write data FIFO in addition, if, get back to step 104, otherwise, process ends.
With reference to Fig. 2, when FPGA read message data, the management method of metadata cache may further comprise the steps:
Step 201: the read operation module is judged whether non-NULL of control FIFO, if not empty, and expression has at least a fragment data to be buffered in the data FIFO, enters step 202; Otherwise execution in step 201 once more;
Step 202: the read operation module reads control FIFO and obtains the length of a fragment data and the start address in data FIFO thereof;
Step 203: the read operation module provides the address of reading of data FIFO by default Rd_addr interface according to this start address;
Step 204: the read operation module is read the address according to this data FIFO is carried out a read operation, controls initial value among the FIFO simultaneously and is 0 reading times counter and add 1;
Step 205: judge according to the value of the length of this fragment data and reading times counter whether this fragment data reads and finish that if both are identical, the expression fragment data has read and finished, and gets back to step 201 and carries out decision operation once more; Otherwise, enter step 206;
Step 206: this is read the address increases by 1, and gets back to step 204.

Claims (2)

1. the management method of an on-spot programmable gate array data cache is characterized in that, may further comprise the steps during write data:
Whether a, write operation module judgement control FIFO and data FIFO be all non-full, if both are all non-full, enters next step;
B, write operation module receive message data, and obtain data channel number, start of message (SOM) sign and ENMES sign;
C, write operation module divide message data and obtain burst by regular length, and with each burst respectively together with data channel number, start of message (SOM) sign and the ENMES sign form each fragment data;
D, write operation module all write data FIFO with a fragment data, write down the length of this fragment data and obtain the start address of this fragment data in data FIFO, this start address is to be transferred to the write operation module by data FIFO by default Wr_addr interface; The write operation module writes control FIFO with the length of this fragment data and the start address in data FIFO thereof;
E, write operation module judge whether that fragment data need write data FIFO in addition, if, get back to steps d, otherwise, process ends;
May further comprise the steps during read data:
A, read operation module judge whether non-NULL of control FIFO, read control FIFO and obtain the length of a fragment data and the start address in data FIFO thereof;
B, read operation module provide the address of reading of data FIFO by default Rd_addr interface according to this start address;
C, read operation module are read the address according to this data FIFO are carried out a read operation, control initial value among the FIFO simultaneously and are 0 reading times counter and add 1;
D, judge according to the value of the length of this fragment data and reading times counter whether this fragment data reads and finish that if both are identical, promptly fragment data has read and finished, and gets back to steps A and carries out decision operation once more; Otherwise this is read the address increases by 1, and gets back to step C.
2. the management method of on-spot programmable gate array data cache as claimed in claim 1 is characterized in that: described fragment data comprises by regular length divides burst that message data obtains and data channel number, start of message (SOM) sign and ENMES sign.
CN200710125017XA 2007-12-14 2007-12-14 On-spot programmable gate array data cache management method Expired - Fee Related CN101187896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710125017XA CN101187896B (en) 2007-12-14 2007-12-14 On-spot programmable gate array data cache management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710125017XA CN101187896B (en) 2007-12-14 2007-12-14 On-spot programmable gate array data cache management method

Publications (2)

Publication Number Publication Date
CN101187896A CN101187896A (en) 2008-05-28
CN101187896B true CN101187896B (en) 2011-04-06

Family

ID=39480300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710125017XA Expired - Fee Related CN101187896B (en) 2007-12-14 2007-12-14 On-spot programmable gate array data cache management method

Country Status (1)

Country Link
CN (1) CN101187896B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102457441A (en) * 2012-01-16 2012-05-16 瑞斯康达科技发展股份有限公司 PSN (Packet Switched Network) data packet processing method and device

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101447928B (en) * 2008-12-31 2011-09-14 华为技术有限公司 Method and device for processing fragment information
CN102546397A (en) * 2011-12-16 2012-07-04 福建星网锐捷网络有限公司 Method, apparatus and device for balancing traffic of uplink aggregation port
CN107220187B (en) * 2017-05-22 2020-06-16 北京星网锐捷网络技术有限公司 Cache management method and device and field programmable gate array
CN107911317B (en) * 2017-11-30 2020-05-12 杭州迪普科技股份有限公司 Message scheduling method and device
CN108628780B (en) * 2018-04-28 2022-11-08 重庆辉烨通讯技术有限公司 Data communication method and system and electric vehicle
CN108733598B (en) * 2018-05-07 2021-05-18 浪潮集团有限公司 Data transmission method and data transmission device
CN111224903B (en) * 2018-11-26 2022-10-14 深圳市中兴微电子技术有限公司 Data transmission method, data transmission equipment and computer readable storage medium
CN113312282A (en) * 2021-06-10 2021-08-27 京微齐力(北京)科技有限公司 FIFO read-write control circuit, control method, chip and equipment
CN113342717A (en) * 2021-06-22 2021-09-03 京微齐力(深圳)科技有限公司 FIFO read-write control method and control circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102457441A (en) * 2012-01-16 2012-05-16 瑞斯康达科技发展股份有限公司 PSN (Packet Switched Network) data packet processing method and device
CN102457441B (en) * 2012-01-16 2014-06-25 瑞斯康达科技发展股份有限公司 PSN (Packet Switched Network) data packet processing method and device

Also Published As

Publication number Publication date
CN101187896A (en) 2008-05-28

Similar Documents

Publication Publication Date Title
CN101187896B (en) On-spot programmable gate array data cache management method
US9304692B2 (en) Solid-state drive command grouping
CN104220991B (en) Framework for allowing effective storage of the data on nand flash memory
CN104423894B (en) Data memory device and method for controlling flash memory
CN108958907A (en) Context-aware dynamic command for data-storage system is dispatched
US20060187738A1 (en) Memory management device and memory device
EP1712985A1 (en) Method and system for storing logical data blocks into flash-blocks in multiple non-volatile memories which are connected to at least one common data I/O bus
US8996794B2 (en) Flash memory controller
TW200832415A (en) High speed interface for non-volatile memory
CN101241446A (en) Command scheduling method and apparatus of virtual file system embodied in nonvolatile data storage device
US20070226402A1 (en) Data management and control system in semiconductor flush memory and semiconductor flush memory accommodation apparatus
CN102253898B (en) Memory management method and memory management device of image data
CN101714391A (en) Data storage method and device
US8572307B2 (en) Memory controller, memory card, and nonvolatile memory system
CN101303884A (en) Nand type flash memory controller and read-write control system and method
US10929025B2 (en) Data storage system with I/O determinism latency optimization
CN108763531A (en) A kind of MDVR document storage systems and its operation method
CN108733580A (en) Method for scheduling read commands
TW201719429A (en) Flexible interface for NAND flash memory
CN101515221A (en) Method, device and system for reading data
CN106325759A (en) DDR (Double Data Rate) method and device capable of dynamically configuring port bandwidths
CN102096679A (en) Method and device for merging and writing index segments in disk
EP1712984A1 (en) Method and system for accessing logical data blocks in a storage system that includes multiple memories which are connected to at least one common bus
CN104102552A (en) Message processing method and device
TW201426756A (en) Method of arranging data in a non-volatile memory and a memory control system thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110406

Termination date: 20141214

EXPY Termination of patent right or utility model