Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer; To combine the accompanying drawing in the embodiment of the invention below; Technical scheme in the embodiment of the invention is carried out clear, intactly description; Obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making all other embodiment that obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Referring to Fig. 1 a is the structural representation of the device of a kind of analyzing MAC-ehs PDU of providing of first embodiment of the invention; This device can be applicable in the receiving terminal of WCDMA, belongs to a device that is independent of outside the CPU that adds in the receiving terminal, is used for MAC-ehs PDU data are resolved; Generate the analysis result data of MAC-d PDU; Directly read the analysis result result data of MAC-d PDU for CPU, thereby reduce, improve the operating efficiency of receiving terminal the taking of cpu resource.This device comprises: acquisition module 11, parsing module 12 and memory module 13.
Acquisition module 11 is used to obtain MAC-ehs PDU.
Parsing module 12 is used for this MAC-ehs PDU is resolved to MAC-d PDU.
Memory module 13 is used for these MAC-d PDU data that storing and resolving goes out, and reads this analysis result data for CPU.
Wherein, Acquisition module 11 can be made up of a series of decoding unit; The data transaction that is used for the WCDMA receiving terminal is received is MAC-ehs PDU, and sends into parsing module 12 and carry out dissection process, and memory module 13 can be an analysis result buffer; Store M AC-d PDU data directly read use for CPU, and the hardware designs figure of the device of this analyzing MAC-ehs PDU of present embodiment is referring to shown in Fig. 1 b.
In the present embodiment, adopt the mode of parallel parsing, can improve the resolution speed of resolver, reduced delay.This parsing module 12 specifically is used for obtaining each code block of this MAC-ehs PDU, adopts the parallel mode of resolving of many code blocks, and this MAC-ehs PDU is resolved to MAC-d PDU; Memory module 13 specifically is used to adopt parallel mode of storing, and stores these MAC-dPDU data that this parsing module parses, and reads this analysis result data for CPU.
Through adopting the parsing that walks abreast of a plurality of code blocks with MAC-ehs PDU bag; Analysis result is adopted parallel storage; Make the dissection process of this device postpone to be merely the transmission delay of MAC-ehs PDU header field; This postpones usually less than 10 milliseconds, postpones to compare for a few tens of milliseconds with traditional CPU dissection process, has significantly saved the time.
Referring to Fig. 1 c is the data format sketch map of MAC-ehs PDU, and MAC-ehs PDU is made up of MAC-ehs head (packet header) and MAC-ehs payload (load).Whole M AC-ehs PDU is coding and decoding for ease, can be divided into the code block of one or more coding and decoding, shown in Fig. 1 c, MAC-ehs PDU is divided for X code block.
The parsing that can walk abreast to the MAC-ehs PDU that is divided into a plurality of code blocks of the device of present embodiment; And the data of each code block that will parse; Like Logic Channel Identifier (logic channel identify is hereinafter to be referred as LCH-ID), transmission sequence number (Transaction Serial Number is hereinafter to be referred as TSN), stream identification (Stream Identifier; Hereinafter to be referred as SI), Reordering PDU (data cell reorders) and follow-up Reordering service data unit (Service Data Unit; Hereinafter to be referred as SDU) etc. data splicing get up, store according to the pairing form of MAC-d PDU, make things convenient for CPU directly to read use.
Form according to the MAC-ehs PDU shown in Fig. 1 c can be known; The header field data of MAC-ehs PDU all leave in first code block, when resolving, and need be according to this header field information; Calculate corresponding source address and the destination address of Reording PDU in each code block; Wherein, source address is the position of Reording PDU correspondence in MAC-ehs payload, and destination address is the position of Reording PDU correspondence in the analysis result buffer memory.According to source address and destination address, just can MAC-ehs PDU be resolved to MAC-d PDU.
In conjunction with the form of above-mentioned MAC-ehs PDU, and the hardware designs figure of the device of the analyzing MAC-ehs PDU shown in Fig. 1 b, the data transaction that receiving terminal is received is MAC-ehs PDU, and resolves and obtain MAC-d PDU, and its operation principle is following:
Earlier will receive data transaction through a plurality of decoding units is MAC-ehs PDU; A plurality of decoding units adopt the mode of parallel conversion to change receiving data; Like the decoding unit one decoding unit 1 responsible data transaction that will receive the data start-up portion is the first code block data; Decoding unit 2-decoding unit x will receive the data that follow-up data in the data converts the 2nd code block-x code block respectively into, and the data of the 1st code block-x code block have just been formed the MAC-ehs PDU after the conversion.
Wherein, the first code block data are different from the data of other code blocks, and the header field data of MAC-ehs PDU all leave in first code block; Therefore; Data in first code block are resolved be different from other code blocks, shown in 1b among the figure, when resolving first code block; Need parse the header field data, and it is left in the header field register.
In addition, shown in 1b in scheming, the device of present embodiment is to resolve according to the mode of many code blocks; Need handle respectively data boundary in each code block and non-data boundary; Wherein, data boundary is a partial data adjacent in the adjacent code block, and this partial data need adopt the territory Boundary Register to carry out caching process; Non-data boundary is non-conterminous data in each code block, and this partial data can adopt payload territory ping-pong buffer to carry out caching process.MAC-d PDU after promptly obtaining resolving after resolution data in header field register, territory Boundary Register and the payload territory ping-pong buffer arranged, and it is stored in supplies CPU to read in the analysis result buffer memory.
Parsing operation principle by above-mentioned can know that this parsing module 12 comprises: the first code block resolution unit 12a is used for resolving first code block of this MAC-ehs PDU, and extracts the header field data in this first code block.
Address calculation 12b is used for the header field data according to this first code block, calculates source address and the destination address of the Reording PDU in other code blocks.
Arrangement units 12c; Be used for header field data according to this first code block; And source address and the destination address of the Reording PDU in other code blocks of calculating of address calculation 12b; Reording PDU in each code block is sent in the memory module 13, generate the payload data of MAC-d PDU.
Be depicted as the storage format of the analysis result in the analysis result buffer memory in the present embodiment referring to table 1.Wherein, rPDU is Reording PDU, and rPDU1 representes the Reording PDU in first code block, and rSDU is Reording SDU.According to the regulation of existing protocol, adopt following format analysis result, can make things convenient for CPU to read, move and operation such as splicing, make CPU can read analysis result fast.
Table 1
In the parsing module 12 of this device, can also comprise respectively: territory Boundary Register, the data that are used to store each code block boundary; And non-territory Boundary Register, the data that are used to store the non-boundary of each code block, non-territory Boundary Register can be payload territory ping-pong buffer.
Get by above-mentioned, in the present embodiment, owing to adopted independent device to parse; Can largely reduce the occupancy of CPU, the data professional with WCDMA are that 43.2Mbps is an example, in the prior art; The time that approximately takies CPU6% is carried out dissection process, and in the present embodiment, CPU only needs from buffer, to read analysis result; Approximately take the time of CPU about 1.5%, improved the operating efficiency of the receiving terminal of WCDMA.
Present embodiment carries out dissection process through the device of design special in the receiving terminal of WCDMA; Storing and resolving result directly reads for CPU; Can reduce the delay of dissection process, reduce the CPU usage of receiving terminal simultaneously, improve the operating efficiency of receiving terminal.
The structural representation of the receiving terminal that provides for second embodiment of the invention referring to Fig. 2, this receiving terminal comprises resolver 21 and CPU22.
Wherein, the 26S Proteasome Structure and Function of the device of the analyzing MAC-ehs PDU among this resolver 21 and first embodiment is identical, is used to obtain MAC-ehs PDU, and this MAC-ehs PDU is resolved to MAC-dPDU, and the storing and resolving result data;
This CPU22 is used for reading these analysis result data of these resolver 21 storages.
In the present embodiment, postpone for reducing dissection process, this resolver 21 comprises:
Acquisition module 11 is used to obtain MAC-ehs PDU;
Parsing module 12 is used for obtaining each code block of this MAC-ehs PDU, adopts the parallel mode of resolving of many code blocks, and this MAC-ehs PDU is resolved to MAC-d PDU;
Memory module 13 is used to adopt parallel mode of storing, and stores these MAC-d PDU data that this parsing module parses.
MAC-ehs PDU is made up of MAC-ehs head and MAC-ehs payload.Whole M AC-ehsPDU is coding and decoding for ease, can be divided into the code block of one or more coding and decoding.The parsing that can walk abreast to the MAC-ehs PDU that splits into a plurality of code blocks of the resolver of present embodiment, and the data splicing of each code block that will parse are stored according to the pairing form of MAC-d PDU, make things convenient for CPU directly to read use.
Form according to MAC-ehs PDU can be known; The header field data of MAC-ehs PDU all leave in first code block, when resolving, and need be according to this header field information; Calculate corresponding source address and the destination address of ReordingPDU in each code block; Wherein, source address is the position of Reording PDU correspondence in MAC-ehspayload, and destination address is the position of Reording PDU correspondence in the analysis result buffer memory.According to source address and destination address, just can MAC-ehs PDU be resolved to MAC-d PDU.
This parsing module 12 comprises the first code block resolution unit 12a, is used for resolving first code block of this MAC-ehs PDU, and extracts the header field data in this first code block;
Address calculation 12b is used for the header field data according to this first code block, calculates source address and the destination address of the Reording PDU in other code blocks.
Arrangement units 12c; Be used for header field data according to this first code block; And source address and the destination address of the Reording PDU in other code blocks of calculating of address calculation 12b; Reording PDU in each code block is sent in the memory module 13, generate the payload data of MAC-d PDU.
Need to prove,, after need handling respectively the data boundary in each code block and non-data boundary, arrange again and be stored in the analysis result buffer memory because the device of present embodiment is to resolve according to the mode of many code blocks.Wherein, Data boundary is a partial data adjacent in the adjacent code block; This partial data need adopt the territory Boundary Register to carry out caching process, and non-data boundary is non-conterminous data in each code block, and this partial data can adopt payload territory ping-pong buffer to carry out caching process.
Therefore, in the resolver 21 of this receiving terminal, also should comprise respectively: territory Boundary Register, the data that are used to store each code block boundary; And non-territory Boundary Register, the data that are used to store the non-boundary of each code block, non-territory Boundary Register can be payload territory ping-pong buffer.
The receiving terminal of present embodiment carries out dissection process through the device of design special in the receiving terminal of WCDMA; Storing and resolving result directly reads for CPU; Can reduce the delay of dissection process, reduce the CPU usage of receiving terminal simultaneously, improve the operating efficiency of receiving terminal.
The method flow diagram of the analyzing MAC-ehs PDU that provides for third embodiment of the invention referring to Fig. 3, the executive agent of present embodiment can be for being independent of a resolver outside the CPU in the WCDMA receiving terminal, and method may further comprise the steps:
Step 31, obtain MAC-ehs PDU.
In the present embodiment; Adopt the mode of parallel conversion to change to receiving data through a plurality of decoding units; Each decoding unit is to receiving the data that obtain a code block after data are changed, and a plurality of decoding units have just been formed MAC-ehs PDU to the data that receive a plurality of code blocks after the data transaction.
Step 32, this MAC-ehs PDU is resolved to MAC-d PDU.
When analyzing MAC-ehs PDU, also adopt parallel mode of resolving, this MAC-ehs PDU is resolved to MAC-d PDU.Promptly resolve a plurality of code blocks of MAC-ehs PDU are parallel, and the data splicing of each code block that will parse, store according to the pairing form of MAC-d PDU, make things convenient for CPU directly to read use.
Wherein, The first code block data are different from the data of other code blocks, and the header field data of MAC-ehs PDU all leave in first code block, therefore; Data in first code block are resolved be different from other code blocks; When resolving first code block, need parse the header field data, and it is left in the header field register.The method of resolving is specific as follows: resolve first code block among this MAC-ehs PDU, and extract the header field data in this first code block; According to the header field data in this first code block, calculate source address and the destination address of the ReordingPDU in other code blocks; According to the header field data in this first code block, and source address and the destination address of the Reording PDU in other code blocks of calculating of this address calculation, store the data that reorder in each code block, generate the payload data of MAC-d PDU.
In addition; Owing to be to resolve in the resolving, therefore need handle respectively, wherein data boundary in each code block and non-data boundary according to the parallel mode of many code blocks; Data boundary is a partial data adjacent in the adjacent code block; This partial data need adopt the territory Boundary Register to carry out caching process, and non-data boundary is non-conterminous data in each code block, and this partial data can adopt payload territory ping-pong buffer to carry out caching process.
Therefore, the data that reorder in each code block of storage when generating the payload data of MAC-d PDU, adopt following method: store the data of each code block boundary and the data of non-boundary respectively; According to the data of each code block boundary of this storage and the data of non-boundary, the data that reorder in each code block are arranged, generate the payload data of MAC-d PDU.The resolution data that is about in header field register, territory Boundary Register and the payload territory ping-pong buffer is arranged the payload data that the back generates MAC-d PDU.
These MAC-d PDU data that step 33, storing and resolving go out read these MAC-d PDU data that parse for CPU.
Owing to when analyzing MAC-ehs PDU, adopted the parallel mode of resolving of many code blocks; Can fast MAC-ehs PDU be resolved to MAC-d PDU thus; The MAC-d PDU data that adopt the mode storing and resolving of parallel storage to go out, the MAC-d PDU data that can make CPU directly read to parse.
Present embodiment is through adopting special-purpose device analyzing MAC-ehs PDU, and storing and resolving result directly reads for CPU, can reduce the delay of dissection process, reduces the CPU usage of receiving terminal simultaneously, has improved the operating efficiency of receiving terminal.
One of ordinary skill in the art will appreciate that: accompanying drawing is the sketch map of an embodiment, and module in the accompanying drawing or flow process might not be that embodiment of the present invention is necessary.
One of ordinary skill in the art will appreciate that: the module in the device among the embodiment can be described according to embodiment and be distributed in the device of embodiment, also can carry out respective change and be arranged in the one or more devices that are different from present embodiment.The module of the foregoing description can be merged into a module, also can further split into a plurality of submodules.
The invention described above embodiment sequence number is not represented the quality of embodiment just to description.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be accomplished through the relevant hardware of program command; Aforementioned program can be stored in the computer read/write memory medium; This program the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
What should explain at last is: above embodiment is only in order to explaining technical scheme of the present invention, but not to its restriction; Although with reference to previous embodiment the present invention has been carried out detailed explanation, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that previous embodiment is put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these are revised or replacement, do not make the spirit and the scope of the essence disengaging embodiment of the invention technical scheme of relevant art scheme.