CN101833513B - Device and reading method for data frame - Google Patents

Device and reading method for data frame Download PDF

Info

Publication number
CN101833513B
CN101833513B CN2010101583998A CN201010158399A CN101833513B CN 101833513 B CN101833513 B CN 101833513B CN 2010101583998 A CN2010101583998 A CN 2010101583998A CN 201010158399 A CN201010158399 A CN 201010158399A CN 101833513 B CN101833513 B CN 101833513B
Authority
CN
China
Prior art keywords
frame
identification information
data
bit
frame identification
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
CN2010101583998A
Other languages
Chinese (zh)
Other versions
CN101833513A (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.)
Raisecom Technology Co Ltd
Original Assignee
Raisecom Technology Co Ltd
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 Raisecom Technology Co Ltd filed Critical Raisecom Technology Co Ltd
Priority to CN2010101583998A priority Critical patent/CN101833513B/en
Publication of CN101833513A publication Critical patent/CN101833513A/en
Application granted granted Critical
Publication of CN101833513B publication Critical patent/CN101833513B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a reading method for a data frame. The reading method comprises the following steps of reading data of a corresponding length according to the length value of frame identification information from the first bit next to the frame identification information to obtain a data frame corresponding to the frame identification information; and reading the identification information of the next frame from the first bit next to the data of the corresponding length, if the next data frame needs to be read next. Data of different data frames can be divided to be stored according to different frame length information together with check codes. Whether the frame delimitation is wrong or not is judged during the reading of data frames. If wrong, the correct position is retrieved again.

Description

