CN103546232A - Data processing method and device - Google Patents
Data processing method and device Download PDFInfo
- Publication number
- CN103546232A CN103546232A CN201210239061.4A CN201210239061A CN103546232A CN 103546232 A CN103546232 A CN 103546232A CN 201210239061 A CN201210239061 A CN 201210239061A CN 103546232 A CN103546232 A CN 103546232A
- Authority
- CN
- China
- Prior art keywords
- data
- interleaving
- processed
- row
- sequence
- 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.)
- Pending
Links
Images
Landscapes
- Error Detection And Correction (AREA)
Abstract
Description
技术领域 technical field
本发明涉及通信领域,具体而言,涉及一种数据的处理方法及装置。The present invention relates to the communication field, in particular, to a data processing method and device.
背景技术 Background technique
在无线通讯领域中,由于通讯信道质量的不稳定,导致传输的误码率比较高,为了减小误码率,我们需要一个可以自动纠错的编码方法,在译码过程中,能正确地恢复出传输数据。而TURBO编码就是一个很好的编码方式,能很好的在译码阶段对接收数据进行修复处理。In the field of wireless communication, due to the unstable quality of the communication channel, the bit error rate of transmission is relatively high. In order to reduce the bit error rate, we need a coding method that can automatically correct errors. During the decoding process, it can correctly Restore the transferred data. The TURBO encoding is a very good encoding method, which can repair the received data in the decoding stage very well.
3GPP TS 25.212协议介绍了TURBO的编码方式,具体结构如图1所示,整体TURBO编码主要由两个一样的编码运算单元,及其一个交织器构成,编码速率是1/3,也就是每接收1比特数据,编码出3比特的数据。我们查看编码运算单元:The 3GPP TS 25.212 protocol introduces the TURBO coding method. The specific structure is shown in Figure 1. The overall TURBO coding is mainly composed of two identical coding operation units and an interleaver. The coding rate is 1/3, that is, every received 1-bit data, encoded into 3-bit data. Let's look at the encoding operation unit:
Y(i)=(x(i)+(d2+d3)+d1)+d3;Y(i)=(x(i)+(d2+d3)+d1)+d3;
d1`=x(i)+(d2+d3);d1`=x(i)+(d2+d3);
d2`=d1;d2`=d1;
d3`=d2;d3`=d2;
其中,Y为编码后比特,X为输入数据,d1,d2,d3为编码器中状态比特,d1`,d2`,d3`为编完一比特输入数据后,更新的编码器状态比特。其中状态比特跟编码器的初始状态,及其已经处理的输入值有关。因此根据此编码器的结构,最多每个时钟周期只能处理一个待编码数据。Among them, Y is the encoded bit, X is the input data, d1, d2, d3 are the status bits in the encoder, d1`, d2`, d3` are the updated encoder status bits after encoding one bit of input data. Among them, the state bit is related to the initial state of the encoder and its processed input value. Therefore, according to the structure of this encoder, at most each clock cycle can only process one data to be encoded.
随着无线网络的不断普及和完善,无线业务蓬勃发展,一些新技术的出现,比如MIMO多天线技术,64QAM高阶调制技术等,对于无线传输的编码性能要求也在不断的提高,对于编码器的处理能力也要求越来越高。当前的TURBO编码方式受限于时钟频率,性能提升的空间很有限。特别是在干扰抵消系统领域内,在十分有限的一段时间内,需要对大量的用户,大量的数据进行重新编码,编码的性能要求比移动终端要高上2个数量级,对编码器的性能提出更高的要求。然而,相关技术需对数据输出侧需做大量运算,面对较多数据时,其数据的处理能力较低,其处理速度已经无法满足要求。在对数据进行处理时,由于待处理数据的比特相关性较强,一次只能对一个比特的数据进行处理。With the continuous popularization and improvement of wireless networks, wireless services are booming, and some new technologies appear, such as MIMO multi-antenna technology, 64QAM high-order modulation technology, etc., and the coding performance requirements for wireless transmission are also constantly improving. For encoders The processing power is also required to be higher and higher. The current TURBO encoding method is limited by the clock frequency, and the room for performance improvement is very limited. Especially in the field of interference cancellation systems, a large number of users and a large amount of data need to be re-encoded within a very limited period of time, and the performance requirements for encoding are two orders of magnitude higher than those for mobile terminals. higher requirement. However, related technologies need to do a lot of calculations on the data output side. When faced with a lot of data, the data processing capability is low, and the processing speed can no longer meet the requirements. When processing data, only one bit of data can be processed at a time due to the strong bit correlation of the data to be processed.
发明内容Contents of the invention
本发明提供了一种数据的处理方法及装置,以至少解决相关技术对数据进行编码时,需对数据输出侧需做大量运算,面对较多数据时,其数据的处理能力较低,其处理速度已经无法满足要求的问题。The present invention provides a data processing method and device to at least solve the problem that when coding data in related technologies, a large number of calculations need to be done on the data output side. Processing speed has been unable to meet the requirements of the problem.
根据本发明的一个方面,提供了一种数据的处理方法,包括:将待处理数据按预定序列进行交织写入,其中,所述预订序列是将输出数据行顺序作为输入行顺序进行设置;将交织写入后的待处理数据和所述待处理数据分别按预定TURBO编码方式进行编码。According to one aspect of the present invention, a data processing method is provided, including: interleaving and writing the data to be processed according to a predetermined sequence, wherein the predetermined sequence is to set the sequence of output data rows as the sequence of input rows; The data to be processed after the interleaving and writing and the data to be processed are respectively coded in a predetermined TURBO coding manner.
优选地,将待处理数据按预定序列进行交织写入之后,还包括:将所述待处理数据及交织写入后的待处理数据存储在输入数据缓冲空间。Preferably, after interleaving and writing the data to be processed in a predetermined sequence, the method further includes: storing the data to be processed and the data to be processed after interleaving and writing in the input data buffer space.
优选地,将所述待处理数据及交织写入后的待处理数据存储在输入数据缓冲空间包括:获取行间交织地址及行内列交织地址;根据行间交织地址将交织写入后的待编码数据按行间交织顺序存入所述输入数据缓冲空间;根据行内列交织地址将交织写入后的待编码数据按行内列交织顺序存入所述输入数据缓冲空间。Preferably, storing the data to be processed and the data to be processed after interleaving and writing in the input data buffer space includes: obtaining inter-row interleaving addresses and intra-row column interleaving addresses; The data is stored in the input data buffer space in the order of interleaving between rows; the data to be encoded after interleaving and written is stored in the input data buffer space in the order of interleaving in rows and columns according to the interleaving address in the rows.
优选地,获取行间交织地址及行内列交织地址包括:按照所述待处理数据的比特数大小确定交织矩阵;根据所述预订序列确定所述交织矩阵的行间交织地址;根据素数序列及所述预订序列确定所述交织矩阵的行内列地址。Preferably, obtaining the inter-row interleaving address and the intra-row column interleaving address includes: determining the interleaving matrix according to the bit size of the data to be processed; determining the inter-row interleaving address of the interleaving matrix according to the predetermined sequence; according to the prime number sequence and the The reservation sequence determines the column address in the row of the interleaving matrix.
优选地,将交织写入后的待处理数据和所述待处理数据分别按预定TURBO编码方式进行编码包括:根据所述行间交织地址对输入数据缓冲空间进行访问,得到待处理数据;根据所述行内列交织地址对所述输入数据缓冲空间进行访问,得到交织写入后的待处理数据;将所述顺序分支数据与所述交织分支数据分别按照预定TURBO编码方式进行编码运算,其中,所述预定TURBO编码方式为多比特并行处理。Preferably, encoding the interleaved and written data to be processed and the data to be processed respectively according to a predetermined TURBO encoding method includes: accessing the input data buffer space according to the inter-row interleaving address to obtain the data to be processed; The interleaving address in the row accesses the input data buffer space to obtain the data to be processed after interleaving and writing; the sequential branch data and the interleaved branch data are respectively encoded according to a predetermined TURBO encoding method, wherein the The predetermined TURBO encoding method is multi-bit parallel processing.
优选地,预定TURBO编码方式包括:按照预设处理位宽输入相应个数的比特数据;将当前比特数据之前的所有一个或多个比特数据加入至当前处理的比特数据中进行处理,得到当前比特数据的运算结果;将并行处理的多个当前比特数据的运算结果输出。Preferably, the predetermined TURBO encoding method includes: inputting a corresponding number of bit data according to the preset processing bit width; adding all one or more bit data before the current bit data to the currently processed bit data for processing to obtain the current bit data Data operation results; output the operation results of multiple current bit data processed in parallel.
优选地,得到当前比特数据的运算结果之后,还包括:更新编码器状态。Preferably, after obtaining the operation result of the current bit data, the method further includes: updating the state of the encoder.
优选地,将交织写入后的待处理数据和所述待处理数据分别按预定TURBO编码方式进行编码之后,还包括:将按预定TURBO编码方式进行编码运算后的数据分别进行存储。Preferably, after encoding the interleaved and written data to be processed and the data to be processed respectively according to a predetermined TURBO coding method, the method further includes: separately storing the data encoded and calculated according to a predetermined TURBO coding method.
根据本发明的另一方面,提供了一种数据的处理装置,包括:交织模块,用于将待处理数据按预定序列进行交织写入,其中,所述预订序列是将输出数据行顺序作为输入行顺序进行设置;编码模块,用于将交织写入后的待处理数据和所述待处理数据分别按预定TURBO编码方式进行编码。According to another aspect of the present invention, a data processing device is provided, including: an interleaving module, configured to interleave and write the data to be processed according to a predetermined sequence, wherein the predetermined sequence takes the sequence of output data rows as input The sequence of rows is set; the encoding module is used to encode the data to be processed and the data to be processed after interleaving and writing respectively according to a predetermined TURBO encoding method.
优选地,所述装置还包括:第一存储模块,用于将所述待处理数据及交织写入后的待处理数据存储在输入数据缓冲空间。Preferably, the device further includes: a first storage module, configured to store the data to be processed and the data to be processed after interleaving and writing in the input data buffer space.
优选地,所述第一存储模块包括:获取单元,用于获取行间交织地址及行内列交织地址;第一存储单元,用于根据行间交织地址将交织写入后的待编码数据按行间交织顺序存入所述输入数据缓冲空间;第二存储单元,用于根据行内列交织地址将交织写入后的待编码数据按行内列交织顺序存入所述输入数据缓冲空间。Preferably, the first storage module includes: an acquisition unit, configured to acquire an inter-row interleave address and an intra-row column interleave address; a first storage unit, configured to write interleaved data to be coded by row according to the inter-row interleave address The interleaving sequence is stored in the input data buffer space; the second storage unit is used to store the data to be encoded after interleaving and writing into the input data buffer space according to the in-row column interleaving order according to the in-row column interleaving address.
优选地,所述获取单元按照以下方式获取行间交织地址及行内列交织地址:按照所述待处理数据的比特数大小确定交织矩阵;根据所述预订序列确定所述交织矩阵的行间交织地址;根据素数序列及所述预订序列确定所述交织矩阵的行内列地址。Preferably, the obtaining unit obtains the inter-row interleaving address and the intra-row column interleaving address in the following manner: determine the interleaving matrix according to the bit number of the data to be processed; determine the inter-row interleaving address of the interleaving matrix according to the predetermined sequence ; Determine the in-row column address of the interleaving matrix according to the prime number sequence and the predetermined sequence.
优选地,所述编码模块包括:第一访问单元,用于根据所述行间交织地址对输入数据缓冲空间进行访问,得到待处理数据;第二访问单元,用于根据所述行内列交织地址对所述输入数据缓冲空间进行访问,得到交织写入后的待处理数据;编码运算单元,用于将所述顺序分支数据与所述交织分支数据分别按照预定TURBO编码方式进行编码运算,其中,所述预定TURBO编码方式为多比特并行处理。Preferably, the encoding module includes: a first access unit, configured to access the input data buffer space according to the inter-row interleaving address to obtain data to be processed; a second access unit, configured to access the interleaving address within the row Accessing the input data buffer space to obtain data to be processed after interleaving and writing; an encoding operation unit for encoding and calculating the sequential branch data and the interleaved branch data according to a predetermined TURBO encoding method, wherein, The predetermined TURBO encoding method is multi-bit parallel processing.
优选地,所述编码运算单元包括:输入子单元,用于按照预设处理位宽输入相应个数的比特数据;编码运算子单元,用于将当前比特数据之前的所有一个或多个比特数据加入至当前处理的比特数据中进行处理,得到当前比特数据的运算结果;输出子单元,用于将并行处理的多个当前比特数据的运算结果输出。Preferably, the encoding operation unit includes: an input subunit for inputting a corresponding number of bit data according to a preset processing bit width; an encoding operation subunit for converting all one or more bit data before the current bit data It is added to the currently processed bit data for processing to obtain the operation result of the current bit data; the output subunit is used to output the operation results of multiple current bit data processed in parallel.
优选地,所述编码运算单元还包括:更新子单元,用于更新编码器状态。Preferably, the encoding operation unit further includes: an update subunit, configured to update the state of the encoder.
优选地,所述装置还包括:第二存储模块,用于将通过所述TURBO编码单元进行编码运算的数据分别进行存储。Preferably, the device further includes: a second storage module, configured to separately store the data encoded by the TURBO encoding unit.
本发明采用了如下方法:将待处理的数据按照预定序列进行交织写入,预定序列是按照输出数据行顺序作为输入行顺序进行设置的,通过将数据按照输出行顺序输入的方法,减少了数据输出侧的大量运算,将输出的计算减轻,并将数据按预定的TURBO编码方式进行编码,进一步降低输出侧的运算。通过运用本发明,解决了对数据进行编码时,需对数据输出侧需做大量运算,面对较多数据时,其数据的处理能力较低,其处理速度已经无法满足要求的问题,进而减少了输出侧的运算,提升了系统的处理能力。The present invention adopts the following method: the data to be processed is interleaved and written according to a predetermined sequence, and the predetermined sequence is set according to the sequence of output data rows as the sequence of input rows, and the method of inputting data according to the sequence of output rows reduces data A large number of calculations on the output side reduce the calculation of the output, and encode the data according to the predetermined TURBO encoding method, further reducing the calculation on the output side. By using the present invention, when encoding data, a large number of calculations need to be done on the data output side. When faced with more data, the data processing capability is low, and the processing speed can no longer meet the requirements, thereby reducing The operation on the output side is simplified, and the processing capability of the system is improved.
附图说明 Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of the application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention. In the attached picture:
图1是根据相关技术的TURBO的编码方式的结构示意图;FIG. 1 is a schematic structural diagram of a TURBO encoding method according to the related art;
图2是根据本发明实施例的数据的处理方法的流程图;Fig. 2 is a flowchart of a data processing method according to an embodiment of the present invention;
图3是根据本发明实施例的数据的处理装置的结构框图一;Fig. 3 is a structural block diagram 1 of a data processing device according to an embodiment of the present invention;
图4是根据本发明实施例的数据的处理装置的结构框图二;FIG. 4 is a second structural block diagram of a data processing device according to an embodiment of the present invention;
图5是根据本发明实施例的数据的处理装置的结构框图三;Fig. 5 is a structural block diagram three of a data processing device according to an embodiment of the present invention;
图6是根据本发明实施例的数据的处理装置的结构框图四;FIG. 6 is a fourth structural block diagram of a data processing device according to an embodiment of the present invention;
图7是根据本发明实施例的数据的处理装置的结构框图五;Fig. 7 is a structural block diagram five of a data processing device according to an embodiment of the present invention;
图8是根据本发明实施例的数据的处理装置的结构框图六;FIG. 8 is a sixth structural block diagram of a data processing device according to an embodiment of the present invention;
图9是根据本发明优选实施例一的数据的处理方法的流程图;FIG. 9 is a flowchart of a data processing method according to a preferred embodiment 1 of the present invention;
图10是根据本发明优选实施例一的TURBO编码装置的结构示意图;FIG. 10 is a schematic structural diagram of a TURBO encoding device according to a preferred embodiment 1 of the present invention;
图11是根据相关技术的数据输入示意图;Fig. 11 is a schematic diagram of data input according to related technologies;
图12是根据本发明优选实施例一的数据输入示意图;Fig. 12 is a schematic diagram of data input according to the preferred embodiment 1 of the present invention;
图13是根据本发明优选实施例一的数据存储与提取的示意图;Fig. 13 is a schematic diagram of data storage and extraction according to the preferred embodiment 1 of the present invention;
图14是根据本发明优选实施例一的TURBO编码运算单元的结构示意图;Fig. 14 is a schematic structural diagram of a TURBO encoding operation unit according to a preferred embodiment 1 of the present invention;
图15是根据本发明优选实施例二的数据的处理方法的流程图。Fig. 15 is a flowchart of a data processing method according to the second preferred embodiment of the present invention.
具体实施方式 Detailed ways
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the drawings and examples. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
基于相关技术对数据进行编码时,需对数据输出侧需做大量运算,面对较多数据时,其数据的处理能力较低,其处理速度已经无法满足要求的问题,本发明实施例提供了一种数据的处理方法,该方法的流程如图2所示,包括步骤S202至步骤S204:When encoding data based on related technologies, a large number of calculations need to be done on the data output side. When faced with a lot of data, the data processing capability is low, and the processing speed can no longer meet the requirements. The embodiment of the present invention provides A data processing method, the flow of the method is shown in Figure 2, including steps S202 to S204:
步骤S202,将待处理数据按预定序列进行交织写入,其中,预订序列是将输出数据行顺序作为输入行顺序进行设置;Step S202, interleaving and writing the data to be processed according to a predetermined sequence, wherein the predetermined sequence is to set the sequence of output data rows as the sequence of input rows;
步骤S204,将交织写入后的待处理数据和待处理数据分别按预定TURBO编码方式进行编码。In step S204, the data to be processed and the data to be processed after interleaving and writing are respectively coded according to a predetermined TURBO coding method.
本发明实施例采用了如下方法:将待处理的数据按照预定序列进行交织写入,预定序列是按照输出数据行顺序作为输入行顺序进行设置的,通过将数据按照输出行顺序输入的方法,减少了数据输出侧的大量运算,将输出的计算减轻,并将数据按预定的TURBO编码方式进行编码,进一步降低输出侧的运算。通过运用本实施例,解决了对数据进行编码时,需对数据输出侧需做大量运算,面对较多数据时,其数据的处理能力较低,其处理速度已经无法满足要求的问题,进而减少了输出侧的运算,提升了系统的处理能力。The embodiment of the present invention adopts the following method: the data to be processed is interleaved and written according to a predetermined sequence, and the predetermined sequence is set according to the sequence of the output data rows as the sequence of the input rows, and by inputting the data according to the sequence of the output rows, reducing It eliminates a large number of calculations on the data output side, reduces the calculation of the output, and encodes the data according to the predetermined TURBO encoding method, further reducing the calculation on the output side. By using this embodiment, when encoding data, a large number of calculations need to be done on the data output side. When faced with more data, the data processing capability is low, and the processing speed can no longer meet the requirements. Further, The operation on the output side is reduced, and the processing capability of the system is improved.
在实施过程中,将待处理数据按照预定序列进行交织写入时,其预定序列设置为T序列,在实施过程中,T序列是按照将输出数据行顺序作为输入行顺序进行生成的,例如,T序列可以为<4,3,2,1,0>或<9,8,7,6,5,4,3,2,1,0>等,其中,<4,3,2,1,0>表示T序列的输入为5行,<9,8,7,6,5,4,3,2,1,0>表示T序列的输入为10行。During the implementation process, when the data to be processed is interleaved and written according to the predetermined sequence, the predetermined sequence is set as a T sequence. During the implementation process, the T sequence is generated according to the sequence of the output data rows as the sequence of the input rows, for example, T sequence can be <4, 3, 2, 1, 0> or <9, 8, 7, 6, 5, 4, 3, 2, 1, 0>, etc., among them, <4, 3, 2, 1, 0> indicates that the input of T sequence is 5 lines, and <9, 8, 7, 6, 5, 4, 3, 2, 1, 0> indicates that the input of T sequence is 10 lines.
将待处理数据按预定序列进行交织写入之后,还可以将待处理数据及交织写入后的待处理数据存储在输入数据缓冲空间。在实施过程中,可以分为以下处理步骤:After interleaving and writing the data to be processed according to a predetermined sequence, the data to be processed and the data to be processed after interleaving and writing may also be stored in the input data buffer space. In the implementation process, it can be divided into the following processing steps:
(1)获取行间交织地址及行内列交织地址;(1) Obtain inter-row interleaving address and intra-row column interleaving address;
(2)根据行间交织地址将交织写入后的待编码数据按行间交织顺序存入输入数据缓冲空间;(2) According to the address of interleaving between lines, the data to be encoded after interleaving is stored in the input data buffer space in the order of interleaving between lines;
(3)根据行内列交织地址将交织写入后的待编码数据按行内列交织顺序存入输入数据缓冲空间。(3) According to the intra-row and column interleaving addresses, the data to be encoded after interleaving and writing is stored in the input data buffer space in the order of in-row and column interleaving.
在获取行间交织地址及行内列交织地址时,可以按照待处理数据的比特数大小确定交织矩阵,如果待处理数据的比特数较大,则交织矩阵的输入行可以较多,例如20行,如果待处理数据的比特数较小,则交织矩阵的输入行可以较少,例如5行;根据预订序列确定交织矩阵的行间交织地址;根据素数序列及预订序列确定交织矩阵的行内列地址。When obtaining the interleaving address between rows and the column interleaving address in a row, the interleaving matrix can be determined according to the bit number of the data to be processed. If the number of bits of the data to be processed is large, the input rows of the interleaving matrix can be more, such as 20 rows, If the number of bits of the data to be processed is small, the input rows of the interleaving matrix can be less, for example, 5 rows; the inter-row interleaving address of the interleaving matrix is determined according to the predetermined sequence; the intra-row column address of the interleaving matrix is determined according to the prime number sequence and the predetermined sequence.
根据行间交织地址及行内列交织地址进行数据的存储,可以将行与列分开处理存储,把复杂的2维操作分解为2个独立的1维操作,使用存储的复杂度呈几何级别的降低。Data is stored according to the interleaved address between rows and the interleaved address within a row. The rows and columns can be processed and stored separately, and complex 2-dimensional operations can be decomposed into two independent 1-dimensional operations. The complexity of using storage is reduced geometrically. .
将交织写入后的待处理数据和待处理数据分别按预定TURBO编码方式进行编码的过程可以包括:根据行间交织地址对输入数据缓冲空间进行访问,得到待处理数据;根据行内列交织地址对输入数据缓冲空间进行访问,得到交织写入后的待处理数据;将顺序分支数据与交织分支数据分别按照预定TURBO编码方式进行编码运算,其中,预定TURBO编码方式为多比特并行处理。The process of encoding the data to be processed and the data to be processed after interleaving and writing according to a predetermined TURBO encoding method may include: accessing the input data buffer space according to the interleaving address between rows to obtain the data to be processed; The input data buffer space is accessed to obtain the data to be processed after interleaving and writing; the sequential branch data and the interleaving branch data are respectively encoded and operated according to a predetermined TURBO coding method, wherein the predetermined TURBO coding method is multi-bit parallel processing.
在实施过程中,预定TURBO编码方式可以包括:按照预设处理位宽输入相应个数的比特数据;将当前比特数据之前的所有一个或多个比特数据加入至当前处理的比特数据中进行处理,得到当前比特数据的运算结果;将并行处理的多个当前比特数据的运算结果输出。例如,如果要共同处理数据的比特数为5,则可以根据迭代计算,按照5比特设计预定TURBO编码方式,则其处理性能可以比传统的高5倍。In the implementation process, the predetermined TURBO encoding method may include: inputting a corresponding number of bit data according to the preset processing bit width; adding all one or more bit data before the current bit data to the currently processed bit data for processing, Obtain the operation result of the current bit data; output the operation results of multiple current bit data processed in parallel. For example, if the number of bits of data to be processed together is 5, according to iterative calculation, a predetermined TURBO encoding method can be designed according to 5 bits, and its processing performance can be 5 times higher than that of the traditional one.
在得到当前比特数据的运算结果之后,还可以更新编码器状态,该更新过程可以简化预定TURBO编码方式的编码结构,方便下一个计算周期对比特进行计算。After the operation result of the current bit data is obtained, the state of the encoder can also be updated. This update process can simplify the encoding structure of the predetermined TURBO encoding mode and facilitate the bit calculation in the next calculation cycle.
将交织写入后的待处理数据和待处理数据分别按预定TURBO编码方式进行编码之后,将按预定TURBO编码方式进行编码运算后的数据分别进行存储。例如,将经过编码的顺序分支数据及交织分支数据分别存储在不同的FIFO中。After the interleaved and written data to be processed and the data to be processed are respectively coded according to a predetermined TURBO coding method, the data after coding operation according to a predetermined TURBO coding method are respectively stored. For example, the coded sequential branch data and the interleaved branch data are stored in different FIFOs respectively.
本发明实施例还提供了一种数据的处理装置,该处理装置的结构框图如图3所示,包括:交织模块10,用于将待处理数据按预定序列进行交织写入,其中,预订序列是将输出数据行顺序作为输入行顺序进行设置;编码模块20,与交织模块10耦合,用于将交织写入后的待处理数据和待处理数据分别按预定TURBO编码方式进行编码。The embodiment of the present invention also provides a data processing device. The structural block diagram of the processing device is shown in FIG. The output data line order is set as the input line order; the encoding module 20 is coupled with the interleaving module 10, and is used to encode the data to be processed and the data to be processed after interleaving and writing according to a predetermined TURBO encoding method.
在一个优选实施例中,装置还可以如图4所示,还包括第一存储模块30,与交织模块10耦合,用于将待处理数据及交织写入后的待处理数据存储在输入数据缓冲空间。In a preferred embodiment, the device can also include a first storage module 30, as shown in FIG. 4, coupled with the interleaving module 10, for storing the data to be processed and the data to be processed after interleaving and writing in the input data buffer space.
其中,第一存储模块30可以包括图5所示的获取单元302及存储单元304。其中,获取单元302,用于获取行间交织地址及行内列交织地址;存储单元304,与获取单元302耦合,用于根据行间交织地址将交织写入后的待编码数据按行间交织顺序存入输入数据缓冲空间;以及,用于根据行内列交织地址将交织写入后的待编码数据按行内列交织顺序存入输入数据缓冲空间。Wherein, the first storage module 30 may include the acquisition unit 302 and the storage unit 304 shown in FIG. 5 . Wherein, the acquisition unit 302 is used to obtain the interleaving address between rows and the column interleaving address in the row; the storage unit 304 is coupled with the acquisition unit 302, and is used to interleave and write the data to be encoded according to the interleaving order between rows according to the interleaving address between rows storing in the input data buffer space; and storing the data to be encoded after the interleaving and writing into the input data buffer space according to the in-row column interleaving order according to the in-row column interleaving address.
在实施过程中,获取单元302按照以下方式获取行间交织地址及行内列交织地址:按照待处理数据的比特数大小确定交织矩阵;根据预订序列确定交织矩阵的行间交织地址;根据素数序列及预订序列确定交织矩阵的行内列地址。In the implementation process, the obtaining unit 302 obtains the inter-row interleaving address and the intra-row interleaving address in the following manner: determine the interleaving matrix according to the number of bits of the data to be processed; determine the inter-row interleaving address of the interleaving matrix according to the predetermined sequence; The reservation sequence determines the in-row column addresses of the interleaving matrix.
优选地,上述装置还可以如图6所示,编码模块20包括:第一访问单元202,用于根据行间交织地址对输入数据缓冲空间进行访问,得到待处理数据;第二访问单元204,用于根据行内列交织地址对输入数据缓冲空间进行访问,得到交织写入后的待处理数据;编码运算单元206,与第一访问单元202和第二访问单元204耦合,用于将顺序分支数据与交织分支数据分别按照预定TURBO编码方式进行编码运算,其中,预定TURBO编码方式为多比特并行处理。Preferably, the above-mentioned device can also be shown in FIG. 6 , the encoding module 20 includes: a first access unit 202, configured to access the input data buffer space according to the inter-row interleaving address, to obtain data to be processed; a second access unit 204, It is used to access the input data buffer space according to the interleaving address in the row to obtain the data to be processed after interleaving and writing; the encoding operation unit 206 is coupled with the first access unit 202 and the second access unit 204, and is used to sequentially branch data Encoding operations are performed on the interleaved branch data according to a predetermined TURBO encoding method, wherein the predetermined TURBO encoding method is multi-bit parallel processing.
在实施过程中,编码运算单元206可以如图7所示,包括:输入子单元2062,用于按照预设处理位宽输入相应个数的比特数据;编码运算子单元2064,用于将当前比特数据之前的所有一个或多个比特数据加入至当前处理的比特数据中进行处理,得到当前比特数据的运算结果;输出子单元2066,用于将并行处理的多个当前比特数据的运算结果输出;更新子单元2068,用于更新编码器状态。上述各子单元依次耦合。In the implementation process, the encoding operation unit 206 can be shown in Figure 7, including: an input subunit 2062, which is used to input a corresponding number of bit data according to the preset processing bit width; an encoding operation subunit 2064, which is used to convert the current bit All one or more bit data before the data are added to the currently processed bit data for processing to obtain the operation result of the current bit data; the output subunit 2066 is used to output the operation results of multiple current bit data processed in parallel; The update subunit 2068 is used to update the state of the encoder. The above subunits are coupled in sequence.
图8示出了上述装置的一种优选实施方式,该装置还包括:第二存储模块40,与编码模块20耦合,用于将通过TURBO编码单元进行编码运算的两路数据分别进行存储。Fig. 8 shows a preferred implementation of the above device, the device further includes: a second storage module 40, coupled with the encoding module 20, for storing the two channels of data encoded by the TURBO encoding unit respectively.
下面结合附图及优选实施例对本发明实施方式进行说明,在下述优选实施例中,提供的装置的各模块命名与上述实施例中各模块的命名略有不同,但下述装置各模块的组合能够实现与上述装置相同的效果。The embodiment of the present invention will be described below in conjunction with the accompanying drawings and preferred embodiments. In the following preferred embodiments, the naming of each module of the device provided is slightly different from the naming of each module in the above-mentioned embodiment, but the combination of each module of the following device The same effects as those of the above-mentioned device can be achieved.
优选实施例一Preferred embodiment one
随着3G网络的不断普及和完善,数据通信飞速发展,对信道的编解码也在提出新的要求。特别在干扰抵消领域内,在一段特定的时间内需要对大量用户进行重构抵消。因此就需要在特定时间内对大量用户进行TURBO编码。当前协议规定TURBO编码方式,已经慢慢的不能支撑起高性能干扰抵消芯片了。针对当前TURBO编码,编码比特前后强相关,理论上一次最多只能编码1比特的情况,本优选实施例提供一种TURBO编码方法,该方法可以一次编码多位比特,大大提高了TURBO编码的性能。With the continuous popularization and improvement of 3G network and the rapid development of data communication, new requirements are also put forward for the codec of the channel. Especially in the field of interference cancellation, it is necessary to perform reconfiguration and cancellation for a large number of users within a certain period of time. Therefore, it is necessary to perform TURBO encoding on a large number of users within a certain period of time. The current agreement stipulates the TURBO encoding method, which has gradually been unable to support high-performance interference cancellation chips. For the current TURBO coding, the coding bits are strongly correlated before and after, and theoretically only one bit can be coded at a time. This preferred embodiment provides a TURBO coding method, which can code multiple bits at one time, greatly improving the performance of TURBO coding .
在实施过程中,该TURBO编码方法可以如图9所示,该方法在图10所示的装置中执行,包括步骤S902至步骤S916。In the implementation process, the TURBO encoding method may be shown in FIG. 9, and the method is executed in the device shown in FIG. 10, including steps S902 to S916.
步骤S902,根据输入TURBO块的大小,确定交织矩阵的尺寸,并根据T序列,确定交织矩阵的行间交织地址。Step S902: Determine the size of the interleaving matrix according to the size of the input TURBO block, and determine the inter-row interleaving address of the interleaving matrix according to the T sequence.
步骤S904,根据序列q、T等,及其p、v查找表,计算出交织矩阵的行内列地址。Step S904, according to the sequence q, T, etc., and the p, v lookup table, calculate the column address in the row of the interleaving matrix.
步骤S906,根据行间交织地址,把带编码数据按行间交织顺序存入输入数据缓冲空间。Step S906, according to the interleaving address, store the encoded data into the input data buffer space in the order of interleaving.
在该步骤实施过程中,按行间交织地址进行存放编码数据,其中,根据TURBO块大小的不同,最多有4种交织方式:During the implementation of this step, the coded data is stored according to the address interleaved between rows, among which, according to the size of the TURBO block, there are at most 4 interleaving methods:
<4,3,2,1,0>;<9,8,7,6,5,4,3,2,1,0>;<19,9,14,4,0,2,5,7,12,18,16,13,17,15,3,1,6,11,8,10>;<19,9,14,4,0,2,5,7,12,18,10,8,13,17,3,1,16,6,15,11>。<4,3,2,1,0>;<9,8,7,6,5,4,3,2,1,0>;<19,9,14,4,0,2,5,7 ,12,18,16,13,17,15,3,1,6,11,8,10>;<19,9,14,4,0,2,5,7,12,18,10,8 ,13,17,3,1,16,6,15,11>.
在进行输入数据存储的时候,除了在行边界,每个时钟写入行内相邻的5比特数据,行边界写入列数C模5的有效比特。图11为相关技术中行数为5时的传统输入,对比该传统输入,图12为本实施例的输入顺序。When storing input data, except at the row boundary, each clock writes adjacent 5-bit data in the row, and the row boundary writes the valid bits of the column number C modulo 5. FIG. 11 shows the traditional input when the number of rows is 5 in the related art. Compared with the traditional input, FIG. 12 shows the input sequence of this embodiment.
步骤S908,根据行间交织地址,对输入数据缓冲空间进行访问,得到顺序分支数据。由于在输入数据存储的时候,按交织矩阵的行顺序进行输入的,因此在读数据的时候,在每读完一行数据后,必须要根据T序列,链接到下一行,该过程也可以参见图12。进行行交织顺序读取,获取顺序序列数据。Step S908, accessing the input data buffer space according to the interleaving address between rows to obtain sequential branch data. Since the input data is stored in the row order of the interleaving matrix, when reading data, after each row of data is read, it must be linked to the next row according to the T sequence. This process can also be referred to in Figure 12. . Perform row interleaved sequential reading to obtain sequential sequence data.
步骤S910,根据行内列交织地址,对输入数据缓冲空间进行列访问,得到交织分支数据。由于在保存输入数据的时候,按交织矩阵的行顺序进行输入的,因此在读数据的时候,不需要行列同时进行变换,只需要进行行内索引,不需要进行行间变换。行进行顺序累加,每次加5行,模交织矩阵的总行数R。Step S910, perform column access to the input data buffer space according to the column interleave address in the row, and obtain interleaved branch data. Since the input data is input in the row order of the interleaving matrix when saving the input data, it is not necessary to convert the rows and columns at the same time when reading the data, only the intra-row index is required, and no inter-row conversion is required. Rows are accumulated sequentially, adding 5 rows each time, the total row number R of the modulo interleaving matrix.
在步骤S908与步骤S910实施过程中,其处理过程跟普通的数据存储方式不一样,该存储的示意图可以如图13所示。在该图中,左侧为按行号进行存储的数据,右侧有案列号存储的数据。在读取时,左侧的数据通过行地址进行读取,右侧数据通过行内列地址进行读取。其处理过程把复杂的2维操作分解为2个独立的1维操作,使用存储空间的译码电路的复杂度呈几何级别的降低。During the implementation of step S908 and step S910, the processing process is different from the common data storage method, and the schematic diagram of the storage can be shown in FIG. 13 . In the figure, the data stored by row number is on the left, and the data stored by column number is on the right. When reading, the data on the left is read through the row address, and the data on the right is read through the column address in the row. Its processing process decomposes complex 2-dimensional operations into two independent 1-dimensional operations, and the complexity of decoding circuits using storage space is reduced geometrically.
步骤S912,把得到的顺序分支和交织分支数据分别输送给给两路的TURBO运算单元。In step S912, the obtained sequential branch and interleaved branch data are respectively sent to two TURBO operation units.
步骤S914,对输入数据进行TURBO运算。Step S914, performing TURBO operation on the input data.
在实施过程中,可以根据迭代运算的结果设置编码运算单元,本实施例设计的编码运算单元的结构示意如图14所示。因为TURBO编码具有很强的前后相关性,直接重复单比特编码的并行方法肯定是很麻烦的,假定在末特定时刻,TURBO编码器的寄存器值分别为d1,d2,d3。当前时刻的输入数据为x(i),则对应的输出y(i)的计算公式如下:During the implementation process, the encoding operation unit can be set according to the result of the iterative operation. The structure of the encoding operation unit designed in this embodiment is shown in FIG. 14 . Because TURBO coding has a strong front-to-back correlation, the parallel method of directly repeating single-bit coding must be very troublesome. Assume that at the end of a specific moment, the register values of the TURBO encoder are d1, d2, and d3 respectively. The input data at the current moment is x(i), and the calculation formula of the corresponding output y(i) is as follows:
Y(i)=(x(i)+(d2+d3)+d1)+d3;Y(i)=(x(i)+(d2+d3)+d1)+d3;
=x(i)+d2+d1;=x(i)+d2+d1;
在第一次计算周期后,TURBO编码的状态寄存器更新为:D1=x(i)+(d2+d3);D2=d1;D3=d2;After the first calculation cycle, the status register of the TURBO code is updated as follows: D1=x(i)+(d2+d3); D2=d1; D3=d2;
Y(i+1)=(x(i+1)+(d1+d2)+x(i)+(d2+d3))+d2;Y(i+1)=(x(i+1)+(d1+d2)+x(i)+(d2+d3))+d2;
=x(i+1)+x(i)+d1+d2+d3;=x(i+1)+x(i)+d1+d2+d3;
在第二次计算周期后,TURBO编码的状态寄存器更新为:D1=x(i+1)+d1+d2;D2=x(i)+(d2+d3);D3=d1;After the second calculation cycle, the status register of TURBO encoding is updated as follows: D1=x(i+1)+d1+d2; D2=x(i)+(d2+d3); D3=d1;
Y(i+2)=x(i+2)+x(i)+(d2+d3)+x(i+1)+d1+d2Y(i+2)=x(i+2)+x(i)+(d2+d3)+x(i+1)+d1+d2
=x(i+2)+x(i+1)+x(i)+d3+d1;=x(i+2)+x(i+1)+x(i)+d3+d1;
在第三次计算周期后,TURBO编码的状态寄存器更新为:D1=x(i+2)+x(i)+(d2+d3)+d1;D2=x(i+1)+d1+d2;D3=x(i)+(d2+d3);After the third calculation cycle, the status register of TURBO encoding is updated as: D1=x(i+2)+x(i)+(d2+d3)+d1; D2=x(i+1)+d1+d2 ;D3=x(i)+(d2+d3);
Y(i+3)=x(i+3)+x(i+2)+x(i)+(d2+d3)+d1+x(i+1)+d1+d2;Y(i+3)=x(i+3)+x(i+2)+x(i)+(d2+d3)+d1+x(i+1)+d1+d2;
=x(i+3)+x(i+2)+x(i+1)+x(i)+d3;=x(i+3)+x(i+2)+x(i+1)+x(i)+d3;
在第四次计算周期后,TURBO编码的状态寄存器更新为:D1=x(i+3)+x(i+1)+d1+d2+x(i)+(d2+d3)=x(i+3)+x(i+1)+x(i)+d1+d3;D2=x(i+2)+x(i)+(d2+d3)+d1;D3=x(i+1)+d1+d2;After the fourth calculation cycle, the status register of TURBO code is updated as: D1=x(i+3)+x(i+1)+d1+d2+x(i)+(d2+d3)=x(i +3)+x(i+1)+x(i)+d1+d3; D2=x(i+2)+x(i)+(d2+d3)+d1; D3=x(i+1) +d1+d2;
Y(i+4)=x(i+4)+x(i+3)+x(i+1)+x(i)+d1+d3+x(i+2)+x(i)+(d2+d3)+d1Y(i+4)=x(i+4)+x(i+3)+x(i+1)+x(i)+d1+d3+x(i+2)+x(i)+( d2+d3)+d1
=x(i+4)+x(i+3)+x(i+1)+x(i+2)+d2;=x(i+4)+x(i+3)+x(i+1)+x(i+2)+d2;
在第五次计算周期后,TURBO编码的状态寄存器更新为:D1=x(i+4)+x(i+2)+x(i)+(d2+d3)+d1+x(i+1)+d1+d2=x(i+4)+x(i+2)+x(i+1)+x(i)+d3;D2=x(i+3)+x(i+1)+x(i)+d1+d3;D3=x(i+2)+x(i)+(d2+d3)+d1;After the fifth calculation cycle, the status register of TURBO encoding is updated as: D1=x(i+4)+x(i+2)+x(i)+(d2+d3)+d1+x(i+1 )+d1+d2=x(i+4)+x(i+2)+x(i+1)+x(i)+d3; D2=x(i+3)+x(i+1)+ x(i)+d1+d3; D3=x(i+2)+x(i)+(d2+d3)+d1;
Y(i+5)=x(i+5)+x(i+4)+x(i+2)+x(i+1)+x(i)+d3+x(i+3)+x(i+1)+x(i)+d1+d3Y(i+5)=x(i+5)+x(i+4)+x(i+2)+x(i+1)+x(i)+d3+x(i+3)+x (i+1)+x(i)+d1+d3
=x(i+5)+x(i+4)+x(i+3)+x(i+2)+d1;=x(i+5)+x(i+4)+x(i+3)+x(i+2)+d1;
通过上述迭代运算,可以设计一个5比特输入并行处理的编码运算单元,该编码运算单元可以解决各比特数据前后强相关性的问题,可以提高编码速度5倍。当然,在具体实施的过程中,并行处理的比特数可以为10比特,则可以设置10个比特数据的输入口,并依据迭代结果进行设计。Through the above iterative operation, an encoding operation unit for parallel processing of 5-bit input can be designed. This encoding operation unit can solve the problem of strong correlation between each bit of data before and after, and can increase the encoding speed by 5 times. Of course, in the actual implementation process, the number of bits processed in parallel can be 10 bits, and then the input port of 10 bits of data can be set, and the design can be made according to the iteration result.
步骤S916,两路编码完毕的输出数据分别存放在两路不同的FIFO,等待下游操作。In step S916, the two channels of encoded output data are respectively stored in two different channels of FIFO, waiting for downstream operations.
在实施过程中,把各个分支的数据分别存放在不同的FIFO,有利于下游速率匹配的操作,而且由于存放在不同FIFO,允许两个编码速率不需要时刻保持一致,进一步降低两个TURBO运算单元的相关性。In the implementation process, the data of each branch is stored in different FIFOs, which is beneficial to the downstream rate matching operation, and because it is stored in different FIFOs, the two encoding rates do not need to be kept consistent at all times, further reducing the two TURBO calculation units relevance.
下面进一步对图10的TURBO编码装置进行说明:The TURBO encoding device of Fig. 10 is further described below:
其中q序列,r序列,T序列为存储单元,用来存放各自的序列数据,这几个序列数据量都不大,可以用寄存器来进行搭建。Among them, the q sequence, the r sequence, and the T sequence are storage units, which are used to store their respective sequence data. The data volume of these sequences is not large, and they can be built with registers.
重排序运算单元主要是用来计算r序列,主要是根据T序列的位置指示,对q序列的数据进行位置的重排序,获得新的序列r。The reordering operation unit is mainly used to calculate the r sequence, mainly to reorder the position of the data of the q sequence according to the position indication of the T sequence, and obtain a new sequence r.
S序列的索引计算单元与相关技术不同,本实施例用来计算S序列的索引地址。按照正常的计算,索引地址等于交织矩阵的列号和r序列对应数值的乘积。由于乘法成本较高,并且时序性能较差,本单元和S序列的索引存储单元结合起来,以加法器加存储单元的模式代替乘法器。The index calculation unit of the S sequence is different from the related art, and this embodiment is used to calculate the index address of the S sequence. According to normal calculation, the index address is equal to the product of the column number of the interleaving matrix and the value corresponding to the r sequence. Due to the high cost of multiplication and poor timing performance, this unit is combined with the index storage unit of the S sequence to replace the multiplier in the mode of an adder plus a storage unit.
根据协议Ui(j)=s((j×ri)mod(p-1)),需要采用乘法来完成j和r的乘积。j代表的是列序号,并且一行内的r值是相同的。我们按列顺序进行计算,把前一列的计算结果存放到一片存储空间中,那么在计算当前(j+1)*r的时候,只需要从存储空间内取出上次计算存储的值,再加上当前的r即可达到以加法替代乘法的目的,而且一列内各个点不相干,因此可以以列为单位,列内各点并行运算。According to the protocol U i (j)=s((j× ri )mod(p-1)), multiplication is required to complete the product of j and r. j represents the column number, and the r value within a row is the same. We calculate in the order of columns, and store the calculation results of the previous column in a storage space, then when calculating the current (j+1)*r, we only need to take out the value stored in the last calculation from the storage space, and add Adding the current r can achieve the purpose of replacing multiplication with addition, and each point in a column is irrelevant, so the column can be used as the unit, and the points in the column can be operated in parallel.
行内列地址存储空间,是用来存储交织地址中的行内列信息。每个地址空间存放5个交织地址信息。行内列地址的计算,按照交织矩阵的顺序进行计算,按列顺序进行计算。每计算完5个交织地址,把5个交织地址做为一个基本存储单元,存储到RAM内部。读取交织地址的时候,也是按5个交织地址为一个单元,一次取一个单元。The in-row column address storage space is used to store the in-row column information in the interleaving address. Each address space stores 5 interleaving address information. The calculation of the column address in the row is calculated according to the order of the interleaving matrix, and calculated according to the order of the columns. After calculating 5 interleaving addresses, use the 5 interleaving addresses as a basic storage unit and store them in the RAM. When reading the interleaving address, 5 interleaving addresses are also regarded as a unit, and one unit is taken at a time.
输入数据存储空间在本发明实施例中是用来存放输入数据,提供TURBO编码数据。要在存储空间上读取不相关的N比特数据,传统上是在存储数据的时候,复制N份数据进行存储,使存储数据扩大为N倍,每一份数据单独用一个RAM来进行存储,总共需要N个RAM。需要读取N比特数据时,只需要同时对N个RAM分别进行数据读取,而本装置只需要一份图13所示的存储空间。其中,图13所示的空间可以采用寄存器当作存储单元,按最大需求,规划存储空间的尺寸为260X20。如图所示:分顺序支路数据译码电路和交织支路数据译码电路。顺序支路数据是行内逐列读取数据的,每次获取同一行的相邻5个数据。因此包含一个简单的行译码电路和列译码电路。交织支路数据需要按交织矩阵规则,分别进行行列变换,进行数据读取。但是由于输入数据在存储的时候,已经按行变换的顺序进行存储的,所以在进行交织支路数据读取的时候,只需要进列变换,行是顺序读取的。In the embodiment of the present invention, the input data storage space is used to store input data and provide TURBO encoded data. To read irrelevant N-bit data in the storage space, traditionally, when storing data, N copies of data are copied for storage, so that the stored data is expanded to N times, and each piece of data is stored in a separate RAM. A total of N RAMs are required. When N-bit data needs to be read, it is only necessary to read data from N RAMs at the same time, and this device only needs one copy of the storage space shown in FIG. 13 . Among them, the space shown in Figure 13 can use registers as storage units. According to the maximum demand, the size of the planned storage space is 260X20. As shown in the figure: the sequential branch data decoding circuit and the interleaved branch data decoding circuit. Sequential branch data is read column by column within a row, and 5 adjacent data of the same row are acquired each time. Therefore, a simple row decoding circuit and column decoding circuit are included. The interleaving branch data needs to perform row and column transformation according to the rules of the interleaving matrix to read the data. However, when the input data is stored, it has been stored in the order of row transformation, so when reading the interleaved branch data, only the column transformation is required, and the rows are read sequentially.
并行编码单元在本优选实施例中是用来执行TURBO编码运算的,可以无缝支持4比特,5比特并行流水切换。而且由于对于待编码数据的读取进行有效的规划,对于交织分支的读取一行最多读取一比特数据,因此每次获取的无效比特最多有1比特,而TURBO运算单元可以进行4,5比特无缝切换,无任何额外开销。顺序分支与交织分支运算速率的不匹配,可以用运算单元下游的FIFO来进行屏蔽。In this preferred embodiment, the parallel encoding unit is used to perform TURBO encoding operation, and can seamlessly support 4-bit and 5-bit parallel pipeline switching. Moreover, due to the effective planning for the reading of the data to be encoded, the reading of the interleaving branch reads at most one bit of data, so the invalid bit obtained each time is at most 1 bit, and the TURBO operation unit can perform 4, 5 bit Switch seamlessly without any additional overhead. The mismatch between the sequential branch and the interleaved branch operation rate can be shielded by the FIFO downstream of the operation unit.
由于TURBO编码的特性,及其交织序列中填充着无效比特,因此TURBO的提升受到很大的限制。通过本优选实施例,编码性能上有5倍的提升,而且根据实际需要,很方便的可以扩展到20倍性能。在输入的待编码数据的存储和管理上,传统方法需要5组存储空间(如果不是采用双口RAM,而是单口RAM,则需要10组存储空间),10组行译码电路,10组列译码电路,以便提供5比特的顺序支路的数据,和5比特的交织支路的数据。而本实施例的装置,只需要1组存储空间,2个列译码电路,6个行译码电路。存储空间比传统方法的1/5,而译码电路规模是传统的2/5。大幅度的降低了资源开销。并且在存放数据的时候,按交织矩阵的行变换进行数据存储的,使得在进行交织分支数据读取的时候,二维行列交织运算,转换成一维行内列交织运算,数据的读取控制的复杂度呈一个几何级别的降低。Due to the characteristics of TURBO coding and its interleaving sequences filled with invalid bits, the improvement of TURBO is greatly limited. Through this preferred embodiment, the encoding performance is improved by 5 times, and according to actual needs, the performance can be easily expanded to 20 times. In terms of storage and management of the input data to be encoded, the traditional method requires 5 sets of storage space (if a single-port RAM is not a dual-port RAM, 10 sets of storage space are required), 10 sets of row decoding circuits, and 10 sets of columns Decoding circuitry to provide 5 bits of data for the sequential branch, and 5 bits of data for the interleaved branch. However, the device of this embodiment only needs 1 set of storage space, 2 column decoding circuits, and 6 row decoding circuits. The storage space is 1/5 of the traditional method, and the decoding circuit scale is 2/5 of the traditional method. Significantly reduces resource overhead. And when storing data, the data is stored according to the row transformation of the interleaving matrix, so that when the interleaving branch data is read, the two-dimensional row-column interleaving operation is converted into a one-dimensional row-column interleaving operation, and the data reading control is complicated. The degree decreases at a geometric level.
优选实施例二Preferred embodiment two
本优选实施例的实现建立在图10所示的装置上,实施过程如图15所示,包括步骤S1502至步骤S1524。The implementation of this preferred embodiment is based on the device shown in FIG. 10 , and the implementation process is shown in FIG. 15 , including steps S1502 to S1524.
步骤S1502,把准备好的素数系列q,预先存放到内部存储空间,以备下面步骤使用。Step S1502, pre-store the prepared prime number series q in the internal storage space for use in the following steps.
该步骤中度素数系列,最大的个数为交织矩阵的行数,而最大交织矩阵的最大行数是20,所以此序列最大20个数,可以用寄存器进行存储,序列如下所示:In this step, the maximum number of prime number series is the number of rows of the interleaving matrix, and the maximum number of rows of the largest interleaving matrix is 20, so the maximum number of this sequence is 20, which can be stored in registers. The sequence is as follows:
1,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79。1, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79.
步骤S1504,根系协议规定,把4种T系列,预先存放到内部存储空间,以备下面步骤使用。In step S1504, the root protocol stipulates that the four T series are pre-stored in the internal storage space for use in the following steps.
4组T序列,每个序列最大20个数,也可采用寄存器进行存储,具体如下:4 groups of T-sequences, each sequence has a maximum of 20 numbers, which can also be stored in registers, as follows:
T1:<4,3,2,1,0>;T1: <4,3,2,1,0>;
T2:<9,8,7,6,5,4,3,2,1,0>;T2: <9,8,7,6,5,4,3,2,1,0>;
T3:<19,9,14,4,0,2,5,7,12,18,16,13,17,15,3,1,6,11,8,10>;T3: <19,9,14,4,0,2,5,7,12,18,16,13,17,15,3,1,6,11,8,10>;
T4:<19,9,14,4,0,2,5,7,12,18,10,8,13,17,3,1,16,6,15,11>。T4: <19,9,14,4,0,2,5,7,12,18,10,8,13,17,3,1,16,6,15,11>.
步骤S1506,根据编码的收入参考K(编码块的大小),按协议要求选择出对应的一组T系列。并且计算出行数R,和列数C,并按协议查询表格获取p,v参数。Step S1506, according to the encoded income reference K (the size of the encoded block), select a corresponding group of T series according to the protocol requirements. And calculate the number of rows R and the number of columns C, and obtain p and v parameters according to the protocol query table.
该步骤根据K值的范围,选择一组对应的T序列,按照协议规范,计算出行数R,和列数C,并查询表格获取p,v参数。This step selects a set of corresponding T sequences according to the range of the K value, calculates the number of rows R and the number of columns C according to the protocol specification, and queries the table to obtain p and v parameters.
步骤S1508,根据选中的T序列和预先准备好的q序列,产生r序列。Step S1508, generate r-sequence according to the selected T-sequence and the pre-prepared q-sequence.
实施国策很难过按顺序读取q序列和T序列,并把q序列的数值当成写数据,把T序列的数值当成写地址,对r序列存储单元执行写操作。It is very difficult to implement the national policy to read the q sequence and the T sequence in order, and use the value of the q sequence as the write data, and the value of the T sequence as the write address, and perform the write operation on the r sequence storage unit.
步骤S1510,根据T序列,把输入数据按交织矩阵的行变换规则,逐行交织,逐行输入到输入数据存储空间。Step S1510, according to the T sequence, interleave the input data row by row according to the row transformation rule of the interleaving matrix, and input row by row into the input data storage space.
步骤S1512,根据参数C,p,序列r,及其内部计数器,计算S系列的地址索引。Step S1512, according to the parameters C, p, sequence r, and its internal counter, calculate the address index of the S series.
该步骤的执行时计算列地址。直接访问r序列,根据计数器,读取对应的r数值。如果不是交织后的第一列,则读取S序列索引RAM同样行位置的数据,然后对读取的r数据和S索引执行加法操作,把加法运算的结果数值跟p-1进行比较,如果大于p-1则执行减法操作,减去p-1,否则保持不变。计算出S序列的索引,并把计算出来的新S索引,更新到S序列索引RAM中对应相同行的位置。The execution of this step calculates the column address. Directly access the r sequence, and read the corresponding r value according to the counter. If it is not the first column after interleaving, read the data at the same row position of the S sequence index RAM, then perform an addition operation on the read r data and the S index, and compare the value of the result of the addition operation with p-1, if If it is greater than p-1, the subtraction operation is performed, and p-1 is subtracted, otherwise it remains unchanged. Calculate the index of the S sequence, and update the calculated new S index to the position corresponding to the same row in the S sequence index RAM.
步骤S1514,按照S序列的地址索引,访问S系列存储空间,获取对应的交织矩阵的行内位置信息。Step S1514, according to the address index of the S sequence, access the storage space of the S sequence, and obtain the position information of the corresponding row of the interleaving matrix.
实施时,把预先计算好的S序列,存放在S序列空间,根据计算出来的S序列和v参数,读取对应的S序列值。During implementation, the pre-calculated S sequence is stored in the S sequence space, and the corresponding S sequence value is read according to the calculated S sequence and v parameter.
步骤S1516,根据C,R参数及其内部计数器,计算交织矩阵列位置信息。根据读取的S序列数据,及其本TURBO块的交织矩阵的列数C,计算出交织的列地址,然后根据计数器及其r序列,计算出行地址。Step S1516, according to the C, R parameters and their internal counters, calculate the column position information of the interleaving matrix. Calculate the interleaved column address according to the read S sequence data and the column number C of the interleaving matrix of this TURBO block, and then calculate the row address according to the counter and its r sequence.
步骤S1518,根据交织矩阵的行列信息,访问输入数据存储空间,获取交织数据。Step S1518, according to the row and column information of the interleaving matrix, access the input data storage space, and obtain the interleaved data.
步骤S1520,根据内部计数器,顺序访问数据存储空间,获取顺序数据。Step S1520, according to the internal counter, sequentially access the data storage space, and obtain sequential data.
在上述步骤实施时,将待编码的数据并行的存储到编码数据缓冲空间内,然后根据交织地址和顺序地址并行读取数据。其中,此存储单元为特定设计的寄存器阵列,按最大交织矩阵进行规划,大小为行数20,列数256。如果待编码矩阵小于最大交织矩阵,那么待编码矩阵和最大矩阵左顶点重合,按行变换顺序存放到存储空间内。When the above steps are implemented, the data to be encoded is stored in parallel in the encoded data buffer space, and then the data is read in parallel according to the interleaved address and the sequential address. Wherein, the storage unit is a specially designed register array, planned according to the largest interleaving matrix, with a size of 20 rows and 256 columns. If the matrix to be coded is smaller than the maximum interleaving matrix, then the matrix to be coded and the left vertex of the maximum matrix coincide and are stored in the storage space in the order of row transformation.
其中,存储空间的寻址,采用行列共同寻址的方法。顺序矩阵操作分别有一组行列译码单元,并且列译码电路是5个数据公用一个列译码端口。比如列译码电路选择为0,则代表数据0,1,2,3,4列的数据被选择上。交织矩阵操作分别有一组行列译码单元,并且行译码电路是5个数据公用一个行译码端口。比如行译码电路选择为0,则代表数据0,1,2,3,4行的数据被选择上。Among them, the addressing of the storage space adopts the method of joint addressing of rows and columns. Sequential matrix operations have a set of row and column decoding units respectively, and the column decoding circuit uses one column decoding port for 5 data. For example, if the column decoding circuit is selected as 0, it means that the data in
在存储输入数据的时候,按行变换后的顺序,逐行进行写输入数据。每行的最后一个地址单元内,有效数据不一定是5的整数倍。因此进行写的时候,有效比特位置填充输入数据,无效比特位置填充任意值。顺序支路数据读的时候,也执行交织变换,逐行读取操作,每次读一个地址单元,获取5比特数据,如果当前已有有效的5比特数据,则执行TURBO编码。如果没有,则等待下次读取待编码数据,把当前获取的有效比特和上一次获取的有效比特进行合并,取合并后的前5比特进行TURBO编码。When storing the input data, the input data is written row by row in the sequence after row conversion. In the last address unit of each row, valid data is not necessarily an integer multiple of 5. Therefore, when writing, valid bit positions are filled with input data, and invalid bit positions are filled with arbitrary values. When the sequential branch data is read, the interleave conversion is also performed, and the row-by-row read operation is performed. Each address unit is read to obtain 5-bit data. If there is currently valid 5-bit data, TURBO encoding is performed. If not, wait for the data to be encoded to be read next time, combine the currently acquired effective bits with the last acquired effective bits, and take the combined first 5 bits for TURBO encoding.
在读取交织支路数据的时候,以5连续的5行为单位,顺序读取这5行数据,并且根据交织地址,从这顺序的5行中选择出对应的5比特数据。由于在交织支路数据读取的过程中,读取的数据部分是无效数据,而且最多仅有一个数据是无效的,因此我们有一个状态指示寄存器,指示TURBO执行5比特编码或者4比特编码。并且4比特和5比特编码可用无缝流水。When reading the interleaving branch data, the 5 rows of data are sequentially read in units of 5 consecutive rows, and the corresponding 5-bit data is selected from the sequential 5 rows according to the interleaving address. Since in the process of reading the interleaving branch data, the read data part is invalid data, and at most only one data is invalid, so we have a status indication register to instruct TURBO to perform 5-bit encoding or 4-bit encoding. And 4-bit and 5-bit coding can be seamlessly piped.
由于在存储输入数据的时候,是进行行变换存储的,因此把原来的行列同时变换的多维交织,转换成只有行变换的一路分支,和只有列变换的一个分支。复杂度由二纬降低为一纬,复杂度呈几何级别的降低。Since the input data is stored by row transformation, the original multi-dimensional interleaving of row and column transformation at the same time is converted into one branch with only row transformation and one branch with only column transformation. The complexity is reduced from two latitudes to one latitude, and the complexity is reduced at a geometric level.
步骤S1522,获取的输入数据输入给并行TURBO编码器,并行进行编码运算。In step S1522, the acquired input data is input to a parallel TURBO encoder, and the encoding operation is performed in parallel.
第十步进行TURBO运算,可用进行4比特或者5比特编码,并且4比特编码和5比特编码可以无缝切换,可以进行无缝流水。The tenth step is to perform TURBO operation, which can be used for 4-bit or 5-bit encoding, and 4-bit encoding and 5-bit encoding can be seamlessly switched, and seamless pipeline can be performed.
步骤S1524,TURBO运算单元的输出,分顺序与交织两路,分别存放在不同的FIFO中。In step S1524, the output of the TURBO operation unit is divided into sequential and interleaved channels, which are stored in different FIFOs respectively.
输出分不同FIFO存储,主要是要降低两个编码运算单元的耦合度,方便两个编码单元独立的进行运算。在顺序序列分支,在顺序矩阵行切换的时候,存在暂停一个时钟周期的情况,在交织序列分支,存在着无效比特的情况,因此两个分支的编码速率要做要一致,就会增加不少复杂度。因此输出分别采用不同FIFO进行存储,可以切断两组序列编码的相关行,降低编码控制的复杂性。The output is stored in different FIFOs, mainly to reduce the coupling degree of the two encoding operation units, so as to facilitate the independent operation of the two encoding units. In the sequence sequence branch, when the sequence matrix row is switched, there is a situation of pausing a clock cycle, and in the interleaving sequence branch, there is a situation of invalid bits, so the encoding rate of the two branches must be consistent, which will increase a lot the complexity. Therefore, the outputs are stored in different FIFOs, which can cut off the relevant lines of the two sets of sequence codes and reduce the complexity of the code control.
从以上的描述中,可以看出,本发明实现了如下技术效果:From the above description, it can be seen that the present invention achieves the following technical effects:
本发明实施例采用了如下方法:将待处理的数据按照预定序列进行交织写入,预定序列是按照输出数据行顺序作为输入行顺序进行设置的,通过将数据按照输出行顺序输入的方法,减少了数据输出侧的大量运算,将输出的计算减轻,并将数据按预定的TURBO编码方式进行编码,进一步降低输出侧的运算。通过运用本实施例,解决了对数据进行编码时,需对数据输出侧需做大量运算,面对较多数据时,其数据的处理能力较低,其处理速度已经无法满足要求的问题,进而减少了输出侧的运算,提升了系统的处理能力。The embodiment of the present invention adopts the following method: the data to be processed is interleaved and written according to a predetermined sequence, and the predetermined sequence is set according to the sequence of the output data rows as the sequence of the input rows, and by inputting the data according to the sequence of the output rows, reducing It eliminates a large number of calculations on the data output side, reduces the calculation of the output, and encodes the data according to the predetermined TURBO encoding method, further reducing the calculation on the output side. By using this embodiment, when encoding data, a large number of calculations need to be done on the data output side. When faced with more data, the data processing capability is low, and the processing speed can no longer meet the requirements. Further, The operation on the output side is reduced, and the processing capability of the system is improved.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned present invention can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network formed by multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases in an order different from that shown here The steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (16)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210239061.4A CN103546232A (en) | 2012-07-11 | 2012-07-11 | Data processing method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210239061.4A CN103546232A (en) | 2012-07-11 | 2012-07-11 | Data processing method and device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN103546232A true CN103546232A (en) | 2014-01-29 |
Family
ID=49969330
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201210239061.4A Pending CN103546232A (en) | 2012-07-11 | 2012-07-11 | Data processing method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103546232A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109921806A (en) * | 2017-12-13 | 2019-06-21 | 北京松果电子有限公司 | Coding method, device and storage medium and encoder |
| CN110046703A (en) * | 2019-03-07 | 2019-07-23 | 中国科学院计算技术研究所 | A kind of on piece storage processing system for neural network |
| CN111277367A (en) * | 2020-01-19 | 2020-06-12 | 无锡泽太微电子有限公司 | Coding method and device |
| CN111316582A (en) * | 2019-04-26 | 2020-06-19 | 深圳市大疆创新科技有限公司 | Transmission channel rate matching method and device, unmanned aerial vehicle and storage medium |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050154954A1 (en) * | 2001-11-19 | 2005-07-14 | Tsuguo Maru | Interleaving order generator, interleaver, turbo encoder, and turbo decoder |
| CN1841940A (en) * | 2005-03-30 | 2006-10-04 | 华为技术有限公司 | an interweaving device |
| CN101043284A (en) * | 2007-04-10 | 2007-09-26 | 中兴通讯股份有限公司 | Interleaver of TURBO coder in WCDMA system |
| CN101083512A (en) * | 2006-06-02 | 2007-12-05 | 中兴通讯股份有限公司 | Dual-binary system tailbaiting Turbo code coding method and apparatus |
| CN101719102A (en) * | 2009-04-15 | 2010-06-02 | 江苏芯动神州科技有限公司 | Device and method for disordering data sequence |
-
2012
- 2012-07-11 CN CN201210239061.4A patent/CN103546232A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050154954A1 (en) * | 2001-11-19 | 2005-07-14 | Tsuguo Maru | Interleaving order generator, interleaver, turbo encoder, and turbo decoder |
| CN1841940A (en) * | 2005-03-30 | 2006-10-04 | 华为技术有限公司 | an interweaving device |
| CN101083512A (en) * | 2006-06-02 | 2007-12-05 | 中兴通讯股份有限公司 | Dual-binary system tailbaiting Turbo code coding method and apparatus |
| CN101043284A (en) * | 2007-04-10 | 2007-09-26 | 中兴通讯股份有限公司 | Interleaver of TURBO coder in WCDMA system |
| CN101719102A (en) * | 2009-04-15 | 2010-06-02 | 江苏芯动神州科技有限公司 | Device and method for disordering data sequence |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109921806A (en) * | 2017-12-13 | 2019-06-21 | 北京松果电子有限公司 | Coding method, device and storage medium and encoder |
| CN109921806B (en) * | 2017-12-13 | 2023-04-07 | 北京小米松果电子有限公司 | Encoding method, encoding device, storage medium, and encoder |
| CN110046703A (en) * | 2019-03-07 | 2019-07-23 | 中国科学院计算技术研究所 | A kind of on piece storage processing system for neural network |
| CN111316582A (en) * | 2019-04-26 | 2020-06-19 | 深圳市大疆创新科技有限公司 | Transmission channel rate matching method and device, unmanned aerial vehicle and storage medium |
| WO2020215326A1 (en) * | 2019-04-26 | 2020-10-29 | 深圳市大疆创新科技有限公司 | Rate matching method and device for transmission channel, unmanned aerial vehicle and storage medium |
| CN111277367A (en) * | 2020-01-19 | 2020-06-12 | 无锡泽太微电子有限公司 | Coding method and device |
| CN111277367B (en) * | 2020-01-19 | 2022-09-30 | 无锡泽太微电子有限公司 | Coding method and device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7210076B2 (en) | Interleaving order generator, interleaver, turbo encoder, and turbo decoder | |
| CN102084346B (en) | Address generation for multiple access of memory | |
| CN109347486B (en) | Low-complexity high-throughput 5G LDPC encoder and encoding method | |
| CN101438501A (en) | Method for generating interleaver/deinterleaver and application thereof | |
| CN109525365A (en) | A kind of channel coding and modulating system and method passed applied to unmanned plane figure | |
| CN103546232A (en) | Data processing method and device | |
| WO2011024033A1 (en) | Encoding module, apparatus and method for determining a position of a data bit within an interleaved data stream | |
| CN102111163B (en) | Turbo encoder and encoding method | |
| CN102739261B (en) | Multi-additive comparing and selecting forward traceback Viterbi decoder | |
| Sun et al. | FPGA Design and Implementation of a Convolutional Encoder and a Viterbi Decoder Based on 802.11 a for OFDM | |
| CN101800625A (en) | Method and device for deinterlacing | |
| CN114422085B (en) | Optimized rate matching method and system based on FPGA | |
| US6035434A (en) | System and method for bit interleaving of half-rate speech data | |
| WO2013155785A1 (en) | Scrambling code generation method, apparatus and scrambling code processing apparatus | |
| CN113472358B (en) | A high-speed parallel encoder based on quasi-circular generator matrix | |
| US6324504B1 (en) | System and method for bit interleaving of full-rate speech data | |
| KR100416569B1 (en) | Turbo permutator and Turbo decoder using the same | |
| CN116015546B (en) | Random length turbo code rate matching method based on FPGA | |
| KR100519335B1 (en) | Channel Interleaving Method | |
| CN100512361C (en) | Apparatus for realizing convolutional interleaving and canceling interleave in asymmetric user line | |
| Asghar et al. | Very low cost configurable hardware interleaver for 3G turbo decoding | |
| CN112290956B (en) | A CTC encoder and encoding method based on pipeline structure | |
| CN111900999A (en) | High-performance polarization coding method and coder for satellite discontinuous communication | |
| Santhanam et al. | Optimal low power and scalable memory architecture for turbo encoder | |
| CN102790655B (en) | Device and method for achieving Turbo coding |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C41 | Transfer of patent application or patent right or utility model | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20151020 Address after: 518057 Nanshan District Guangdong high tech Industrial Park, South Road, science and technology, ZTE building, Ministry of Justice Applicant after: ZTE Corporation Applicant after: SHENZHEN ZTE MICROELECTRONICS TECHNOLOGY CO., LTD. Address before: 518057 Nanshan District science and technology, Guangdong Province, South Road, No. 55, No. Applicant before: ZTE Corporation |
|
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140129 |