Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of cyclic redundancy check accelerated method, device and access
Net equipment.
To achieve the goals above, on the one hand, the embodiment of the invention provides a kind of circulations implemented from physical layer angle
Redundancy check accelerated method, comprising steps of
Physical layer transmitting terminal parses the MAC layer data packet from media access control layer, obtains the first parsing letter
Breath;MAC layer data packet is the data packet for meeting mac frame structure of media access control layer building;
Physical layer transmitting terminal is completed to calculate the CRC of MAC layer data packet, and is MAC layer data based on the first parsing information
The additional first circulation redundancy check bit being calculated through CRC of packet, and by the MAC layer data of additional first circulation redundancy check bit
Packet is sent to physical layer receiving end;
Physical layer receiving end parses the MAC layer data packet of additional first circulation redundancy check bit, obtains the second solution
Analyse information;And complete to calculate the CRC of the MAC layer data packet of additional first circulation redundancy check bit based on the second parsing information,
Obtain second circulation redundancy check bit;
Physical layer receiving end compares first circulation redundancy check bit and second circulation redundancy check bit, and according to the knot of comparison
Fruit completes data and reports.
The first parsing information includes frame head and frame length in one of the embodiments,;
Physical layer transmitting terminal parses the MAC layer data packet from media access control layer, obtains the first parsing letter
The step of breath includes:
Physical layer transmitting terminal caches MAC layer data packet, and according to the MAC layer data in communication protocol detection caching
Packet, obtains frame head;
Physical layer transmitting terminal reads the MAC layer data packet in caching, obtains frame length according to communication protocol and frame head.
MAC layer data packet includes what media access control layer was selected according to communication protocol in one of the embodiments,
Cyclic redundancy check parameter;Cyclic redundancy check parameter includes multinomial length and degree of parallelism;
Physical layer transmitting terminal, parsing the step of information completes the CRC calculating to MAC layer data packet based on first includes:
Physical layer transmitting terminal is taken on the basis of transmission rate according to cyclic redundancy check parameter according to first-in first-out rule
Out the MAC layer data packet in caching, carry out the calculating of first circulation redundancy check bit, and by MAC layer number to be issued after calculating
According in packet filling caching;
Wherein, the MAC layer data packet in caching is taken out on the basis of transmission rate, carries out first circulation redundancy check bit
In the step of calculating:
Physical layer transmitting terminal is confirmed whether to complete the CRC calculation processing to MAC layer data packet according to data packet length;Data
Packet length is to be obtained according to MAC layer overhead data packet and frame length;MAC layer overhead data packet is to be determined based on communication protocol.
The second parsing information includes frame head and frame length in one of the embodiments,;
Physical layer receiving end parses the MAC layer data packet of additional first circulation redundancy check bit, obtains the second solution
Analyse information the step of include:
Physical layer receiving end caches the MAC layer data packet of additional first circulation redundancy check bit, and according to communication
The MAC layer data packet of additional first circulation redundancy check bit in protocol detection caching, obtains frame head;
Physical layer receiving end the additional first circulation redundancy check bit in caching is read according to communication protocol and frame head
MAC layer data packet obtains frame length.
MAC layer data packet includes what media access control layer was selected according to communication protocol in one of the embodiments,
Cyclic redundancy check parameter;Cyclic redundancy check parameter includes multinomial length and degree of parallelism;
The MAC layer data to additional first circulation redundancy check bit are completed based on the second parsing information in physical layer receiving end
The step of CRC of packet is calculated, and obtains second circulation redundancy check bit include:
Physical layer receiving end is taken on the basis of transmission rate according to cyclic redundancy check parameter according to first-in first-out rule
The calculating of the MAC layer data packet of additional first circulation redundancy check bit in caching, progress second circulation redundancy check bit out, and
It will be in MAC layer data packet filling caching to be issued after calculating;
Wherein, on the basis of transmission rate take out caching in additional first circulation redundancy check bit MAC layer data packet,
In the step of carrying out the calculating of second circulation redundancy check bit:
Physical layer receiving end is confirmed whether to complete the MAC layer to additional first circulation redundancy check bit according to data packet length
The CRC calculation processing of data packet;Data packet length is the length according to MAC layer overhead data packet, first circulation redundancy check bit
It is obtained with frame length;MAC layer overhead data packet is to be determined based on communication protocol.
On the other hand, the embodiment of the invention also provides a kind of from the cyclic redundancy school that media access control layer angle is implemented
Accelerated method is tested, comprising steps of
Media access control layer constructs the MAC layer data packet for meeting mac frame structure;
MAC layer data packet is handed down to physical layer transmitting terminal by media access control layer;
MAC layer data packet is used to indicate physical layer transmitting terminal for the MAC layer data packet of additional first circulation redundancy check bit
It is sent to physical layer receiving end;The MAC layer data packet of additional first circulation redundancy check bit is sent out by MAC layer data packet through physical layer
Sending end is added first circulation redundancy check bit and is obtained;First circulation redundancy check bit by MAC layer data packet, through physical layer transmitting terminal
CRC is completed based on the first parsing information to be calculated;First parsing information is parsed by MAC layer data packet through physical layer transmitting terminal
It arrives;
It is superfluous that the MAC layer data packet of additional first circulation redundancy check bit is used to indicate physical layer receiving end comparison second circulation
Remaining check bit and first circulation redundancy check bit, and data are completed according to the result of comparison and are reported;Second circulation redundancy check bit
By adding the MAC layer data packet of first circulation redundancy check bit, being completed based on CRC through physical layer receiving end by the second parsing information
It obtains;Second parsing information is parsed by the MAC layer data packet for adding first circulation redundancy check bit through physical layer receiving end
It arrives.
Media access control layer is to be realized based on ARM framework in one of the embodiments,;Media access control layer passes through
MAC layer data packet is handed down to physical layer transmitting terminal by PCIe or parallel port.
Media access control layer in one of the embodiments, building meet the step of the MAC layer data packet of mac frame structure
Suddenly include:
Media access control layer chooses cyclic redundancy check parameter according to communication protocol, and according to cyclic redundancy check parameter
Building meets mac frame structure and vacates the MAC layer data packet of respective cycle redundancy check bit position;
Wherein, cyclic redundancy check parameter includes multinomial length and degree of parallelism.
A kind of cyclic redundancy check accelerator implemented from physical layer angle, comprising:
Transmitting terminal cyclic redundancy check module, for being parsed to the MAC layer data packet from media access control layer,
Obtain the first parsing information;MAC layer data packet is the data packet for meeting mac frame structure of media access control layer building;And
It completes to calculate the CRC of MAC layer data packet based on the first parsing information, and is that MAC layer data packet is additional and is calculated through CRC
First circulation redundancy check bit, and the MAC layer data packet of additional first circulation redundancy check bit is sent to physical layer receiving end;
Receiving end cyclic redundancy check module, the additional first circulation redundancy check for being received to physical layer receiving end
The MAC layer data packet of position is parsed, and the second parsing information is obtained;And it is completed based on the second parsing information to additional first circulation
The CRC of the MAC layer data packet of redundancy check bit is calculated, and obtains second circulation redundancy check bit;And compare first circulation redundancy
Check bit and second circulation redundancy check bit, and data are completed according to the result of comparison and are reported.
A kind of cyclic redundancy check accelerator implemented from media access control layer angle, comprising:
MAC layer constructs data packet module, for constructing the MAC layer data packet for meeting mac frame structure;
MAC layer data transmission blocks, for MAC layer data packet to be handed down to physical layer transmitting terminal;
MAC layer data packet is used to indicate physical layer transmitting terminal for the MAC layer data packet of additional first circulation redundancy check bit
It is sent to physical layer receiving end;The MAC layer data packet of additional first circulation redundancy check bit is sent out by MAC layer data packet through physical layer
Sending end is added first circulation redundancy check bit and is obtained;First circulation redundancy check bit by MAC layer data packet, through physical layer transmitting terminal
CRC is completed based on the first parsing information to be calculated;First parsing information is parsed by MAC layer data packet through physical layer transmitting terminal
It arrives;
It is superfluous that the MAC layer data packet of additional first circulation redundancy check bit is used to indicate physical layer receiving end comparison second circulation
Remaining check bit and first circulation redundancy check bit, and data are completed according to the result of comparison and are reported;Second circulation redundancy check bit
By adding the MAC layer data packet of first circulation redundancy check bit, being completed based on CRC through physical layer receiving end by the second parsing information
It obtains;Second parsing information is parsed by the MAC layer data packet for adding first circulation redundancy check bit through physical layer receiving end
It arrives.
A kind of access network equipment, access network equipment include the FPGA (Field-Programmable of CPU and connection CPU
Gate Array, field programmable gate array);
CPU is used to execute the cyclic redundancy check accelerated method that any of the above-described is implemented from media access control layer angle
Step;
The step of FPGA is for executing any of the above-described from the cyclic redundancy check accelerated method that physical layer angle is implemented.
Access network equipment is base station in one of the embodiments,;Base station include macro base station, micro-base station, femto base station and
Scytoblastema station.
CPU connects FPGA by PCIe or parallel port in one of the embodiments,.
A kind of computer readable storage medium is stored thereon with computer program, when computer program is executed by processor
The step of realizing the method for any of the above-described.
A technical solution in above-mentioned technical proposal is had the following advantages and beneficial effects:
According to communication protocol, building meets the application MAC (Media Access Control, media access control) layer
The data packet of mac frame structure, and data packet is issued to physical layer;Then, physical layer passes through the interior of parsing MAC layer data packet
Hold, the cyclic redundancy check position of data is calculated in real time;So that physical layer is cooperateed with MAC, physical layer is allowed to understand MAC
Communication protocol;The function that MAC layer calculates cyclic redundancy check is sunk to physical layer and calculated by the application, abundant using physical layer
Logical resource mitigate MAC computation burden, reduce the computation complexity of MAC layer, be able to achieve the cyclic redundancy school to data
Test the real-time calculating of position;The application Rational choice cyclic redundancy check parameter improves cyclic redundancy check position in data and calculates
Real-time and validity.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Conventional recycle redundancy check technology mainly includes two key technology points: the 1, selection of cyclic redundancy check parameter;
2, the specific implementation method of cyclic redundancy check.For key technology point 1: the cyclic redundancy check parameter of required selection has two
It is a, cyclic redundancy check digit and generator polynomial.The former has determined the performance and reality of cyclic redundancy check substantially on the whole
Complexity is applied, in general, cyclic redundancy check digit is longer, and performance is better, and it is bigger to implement complexity.The latter then ensure that
The randomness of cyclic redundancy check also ensures its performance to a certain extent.For key technology point 2: conventional method is to make
It is carried out implementing cyclic redundancy check with software, this method needs to safeguard a biggish look-up table, needs to account in this way
With CPU biggish calculation resources and memory source, while time delay is larger, easily becomes the bottleneck of system performance, leads to system
Performance decline.
And the function of cyclic redundancy check is transferred to physical layer by the application, alleviates the computation burden of MAC layer, to mention
The high calculated performance of MAC layer;The application implements cyclic redundancy check using the physical layer based on fpga chip, can be effective
The time delay for calculating cyclic redundancy check position is reduced, to improve the whole delay performance of system.
Cyclic redundancy check accelerated method provided by the present application, can be applied in wireless communication system, is particularly suitable for
Cyclic redundancy check in microwave telecommunication system.Specifically, being applicable to 5G (5th generation mobile
Networks the millimeter-wave systems in), have a extensive future.
In one embodiment, it as shown in Figure 1, providing a kind of cyclic redundancy check accelerated method, applies in this way
It is illustrated for physical layer, comprising the following steps:
Step S102, physical layer transmitting terminal parse the MAC layer data packet from media access control layer, obtain
First parsing information;
Wherein, MAC layer data packet is the data packet for meeting mac frame structure of media access control layer building.
Specifically, physical layer transmitting terminal needs to carry out after the MAC layer data packet for receiving media access control layer transmission
Parsing, such as according to communication protocol, the data packet that MAC layer issues is parsed;In a specific example, need to parse
Variable (i.e. first parsing information) may include: the frame head of MAC layer data packet and the frame length of MAC layer data packet.It needs
Illustrate, the communication protocol in the application is related to the communication system of concrete application.The application is in combination with specific communication system
Protocol realization needs two professions of MAC layer and physical layer to cooperate.
Wherein, the frame head of MAC data packet indicate each MAC layer data packet initial position and each MAC layer data packet
Separation;The frame length of MAC layer data packet indicates data length of each MAC layer data packet other than expense.
Such as: the frame head of MAC layer data packet can be indicated with 16 special bits, if with hexadecimal number
Word indicates frame head, then can indicate frame head with 0x4859;And the frame length of MAC layer data packet can use 12 bits
Position indicates, therefore frame length is up to 8192 bytes.
Further, in a specific embodiment, physical layer transmitting terminal, to the MAC from media access control layer
The step of layer data packet is parsed, and the first parsing information is obtained may include:
Physical layer transmitting terminal caches MAC layer data packet, and according to the MAC layer data in communication protocol detection caching
Packet, obtains frame head;
Physical layer transmitting terminal reads the MAC layer data packet in caching, obtains frame length according to communication protocol and frame head.
Specifically, physical layer transmitting terminal caches the data packet that MAC layer issues, and detect MAC layer data packet
Frame head and corresponding frame length;In a specific example, physical layer transmitting terminal first identifies the separation in MAC layer data packet
Symbol (i.e. frame head) parses the frame length of MAC layer data packet then according to the structure of MAC layer data packet.
It should be noted that in practical applications, data are little by little to send, and the frame head of data packet has certain length
Degree.For example, data send out 1bit (bit) when transmission every time, and frame head has 10bit;This application is proposed, under MAC layer
The data packet of hair is cached, such as must cache 10bit data, and then judge, which is frame head, rather than
It receives 1bit just to be judged, to improve analyzing efficiency.
Wherein, the information position of the frame head of MAC layer data packet and instruction frame length can all be determined according to communication protocol.
Such as: provide that frame head is 0x4859 in communication protocol, physical layer is detecting that certain 16 successive bits position is equal with 0x4859, then
Think the initial position herein for a MAC layer data packet.Regulation according to communication protocol simultaneously, the 5th since frame head
The length of frame is indicated with the 6th byte, therefore the frame that physical layer can read current MAC layer data packet in corresponding position is long
Degree.
Step S104, physical layer transmitting terminal are completed to calculate the CRC of MAC layer data packet, and are based on the first parsing information
The additional first circulation redundancy check bit being calculated through CRC of MAC layer data packet, and by additional first circulation redundancy check bit
MAC layer data packet is sent to physical layer receiving end.
Specifically, physical layer transmitting terminal carries out corresponding CRC operation after the length for obtaining the MAC packet, to it.Physics
Layer transmitting terminal is followed in the frame head for detecting MAC layer data packet and after obtaining its data packet length according to what MAC layer data packet included
Ring redundancy verification parameters (parameter is by media access control layer, i.e. MAC layer is chosen according to communication protocol) are realized
The step by step calculation of cyclic redundancy check position is carried out while MAC layer data packet issues;Wherein, the application Rational choice cyclic redundancy
Checking parameter improves cyclic redundancy check position calculates in data real-time and validity.
In a specific embodiment, MAC layer data packet includes that media access control layer is selected according to communication protocol
Cyclic redundancy check parameter;Cyclic redundancy check parameter includes multinomial length and degree of parallelism;
Physical layer transmitting terminal, parsing the step of information completes the CRC calculating to MAC layer data packet based on first includes:
Physical layer transmitting terminal is taken on the basis of transmission rate according to cyclic redundancy check parameter according to first-in first-out rule
Out the MAC layer data packet in caching, carry out the calculating of first circulation redundancy check bit, and by MAC layer number to be issued after calculating
According in packet filling caching;
Wherein, the MAC layer data packet in caching is taken out on the basis of transmission rate, carries out first circulation redundancy check bit
In the step of calculating:
Physical layer transmitting terminal is confirmed whether to complete the CRC calculation processing to MAC layer data packet according to data packet length;Data
Packet length is to be obtained according to MAC layer overhead data packet and frame length;MAC layer overhead data packet is to be determined based on communication protocol.
Specifically, physical layer transmitting terminal is in the frame head that detects MAC layer data packet and after obtaining its data packet length, it can
It, will be in caching on the basis of transmission rate according to the principle of first in first out according to obtained cyclic redundancy check parameter before
Data take out, carry out cyclic redundancy check position calculating, while by the data issued filling caching in, keep caching in data
Disengaging balance, realize while MAC layer data packet issues carry out cyclic redundancy check position step by step calculation.Wherein, parallel
Degree refers to the data length handled in the single clock cycle.
Further, physical layer transmitting terminal can judge whether to have handled according to the data packet length of MAC layer data packet current
MAC layer data packet, if so, additional through CRC (cyclic redundancy check, Cyclic Redundancy for MAC layer data packet
Check otherwise the first circulation redundancy check bit) being calculated executes cyclic redundancy check position step by step calculation.Wherein, data packet
Length can determine that and the latter can then determine according to system communication protocol according to frame length and MAC layer overhead data packet.
Such as: data packet indicates that frame length is 4000 bytes, and according to communication protocol, MAC layer overhead data packet is fixed
For 11 bytes, then physical layer transmitting terminal just can determine that the data packet length is 4011 bytes, to judge whether to handle
Complete current MAC layer data packet.If judgement is processed, cyclic redundancy check position is attached to behind the data of MAC layer data packet
It is sent.
Step S106, physical layer receiving end parse the MAC layer data packet of additional first circulation redundancy check bit,
Obtain the second parsing information;And the MAC layer data packet to additional first circulation redundancy check bit is completed based on the second parsing information
CRC calculate, obtain second circulation redundancy check bit.
Specifically, physical layer receiving end can calculate data packet cyclic redundancy check position according to communication protocol.Further,
Physical layer receiving end carries out it accordingly after obtaining the length of MAC layer data packet of the additional first circulation redundancy check bit
CRC operation.
On the one hand, in a specific embodiment, the second parsing information includes frame head and frame length;
Physical layer receiving end parses the MAC layer data packet of additional first circulation redundancy check bit, obtains the second solution
Analyse information the step of include:
Physical layer receiving end caches the MAC layer data packet of additional first circulation redundancy check bit, and according to communication
The MAC layer data packet of additional first circulation redundancy check bit in protocol detection caching, obtains frame head;
Physical layer receiving end the additional first circulation redundancy check bit in caching is read according to communication protocol and frame head
MAC layer data packet obtains frame length.
Specifically, physical layer receiving end caches the data packet received from physical layer transmitting terminal, and detects MAC layer
The frame head of data packet and corresponding data packet length;
Wherein, the information position of the frame head of MAC layer data packet and designation date packet length is determined according to communication protocol
's.Such as: provide that frame head is 0x4859 in communication protocol, physical layer is in detection all certain 16 successive bits position and 0x4859 phase
Deng, then it is assumed that it is herein the initial position of a MAC layer data packet.Communication protocol regulation simultaneously, the 5th since frame head and
The length of 6th byte instruction frame, therefore the frame that physical layer can read current MAC layer data packet in corresponding position is long
Degree.
On the other hand, in a specific embodiment, MAC layer data packet includes media access control layer according to communication protocols
Discuss the cyclic redundancy check parameter selected;Cyclic redundancy check parameter includes multinomial length and degree of parallelism;
The MAC layer data to additional first circulation redundancy check bit are completed based on the second parsing information in physical layer receiving end
The step of CRC of packet is calculated, and obtains second circulation redundancy check bit include:
Physical layer receiving end is taken on the basis of transmission rate according to cyclic redundancy check parameter according to first-in first-out rule
The calculating of the MAC layer data packet of additional first circulation redundancy check bit in caching, progress second circulation redundancy check bit out, and
It will be in MAC layer data packet filling caching to be issued after calculating;
Wherein, on the basis of transmission rate take out caching in additional first circulation redundancy check bit MAC layer data packet,
In the step of carrying out the calculating of second circulation redundancy check bit:
Physical layer receiving end is confirmed whether to complete the MAC layer to additional first circulation redundancy check bit according to data packet length
The CRC calculation processing of data packet;Data packet length is the length according to MAC layer overhead data packet, first circulation redundancy check bit
It is obtained with frame length;MAC layer overhead data packet is to be determined based on communication protocol.
Specifically, physical layer receiving end is in the frame head for detecting MAC layer data packet and after obtaining its data packet length, root
It will be in caching on the basis of transmission rate according to the principle of first in first out according to obtained cyclic redundancy check parameter before
Data are taken out, and the calculating of cyclic redundancy check position is carried out, while by the data issued filling caching, keeping data in caching
Disengaging balance realizes the step by step calculation that cyclic redundancy check position is carried out while MAC layer data packet issues.Wherein, the application
Rational choice cyclic redundancy check parameter improves cyclic redundancy check position calculates in data real-time and validity.
And physical layer receiving end can judge whether to have handled current MAC layer data packet according to the length of MAC layer data packet,
If so, thening follow the steps S108, the step by step calculation of second circulation redundancy check bit is otherwise executed;
Wherein, the data packet length for adding the MAC layer data packet of first circulation redundancy check bit can be superfluous according to first circulation
Remaining check bit, frame length and MAC layer overhead data packet determine, and the latter is determined according to system communication protocol.Such as:
Data packet indicates that frame length is 4000 bytes, and according to communication protocol, MAC layer overhead data packet is fixed as 11 bytes, that
Physical layer just can determine that the data packet length is 4011 bytes.Assuming that the cyclic redundancy check bit length of addition is 4 words
Section, then required processing data packet length should be 4007 bytes, to judge whether to have handled current MAC layer data
Packet.
Step S108, physical layer receiving end compare first circulation redundancy check bit and second circulation redundancy check bit, and root
Data are completed according to the result of comparison to report.
Specifically, the cyclic redundancy that the resulting cyclic redundancy check position of physical layer receiving end contrast conting and reception obtain
Whether check bit is consistent, completes reporting for comparison result and data.
It should be noted that the main thought of cyclic redundancy check is that first determining required cyclic redundancy check is successful
Probability, and then the cyclic redundancy check digit and its corresponding generator polynomial added needed for determining.Transmitting terminal is more according to generating
The data of item formula and input, calculate the cyclic redundancy check position of regular length, are attached to behind data and are transmitted together.And
Receiving end after receiving the data, also according to generator polynomial and receives the identical calculating of data progress, if be calculated
Cyclic redundancy check position it is consistent with the cyclic redundancy check position received, then it is assumed that under the probability determined by before, passed
There is no mistakes for defeated data, it can be further processed;Otherwise it is assumed that mistake occurs for data transmission, need it
It abandons.
And the application is implemented originally physical layer is sunk in the cyclic redundancy check that MAC layer is implemented, and is taken full advantage of
Physical layer logic circuit resource reduces the computation complexity of MAC layer, is able to achieve to the real-time of the cyclic redundancy check position of data
It calculates.Further, the application Rational choice cyclic redundancy check parameter improves what cyclic redundancy check position in data calculated
Real-time and validity.
In addition, being different from traditional technology overweights the cyclic redundancy check how description flexibly realizes different bit wides in FPGA
The calculating of position, or calculate itself in cyclic redundancy check and accelerated using which kind of computing architecture;How the application is dedicated to solution
So that physical layer (for example, FPGA) is cooperateed with MAC, physical layer is allowed to understand the communication protocol of MAC, thus by MAC layer (i.e. matchmaker
Body access control layer) the function of cyclic redundancy check transfer in physical layer, the cyclic redundancy check of MAC layer is added
Speed.About concrete application scene, the communication protocol referred in the application can refer to the millimetre-wave attenuator agreement of 5G.
In one embodiment, it as shown in Fig. 2, providing a kind of cyclic redundancy check accelerated method, applies in this way
It is illustrated for MAC layer (i.e. media access control layer), comprising the following steps:
Step S202, media access control layer construct the MAC layer data packet for meeting mac frame structure;
Specifically, MAC layer can construct the data packet for meeting MAC layer frame structure according to communication protocol.
Further, in a specific embodiment, media access control layer, building meet the MAC layer of mac frame structure
The step of data packet may include:
Media access control layer chooses cyclic redundancy check parameter according to communication protocol, and according to cyclic redundancy check parameter
Building meets mac frame structure and vacates the MAC layer data packet of respective cycle redundancy check bit position;Wherein, cyclic redundancy check
Parameter includes multinomial length and degree of parallelism.
Specifically, MAC layer meets the data packet of mac frame structure according to communication protocol, building, while vacating corresponding circulation
The position of redundancy check bit.
Further, MAC layer is required according to time delay, transmission rate and the bit error rate etc. in transport protocol communication protocol, choosing
The parameter of cyclic redundancy check, such as polynomial length are selected, (data handled in the single clock cycle are long for the degree of parallelism of calculating
Degree), building meets the data packet of mac frame structure, while vacating the position of corresponding cyclic redundancy check position.
It should be noted that the delay requirement of communication protocol is higher in the application, transmission rate request is higher, cyclic redundancy
The calculating speed of verification requires also higher;And bit error rate requirement is stringenter, to the polynomial length requirement of cyclic redundancy check
Also longer.
MAC layer data packet is handed down to physical layer transmitting terminal by step S204, media access control layer;Wherein, MAC layer data
Packet is used to indicate physical layer transmitting terminal and the MAC layer data packet of additional first circulation redundancy check bit is sent to physical layer reception
End;The MAC layer data packet of additional first circulation redundancy check bit adds first circulation through physical layer transmitting terminal by MAC layer data packet
Redundancy check bit obtains;First circulation redundancy check bit is based on the first parsing information by MAC layer data packet, through physical layer transmitting terminal
CRC is completed to be calculated;First parsing information is parsed to obtain by MAC layer data packet through physical layer transmitting terminal;
And the MAC layer data packet of additional first circulation redundancy check bit is used to indicate physical layer receiving end and compares second circulation
Redundancy check bit and first circulation redundancy check bit, and data are completed according to the result of comparison and are reported;Second circulation redundancy check
CRC is completed by adding the MAC layer data packet of first circulation redundancy check bit, being based on the second parsing information through physical layer receiving end in position
It is calculated;Second parsing information is parsed by the MAC layer data packet for adding first circulation redundancy check bit through physical layer receiving end
It obtains.
Specifically, MAC layer, according to communication protocol, building meets the data packet of mac frame structure, while vacating and following accordingly
It is passed through PCIE (PCI-Express, peripheral component interconnect by the position of ring redundancy check bit
Express, high speed serialization computer expansion bus standard) or the devices such as parallel port be issued to physical layer;And then it is held by physical layer
The process of the corresponding cyclic redundancy check of row, wherein physical layer executes the detailed process that CRC is calculated, reference can be made to aforementioned in physics
The cyclic redundancy check accelerated method that layer executes, details are not described herein again.
In a specific embodiment, media access control layer is to be realized based on ARM framework;Media access control layer is logical
PCIe or parallel port are crossed, MAC layer data packet is handed down to physical layer transmitting terminal.
More than, the MAC layer in communication system is largely that the CPU based on ARM framework is implemented, cyclic redundancy check position
Calculating it is born larger, influence system performance.The application proposes the function of cyclic redundancy check transferring to physical layer, subtract
The light computation burden of MAC layer, to improve the calculated performance of MAC layer;Meanwhile the application implements to recycle using physical layer
Redundancy check can be effectively reduced the time delay for calculating cyclic redundancy check position, to improve the whole delay performance of system.
Wherein, the application, which is principally motivated in addressing, cooperates with physical layer (for example, FPGA) with MAC, in turn
It allows physical layer to understand the communication protocol of MAC, so that the function of the cyclic redundancy check of MAC layer be transferred in physical layer, utilizes
Circuit logic resource abundant in physical layer, calculates the cyclic redundancy check position of data in real time, accelerates in data and follow
The calculating of ring redundancy check bit.
Below with reference to a specific example, the application is described in detail, as shown in figure 3, it is superfluous to provide a kind of circulation
Remaining verification accelerated method, in this way be applied to base station, be applied particularly to the MAC layer (i.e. media access control layer) in base station with
And it is illustrated for physical layer, comprising the following steps:
Step 301, the MAC layer in base station meets the data packet of MAC layer frame structure, same space-time according to communication protocol, building
It is issued to physical layer by devices such as PCIE or parallel ports by the position of corresponding cyclic redundancy check position out.
Specifically, in order to cooperate with FPGA (physical layer) with MAC, MAC layer is according to the time delay in communication protocol, transmission
The requirement such as rate and the bit error rate, selects the parameter of cyclic redundancy check, such as polynomial length, and the degree of parallelism of calculating is (single
The data length handled in clock cycle), building meets the data packet of mac frame structure, while vacating corresponding cyclic redundancy school
Test the position of position.
Step 302, the physical layer transmitting terminal in base station first solves the data packet that MAC layer issues according to communication protocol
Analysis.
The variable for needing to parse in step 302 respectively include: the frame head of MAC layer data packet and the frame of MAC layer data packet
Length;
Wherein, the frame head of MAC layer data packet indicate each MAC layer data packet initial position and each MAC layer data
The separation of packet;The frame length of MAC layer data packet indicates data length of each MAC layer data packet other than expense;
Such as: the frame head of MAC layer data packet can be indicated with 16 special bits, if with hexadecimal number
Word indicates frame head, then can indicate frame head with 0x4859;
The frame length of MAC layer data packet can be indicated with 12 bits, therefore frame length is up to 8192
Byte, if the expense of MAC layer data packet is fixed as 11 bytes (including frame head and other expenses), entire MAC layer number
Maximum length according to packet is 8203 bytes;
Physical layer transmitting terminal can be with according to the method that communication protocol calculates data packet cyclic redundancy check position in step 302
Are as follows:
1) data packet that MAC layer issues is cached, and detects the frame head and corresponding long data packet of MAC layer data packet
Degree;
In step 1), the frame head of MAC layer data packet and the information position of designation date packet length are all according to communication protocol
Determining.
Such as: in communication protocol provide frame head be 0x4859, physical layer detection all certain 16 successive bits position with
0x4859 is equal, then it is assumed that is herein the initial position of a MAC layer data packet.Communication protocol regulation simultaneously, since frame head
The 5th and the 6th byte instruction frame length, therefore physical layer can read current MAC layer data packet in corresponding position
Frame length.
2) in the frame head for detecting MAC layer data packet and after obtaining its data packet length, according to obtained circulation before
Data in caching are taken out on the basis of transmission rate according to the principle of first in first out, recycle superfluous by redundancy verification parameters
The calculating of remaining check bit, while by the data issued filling caching, the disengaging balance of data in caching is kept, is realized in MAC
The step by step calculation of cyclic redundancy check position is carried out while layer data packet issues;
3) judged whether to have handled current MAC layer data packet according to the length of MAC layer data packet, if so, executing step
It is rapid 4), it is no to then follow the steps 2);
In the step 3), the length of data packet will be determined according to frame length and MAC layer overhead data packet, and the latter is then
It is to be determined according to system communication protocol.
Such as: data packet indicates that frame length is 4000 bytes, and according to communication protocol, MAC layer overhead data packet is fixed
For 11 bytes, then physical layer just can determine that the data packet length is 4011 bytes, to judge whether to have handled current
MAC layer data packet.
4) cyclic redundancy check position is attached to data followed by transmission, executes step 5).
Step 303, physical layer receiving end calculates data packet cyclic redundancy check position according to communication protocol and is compared.
Specifically, the mistake that physical layer receiving end calculates data packet cyclic redundancy check position according to communication protocol and is compared
Journey may include:
5) data packet received from physical layer transmitting terminal is cached, and detects the frame head and phase of MAC layer data packet
The data packet length answered;
In step 5), the frame head of MAC layer data packet and the information position of designation date packet length are all according to communication protocol
Determining.
Such as: in communication protocol provide frame head be 0x4859, physical layer detection all certain 16 successive bits position with
0x4859 is equal, then it is assumed that is herein the initial position of a MAC layer data packet.Communication protocol regulation simultaneously, since frame head
The 5th and the 6th byte instruction frame length, therefore physical layer can read current MAC layer data packet in corresponding position
Frame length.
6) in the frame head for detecting MAC layer data packet and after obtaining its data packet length, according to obtained circulation before
Data in caching are taken out on the basis of transmission rate according to the principle of first in first out, recycle superfluous by redundancy verification parameters
The calculating of remaining check bit, while by the data issued filling caching, the disengaging balance of data in caching is kept, is realized in MAC
The step by step calculation of cyclic redundancy check position is carried out while layer data packet issues;
7) judged whether to have handled current MAC layer data packet according to the length of MAC layer data packet, if so, executing step
It is rapid 8), it is no to then follow the steps 6);
Wherein, in step 7), the length of data packet can according to the cyclic redundancy check bit length of addition, frame length and
MAC layer overhead data packet determines, and the latter is determined according to system communication protocol.Such as: data packet indicates frame length
For 4000 bytes, according to communication protocol, MAC layer overhead data packet is fixed as 11 bytes, then physical layer just can determine that this
Data packet length is 4011 bytes.Assuming that the cyclic redundancy check bit length of addition is 4 bytes, then required handle number
It should be 4007 bytes according to packet length, to judge whether to have handled current MAC layer data packet.
8) the resulting cyclic redundancy check position of contrast conting with whether receive obtained cyclic redundancy check position consistent, complete
Comparison result and data report.
The application MAC layer meets the data packet of mac frame structure according to communication protocol, building, and data packet is issued to object
Manage layer;Then, physical layer calculates the cyclic redundancy check position of data by the content of parsing MAC layer data packet in real time.
The function that MAC layer calculates cyclic redundancy check is sunk to physical layer and calculated by the application, utilizes physical layer logical resource abundant
The computation burden for mitigating MAC, reduces the computation complexity of MAC layer, is able to achieve to the real-time of the cyclic redundancy check position of data
It calculates;The application Rational choice cyclic redundancy check parameter, improve real-time that cyclic redundancy check position in data calculates and
Validity.
It should be understood that although each step in the flow chart of Fig. 1-3 is successively shown according to the instruction of arrow,
These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 1-3
Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps
Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively
It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately
It executes.
In one embodiment, as shown in figure 4, providing a kind of cyclic redundancy check acceleration implemented from physical layer angle
Device, comprising:
Transmitting terminal cyclic redundancy check module 410, for being solved to the MAC layer data packet from media access control layer
Analysis, obtains the first parsing information;MAC layer data packet is the data packet for meeting mac frame structure of media access control layer building;With
And it completes to calculate the CRC of MAC layer data packet based on the first parsing information, and be calculated for MAC layer data packet is additional through CRC
First circulation redundancy check bit, and by the MAC layer data packet of additional first circulation redundancy check bit be sent to physical layer receive
End;
Receiving end cyclic redundancy check module 420, the additional first circulation redundancy for being received to physical layer receiving end
The MAC layer data packet of check bit is parsed, and the second parsing information is obtained;And it is completed based on the second parsing information to additional first
The CRC of the MAC layer data packet of cyclic redundancy check position is calculated, and obtains second circulation redundancy check bit;And compare first circulation
Redundancy check bit and second circulation redundancy check bit, and data are completed according to the result of comparison and are reported.
It is above right that specific restriction about the cyclic redundancy check accelerator implemented from physical layer angle may refer to
In the restriction for the cyclic redundancy check accelerated method implemented from physical layer angle, details are not described herein.It is above-mentioned from physical layer angle
Modules in the cyclic redundancy check accelerator of implementation can come real fully or partially through software, hardware and combinations thereof
It is existing.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with software shape
Formula is stored in the memory in computer equipment, executes the corresponding operation of the above modules in order to which processor calls.
In one embodiment, as shown in figure 5, providing a kind of cyclic redundancy implemented from media access control layer angle
Verify accelerator, comprising:
MAC layer constructs data packet module 510, for constructing the MAC layer data packet for meeting mac frame structure;
MAC layer data transmission blocks 520, for MAC layer data packet to be handed down to physical layer transmitting terminal;
MAC layer data packet is used to indicate physical layer transmitting terminal for the MAC layer data packet of additional first circulation redundancy check bit
It is sent to physical layer receiving end;The MAC layer data packet of additional first circulation redundancy check bit is sent out by MAC layer data packet through physical layer
Sending end is added first circulation redundancy check bit and is obtained;First circulation redundancy check bit by MAC layer data packet, through physical layer transmitting terminal
CRC is completed based on the first parsing information to be calculated;First parsing information is parsed by MAC layer data packet through physical layer transmitting terminal
It arrives;
It is superfluous that the MAC layer data packet of additional first circulation redundancy check bit is used to indicate physical layer receiving end comparison second circulation
Remaining check bit and first circulation redundancy check bit, and data are completed according to the result of comparison and are reported;Second circulation redundancy check bit
By adding the MAC layer data packet of first circulation redundancy check bit, being completed based on CRC through physical layer receiving end by the second parsing information
It obtains;Second parsing information is parsed by the MAC layer data packet for adding first circulation redundancy check bit through physical layer receiving end
It arrives.
About the cyclic redundancy check accelerator implemented from MAC layer angle it is specific restriction may refer to above for
The restriction for the cyclic redundancy check accelerated method implemented from MAC layer angle, details are not described herein.It is above-mentioned to implement from MAC layer angle
Cyclic redundancy check accelerator in modules can be realized fully or partially through software, hardware and combinations thereof.On
Stating each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also store in a software form
In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, as shown in fig. 6, providing a kind of cyclic redundancy check acceleration dress implemented from base station angle
It sets, including MAC layer constructs data packet module 601, transmitting terminal cyclic redundancy check module 602, receiving end cyclic redundancy check mould
Block 603;
MAC layer constructs data packet module 601, and for MAC layer according to communication protocol, building meets the number of MAC layer frame structure
According to wrapping and be issued to physical layer;
Transmitting terminal cyclic redundancy check module 602, calculates for physical layer transmitting terminal and adds the circulation of MAC layer data packet
Redundancy check bit transmits it out;
Receiving end cyclic redundancy check module 603, calculates for physical layer receiving end and compares the circulation of MAC layer data packet
Redundancy check bit, completion comparison result and data report.
About the cyclic redundancy check accelerator implemented from base station angle it is specific restriction may refer to above for
The restriction for the cyclic redundancy check accelerated method implemented from base station angle, details are not described herein.It is above-mentioned from base station angle implement
Modules in cyclic redundancy check accelerator can be realized fully or partially through software, hardware and combinations thereof.It is above-mentioned
Each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be stored in a software form
In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of access network equipment is provided, access network equipment includes the FPGA of CPU and connection CPU;
CPU is used to execute the cyclic redundancy check accelerated method that any of the above-described is implemented from media access control layer angle
Step;
The step of FPGA is for executing any of the above-described from the cyclic redundancy check accelerated method that physical layer angle is implemented.
In a specific embodiment, access network equipment is base station;Base station includes macro base station, micro-base station, femto base station
And scytoblastema station.
In a specific embodiment, CPU connects FPGA by PCIe or parallel port.
Specifically, legacy system is to big data quantity as shown in fig. 7, the application can speed up the processing of MAC layer data packet
Requirement of real-time is high, and cpu logic processing load is high, low efficiency, and the time is long;And partial function is sunk in the application proposition;Specifically
Ground, MAC layer issue MAC packet to fpga chip, and fpga chip first identifies the separator in MAC packet, then according to the knot of MAC packet
Structure parses the length of MAC.After the length for obtaining the MAC packet, corresponding CRC operation is carried out to it.
It should be noted that MAC layer is located in superstructure CPU, FPGA belongs to the underlying services of CPU;The application proposes
It will be put into FPGA under MAC layer operation, realize that FPGA is cooperateed with MAC layer, understand the basis of the communication protocol of MAC layer in FPGA
On, the cyclic redundancy check of MAC layer is accelerated.It can be substantially reduced the calculating pressure of MAC layer, significantly improve cyclic redundancy
The real-time computing of check bit.
It will be understood by those skilled in the art that structure shown in Fig. 7, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
The step of method of any of the above-described is realized when machine program is executed by processor.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality
It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.