A kind of read method of Frame, device
Technical field
The present invention relates to field of storage, relate in particular to a kind of read method, device of Frame.
Background technology
When storer is gone in the Various types of data frame buffer, all need carry out frame and delimit processing, promptly add the starting and ending position that certain specific character is used for the recognition data frame.Have only through delimiting and handle, could be reduced to Frame to the continuous data of from storer, reading.
In the prior art, a kind of frame is delimited the scheme of handling and is: respectively each Frame in the storer is added frame head sign and postamble sign, thereby realize the demarcation of Frame in the storer.Following table is that a data width is the data storage instance when concrete achieve frame is delimited in 16 the storer:
Data storage signal table in table 1, the storer
address Data[9] Data[8] Data[7:0]
0 1 0 11
1 0 0 22
2 0 0 33
3 0 0 44
4 0 0 55
5 0 0 66
6 0 0 77
7 0 0 88
8 0 1 99
9 1 0 10
10 0 0 11
11 0 0 12
12 0 0 13
13 0 0 14
14 0 0 15
15 0 0 16
16 0 0 17
17 0 0 18
18 0 1 19
In this data storage signal table; The memory data width is 16 bits (being that each address space is 16 bits); Low byte is used for the storage frame data; First bit in the high byte (the 8th bit) is used for the storage frame tail tag to be known, and this postamble sign is set when comprising the postamble of Frame in the low byte of front; Second bit (the 9th bit) is used for the knowledge of storage frame leader in the high byte, and this frame head sign is set when next Frame will be stored in the back; Other 6 bit free time in the high byte.In the example shown in the last table, identify data 0 beginning that can discern first Frame through frame head, postamble when reading the storage data from the address, to 8 end, the data of second Frame are 9 beginnings from the address, finish to 18.
The shortcoming of this scheme is: adopt the frame demarcation method of frame head, postamble sign need sacrifice a byte and be used for storaging mark, so its shortcoming is that the storage space utilization factor is low that concrete storage space utilization factor is relevant with the data width of storer.As above data width is 16 bits in the example, sacrifice a bytes store frame head, postamble sign in two bytes, so the storage space utilization factor is 1/2.If the memory data width is 4 bytes, then the storage space utilization factor is 3/4.
In the prior art, another kind of frame is delimited the scheme of handling and is: the storage space to storer carries out piecemeal, and the size of piece must be less than the minimum frame length of storage frame, thereby guaranteeing that each frame is minimum is divided into 2.The first half of first address of each piece is used for the frame head sign or the postamble sign of store frames of data; If this piece is first piece of certain Frame of storage then first half is changed to the frame head sign; If last piece of storing certain Frame then is changed to the postamble sign with first half, if be not then first half is idle; In addition, current half part storage be the postamble sign time, latter half is used to store the data length in this piece, otherwise latter half is idle; Fig. 1 is that a data width is a concrete synoptic diagram of realizing the piecemeal storage in 16 the storer.
In deblocking storage synoptic diagram, suppose that minimum frame length is 64 bytes (like the ether bags), selecting the size of piece is 32 bytes.The memory data width is 2 bytes, and therefore every comprises 16 address spaces.Frame is divided into 4 storages among Fig. 1, and the 1st has the frame head sign, and the data field is filled with.Middle two do not identify end to end, and the data field also is filled with.Last 1 has data length sign in tail tag knowledge and the piece, and the data field is not filled with.
The shortcoming of this scheme is: when piecemeal was stored, every needed to sacrifice an address space storage sign and length information end to end, and the data storage area average utilization of last piece has only half the simultaneously.Therefore its shortcoming is that the storage space utilization factor is lower, and concrete storage space utilization factor is relevant with frame length with the branch block size.When minute block size fixedly the time, it is higher than the short frame space availability ratio of storage to store long frame.
Summary of the invention
The technical matters that the present invention will solve provides a kind of read method, device of Frame; Can work as when adding check code and cut apart the data of different pieces of information frame and store with frame length information; Whether judgment frame delimits mistake when read data frame, and is occurring giving correct position when wrong again for change.
In order to address the above problem, the invention provides a kind of read method of Frame, comprising:
A, read frame identification information; Said frame identification information comprises the length value of the pairing Frame of this frame identification information at least, and the frame identification message length of each Frame is identical;
B, first bit after the frame identification information that is read begin, and read the data of respective length according to the length value in this frame identification information, obtain the pairing Frame of this frame identification information;
C is if continue to read next Frame, and then first bit after the data of said respective length begins to read next frame identification information, returns step B;
Said frame identification information also comprises the proof test value of the length value of said Frame; The shared storage space of said length value is a N bit; The shared storage space of said proof test value is a M bit;
Said step B comprises:
B1, calculate the proof test value of length value in the said frame identification information, and with this frame identification information in proof test value relatively, as equating then to carry out step B3; Otherwise second bit of said frame identification information as current bit, carried out step B2;
B2, begin, read the N Bit data and calculate its proof test value, behind this N Bit data, read the M Bit data from said current bit;
If this M Bit data with calculate the unequal or said N Bit data of proof test value not in the length value scope, then with the next bit of said current bit as new current bit, return step B2;
If equate and said N Bit data in said length value scope then think the correct frame identification information that searched, as said length value, carry out step B3 with said N Bit data;
B3, read the data of respective length, obtain the pairing Frame of this frame identification information according to said length value.
Further, included length value of said frame identification information and proof test value are to carry out the scrambled data behind the XOR with predetermined data;
Among the said step B1, calculate the proof test value of said length value before, earlier said length value and said predetermined data are carried out XOR; Relatively the time, earlier CRC check value in this frame identification information and said predetermined data are carried out XOR with proof test value in the said frame identification information;
Among the said step B2, calculate the proof test value of said N Bit data before, earlier said N Bit data and said predetermined data are carried out XOR; When comparing, earlier this M Bit data and said predetermined data are carried out XOR with said M Bit data.
The present invention also provides a kind of reading device of Frame, comprising:
First read module is used to read frame identification information; Said frame identification information comprises the length value of the pairing Frame of this frame identification information at least, and the frame identification message length of each Frame is identical;
Second read module; Be used for obtaining length value from the frame identification information that said first read module reads; First bit after said frame identification information begins, and reads the data of respective length according to said length value, obtains the pairing Frame of this frame identification information;
Judge module after said second read module obtains Frame, judges whether to continue to read next Frame; If then indicate said first read module first bit after the data of said respective length to begin to read next frame identification information;
Said frame identification information also comprises the proof test value of the length value of said Frame; The shared storage space of said length value is a N bit; The shared storage space of said proof test value is a M bit;
Said second read module comprises:
The Frame reading unit is used for reading according to length value the data of respective length, obtains Frame;
Search unit is used for beginning from current bit, reads the N Bit data and calculates its proof test value, behind this N Bit data, reads the M Bit data;
Judging unit; The M Bit data that is used for reading when said search unit is with to calculate proof test value unequal; Or said N Bit data is in the length value scope time, as new current bit, enables said search unit with the next bit of said current bit; When equating and said N Bit data in said length value scope the time, said N Bit data as said length value, is enabled said Frame reading unit;
Verification unit is used for calculating the proof test value of the frame identification information length value that said first read module reads, and with this frame identification information in proof test value relatively, as equating then to enable said Frame reading unit; Otherwise second bit of said frame identification information as said current bit, enabled search unit.
Further, included length value of said frame identification information and proof test value are to carry out the scrambled data behind the XOR with predetermined data;
When said verification unit is calculated the proof test value of said length value, earlier said length value and said predetermined data are carried out XOR; Relatively the time, earlier proof test value in this frame identification information and said predetermined data are carried out XOR with proof test value in the said frame identification information;
Before said search unit calculates the proof test value of said N Bit data, earlier said N Bit data and said predetermined data are carried out XOR;
Said judging unit with the proof test value that calculates and said M Bit data relatively before, earlier this M Bit data and said predetermined data are carried out XOR.
Technical scheme of the present invention adds check code applicable to when storage with frame length information and cuts apart the situation that the method achieve frame of the data of different pieces of information frame is delimited; Owing to reduced outside the data that are used for store frames of data, idle storage spaces; Therefore operating factor of memory space can be greatly improved, the utilization factor of memory interface effective bandwidth can also be improved; Can be when read data frame judgment frame whether delimit mistake, and occurring giving correct position when wrong again for change; Another prioritization scheme of the present invention can avoid searching wrong frame identification information when read data frame.
Description of drawings
Fig. 1 is to be the synoptic diagram of realizing the piecemeal storage in 16 the storer at a data width;
Fig. 2 is a storage organization synoptic diagram among the embodiment one;
Fig. 3 is the schematic flow sheet of read data frame among the embodiment two.
Embodiment
To combine accompanying drawing and embodiment that technical scheme of the present invention is explained in more detail below.
Need to prove that if do not conflict, each characteristic among the embodiment of the invention and the embodiment can mutually combine, all within protection scope of the present invention.In addition; Can in computer system, carry out in the step shown in the process flow diagram of accompanying drawing such as a set of computer-executable instructions, and, though logical order has been shown in process flow diagram; But in some cases, can carry out step shown or that describe with the order that is different from here.
Embodiment one, and a kind of storage means of Frame comprises:
The frame identification information of before data frame header, adding this Frame;
Said frame identification information comprises the length value of this Frame at least, the frame identification message length of each Frame identical (promptly taking the storage space of fixed size);
Each Frame after the interpolation frame identification information is stored continuously.
In the present embodiment, realized the demarcation of Frame in the storage space through said frame identification information.
In a kind of embodiment of present embodiment, said frame identification information can also comprise the proof test value of the length value of said Frame, this proof test value can but be not limited to the CRC check value; Be that length value with said Frame is stored in before its proof test value in the present embodiment; In the practical application, also can the length value of said Frame be stored in after its proof test value.
An instantiation in this embodiment is following, and the data width of supposing storer is 16 bits, and the length value of Frame takies 2 bytes of memory spaces, adopts the CRC16 proof test value, and proof test value takies 2 bytes of memory spaces;
When memory write (storage); In the current address space pointed of write pointer, write the length value of the Frame of current storage; Write the CRC16 proof test value of the length value of this Frame in the next address space, begin to write whole frame data from next address space again; Write after having write the length value of the next Frame that will store, by that analogy.
Storage organization in the last storage space is as shown in Figure 2.
During practical application, do not get rid of said frame identification information and can also comprise out of Memory; Said proof test value also can be other included one or more information of frame identification information proof test value, can also be the common proof test value of other included one or more information of frame identification information and said length value.
In this embodiment, said step of before data frame header, adding the frame identification information of this Frame can comprise:
The frame identification information of specified data frame;
All or part of bit in the said frame identification information and predetermined data are carried out XOR, obtain the frame identification information of scrambling;
The frame identification information of scrambling is added on before the said data frame header.
Scrambling can improve the reliability of frame alignment, does not get rid of the scrambler mode that adopts outside the XOR in the practical application.
In the another kind of embodiment of present embodiment, after the step of said frame identification information of adding this Frame before the data frame header, said each Frame that adds after the frame identification information can also be comprised before the step of storage continuously:
After each Frame that has added frame identification information, add proof test value respectively corresponding to this Frame; Said proof test value is the proof test value of all or part of frame identification information of this Frame.
Embodiment two, and a kind of read method of Frame comprises:
A, read frame identification information; Said frame identification information comprises the length value of the pairing Frame of this frame identification information at least, the frame identification message length of each Frame identical (promptly taking the storage space of fixed size);
B, first bit after the frame identification information that is read begin, and read the data of respective length according to the length value in this frame identification information, obtain the pairing Frame of this frame identification information;
C is if continue to read next Frame, and then first bit after the data of said respective length begins to read next frame identification information, returns step B.
In the present embodiment, the Frame that is read is to store according to the method among the embodiment one.
In the present embodiment, the reference position that reads frame identification information for the first time can be the reference position of store frames of data.
In the present embodiment, when reading the data of respective length according to the length value of said Frame among the step B, can be when reading of data, to be that initial value counts down, when counting 0, read completion, obtain the data of a Frame with said length value; Read accomplish after next bit to begin be exactly the frame identification information of next Frame.
In the present embodiment; Owing to have the Frame of frame identification information is storage continuously; Therefore between the frame identification information of two Frames of adjacent storage separated storage space length; Just equal the length of previous Frame in two Frames, so also can directly navigate to the frame identification information of next Frame through said length value.
In the present embodiment, said frame identification information can also comprise the proof test value of the length value of said Frame, whether can judgment frame delimits mistake through this proof test value, and is occurring giving correct position when wrong again for change.This proof test value can but be not limited to the CRC check value; During practical application, do not get rid of said frame identification information and can also comprise out of Memory; The proof test value of other one or more information that said proof test value frame identification information is included, can also be the common proof test value of other included one or more information of frame identification information and said length value.
In the present embodiment, the size of the storage space that the length value of each Frame is shared is fixed, and is assumed to be N bit; The size of the storage space that each proof test value is shared is also fixed, and is assumed to be M bit;
Said step B can specifically comprise:
B1, calculate the proof test value of length value in the said frame identification information, and with this frame identification information in proof test value relatively, represent then that as equating frame identification information reads correct position, carries out step B3; Otherwise expression frame identification information occurs and reads positional fault, and need carry out the frame length location finding this moment, and second bit of said frame identification information as current bit, carried out step B2;
B2, begin, read the N Bit data and calculate its proof test value, behind this N Bit data, read the M Bit data from said current bit;
If this M Bit data with calculate the unequal or said N Bit data of proof test value not in the length value scope, then with the next bit of said current bit as new current bit, return step B2;
If equate and said N Bit data in said length value scope then think the correct frame identification information that searched, as said length value, carry out step B3 with said N Bit data;
B3, read the data of respective length, obtain the pairing Frame of this frame identification information according to said length value.
Among the step B2, can be before the calculation check value judge earlier that said N Bit data whether in predetermined length value scope, is just calculating; Also can directly calculate; Calculating test value can walk abreast with the process that reads the M bit.
In the instantiation of present embodiment, said frame identification information comprises length value and CRC check value, and both respectively take an address space, and the flow process that Frame reads is as shown in Figure 3, comprising:
301, read the data of an address space;
302, the data of read next address space;
303, judge whether the data fit frame length value scope of last address space,, meet then and carry out step 304 if do not meet then return step 302;
304, judging whether that back one address space data are CRC check values of last address space data, if not then returning step 302, is then carry out step 305;
It should be noted that; Described " last address space " carries out the different of order with " back one address space " according to step; The address space that is referred to can be inequality, is must be two adjacent address spaces, before and after the difference of the storage order in storage space; What read when supposing to carry out step 301 is the data of address space X; " data in next address space " read when carrying out step 302 for the first time are the data of address space X+1; " last address space " refers to address space X at this moment, and " back one address space " refers to address space X+1; If return step 302 from step 303, " data in next address space " then read are the data of address space X+2, and " last address space " refers to address space X+1 at this moment, and " back one address space " refers to address space X+2; By that analogy.
305, with the data of last address space length value as Frame;
306, read frame data;
307, count down according to said length value;
308, the end that judges whether to count down is if then return step 301; Otherwise return step 306.
In the present embodiment, length value that said frame identification information is included and proof test value are to carry out the scrambled data behind the XOR with predetermined data; In requisition for carrying out descrambling code, specifically comprise:
Among the said step B1, calculate the proof test value of said length value before, earlier said length value and said predetermined data are carried out XOR; Relatively the time, earlier CRC check value in this frame identification information and said predetermined data are carried out XOR with proof test value in the said frame identification information.
Among the said step B2, calculate the proof test value of said N Bit data before, earlier said N Bit data and said predetermined data are carried out XOR; When comparing, earlier this M Bit data and said predetermined data are carried out XOR with said M Bit data.
The process of conciliating scrambling through scrambling can improve the reliability of location, does not get rid of the scrambler mode that adopts outside the XOR in the practical application.In superincumbent instance,, then when search length value again, may search if there is the situation of " the data followed of two bytes is along with its proof test value " in certain frame format data field; Carry out scrambling and then avoided the generation of this situation.
In the practical application, also can only carry out scrambling, before comparison, only the data of scrambling separated scrambling like this length value or proof test value; Such as only proof test value having been carried out scrambling, then calculate the proof test value of length value after, relatively get final product with the proof test value of separating after the scrambling, need not again length value to be separated scrambling; Can certainly proof test value scrambling and the proof test value after the scrambling that calculated by length value be compared.Suchlike distortion can reach the effect of avoiding searching wrong frame identification information, does not enumerate one by one here.
Embodiment three, and a kind of memory storage of Frame comprises:
Generation module is used for generating respectively the frame identification information of each Frame, and the said frame identification information of a Frame comprises the length value of this Frame at least; The frame identification message length of each Frame identical (promptly taking the storage space of fixed size);
Add module, be used for the frame identification information of before each data frame header, adding this Frame respectively;
Writing module is used for each Frame after the interpolation frame identification information is kept at continuous storage space.
In a kind of embodiment of present embodiment, said generation module can comprise:
Length value obtains submodule, is used for confirming respectively the length value of each Frame;
The syndrome module is used for respectively the said length value of each Frame is carried out verification, obtains the proof test value of this length value; Said proof test value can but be not limited to the CRC check value;
The synthon module is used for the length value and the proof test value thereof of each Frame are constituted said frame identification information.
In the present embodiment, the synthon module is that the length value with said Frame is placed on before its proof test value; In the practical application, also can the length value of said Frame be placed on after its proof test value.
During practical application, do not get rid of said synthon module and can also put into out of Memory in the said frame identification information of formation; Said syndrome module also can be other included one or more information of frame identification information to be carried out verification obtain proof test value, can also be included other the one or more information of frame identification information and said length value to be carried out verification together obtain proof test value.
In this embodiment, said memory storage can also comprise:
Scrambling module, all or part of bit of frame identification information that is used for said generation module is generated carries out XOR with predetermined data, obtains the frame identification information of scrambling;
It before the said data frame header is the frame identification information of said scrambling that said interpolation module is added on.
Scrambling can improve the reliability of frame alignment, does not get rid of the scrambler mode that adopts outside the XOR in the practical application.
In the another kind of embodiment of present embodiment, each Frame that said interpolation module also has been used to add frame identification information adds the proof test value corresponding to this Frame afterwards respectively; Said proof test value is the proof test value of all or part of frame identification information of this Frame.
Embodiment four, and a kind of reading device of Frame comprises:
First read module is used to read frame identification information; Said frame identification information comprises the length value of the pairing Frame of this frame identification information at least, the frame identification message length of each Frame identical (promptly taking the storage space of fixed size);
Second read module; Be used for obtaining length value from the frame identification information that said first read module reads; First bit after said frame identification information begins, and reads the data of respective length according to said length value, obtains the pairing Frame of this frame identification information;
Judge module after said second read module obtains Frame, judges whether to continue to read next Frame; If then indicate said first read module first bit after the data of said respective length to begin to read next frame identification information.
In the present embodiment, the reference position that said first read module reads frame identification information for the first time can be the reference position of store frames of data.
In the present embodiment, when said second read module reads the data of respective length according to the length value of said Frame, can be when reading of data, to be that initial value counts down, when counting 0, read completion, obtain the data of a Frame with said length value; Read accomplish after next bit to begin be exactly the frame identification information of next Frame.
In the present embodiment; Owing to have the Frame of frame identification information is storage continuously; Therefore between the frame identification information of two Frames of adjacent storage separated storage space length; Just equal the length of previous Frame in two Frames, so also can directly navigate to the frame identification information of next Frame through said length value.
In the present embodiment, said frame identification information can also comprise the proof test value of the length value of said Frame, whether can judgment frame delimits mistake through this proof test value, and is occurring giving correct position when wrong again for change.This proof test value can but be not limited to the CRC check value; During practical application, do not get rid of said frame identification information and can also comprise out of Memory; The proof test value of other one or more information that said proof test value frame identification information is included, can also be the common proof test value of other included one or more information of frame identification information and said length value.
In the present embodiment, the size of the storage space that the length value of each Frame is shared is fixed, and is assumed to be N bit; The size of the storage space that each proof test value is shared is also fixed, and is assumed to be M bit;
Said second read module can specifically comprise:
The Frame reading unit is used for reading according to length value the data of respective length, obtains Frame;
Search unit is used for beginning from current bit, reads the N Bit data and calculates its proof test value, behind this N Bit data, reads the M Bit data;
Judging unit; The M Bit data that is used for reading when said search unit is with to calculate proof test value unequal; Or said N Bit data is in the length value scope time, as new current bit, enables said search unit with the next bit of said current bit; When equating and said N Bit data in said length value scope the time, said N Bit data as said length value, is enabled said Frame reading unit;
Verification unit is used for calculating the proof test value of the frame identification information length value that said first read module reads, and with this frame identification information in proof test value relatively, as equating then to enable said Frame reading unit; Otherwise second bit of said frame identification information as said current bit, enabled search unit.
In the present embodiment, length value that said frame identification information is included and proof test value are to carry out the scrambled data behind the XOR with predetermined data; In requisition for carrying out descrambling code, be specially:
When said verification unit is calculated the proof test value of said length value, earlier said length value and said predetermined data are carried out XOR; Relatively the time, earlier proof test value in this frame identification information and said predetermined data are carried out XOR with proof test value in the said frame identification information.
Before said search unit calculates the proof test value of said N Bit data, earlier said N Bit data and said predetermined data are carried out XOR;
Said judging unit with the proof test value that calculates and said M Bit data relatively before, earlier this M Bit data and said predetermined data are carried out XOR.
Obviously, it is apparent to those skilled in the art that above-mentioned each module of the present invention or each step can realize with the general calculation device; They can concentrate on the single calculation element; Perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element; Thereby; Can they be stored in the memory storage and carry out, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize by calculation element.Like this, the present invention is not restricted to any specific hardware and software combination.
Certainly; The present invention also can have other various embodiments; Under the situation that does not deviate from spirit of the present invention and essence thereof; Those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of claim of the present invention.

