[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN102098129B - Data frame encapsulation method and device as well as data frame resolving method and device - Google Patents

Data frame encapsulation method and device as well as data frame resolving method and device Download PDF

Info

Publication number
CN102098129B
CN102098129B CN200910249697.5A CN200910249697A CN102098129B CN 102098129 B CN102098129 B CN 102098129B CN 200910249697 A CN200910249697 A CN 200910249697A CN 102098129 B CN102098129 B CN 102098129B
Authority
CN
China
Prior art keywords
counter
message
data
frame
numerical value
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
CN200910249697.5A
Other languages
Chinese (zh)
Other versions
CN102098129A (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 CN200910249697.5A priority Critical patent/CN102098129B/en
Publication of CN102098129A publication Critical patent/CN102098129A/en
Application granted granted Critical
Publication of CN102098129B publication Critical patent/CN102098129B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Communication Control (AREA)

Abstract

The invention discloses a data frame encapsulation method and device as well as a data frame resolving method and device. The data frame encapsulation method comprises the following steps of: acquiring data with the length of 16bits, wherein the data includes user identification information and user data; and counting the acquired data through a data counter, a message counter and a message group counter of 16bits; and mapping the data into an open base station architecture initiative special Internet group RP3 (OBSAI RP3) data frame according to the counting of the data counter, the message counter and the message group counter. By means of the technical scheme of the embodiment of the invention, the influence that the data byte number is odd is eliminated, and the encapsulation of 16bits bit width data can be realized with low clock frequency.

Description

Data frame encapsulation method and device, data frame analyzing method and device
Technical field
The present invention relates to soft exchange communication technical field, particularly relate to a kind of data frame encapsulation method and device, data frame analyzing method and device.
Background technology
Open Base Station Architecture reference point 3 (Open Base Station Architecture Initiative SpecialInterest Group RP3, referred to as OBSAI RP3) interface is the interface of data interaction between base band and radio frequency in the base station system architectures formulated by OBSAI working group, aim to provide standardized HSSI High-Speed Serial Interface agreement, reduce Component Interface pin number.At present, under OBSAI RP3 interface can work in 1x, 2x and 4x tri-kinds of wire rate patterns, under 4x wire rate pattern, OBSAI RP3 serial rate is up to 3.072Gbps.
In the related, Fig. 1 is the schematic diagram of OBSAI RP3 data frame structure in prior art, and as shown in Figure 1, a data frame length of OBSAI RP3 is 10ms.Under 4x wire rate pattern, frame data comprise 7680 message groups, and each message groups is made up of 21 message and 1 byte (Byte) K character, and it should be noted that, 1Byte equals the data of 8 bits (bit).Each message comprises the data of 19Byte, and wherein, front 3Byte is message header, and rear 16Byte is load (Payload).In the Frame of OBSAIRP3, K character is used to the delimiter doing frame and message groups, and wherein, the K character being used for doing frame demarcation is different from the K character being used for doing message groups.
The encapsulation realizing OBSAI RP3 Frame at the scene in programmable gate array (Field Programmable Gate Array, referred to as FPGA) needs according to each byte data in protocol operation K character, message header and message load with parsing.Because data are in units of Byte, therefore in FPGA, logical circuit operation parallel data width is the most suitable with 8bits.In the prior art, OBSAI RP3 Frame encapsulation with resolve method be under 8bits data width, adopt counter to judge the data type of current time slots is carried out.When being operated under 4x wire rate pattern, according to OBSAI RP3 interface protocol, the clock frequency of the driving that fpga logic circuit needs is 307.2MHz, and so high clock frequency is difficult to realize for current large-scale fpga logic circuit design.
At present, the width reducing fpga logic drives clock frequency, corresponding raising parallel logic circuit operating data can be passed through, to ensure that serial line interface wire rate solves the too high problem of above-mentioned clock frequency.For the data frame structure of OBSAI RP3, if reduce clock rate to 153.6MHz, data width just needs to bring up to 16bits.Because the byte quantity that the message of the message header of 3Byte and 19Byte comprises is all odd number, not the integral multiple of 16bits, therefore, when data width is 16bits, cannot OBSAI RP3 Frame is encapsulated and be resolved.
Summary of the invention
The problem to be solved in the present invention is to provide a kind of data frame encapsulation method and device, data frame analyzing method and device, to overcome in prior art when data width is for 16bits, and the defect that cannot OBSAI RP3 Frame be encapsulated and be resolved.
According to an aspect of the present invention, provide a kind of data frame encapsulation method, comprising:
Obtain the data that width is 16 bits, wherein, data comprise: user totem information and user data; By the data counter of 16 bits, message counter and message groups counter, the data obtained are counted; Be OBSAI RP3 Frame according to the counting of data counter, message counter and message groups counter by data-mapping.
According to an aspect of the present invention, provide a kind of data frame analyzing method, comprising:
By the data counter of 16 bits, message counter and message groups counter, the OBSAI RP3 Frame obtained is counted; Determine the message groups border in OBSAI RP3 Frame and frame boundaries; Delete message groups border K character and frame boundaries K character, obtain the OBSAI RP3 Frame without K character; Counting according to data counter, message counter and message groups counter extracts without the message header in the OBSAI RP3 Frame of K character and load.
According to an aspect of the present invention, provide a kind of Frame packaging system, comprising:
Acquisition module, for obtaining the data that width is 16 bits, wherein, data comprise: user totem information and user data; Counting module, for counting the data obtained by the data counter of 16 bits, message counter and message groups counter; Mapping block, for being OBSAI RP3 Frame according to the counting of data counter, message counter and message groups counter by data-mapping.
According to an aspect of the present invention, provide a kind of data frame analyzing device, comprising:
Acquisition module, for counting the OBSAI RP3 Frame obtained by the data counter of 16 bits, message counter and message groups counter; Determination module, for determining message groups border in OBSAI RP3 Frame and frame boundaries; Removing module, for deleting message groups border K character and frame boundaries K character, obtains the OBSAI RP3 Frame without K character; Extraction module, extracts without the message header in the OBSAI RP3 Frame of K character and load for the counting according to data counter, message counter and message groups counter.
Beneficial effect of the present invention is as follows:
The embodiment of the present invention counts data by arranging three counters, and be OBSAI RP3 Frame according to the counting of three counters by data-mapping, to overcome in prior art when data width is 16bits, the defect that cannot encapsulate OBSAI RP3 Frame, eliminate the impact that number data bytes is odd number, with lower clock frequency, the encapsulation of 16bits bit wide data can be realized.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of OBSAI RP3 data frame structure in prior art;
Fig. 2 is the flow chart of the data frame encapsulation method of the embodiment of the present invention;
Fig. 3 is the data counter of the embodiment of the present invention and the schematic diagram of message relationship;
Fig. 4 is the flow chart of the data frame analyzing method of the embodiment of the present invention;
Fig. 5 is the flow chart of the counter process of the embodiment of the present invention;
Fig. 6 is the structural representation of the Frame packaging system of the embodiment of the present invention;
Fig. 7 is the structural representation of the Frame encapsulation of the embodiment of the present invention;
Fig. 8 is the structural representation of the data frame analyzing device of the embodiment of the present invention;
Fig. 9 is the structural representation of the data frame analyzing of the embodiment of the present invention.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples for illustration of the present invention, but are not used for limiting the scope of the invention.
Embodiment of the method 1
According to embodiments of the invention, provide a kind of data frame encapsulation method, Fig. 2 is the flow chart of the data frame encapsulation method of the embodiment of the present invention, and as shown in Figure 2, the data frame encapsulation method according to the embodiment of the present invention comprises:
Step 201, obtain the data that width is 16 bits, wherein, above-mentioned data comprise: user totem information and user data;
Particularly, in actual applications, often obtain a message, the user totem information of 2 16bit and the user data information of 8 16bit can be obtained, altogether the data of 20 8bit.
Step 202, is counted the data obtained by the data counter of 16 bits, message counter and message groups counter; That is, above-mentioned three counters are respectively used to count the different pieces of information unit in OBSAI RP3 Frame, are convenient to the process of data in OBSAI RP3 link.Below, above-mentioned three counters are described in detail.
1,16bits data counter: the data often receiving 16 bits, the numerical value of this data counter adds 1, and when the numerical value of data counter is 18, data counter is reset, restarts counting, wherein, the count range of data counter is 0 to 18, comprises following purposes:
(1) the header data time slot in message is judged according to its count value;
(2) the load data time slot in message is judged according to its count value;
(3) border in Data-Link between two message is judged according to its count value;
(4) judge whether the high 8bits of the 16bits data at two message boundaries places and low 8bits belongs to different message respectively according to its count value.
(5) be combined with two other counter, when judging transmitting terminal encapsulation of data frame, after an end of message, whether add K character.If the border of frame, then add frame end mark K character; If the border of message groups, and not the border of frame, then add message groups end mark K character.
2, message counter: when the numerical value of data counter is 9 or 18, the numerical value of message counter adds 1; Be 20 at the numerical value of message counter, and when the numerical value of data counter is 9, message counter, data counter reset, and restart counting.Wherein, the count range of message counter is 0 to 20, comprises following purposes:
(1) border between two message groups is judged;
(2) control data counter count value reset opportunity, that is, message counter be counted as 20 time, need data counter to reset.
3, message groups counter: when the numerical value of message counter is 20, the numerical value of message groups counter adds 1, the count range of this message groups counter is 0 ~ 7679; The numerical value of message groups counter be 7679, the numerical value of message counter is 20, and when the numerical value of data counter is 9, message groups counter, message counter, data counter is reset, restart counting, comprise following purposes:
(1) according to current wire rate pattern, be combined with message counter and judge the position of control message in Data-Link;
(2) according to current wire rate pattern, the border between two Frames is judged.
Data-mapping is OBSAI RP3 Frame according to the counting of data counter, message counter and message groups counter by step 203.
In step 203, when being mapped to by user data in OBSAI RP3 chain, in message header, add user totem information, and byte split and restructuring are carried out to the user data of 16bit.
Particularly, Fig. 3 is the data counter of the embodiment of the present invention and the schematic diagram of message relationship, and as shown in Figure 3, data counter, from 0 to 18, contains the data of two message.If this counter is 0 ~ 8, then the sequence sequence number of current message in message groups is even number; If this counter is 10 ~ 18, then the sequence sequence number of current message in message groups is odd number; Even message and strange message are had a common boundary when data counter count value is 9.When being in last message and the message 20 of a message groups, data counter count down to 9, will owing to message groups border being detected and clear 0.As shown in Figure 3, be that OBSAIRP3 Frame comprises by data-mapping:
1, the 0th number counted by data counter and the message header of high 8 bits current strange message in OBSAIRP3 Frame of the 1st number, using low 8 bits of the 1st number, the 2nd number to high 8 bits of the 8th number and the 9th number as the load of current strange message;
2, low 8 bits of the 9th number counted by data counter and the message header of the 10th number current even message in OBSAIRP3 Frame, using the load of o.11 data to 18 numbers as current even message;
3, the numerical value of message counter be 20, the numerical value of data counter be 9 and breath cluster counters numerical value be not 7679 time, after current message, add message groups border K character;
4, the numerical value of message groups counter be 7679, the numerical value of message counter is 20, the numerical value of data counter is 9 time, after current message, add frame boundaries K character.
As can be seen from above-mentioned process, when being in message groups or frame boundaries, data counter count value is 9, just a unnecessary byte data can be used for inserting K character, avoids the problem that data bit width is not 16bits integral multiple dexterously.The embodiment of the present invention employs the form of three counters and OBSAI RP3 Frame simply, dexterously, encapsulates OBSAI RP3 Frame under can being conveniently implemented in 16bit data width.
Embodiment of the method 2
According to embodiments of the invention, provide a kind of data frame analyzing method, Fig. 4 is the flow chart of the data frame analyzing method of the embodiment of the present invention, and as shown in Figure 4, the data frame analyzing method according to the embodiment of the present invention comprises:
Step 401, is counted the OBSAI RP3 Frame obtained by the data counter of 16 bits, message counter and message groups counter;
Particularly, often receive the OBSAI RP3 Frame of 16 bits, the numerical value of data counter adds 1, and wherein, the count range of data counter is 0 to 18; When the numerical value of data counter is 9 or 18, the numerical value of message counter is added 1, and when the numerical value of data counter is 18, reset by data counter, restart counting, wherein, the count range of message counter is 0 to 20; Be 20 at the numerical value of message counter, and when data counter is 9, message counter, data counter are reset, restart counting, and the numerical value of message groups counter is added 1, wherein, the count range of message groups counter is 0 to 7679; Be 7679 at the numerical value of message groups counter, message counter is 20, and when data counter is 9, message groups counter, message counter, data counter is reset, restart counting.
Step 402, determines the message groups border in OBSAI RP3 Frame and frame boundaries;
Particularly, can by detecting that message groups border in OBSAI RP3 Frame and frame boundaries determined in message groups border K character in OBSAI RP3 Frame and frame boundaries K character; Can also by determining message groups border in OBSAI RP3 Frame and frame boundaries according to the counting of data counter, message counter and message groups counter.Wherein, the numerical value of message counter be 20, data counter be 9 and message groups counter is not 7679 time, then determine that current message is message groups border; Message groups counter be 7679, message counter is 20, data counter is 9 time, be then frame boundaries after determining current message.
In an embodiment of the present invention, when message groups border K character being detected, data counter and message counter are reset, restart counting, the numerical value of message groups counter adds 1 simultaneously; When frame boundaries K character being detected, by data counter, message counter and message groups counter O reset, restart counting.
Step 403, deletes message groups border K character and frame boundaries K character, obtains the OBSAIRP3 Frame without K character;
Step 404, the counting according to data counter, message counter and message groups counter extracts without the message header in the OBSAI RP3 Frame of K character and load.
Particularly, from the 0th number of data counter counting and high 8 bits of the 1st number, extract the message header of current strange message; The load of current strange message is extracted from low 8 bits of the 1st number, the 2nd number to high 8 bits of the 8th number and the 9th number; The message header of current even message is extracted from low 8 bits and the 10th number of the 9th number of data counter counting; The load of current even message is extracted from o.11 data to 18 numbers.
As can be seen from above-mentioned process, when being in message groups or frame boundaries, data counter count value is 9, just can a byte data of Delete superfluous and K character, ensures that three counters normally work.The embodiment of the present invention employs the form of three counters and OBSAI RP3 Frame simply, dexterously, can be conveniently implemented in the parsing to OBSAI RP3 Frame under 16bit data width.
Fig. 5 is the flow chart of the counter process of the embodiment of the present invention, as shown in Figure 5, is illustrated below, comprises the course of work of three counters:
Step 501, counter is waited for and being processed 16bits data, if process terminates, then counter enters next cycle counting;
Step 502, if frame boundaries detected, then three counters all clear 0.Here frame boundaries refers to, when the value of message groups counter equals 7679, or receives frame boundaries K character;
Step 503, if message groups border detected, then message groups counter adds 1, simultaneously by data counter and message counter clear 0.Here message groups border refers to, when the value of message counter equals 20, or receives message groups border K character;
Step 504, if the border of a message, so message groups counter adds 1.Here message boundaries refers to, when the value of data counter equals 9 or 18;
Step 505, if the value of data counter is 18, then data counter clear 0, otherwise data counter adds 1.
As can be seen from above-mentioned process, frame boundaries or message groups border can be determined by counter or detection easily, thus provide basis for the encapsulation of OBSAI RP3 Frame and parsing.
In sum, embodiments provide a kind of counter that utilizes to realize carrying out to OBSAI RP3 Frame the method that encapsulates Yu resolve under 4x wire rate pattern.The embodiment of the present invention is under the prerequisite taking less FPGA internal resource, ingenious tissue and the decomposition utilizing the various data unit of counter process, dissimilar and user data that is data volume can be carried out encapsulate in OBSAI RP3 link and resolve, the highlyest realize full rate 4x standard OBSAI RP3 interface data transmission.
Device embodiment 1
According to embodiments of the invention, provide a kind of Frame packaging system, Fig. 6 is the structural representation of the Frame packaging system of the embodiment of the present invention, and as shown in Figure 6, the Frame packaging system according to the embodiment of the present invention comprises: acquisition module 60, counting module 62, mapping block 64.Below the Frame packaging system of the embodiment of the present invention is described in detail.
Particularly, acquisition module 60 is for obtaining the data that width is 16 bits, and wherein, data comprise: user totem information and user data;
In actual applications, acquisition module 60 often obtains a message, can obtain the user totem information of 2 16bit and the user data information of 8 16bit, altogether the data of 20 8bit.
Counting module 62 is for counting the data obtained by the data counter of 16 bits, message counter and message groups counter; That is, counting module 62 can count the different pieces of information unit in OBSAI RP3 Frame respectively by above-mentioned three counters, be convenient to the process of data in OBSAI RP3 link.Below, above-mentioned three counters are described in detail.
1,16bits data counter: the data often receiving 16 bits, the numerical value of this data counter adds 1, and when the numerical value of data counter is 18, data counter is reset, restarts counting, wherein, the count range of data counter is 0 to 18, comprises following purposes:
(1) the header data time slot in message is judged according to its count value;
(2) the load data time slot in message is judged according to its count value;
(3) border in Data-Link between two message is judged according to its count value;
(4) judge whether the high 8bits of the 16bits data at two message boundaries places and low 8bits belongs to different message respectively according to its count value.
(5) be combined with two other counter, when judging transmitting terminal encapsulation of data frame, after an end of message, whether add K character.If the border of frame, then add frame end mark K character; If the border of message groups, and not the border of frame, then add message groups end mark K character.
2, message counter: when the numerical value of data counter is 9 or 18, the numerical value of message counter adds 1 is 20 at the numerical value of message counter, and when data counter is 9, message counter, data counter reset, and restart counting.Wherein, the count range of message counter is 0 to 20, comprises following purposes:
(1) border between two message groups is judged;
(2) control data counter count value reset opportunity, that is, message counter be counted as 20 time, need data counter to reset.
3, message groups counter: when the numerical value of message counter is 20, the numerical value of message groups counter adds 1, the count range of this message groups counter is 0 ~ 7679, be 7679 at the numerical value of message groups counter, message counter is 20, and when data counter is 9, message groups counter, message counter, data counter is reset, restart counting, comprise following purposes:
(1) according to current wire rate pattern, be combined with message counter and judge the position of control message in Data-Link;
(2) according to current wire rate pattern, the border between two Frames is judged.
Mapping block 64 is for being OBSAI RP3 Frame according to the counting of data counter, message counter and message groups counter by data-mapping.
Data-mapping is that OBSAI RP3 Frame comprises by mapping block 64:
1, high 8 bits of the 0th number that counted by data counter of mapping block 64 and the 1st number are as the message header of current strange message in OBSAI RP3 Frame, using low 8 bits of the 1st number, the 2nd number to high 8 bits of the 8th number and the 9th number as the load of current strange message;
2, low 8 bits of the 9th number that counted by data counter of mapping block 64 and the 10th number are as the message header of current even message in OBSAI RP3 Frame, using the load of o.11 data to 18 numbers as current even message;
3, mapping block 64 the numerical value of message counter be 20, the numerical value of data counter be 9 and breath cluster counters numerical value be not 7679 time, after current message, add message groups border K character;
4, mapping block 64 the numerical value of message groups counter be 7679, the numerical value of message counter is 20, the numerical value of data counter is 9 time, after current message, add frame boundaries K character.
As can be seen from above-mentioned process, when being in message groups or frame boundaries, data counter count value is 9, just a unnecessary byte data can be used for inserting K character, avoids the problem that data bit width is not 16bits integral multiple dexterously.The embodiment of the present invention employs the form of three counters and OBSAI RP3 Frame simply, dexterously, encapsulates OBSAI RP3 Frame under can being conveniently implemented in 16bit data width.
Below, composition graphs 7 is described in detail to technique scheme of the present invention.Fig. 7 is the structural representation of the Frame encapsulation of the embodiment of the present invention, as shown in Figure 7, comprising: transmitting terminal data receiver interface module 71, transmitting terminal counter controls module 72, transmitting terminal data mapping module 73, transmitting terminal boundary judgment module 74, insertion K character module 75.
Transmitting terminal data receiver interface module 71 (being equivalent to above-mentioned acquisition module): for buffered user data, provides the data of 16bits width to carry out the encapsulation of OBSAI RP3 Frame to follow-up module;
Transmitting terminal counter controls module 72 (being equivalent to above-mentioned counting module): comprise three counters, the operation principle of three counters has been described in detail in the above-described embodiments, has not repeated them here.
Transmitting terminal data mapping module 73 (being equivalent to above-mentioned mapping block): for realizing the mapping of user data to OBSAI RP3 message load, adds message header according to OBSAI RP3 agreement simultaneously.Wherein, the message header of even message is the high 8bits of the 0th number and the 1st number, and the message header of strange message is low 8bits and the 10th number of the 9th number, and therefore user data and message header will re-start partition and restructuring.
Partition and restructuring are controlled by data counter: when the value of data counter is 1, and the last 8bits of message header and the high 8bits of user data forms 16bits data; When the value of data counter is 2 ~ 8, the low 8bits of last user data and the high 8bits of current-user data forms 16bits data; When the value of data counter is 9, the low 8bits of last user data and first 8bits of current message forms 16bits data.
Transmitting terminal boundary judgment module 74: if the value of message counter equals 20, then current message is last message of message groups.If now data counter count value is 9, then current location is in message groups border or frame boundaries.
Insert K character module 75: when being in a message groups or frame boundaries, transmitting terminal should insert border K character.If at this moment the value of message groups counter equals 7679, then current message group is last message of frame, the frame boundaries K character that should insert, otherwise what insert is message groups border K character.
As can be seen from above-mentioned process, by the counter of three in Frame packaging system, under 16bit data width can be conveniently implemented in, encapsulate OBSAI RP3 Frame.
Device embodiment 2
According to embodiments of the invention, provide a kind of data frame analyzing device, Fig. 8 is the structural representation of the data frame analyzing device of the embodiment of the present invention, as shown in Figure 8, comprise according to the data frame analyzing device of the embodiment of the present invention: counting module 80, determination module 82, removing module 84, extraction module 86.Below the data frame analyzing device of the embodiment of the present invention is described in detail.
Particularly, counting module 80 is for counting the OBSAI RP3 Frame obtained by the data counter of 16 bits, message counter and message groups counter;
Particularly, counting module 80 often receives the OBSAI RP3 Frame of 16 bits, and the numerical value of data counter is added 1, and wherein, the count range of data counter is 0 to 18; When the numerical value of data counter is 9 or 18, the numerical value of message counter is added 1, and when the numerical value of data counter is 18, reset by data counter, restart counting, wherein, the count range of message counter is 0 to 20; Be 20 at the numerical value of message counter, and when data counter is 9, message counter, data counter are reset, restart counting, and the numerical value of message groups counter is added 1, wherein, the count range of message groups counter is 0 to 7679; Be 7679 at the numerical value of message groups counter, message counter I be 20, and when data counter is 9, message groups counter, message counter, data counter is reset, restart counting.
Determination module 82 is for determining message groups border in described OBSAI RP3 Frame and frame boundaries;
Particularly, determination module 82 can by detecting that message groups border in OBSAI RP3 Frame and frame boundaries determined in message groups border K character in OBSAI RP3 Frame and frame boundaries K character; Determination module 82 can also by determining message groups border in OBSAI RP3 Frame and frame boundaries according to the counting of data counter, message counter and message groups counter.Wherein, the numerical value of message counter be 20, data counter be 9 and message groups counter is not 7679 time, then determine that current message is message groups border; Message groups counter be 7679, message counter is 20, data counter is 9 time, be then frame boundaries after determining current message.
In an embodiment of the present invention, when message groups border K character being detected, data counter and message counter reset by determination module 82, restart counting; When frame boundaries K character being detected, determination module 82, by data counter, message counter and message groups counter O reset, restarts counting.
Removing module 84, for deleting message groups border K character and frame boundaries K character, obtains the OBSAI RP3 Frame without K character;
Extraction module 86 extracts described without the message header in the OBSAI RP3 Frame of K character and load for the counting according to described data counter, described message counter and described message groups counter.
Particularly, the message header of current strange message is extracted high 8 bits of the 0th number that counts from data counter of extraction module 86 and the 1st number; Extraction module 86 extracts the load of current strange message from low 8 bits of the 1st number, the 2nd number to high 8 bits of the 8th number and the 9th number; The message header of current even message is extracted low 8 bits of the 9th number that extraction module 86 counts from data counter and the 10th number; Extraction module 86 from o.11 data to 18 numbers extract the load of current even message.
As can be seen from above-mentioned process, when being in message groups or frame boundaries, data counter count value is 9, just can a byte data of Delete superfluous and K character, ensures that three counters normally work.The embodiment of the present invention employs the form of three counters and OBSAI RP3 Frame simply, dexterously, can be conveniently implemented in the parsing to OBSAI RP3 Frame under 16bit data width.
Below, composition graphs 9 is described in detail to technique scheme of the present invention.Fig. 9 is the structural representation of the data frame analyzing of the embodiment of the present invention, as shown in Figure 9, comprising: receiving terminal boundary judgment module 91, deletion K character 92, receiving terminal counter controls module 93, receiving terminal data mapping module 94, receiving terminal data receiver interface module 95.
Particularly, receiving terminal boundary judgment module 91: if receiving terminal detects frame boundaries K character, be then judged to be frame boundaries; If message groups border K character detected, be then judged to be message groups border.
Delete K character 92: receiving terminal deletes the K character of message groups border or frame boundaries.When being in message groups or frame boundaries, data counter count value is 9, just can the data of a byte of Delete superfluous and K character, ensures that three counters normally work.
Receiving terminal counter controls module 93: comprise three counters, counter works flow process has been described in detail in said method embodiment 2, does not repeat them here.
Receiving terminal data mapping module 94: the extraction realizing OBSAI RP3 frame message head and message load, completes fractionation and the restructuring of 16bits data simultaneously.
Receiving terminal data receiver interface module 95: buffer memory OBSAI receives data, exports the user data of 16bits bit wide.
In sum, embodiments provide a kind of counter that utilizes and realize the encapsulation of OBSAI RP3 Frame and the device of resolving under 4x wire rate pattern.The embodiment of the present invention is under the prerequisite taking less FPGA internal resource, ingenious tissue and the decomposition utilizing the various data unit of counter process, dissimilar and user data that is data volume can be carried out encapsulate in OBSAI RP3 link and resolve, the highlyest realize full rate 4x standard OBSAI RP3 interface data transmission.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the prerequisite not departing from the technology of the present invention principle; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (9)

1. a data frame encapsulation method, is characterized in that, comprising:
Obtain the data that width is 16 bits, wherein, described data comprise: user totem information and user data;
By the data counter of 16 bits, message counter and message groups counter, the described data obtained are counted;
Be Open Base Station Architecture reference point 3OBSAI RP3 Frame according to the counting of described data counter, described message counter and described message groups counter by described data-mapping;
Wherein, the described data counter by 16 bits, message counter and message groups counter carry out counting comprise the described data obtained:
Often receive the data of 16 bits, the numerical value of described data counter adds 1, and wherein, the count range of described data counter is 0 to 18;
When the numerical value of described data counter is 9 or 18, the numerical value of described message counter is added 1, and when the numerical value of described data counter is 18, described data counter is reset, restart counting, wherein, the count range of described message counter is 0 to 20;
Be 20 at the numerical value of described message counter, and when data counter is 9, described message counter and data counter reset, restart counting, and the numerical value of described message groups counter is added 1, wherein, the count range of described message groups counter is 0 to 7679;
Be 7679 at the numerical value of described message groups counter, message counter is 20, and when data counter is 9, described message groups counter, described message counter, described data counter is reset, restart counting.
2. the method for claim 1, is characterized in that, described data-mapping is that OBSAI RP3 Frame comprises by the described counting according to described data counter, described message counter and described message groups counter:
The 0th number that described data counter is counted and high 8 bits of the 1st number as the message header of current strange message in described OBSAI RP3 Frame, using low 8 bits of described 1st number, the 2nd number to high 8 bits of the 8th number and the 9th number as the load of described current strange message;
Low 8 bits of the 9th number that described data counter is counted and the 10th number as the message header of current even message in described OBSAI RP3 Frame, using the load of o.11 data to 18 numbers as described current even message;
The numerical value of described message counter be 20, the numerical value of described data counter be 9 and the numerical value of described breath cluster counters is not 7679 time, after current message, add message groups border K character;
The numerical value of described message groups counter be 7679, the numerical value of described message counter is 20, the numerical value of described data counter is 9 time, after current message, add frame boundaries K character.
3. a data frame analyzing method, is characterized in that, comprising:
By the data counter of 16 bits, message counter and message groups counter, the OBSAI RP3 Frame obtained is counted;
Determine the message groups border in described OBSAI RP3 Frame and frame boundaries;
Delete message groups border K character and frame boundaries K character, obtain the OBSAI RP3 Frame without K character;
Counting according to described data counter, described message counter and described message groups counter extracts described without the message header in the OBSAI RP3 Frame of K character and load;
Wherein, the described data counter by 16 bits, message counter and message groups counter carry out counting comprise the OBSAI RP3 Frames obtained:
Often receive the described OBSAI RP3 Frame of 16 bits, the numerical value of described data counter adds 1, and wherein, the count range of described data counter is 0 to 18;
When the numerical value of described data counter is 9 or 18, the numerical value of described message counter is added 1, and when the numerical value of described data counter is 18, described data counter is reset, restart counting, wherein, the count range of described message counter is 0 to 20;
Be 20 at the numerical value of described message counter, and when data counter is 9, described message counter and data counter reset, restart counting, and the numerical value of described message groups counter is added 1, wherein, the count range of described message groups counter is 0 to 7679;
Be 7679 at the numerical value of described message groups counter, message counter is 20, and when data counter is 9, described message groups counter, message counter, data counter is reset, restart counting.
4. method as claimed in claim 3, is characterized in that, determines that message groups border in described OBSAI RP3 Frame and frame boundaries comprise;
By detecting that message groups border in described OBSAI RP3 Frame and frame boundaries determined in described message groups border K character in described OBSAI RP3 Frame and described frame boundaries K character; And
By determining message groups border in described OBSAI RP3 Frame and frame boundaries according to the counting of described data counter, described message counter and described message groups counter.
5. method as claimed in claim 4, is characterized in that, by determining that according to the counting of described data counter, described message counter and described message groups counter message groups border in described OBSAI RP3 Frame and frame boundaries comprise:
The numerical value of described message counter be 20, the numerical value of described data counter be 9 and described message groups counter is not 7679 time, then determine that current message is described message groups border;
Described message groups counter be 7679, the numerical value of described message counter is 20, the numerical value of described data counter is 9 time, be then described frame boundaries after determining described current message.
6. method as claimed in claim 5, is characterized in that, after described message groups border K character in described OBSAI RP3 Frame and described frame boundaries K character being detected, described method also comprises:
When described message groups border K character being detected, described data counter and described message counter being reset, restarts counting;
When described frame boundaries K character being detected, by described data counter, described message counter and described message groups counter O reset, restart counting.
7. method as claimed in claim 6, is characterized in that, comprises without the message header in the OBSAI RP3 Frame of K character and load according to the counting extraction of described data counter, described message counter and described message groups counter is described:
The message header of current strange message is extracted the 0th number counted from described data counter and high 8 bits of the 1st number;
The load of described current strange message is extracted from low 8 bits of described 1st number, the 2nd number to high 8 bits of the 8th number and the 9th number;
The message header of current even message is extracted low 8 bits of the 9th number counted from described data counter and the 10th number;
The load of described current even message is extracted from o.11 data to 18 numbers.
8. a Frame packaging system, is characterized in that, comprising:
Acquisition module, for obtaining the data that width is 16 bits, wherein, described data comprise: user totem information and user data;
Counting module, for counting the described data obtained by the data counter of 16 bits, message counter and message groups counter;
Mapping block, for being OBSAI RP3 Frame according to the counting of described data counter, described message counter and described message groups counter by described data-mapping;
Described counting module is specifically for the data often receiving 16 bits, and the numerical value of described data counter adds 1, wherein, the count range of described data counter is 0 to 18;
When the numerical value of described data counter is 9 or 18, the numerical value of described message counter is added 1, and when the numerical value of described data counter is 18, described data counter is reset, restart counting, wherein, the count range of described message counter is 0 to 20;
Be 20 at the numerical value of described message counter, and when data counter is 9, described message counter and data counter reset, restart counting, and the numerical value of described message groups counter is added 1, wherein, the count range of described message groups counter is 0 to 7679;
Be 7679 at the numerical value of described message groups counter, message counter is 20, and when data counter is 9, described message groups counter, described message counter, described data counter is reset, restart counting.
9. a data frame analyzing device, is characterized in that, comprising:
Counting module, for counting the OBSAI RP3 Frame obtained by the data counter of 16 bits, message counter and message groups counter; Described counting module specifically for:
Often receive the described OBSAI RP3 Frame of 16 bits, the numerical value of described data counter adds 1, and wherein, the count range of described data counter is 0 to 18; When the numerical value of described data counter is 9 or 18, the numerical value of described message counter is added 1, and when the numerical value of described data counter is 18, described data counter is reset, restart counting, wherein, the count range of described message counter is 0 to 20; Be 20 at the numerical value of described message counter, and when data counter is 9, described message counter and data counter reset, restart counting, and the numerical value of described message groups counter is added 1, wherein, the count range of described message groups counter is 0 to 7679; Be 7679 at the numerical value of described message groups counter, message counter is 20, and when data counter is 9, described message groups counter, message counter, data counter is reset, restart counting;
Determination module, for determining message groups border in described OBSAI RP3 Frame and frame boundaries;
Removing module, for deleting message groups border K character and frame boundaries K character, obtains the OBSAI RP3 Frame without K character;
Extraction module, extracts described without the message header in the OBSAI RP3 Frame of K character and load for the counting according to described data counter, described message counter and described message groups counter.
CN200910249697.5A 2009-12-14 2009-12-14 Data frame encapsulation method and device as well as data frame resolving method and device Expired - Fee Related CN102098129B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910249697.5A CN102098129B (en) 2009-12-14 2009-12-14 Data frame encapsulation method and device as well as data frame resolving method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910249697.5A CN102098129B (en) 2009-12-14 2009-12-14 Data frame encapsulation method and device as well as data frame resolving method and device

Publications (2)

Publication Number Publication Date
CN102098129A CN102098129A (en) 2011-06-15
CN102098129B true CN102098129B (en) 2015-04-01

Family

ID=44131013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910249697.5A Expired - Fee Related CN102098129B (en) 2009-12-14 2009-12-14 Data frame encapsulation method and device as well as data frame resolving method and device

Country Status (1)

Country Link
CN (1) CN102098129B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983913A (en) * 2005-12-17 2007-06-20 华为技术有限公司 Method and system for transmitting data
CN101431507A (en) * 2007-11-05 2009-05-13 中兴通讯股份有限公司 Signaling transmission method for OBSAI RP3 interface

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983913A (en) * 2005-12-17 2007-06-20 华为技术有限公司 Method and system for transmitting data
CN101431507A (en) * 2007-11-05 2009-05-13 中兴通讯股份有限公司 Signaling transmission method for OBSAI RP3 interface

Also Published As

Publication number Publication date
CN102098129A (en) 2011-06-15

Similar Documents

Publication Publication Date Title
CN103023809B (en) Information system synchronous data processing method utilizing secondary buffer technology
CN103269388B (en) A kind of method by satellite data transmission channel acquisition high-speed real-time
CN109089029B (en) An FPGA-based Gige Vision interface image transmission system and method
CN104008078B (en) Method for high-speed transmission between data transmission boards based on FPGA
CN105703885B (en) Analysis method and device based on Manchester code
CN107707446A (en) A kind of SENT bus encoding/decodings, triggering and analysis method based on FPGA
CN113190291B (en) A configurable protocol conversion system and method based on network-on-chip data acquisition
CN112187789B (en) Data link protocol conversion system
CN109861782A (en) A kind of SDH protocol signal analysis platform based on PCIE analog input card
CN104796653B (en) The method and apparatus that MIPI signals are transmitted under LPDT patterns realized based on FPGA
CN107771331A (en) Free-standing UARK BRK detections
CN105187332A (en) Multi-source data transmission method based on Zigbee network
CN101832125A (en) Remotely updating device of EDIB (Electronic Data Interchange Bus) based down-hole program
CN104009982B (en) File grouping group sending device and file grouping method for group sending based on ultrashort wave radio set
CN102098129B (en) Data frame encapsulation method and device as well as data frame resolving method and device
CN109521942A (en) A kind of CAN bus protocol analysis system and method based on high-resolution oscillscope tube
CN1848715A (en) Method, system and processing apparatus for realizing synchronous serial data transparent transmission in TDM network
CN102594871B (en) A kind of data encapsulation method, system, adapter and Internet of things middleware
CN101119172B (en) Parallel overhead extracting method and device in optical synchronization digital transmission system
CN105703869A (en) Frame positioning method and device
CN100444595C (en) A method of master-slave equipment communication
CN113709010B (en) A Modbus Communication Protocol System with Unlimited Frame Length
CN104461960A (en) Telemetry frame data path selection processing method for matrix type telemetry frame
CN114726674A (en) FPGA-based PROFIBUS bus process data extraction method
CN102098333B (en) High-level data link control (HDLC) data processing method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
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: 20150401

Termination date: 20171214

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