CN100499632C - Method for improving code and decode treatment efficiency - Google Patents
Method for improving code and decode treatment efficiency Download PDFInfo
- Publication number
- CN100499632C CN100499632C CNB200410101319XA CN200410101319A CN100499632C CN 100499632 C CN100499632 C CN 100499632C CN B200410101319X A CNB200410101319X A CN B200410101319XA CN 200410101319 A CN200410101319 A CN 200410101319A CN 100499632 C CN100499632 C CN 100499632C
- Authority
- CN
- China
- Prior art keywords
- decoder
- encoder
- decoding
- volume
- buffer set
- 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
Links
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
The invention relates to a method to improve code-decode efficiency, which comprises: presetting a first buffer block between code/decode pre-process unit and coder-decoder and a second buffer block between coder-decoder and code/decode post-process unit; the said pre-process unit writes the data into empty buffer zone in the first block; the coder-decoder obtains data from nun-empty buffer zone of the first block for coding/decoding and send the treated data to the empty buffer zone in the second block; the said post-process unit obtains treated data from nun-empty buffer zone of the second block for coding/decoding. This invention can reduce time delay, improves system capacity, and brings device treatment performance into play.
Description
Technical field
The present invention relates to communication technical field, be specifically related to a kind of method that improves coding, decoding treatment effeciency.
Background technology
At present, coding and decoding are handled and occupied crucial status in the communications fields.In whole coding and decoding process, usually need through encoder/decoder pre-treatment, encoder/decoder and three treatment steps of encoder/decoder post processing.The encoder/decoder system that is made of encoder/decoder pretreatment unit, encoder/decoder and encoder/decoder post-processing unit is by interface externally is provided flexibly and be used widely in different communication process.
With the WCDMA system up decoding treatment process of baseband portion is example, as shown in Figure 1, this decoding system is by Digital Signal Processing (DSP, Digital Signal Processing) combines with programmable logic device (FPGA), perhaps by Digital Signal Processing (DSP, Digital Signal Processing) with application-specific IC (ASIC, Application Specific Integrated Circuit) mode that combines realizes, wherein DSP deciphers preceding data processing and the processing of deciphering the back data after finishing demodulation, FPGA or ASIC are used for realizing decoder, finish the decoding of Turbo code and Viterbi sign indicating number and handle.Between decoder and decoding pretreatment unit, have buffering area, be used for the data of finishing the decoding pre-treatment are carried out buffer memory, wait pending decoding; Equally, between decoder and decoding post-processing unit, have buffering area, be used for the data of finishing decoding are carried out buffer memory, wait pending decoding reprocessing.
In the prior art, take the WCDMA system up decoding treatment process of baseband portion as example, the mode that decoding is processed is DSP and the complete work in series of decoder.With reference to Fig. 1, the specific works method of this decoding system is: input decoding pretreatment unit after the data demodulates, the DSP data after to demodulation are deciphered pre-treatment; Decoding is after pre-treatment finishes, and data sent into buffer cell wait decoder and decipher processing; Decoder is sent into data the post processings to be decoded such as buffer cell after finishing the decoding processing; The decoding post-processing unit reads the rear data of decoding from buffering area, decipher post processing.By said method as can be known, process in the engineering in whole decoding, data are respectively through deciphering pretreatment unit, buffering area, decoder, buffering area, decoding post-processing unit.
The defective that this method is brought is: because decoding pretreatment unit, decoder and decoding post-processing unit are the work in series pattern, namely previous element finish process and data sent into buffering area after, a rear unit could obtain these data and proceed to process from buffering area, thereby, under this mode of operation, cause the processing time-delay in the decode procedure bigger, system's treatment effeciency is lower.In the decoding treatment system, DSP and decoder are two independent functional units, for raising system decoding treatment effeciency, shorten the processing time-delay in the decode procedure, on the basis of existing technology, usually disposal ability, the device processing speed with each cell processing device in the system improves, but owing to be subjected to the restriction of decoding process method in the prior art, each processing apparatus still often is in idle condition in whole decoding treatment process, and then can't give full play to the premium properties of device in decoding treatment process.
In sum, the disposal ability that simply improves device can not effectively solve above-mentioned technical problem, and has strengthened system cost.
Summary of the invention
The problem to be solved in the present invention provides a kind of method that improves coding or decoding treatment effeciency, and this method can effectively shorten the processing time-delay in the coding and decoding processing procedure, improves the efficient that volume/decoding is handled.
For solving the problems of the technologies described above, the invention provides a kind of method that improves volume/decoding treatment effeciency, be used to improve the treatment effeciency of the volume/decoding treatment system that is made of volume/decoding pretreatment unit, volume/decoder and volume/decoding post-processing unit, its concrete implementation method is:
Between encoder/decoder pretreatment unit and encoder/decoder, preset first buffer set, between encoder/decoder and encoder/decoder post-processing unit, preset second buffer set; In the encoder/decoder system work process, walk abreast and carry out following operation: the encoder/decoder pretreatment unit indicates the vacant buffering area that the data before the encoder/decoder is write respectively different priorities in first buffer set according to packet; Simultaneously, the data that encoder/decoder is chosen from the non-empty buffers of first buffer set in the high buffering area of priority are carried out encoder/decoder, and the data after the encoder/decoder are write the vacant buffering area that has respective priority in second buffer set; Simultaneously, the data chosen from the non-empty buffers of second buffer set in the high buffering area of priority of encoder/decoder post-processing unit are carried out the encoder/decoder post processing.
In the said method, before compiling/deciphering, to judge also whether vacant buffering area is arranged in second buffer set,, then postpone the processing of volume/decoder if there is not vacant buffering area; And after finishing, volume/decoding discharges the substep of the non-empty buffers of described first buffer set; After finishing, volume/decoding reprocessing discharges the substep of the non-empty buffers of described second buffer set.Before carrying out encoder/decoder, judge that whether the encoder/decoder resource is idle, if compiling/code device resource is occupied, then postpones the processing of encoder/decoder; And after finishing, the encoder/decoder of encoder/decoder discharges immediately the decoder resource.
First and second buffer set in the said method comprise at least two buffering areas.Described encoder/decoder is the encoder/decoder of topology code Turbo or the encoder/decoder of convolutional code.And use the method for semaphore to carry out in the present invention, will be of value to the treatment effeciency that improves volume/decoding system.
As can be seen from the above technical solutions, manage throughout among the present invention and preset a plurality of buffering areas between the unit, and in scheduling to buffer resource, make previous processing unit synchronous from the process that buffering area obtains data to a process and a back unit that buffering area writes data, and then volume/decoding pre-treatment, volume/decoding and volume/decoding reprocessing are carried out synchronously, thereby effectively reduced the Business Processing time delay, improved power system capacity; Simultaneously,, thereby reduced the free time of each device in the coding and decoding process, given full play to the handling property of device because the present invention has improved the parallel processing capability of each unit in the system.
Description of drawings
Fig. 1 is a prior art volume/decoding treatment process schematic diagram;
Fig. 2 is the method for the invention schematic diagram.
Embodiment
Because in the encoder/decoder system, encoder/decoder pretreatment unit, encoder/decoder and encoder/decoder post-processing unit are functional units independently, thereby emphasis of the present invention has been considered the use of buffering areas before and after the encoder/decoder and the communication mode between each functional unit.And then the core of the method for the invention has been to give full play to the parallel processing capability of each functional unit in volume/decoding system.
In order to make those skilled in the art person understand the present invention program better, the present invention is described in further detail by specific embodiment.
General encoder/decoder system comprises: the encoder/decoder pretreatment unit, and encoder/decoder and encoder/decoder post-processing unit, and usually between encoder/decoder pretreatment unit and the encoder/decoder, between encoder/decoder and the encoder/decoder post-processing unit buffering area is arranged.With reference to Fig. 2, in the present embodiment, between encoder/decoder pretreatment unit and encoder/decoder, preset first buffer set, between encoder/decoder and encoder/decoder post-processing unit, preset second buffer set.And first buffer set is made up of buffering area 11 and buffering area 12, and second buffer set is made up of buffering area 21 and buffering area 22.
The general handling process of encoder/decoder treatment system is: coding and decoding pretreatment unit receive data carries out the encoder/decoder pre-treatment, and the data that will process are sent into coding or decoding that buffer unit is waited for encoder/decoder, after encoder/decoder is finished, the data that encoder/decoder will be finished after coding or the decoding are delivered in the buffering area, wait for the processing of encoder/decoder post-processing unit.In the present invention, at first preset two above-mentioned buffer set, in carrying out the coding and decoding processing, followed following treatment mechanism:
In the process before coding and decoding, first buffer set adopts the mode of operation of pingpang handoff, namely after the encoder/decoder pre-treatment is finished, data is write buffering area 11, simultaneously coder such as obtains at the data of pending coding or decoding from buffering area 12, and carries out coding and decoding; In the buffering area 12 data be compiled a yard device obtain complete after, after namely coder was finished the encoder/decoder of data in this buffering area, buffering area 12 was set to null, and waited the data to be compiled/translated of new process encoder/decoder pre-treatment to be written; And the data in the buffering area 11 will be obtained by encoder/decoder and carry out the encoder/decoder processing.
In like manner, in the process after encoder/decoder, second buffer set also adopts the mode of operation of pingpang handoff, namely after encoder/decoder is finished, encoder/decoder writes buffering area 21 with data, the encoder/decoder post-processing unit obtains the data of finishing coding or decoding from buffering area 22 simultaneously, and carries out the encoder/decoder post processing; Data are finished the encoder/decoder post processing in the buffering area 22, and then buffering area 22 is set to null, and wait the data of process encoder/decoder newly to be written; And the encoder/decoder post-processing unit will obtain data and carry out the encoder/decoder post processing from buffering area 21.
In order to guarantee carrying out synchronously of above two processes, when the decoder preparation is deciphered the data in first buffer set, whether judge has vacant buffering area can offer volume/decoder in second buffer set, be used to write the data of finishing volume/decoding, if vacant buffering area is arranged in second buffer set, the coding or the decoding that then start volume/decoder are handled, otherwise delay coding or decoding are handled.
For above-mentioned handling process, be treated to example with row decoding on the WCDMA base band, designed three tasks in the specific embodiments of the invention, be specially: decoding task, decoding are interrupted, decoding post processing task.Decoding task and decoding reprocessing task are same priority, and in three tasks, the decoding priority of interrupt is the highest, and i.e. triggering decoding was interrupted after decoder was finished decoding.
To adopt below the form of pseudo-code to introduce between the handling process of each task and task and concern, in order should be readily appreciated that, to introduce earlier several basic concepts:
Task status: three kinds of task duration of existences generally have three kinds of states, that is: ready state, blocked state and running status.
Ready state: this task has satisfied service condition, has entered inactive queue of task, but also has the task of higher priority moving;
Blocked state: task does not satisfy service conditions;
Running status: task is carried out.
Switching between above-mentioned state adopts semaphore SEM to control, and uses semaphore SEM_Dec in the decoding task, and decoding post processing task is used semaphore SEM_AftDec.
The management of decoder: decoder is a kind of resource, adopts semaphore SEM_Dec to manage, and SEM_Dec is initialized as 1, the expression decoder can be used, and after starting decoding, SEM_Dec subtracts 1 and becomes 0, the expression decoder is occupied, and SEM_Dec adds 1 after decoding is complete, and the expression decoder can be used.
The management of ping-pong buffer: ping-pong buffer is a kind of resource, adopt a variable g_DecOutPingPongState to manage the occupancy of decoding back ping-pong buffers area resource, g_DecOutPingPongState is initialized as 2 and represents that table tennis is all available (as previously described in the ping-pong buffers, comprise two buffering areas in a buffer set in the present embodiment), g_DecOutPingPongState subtracts 1 in the decoding task, expression takies in the table tennis one, g_DecOutPingPongState adds 1 in the decoding reprocessing task, expression discharges in the table tennis one, and it is unavailable to represent to decipher the back ping-pong buffer when g_DecOutPingPongState is 0.Read pointer g_DecOutPingPongRFlg and write pointer g_DecOutPingPongWFlg are used in the read-write of ping-pong buffer after the decoding, the decoding task is safeguarded write pointer g_DecOutPingPongWFlg, decoding post processing task is safeguarded read pointer g_DecOutPingPongRFlg, g_DecOutPingPongRFlg and g_DecOutPingPongWFlg are initialized as table tennis, do switching in the running between table tennis.
Pseudo-code of the present invention is described and is specially:
1) decoding task
The decoding pre-treatment;
Data are imported ping-pong buffer before inserting decoding before the decoding;
Input ping-pong buffer table tennis switches before the decoding;
if(0==SEM_Dec)
{
The decoding task enters blocked state;
}
Decoder resource occupation SEM_Dec--;
The decoder for decoding parameter is prepared;
if(0==DecOutPingPongState)
{
The decoding task suspension enters ready state;
Decoding reprocessing mission-enabling enters running status;
}
Ping-pong buffer write pointer g_DecOutPingPongWFlg pingpang handoff after the decoding;
Ping-pong buffer takies g_DecOutPingPongState-1 after the decoding;
Start decoder and begin decoding;
2) decoding is interrupted
The decoder resource discharges SEM_Dec++;
Decoding post processing task signal amount discharges SEM_AftDec++;
3) decoding reprocessing task
if(0==SEM_AftDec)
{
Decoding reprocessing task enters blocked state;
}
SEM_AftDec--;
Buffer data after the decoding of deciphering back ping-pong buffer read pointer g_DecOutPingPongRFlg indication is handled;
Ping-pong buffer read pointer g_DecOutPingPongRFlg pingpang handoff after the decoding;
Decoding back ping-pong buffer discharges g_DecOutPingPongState+1;
The priority of decoding task and decoding post processing task is set to same height, discharges earlier decoder resource SEM_Dec among the processing of decoding interrupt task, can make the decoding task that more starter motor meeting is arranged.Because decoder and DSP are independent functional units, can carry out parallel processing, thereby in order to improve the parallel processing capability of functional unit, should give the more starter motor meeting of decoder; Simultaneously, utilize the policy in resource management of preamble introduction to retrain operational relation between task, guaranteed between decoding task and decoding reprocessing task synchronously, because show that when g_DecOutPingPongState is 0 decoding back ping-pong buffer is occupied fully, decoding reprocessing task has satisfied service conditions certainly, at this moment initiatively hang up the decoding task and activate decoding reprocessing task, exactly because this restriction relation, the difference that has guaranteed decoding task and decoding reprocessing task run number of times can not surpass 2 times, so just can be synchronously to the read-write of deciphering the back ping-pong buffer between task.
Below specifically introduced one embodiment of the present of invention, among the described embodiment, comprised two buffering areas in each buffer set,, before and after the decoding a plurality of buffering areas can be set respectively if enough cache resources are arranged; When number of buffer greater than 2 the time, change the way to manage of buffer resource, for example: the buffer blocks number is 3, then the buffering area seizure condition is initialized as 3, subtracts 1 and carry out buffering area and take in the decoding task, adds 1 and carry out buffering area and discharge in decoding reprocessing task, read-write pointer value is 0,1,2 order is switched, and can reach better parallel effect.
Under the situation of multiple buffer, except said sequence obtains the method for data in the buffering area, can also be at different service types, according to the needs of handling buffering area is divided, sign according to packet, the data that need carry out coding and decoding are earlier packed in the higher buffering area of priority, and when then each processing unit obtained data from buffering area, the data of preferentially obtaining in the higher buffering area of priority were handled.Above-mentioned varied about calling in the buffering area implementation of data, advantage is separately arranged, when realizing method of the present invention,, can choose appropriate method of calling to promote beneficial effect of the present invention according to concrete service needed.
More than the method for raising encoder/decoder treatment effeciency provided by the present invention is described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.
Claims (8)
1, a kind of method that improves the encoder/decoder treatment effeciency, the treatment effeciency for improving the encoder/decoder treatment system that is made of encoder/decoder pretreatment unit, encoder/decoder and encoder/decoder post-processing unit is characterized in that:
1) between volume/decoding pretreatment unit and volume/decoder, presets first buffer set, between volume/decoder and volume/decoding post-processing unit, preset second buffer set;
In the encoder/decoder system work process, walk abreast and carry out following operation:
21) the encoder/decoder pretreatment unit indicates the vacant buffering area that the data before the encoder/decoder is write respectively different priorities in first buffer set according to packet;
22) simultaneously, the data that encoder/decoder is chosen from the non-empty buffers of first buffer set in the high buffering area of priority are carried out encoder/decoder, and the data after the encoder/decoder are write the vacant buffering area that has respective priority in second buffer set;
23) simultaneously, the data chosen from the non-empty buffers of second buffer set in the high buffering area of priority of encoder/decoder post-processing unit are carried out the encoder/decoder post processing.
2, the method for raising encoder/decoder treatment effeciency as claimed in claim 1 is characterized in that, the operation 22) in before described encoder/decoder is carried out encoder/decoder, also comprise:
Whether judge has vacant buffering area in second buffer set, if the processing of then carrying out encoder/decoder is arranged, otherwise the processing of delay encoder/decoder.
3, the method for raising volume/decoding treatment effeciency as claimed in claim 2 is characterized in that:
Operation 22) after finishing encoder/decoder in, discharges the non-empty buffers of described first buffer set;
Operation 23) finishes the encoder/decoder post processing in, discharge the non-empty buffers of described second buffer set.
4, the method for raising volume/decoding treatment effeciency as claimed in claim 1 or 2 is characterized in that:
Operation 22) before carrying out encoder/decoder, described encoder/decoder also comprises in: judge that the encoder/decoder resource is whether idle, if idle then carry out the processing of encoder/decoder, otherwise the processing of delay encoder/decoder; And, release encoder/decoder resource after encoder/decoder is finished.
5, the method for raising volume/decoding treatment effeciency as claimed in claim 1 is characterized in that: in the parallel operation of carrying out, adopt the method for semaphore that buffering area and decoder resource are managed.
6, the method for raising encoder/decoder treatment effeciency as claimed in claim 1 is characterized in that: described encoder/decoder is the encoder/decoder of topology code Turbo.
7, the method for raising volume/decoding treatment effeciency as claimed in claim 1 is characterized in that: described volume/decoder is the volume/decoder of convolution code.
8, the method for raising volume/decoding treatment effeciency as claimed in claim 1 is characterized in that: comprise two buffering areas in described first and second buffer set respectively.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB200410101319XA CN100499632C (en) | 2004-12-17 | 2004-12-17 | Method for improving code and decode treatment efficiency |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB200410101319XA CN100499632C (en) | 2004-12-17 | 2004-12-17 | Method for improving code and decode treatment efficiency |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1791089A CN1791089A (en) | 2006-06-21 |
CN100499632C true CN100499632C (en) | 2009-06-10 |
Family
ID=36788588
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB200410101319XA Expired - Fee Related CN100499632C (en) | 2004-12-17 | 2004-12-17 | Method for improving code and decode treatment efficiency |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100499632C (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102208961A (en) * | 2011-05-17 | 2011-10-05 | 中国电子科技集团公司第十研究所 | Low-delay R-S coder/decoder realization method applicable to CCSDS (Consultative Committee for Space Data Systems) standard |
CN105589820B (en) * | 2015-12-22 | 2019-01-15 | 中国科学院微电子研究所 | Data transmission buffer device |
CN113472478B (en) * | 2020-03-31 | 2023-12-12 | 广州海格通信集团股份有限公司 | Decoding front-end processing method, decoding front-end processing device, computer equipment and storage medium |
-
2004
- 2004-12-17 CN CNB200410101319XA patent/CN100499632C/en not_active Expired - Fee Related
Non-Patent Citations (4)
Title |
---|
中频软件无线电接收机中信号传输和处理技术. 陆迎光,仇润鹤,孙晓靖.电子技术,第11期. 2003 |
中频软件无线电接收机中信号传输和处理技术. 陆迎光,仇润鹤,孙晓靖.电子技术,第11期. 2003 * |
持续高速数据采集与过程控制并行工作的单机系统设计. 吴越,林支付,葛霁光.化工自动化及仪表,第23卷第5期. 1996 |
持续高速数据采集与过程控制并行工作的单机系统设计. 吴越,林支付,葛霁光.化工自动化及仪表,第23卷第5期. 1996 * |
Also Published As
Publication number | Publication date |
---|---|
CN1791089A (en) | 2006-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101882089B (en) | Method for processing business conversational application with multi-thread and device thereof | |
CN105337896A (en) | Message processing method and device | |
CN101051280A (en) | Intelligent card embedded operation system and its control method | |
CN102779075A (en) | Method, device and system for scheduling in multiprocessor nuclear system | |
CN100347676C (en) | PowerPC processor based vehicular operating system interrupt management method | |
CN1856148A (en) | Management of business processing resourse in communication system | |
CN1496636A (en) | Method and apparatus for data rate control in communication system | |
CN1940858A (en) | Multi-task realization of media player | |
CN102868635A (en) | Multi-core and multi-thread method and system for preserving order of messages | |
CN102301664A (en) | Method and device for dispatching streams of multicore processor | |
CN100499632C (en) | Method for improving code and decode treatment efficiency | |
CN1478346A (en) | Intercommunication preprocessor | |
CN102255687A (en) | Rate matching method and device thereof | |
CN101567873A (en) | Multitask Parallel processing method and multitask parallel processing system | |
CN103176855A (en) | Message exchange handling method and device | |
CN102090101A (en) | Process for selection of resources to be released in case of an overload in a cellular land mobile system | |
CN102004665B (en) | Task concurrent processing method in workflow system | |
CN103297992A (en) | Achievement system of high-level protocol stack in LTE terminal tester based on TTCN-3 | |
US20110117871A1 (en) | Method and system for processing radio packages in a multimode software defined radio (sdr) terminal | |
CN111600681A (en) | Downlink bit level processing method based on FPGA hardware acceleration | |
CN1349362A (en) | Multiple carrier task processing method in GSM wideband base station | |
CN103227690B (en) | Coding/decoding method, decoder device and electronic equipment | |
CN1822594B (en) | Multi-media application processing method and device based on digital baseband processor | |
CN101478782B (en) | Method and apparatus for hybrid automatic repeat request and channel decoding | |
CN101674159A (en) | Rate de-matching method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090610 Termination date: 20201217 |