Claims (4)

1. the read method of a Frame comprises:
A, read frame identification information; Said frame identification information comprises the length value of the pairing Frame of this frame identification information at least, and the frame identification message length of each Frame is identical; Said frame identification information also comprises the proof test value of the length value of said Frame; The shared storage space of said length value is a N bit; The shared storage space of said proof test value is a M bit;
B, first bit after the frame identification information that is read begin, and read the data of respective length according to the length value in this frame identification information, obtain the pairing Frame of this frame identification information;
Said step B comprises:
B1, calculate the proof test value of length value in the said frame identification information, and with this frame identification information in proof test value relatively, as equating then to carry out step B3; Otherwise second bit of said frame identification information as current bit, carried out step B2;
B2, begin, read the N Bit data and calculate its proof test value, behind this N Bit data, read the M Bit data from said current bit;
If this M Bit data with calculate the unequal or said N Bit data of proof test value not in the length value scope, then with the next bit of said current bit as new current bit, return step B2;
If equate and said N Bit data in said length value scope then think the correct frame identification information that searched, as said length value, carry out step B3 with said N Bit data;
B3, read the data of respective length, obtain the pairing Frame of this frame identification information according to said length value;
C is if continue to read next Frame, and then first bit after the data of said respective length begins to read next frame identification information, returns step B.
2. read method as claimed in claim 1 is characterized in that:
Length value that said frame identification information is included and proof test value are to carry out the scrambled data behind the XOR with predetermined data;
Among the said step B1, calculate the proof test value of said length value before, earlier said length value and said predetermined data are carried out XOR; Relatively the time, earlier CRC check value in this frame identification information and said predetermined data are carried out XOR with proof test value in the said frame identification information;
Among the said step B2, calculate the proof test value of said N Bit data before, earlier said N Bit data and said predetermined data are carried out XOR; When comparing, earlier this M Bit data and said predetermined data are carried out XOR with said M Bit data.
3. the reading device of a Frame is characterized in that, comprising:
First read module is used to read frame identification information; Said frame identification information comprises the length value of the pairing Frame of this frame identification information at least, and the frame identification message length of each Frame is identical; Said frame identification information also comprises the proof test value of the length value of said Frame; The shared storage space of said length value is a N bit; The shared storage space of said proof test value is a M bit;
Second read module; Be used for obtaining length value from the frame identification information that said first read module reads; First bit after said frame identification information begins, and reads the data of respective length according to said length value, obtains the pairing Frame of this frame identification information;
Said second read module comprises:
The Frame reading unit is used for reading according to length value the data of respective length, obtains Frame;
Search unit is used for beginning from current bit, reads the N Bit data and calculates its proof test value, behind this N Bit data, reads the M Bit data;
Judging unit; The M Bit data that is used for reading when said search unit is with to calculate proof test value unequal; Or said N Bit data is in the length value scope time, as new current bit, enables said search unit with the next bit of said current bit; When equating and said N Bit data in said length value scope the time, said N Bit data as said length value, is enabled said Frame reading unit;
Verification unit is used for calculating the proof test value of the frame identification information length value that said first read module reads, and with this frame identification information in proof test value relatively, as equating then to enable said Frame reading unit; Otherwise second bit of said frame identification information as said current bit, enabled search unit;
Judge module after said second read module obtains Frame, judges whether to continue to read next Frame; If then indicate said first read module first bit after the data of said respective length to begin to read next frame identification information.
4. reading device as claimed in claim 3 is characterized in that:
Length value that said frame identification information is included and proof test value are to carry out the scrambled data behind the XOR with predetermined data;
When said verification unit is calculated the proof test value of said length value, earlier said length value and said predetermined data are carried out XOR; Relatively the time, earlier proof test value in this frame identification information and said predetermined data are carried out XOR with proof test value in the said frame identification information;
Before said search unit calculates the proof test value of said N Bit data, earlier said N Bit data and said predetermined data are carried out XOR;
Said judging unit with the proof test value that calculates and said M Bit data relatively before, earlier this M Bit data and said predetermined data are carried out XOR.
CN2010101583998A 2010-04-22 2010-04-22 Device and reading method for data frame Expired - Fee Related CN101833513B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101583998A CN101833513B (en) 2010-04-22 2010-04-22 Device and reading method for data frame

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101583998A CN101833513B (en) 2010-04-22 2010-04-22 Device and reading method for data frame

Publications (2)

Publication Number Publication Date
CN101833513A CN101833513A (en) 2010-09-15
CN101833513B true CN101833513B (en) 2012-11-21

Family

ID=42717589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101583998A Expired - Fee Related CN101833513B (en) 2010-04-22 2010-04-22 Device and reading method for data frame

Country Status (1)

Country Link
CN (1) CN101833513B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761191B (en) * 2013-12-25 2016-06-08 广西科技大学 A kind of fixed data form reading/writing method of nonvolatile memory
CN105630619A (en) * 2014-12-30 2016-06-01 航天恒星科技有限公司 Frame sequence processing method and system
CN105447954B (en) * 2015-12-14 2019-02-01 深圳怡化电脑股份有限公司 A kind of magnetic data method of reseptance and device
CN106095910B (en) * 2016-06-08 2018-01-19 广东欧珀移动通信有限公司 Label information analytic method, device and the terminal of a kind of audio file
CN106095909B (en) * 2016-06-08 2018-03-23 广东欧珀移动通信有限公司 Label information analytic method, device and the terminal of a kind of audio file
CN109756293B (en) * 2017-11-01 2021-12-07 中兴通讯股份有限公司 Method for processing data in Ethernet and physical layer chip
CN109803065B (en) * 2019-01-28 2021-02-26 深兰人工智能芯片研究院(江苏)有限公司 Data processing method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1533094A (en) * 2003-03-19 2004-09-29 ���ǵ�����ʽ���� Method for realizing logic medium access control in passive ether optical network system
CN1633101A (en) * 2003-12-24 2005-06-29 华为技术有限公司 A data packet storage management method and apparatus
CN1812316A (en) * 2005-01-25 2006-08-02 华为技术有限公司 Link collecting processing method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1533094A (en) * 2003-03-19 2004-09-29 ���ǵ�����ʽ���� Method for realizing logic medium access control in passive ether optical network system
CN1633101A (en) * 2003-12-24 2005-06-29 华为技术有限公司 A data packet storage management method and apparatus
CN1812316A (en) * 2005-01-25 2006-08-02 华为技术有限公司 Link collecting processing method and apparatus

Also Published As

Publication number Publication date
CN101833513A (en) 2010-09-15

Similar Documents

Publication Publication Date Title
CN101833513B (en) Device and reading method for data frame
KR102099544B1 (en) Method and device for processing distribution of streaming data
CN102301342B (en) Regular Expression Matching Method And System, And Searching Device
CN101241452A (en) Memory system and command handling method
CN108846749A (en) A kind of sliced transaction execution system and method based on block chain technology
CN101877659A (en) Method, device and system for monitoring packet loss
CN101582081A (en) Data comparison method and device
CN101599074A (en) The method and the device of regular expression coupling
CN105830041A (en) Metadata recovery method and apparatus
US10430364B2 (en) Packet forwarding
CN110048961A (en) Duplicate message detection method and system based on ASIC
WO2012004387A2 (en) Generalized notion of similarities between uncertain time series
CN111241088A (en) Data writing method, data query method, device and equipment
CN108399175B (en) Data storage and query method and device
CN102629235A (en) Method for increasing read-write speed of double data rate (DDR) memory
CN107547378B (en) VPN route learning method and device
CN103905310A (en) Message processing method and forwarding device
CN105550220B (en) A kind of method and device of the access of heterogeneous system
CN104298572A (en) Error correction method, device and system
CN106293996A (en) Method of data synchronization, main equipment, alternate device and system
CN102043683B (en) Smart card and method for operating data in smart card memory
CN110049312B (en) ARINC818 protocol fault injection method and device
CN102769512A (en) Implementation method and device for GFP frame delimitation
CN102262526B (en) Ordered tree table segmented traversing method and software processing system
CN105450331A (en) Frame synchronization method and frame synchronization device

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: 20121121

CF01 Termination of patent right due to non-payment of annual fee