CN1787385A - Data bus converting device and its RS coder decoder - Google Patents
Data bus converting device and its RS coder decoder Download PDFInfo
- Publication number
- CN1787385A CN1787385A CN 200410052576 CN200410052576A CN1787385A CN 1787385 A CN1787385 A CN 1787385A CN 200410052576 CN200410052576 CN 200410052576 CN 200410052576 A CN200410052576 A CN 200410052576A CN 1787385 A CN1787385 A CN 1787385A
- Authority
- CN
- China
- Prior art keywords
- data
- bit
- bus
- conversion module
- output
- 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.)
- Granted
Links
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
本发明的一种数据总线转换装置及其RS编译码器,其中,所述数据总线转换装置包括在系统中同时实现的两种RS编译码器,该两种RS编译码器为P路交织RS(n1,k1)复合码和RS(n2,k2)码,该两种RS编译码器都使用P*m1比特宽的数据总线,并且输入输出接口相同;通过比特0的插入和剔出,实现P*m1与T*m2比特总线之间的相互转换,避免不完整码元的产生,从而实现了传统的RS编译码器在通信领域的前向纠错装置中的应用。
A data bus conversion device and its RS codec of the present invention, wherein the data bus conversion device includes two RS codecs simultaneously implemented in the system, and the two RS codecs are P-way interleaved RS (n1, k1) composite code and RS (n2, k2) code, the two RS codecs all use a P*m1 bit-wide data bus, and the input and output interfaces are the same; through the insertion and removal of bit 0, realize The mutual conversion between the P*m1 and T*m2 bit buses avoids the generation of incomplete symbols, thereby realizing the application of the traditional RS codec in the forward error correction device in the communication field.
Description
技术领域technical field
本发明涉及一种通信领域的数据总线转换装置以及其前向纠错装置,尤其涉及的是一种RS(Reed-Solomon)码的编译码装置。The invention relates to a data bus conversion device in the communication field and a forward error correction device thereof, in particular to an RS (Reed-Solomon) code encoding and decoding device.
背景技术:Background technique:
RS码是Reed-Solomon码的简称,由Reed和Solomon各自于1960年首先提出,是Galos域GF(2m)上的线性分组循环码。一个码组(也称码字)中包含n个码元,k个信息码元(称为信息组),n-k个校验码元(称为校验组),一般用RS[n,k]表示,可以检测n-k个错误,可以纠正 个错误,是一类有很强纠错能力的多进制码。在计算机纠错系统,特别是存储系统,如光盘、磁盘、磁带中用得很普遍,近年来在光传输系统也大量采用了RS码。RS code is the abbreviation of Reed-Solomon code, which was first proposed by Reed and Solomon in 1960 respectively, and it is a linear block cyclic code on Galos field GF(2 m ). A code group (also called code word) contains n code elements, k information code elements (called information group), nk check code elements (called check group), generally RS[n, k] Indicates that nk errors can be detected and can be corrected An error is a kind of multi-ary code with strong error correction ability. It is widely used in computer error correction systems, especially storage systems, such as optical discs, magnetic disks, and magnetic tapes. In recent years, RS codes have also been widely used in optical transmission systems.
目前的RS编译码装置只针对一种RS码,输入输出总线宽度与码元的比特数相同,但在实际应用系统中,通常要求同时实现两种或多种RS码。其中一种是标准RS码或其缩短码,另一种或多种是多路交织的复合码。例如16路交织RS(255,239)和RS(2720,2550),8路交织RS(31,26)和RS(155,131),8路交织RS(15,11)和RS(80,59)等。在同一系统中同时实现的多种RS码码字的总比特数相同,但码元的比特数不一样,信息组的比特数也可能不一样。一般以信息组最少比特数为准,超过该值的用0填充。例如16路交织RS(255,239)与RS(2720,2550),两者的总比特数都为32640,但前者的信息组比特数为16*239*8=30592,后者的信息组比特数为2550*12=30600。为了实现两者兼容,规定RS(2720,2550)每个信息组的最后8比特固定为0。The current RS encoding and decoding device is only for one RS code, and the input and output bus width is the same as the number of bits of the symbol. However, in practical application systems, it is usually required to realize two or more RS codes at the same time. One of them is the standard RS code or its shortened code, and the other or more are multiple interleaved compound codes. For example, 16-way interleaved RS (255, 239) and RS (2720, 2550), 8-way interleaved RS (31, 26) and RS (155, 131), 8-way interleaved RS (15, 11) and RS (80, 59 )wait. The total number of bits of a variety of RS codewords implemented simultaneously in the same system is the same, but the number of bits of a symbol is different, and the number of bits of an information group may also be different. Generally, the minimum number of bits in the information group shall prevail, and those exceeding this value shall be filled with 0. For example, 16-way interleaved RS (255, 239) and RS (2720, 2550), the total number of bits of both is 32640, but the number of information group bits of the former is 16*239*8=30592, and the number of information group bits of the latter The number is 2550*12=30600. In order to achieve compatibility between the two, it is stipulated that the last 8 bits of each information group of RS (2720, 2550) are fixed to be 0.
在实际应用系统中,通常要求使用相同的输入输出接口。仍以16路交织RS(255,239)和RS(2720,2550)为例,目前,16路交织RS(255,239)已经得到广泛应用,实现时一般采用16*8=128bits数据总线,每8-bits一组,按顺序分别与一个RS(255,239)编码器或译码器对应。RS(255,239)编码器或译码器实际使用的是8-bits数据总线,每个时钟周期刚好输入输出一个码元。RS(2720,2550)要使用与16路交织RS(255,239)相同的接口,数据总线也必须是128比特的。但是,RS(2720,2550)的每个码元包含12比特,128不是12的整数倍,每时钟周期输入输出的128比特数据中必然包含不完整的码元,但现有RS编译码技术都是以码元为单位的,不能处理不完整码元。8路交织RS(31,26)和RS(155,131),8路交织RS(15,11)和RS(80,59)等具有与16路交织RS(255,239)和RS(2720,2550)同样的问题。In practical application systems, it is usually required to use the same input and output interfaces. Still taking 16-way interleaved RS (255, 239) and RS (2720, 2550) as an example, at present, 16-way interleaved RS (255, 239) has been widely used, and generally adopts 16*8=128bits data bus during realization, and each A group of 8-bits corresponds to an RS (255, 239) encoder or decoder in sequence. The RS (255, 239) encoder or decoder actually uses an 8-bits data bus, and each clock cycle just inputs and outputs one symbol. If RS (2720, 2550) uses the same interface as 16-way interleaved RS (255, 239), the data bus must also be 128 bits. However, each symbol of RS (2720, 2550) contains 12 bits, and 128 is not an integer multiple of 12. The 128-bit data input and output per clock cycle must contain incomplete symbols, but the existing RS coding and decoding technologies are all The unit is the code unit, and incomplete code units cannot be processed. 8-way interleaved RS (31, 26) and RS (155, 131), 8-way interleaved RS (15, 11) and RS (80, 59), etc. have the same functions as 16-way interleaved RS (255, 239) and RS (2720, 2550) same problem.
因此,现有技术存在缺陷,而有待于改进和发展。Therefore, there are defects in the prior art and need to be improved and developed.
发明内容Contents of the invention
本发明的目的在于提供一种数据总线转换装置及其RS编译码器,针对上述描述的不完整码元问题,通过比特0的插入和剔出,实现P*m1与T*m2比特总线之间的相互转换,避免不完整码元的产生,从而有效解决现有技术之难题。The purpose of the present invention is to provide a data bus conversion device and its RS codec, aiming at the problem of incomplete code elements described above, through the insertion and removal of bit 0, to realize the connection between P*m1 and T*m2 bit buses mutual conversion, avoiding the generation of incomplete code elements, thereby effectively solving the problems of the prior art.
本发明的技术方案为:Technical scheme of the present invention is:
一种数据总线转换装置,其中,所述数据总线转换装置包括A data bus conversion device, wherein the data bus conversion device includes
在系统中同时实现的两种RS编译码器,该两种RS编译码器为P路交织RS(n1,k1)复合码和RS(n2,k2)码,该两种RS编译码器都使用P*m1比特宽的数据总线,并且输入输出接口相同;Two RS codecs implemented simultaneously in the system, the two RS codecs are P-way interleaved RS (n1, k1) composite code and RS (n2, k2) code, the two RS codecs both use P*m1 bit wide data bus, and the input and output interfaces are the same;
一交织模块和一解交织模块,所述P路交织RS(n1,k1)复合码通过该交织模块和解交织模块把P*m1比特宽的数据总线分解成P路独立的具有m1比特宽的数据总线,分别提供给P个相互独立的RS(n1,k1)编译码器;An interleaving module and a deinterleaving module, the P-way interleaving RS (n1, k1) composite code decomposes the P*m1 bit-wide data bus into P-way independent data with m1 bit width through the interleaving module and the deinterleaving module The bus is respectively provided to P mutually independent RS(n1, k1) codecs;
一总线转换模块,所述RS(n2,k2)编译码器通过该总线转换模块实现P*m1比特数据总线和T*m2比特数据总线之间的转换,提供T*m2比特宽数据总线给RS(n2,k2)半并行编译码器进行T路并行编译码;A bus conversion module, the RS (n2, k2) codec realizes the conversion between the P*m1 bit data bus and the T*m2 bit data bus through the bus conversion module, and provides the T*m2 bit wide data bus to the RS The (n2, k2) semi-parallel codec performs T-way parallel codec;
其中RS(n1,k1)表示信息码元数为k1,校验码元数为(n1-k1),每个码元包含m1比特的RS码;RS(n2,k2)表示信息码元数为k2,校验码元数为(n2-k2),每个码元包含m2比特的RS码;T是RS(n2,k2)半并行编译码器并行处理的码元数。Among them, RS(n1, k1) indicates that the number of information symbols is k1, the number of check symbols is (n1-k1), and each symbol contains an RS code of m1 bits; RS(n2, k2) indicates that the number of information symbols is k2, the number of check symbols is (n2-k2), and each symbol contains an RS code of m2 bits; T is the number of symbols processed in parallel by the RS (n2, k2) semi-parallel codec.
所述的数据总线转换装置,其中,所述总线转换模块包括P*m1到T*m2总线转换模块和T*m2到P*m1总线转换模块,所述P*m1到T*m2总线转换模块用于通过P*m1比特总线接收数据,存入一移位寄存器组,再通过T*m2比特数据总线输入到FIFO中缓存,然后用T*m2比特数据总线输出;The data bus conversion device, wherein the bus conversion module includes a P*m1 to T*m2 bus conversion module and a T*m2 to P*m1 bus conversion module, and the P*m1 to T*m2 bus conversion module It is used to receive data through the P*m1 bit bus, store it in a shift register group, and then input it into the FIFO buffer through the T*m2 bit data bus, and then use the T*m2 bit data bus to output it;
一控制模块,用于控制所述移位寄存器组在帧头和帧尾插入适当比特的0,管理FIFO,同时将接收的与P*m1比特总线同步的帧定位信息转换成与输出的T*m2比特数据总线同步的帧定位信息。A control module is used to control the shift register group to insert 0 of appropriate bits at the frame head and frame tail, manage FIFO, and simultaneously convert the received frame alignment information synchronized with the P*m1 bit bus into T* outputted Frame alignment information for m2 bit data bus synchronization.
所述的数据总线转换装置,其中,所述T*m2到P*m1总线转换模块用于通过T*m2比特总线接收数据,存入移位寄存器组,再通过P*m1比特数据总线输入到FIFO中缓存,然后用P*m1比特数据总线输出;The data bus conversion device, wherein, the T*m2 to P*m1 bus conversion module is used to receive data through the T*m2 bit bus, store it in the shift register group, and then input it to the P*m1 bit data bus Cache in FIFO, and then use P*m1 bit data bus to output;
所述控制模块控制移位寄存器组在帧头和帧尾插入适当比特的0,管理FIFO,同时将接收的与T*m2比特总线同步的帧定位信息转换成与输出的P*m1比特数据总线同步的帧定位信息。The control module controls the shift register group to insert 0s of appropriate bits at the frame header and frame tail, manages the FIFO, and simultaneously converts the received frame alignment information synchronized with the T*m2 bit bus into an output P*m1 bit data bus Synchronized frame alignment information.
一种使用所述的数据总线转换装置的RS编译码器,其中,所述RS编译码器包括An RS codec using the data bus conversion device, wherein the RS codec includes
同时实现的一P路交织RS(n1,k1)复合码和RS(n2,k2)码编译码功能的RS编译码器,所述P路交织RS(n1,k1)编码器和RS(n2,k2)编码器采用相同的输入输出接口,所述P路交织RS(n1,k1)译码器和RS(n2,k2)译码器采用相同的输入输出接口,总线宽度都为P*m1比特。A P-way interleaved RS (n1, k1) composite code and an RS codec of RS (n2, k2) coding and decoding functions realized simultaneously, the P-way interleaved RS (n1, k1) encoder and RS (n2, k2) The encoder adopts the same input and output interface, the P-way interleaved RS (n1, k1) decoder and the RS (n2, k2) decoder adopt the same input and output interface, and the bus width is all P*m1 bits .
所述的RS编译码器,其中,所述P路交织RS(n1,k1)编译码器包括一交织模块及一解交织模块,该交织模块与解交织模块之间为P路RS编/译码器;对于编码器,输入数据进入系统后送到P路交织RS编码器进行编码,编码后的数据通过P*m1比特宽度的数据总线输出;对于译码器,输入数据进入系统后送到P路交织RS译码器进行译码,译码后的数据同样通过P*m1比特宽度的数据总线输出。The RS codec, wherein the P-way interleaving RS (n1, k1) codec includes an interleaving module and a de-interleaving module, and between the interleaving module and the de-interleaving module is the P-way RS coding/decoding encoder; for the encoder, the input data enters the system and is sent to the P-way interleaved RS encoder for encoding, and the encoded data is output through a data bus with a P*m1 bit width; for the decoder, the input data enters the system and is sent to The P-way interleaved RS decoder performs decoding, and the decoded data is also output through a data bus with a width of P*m1 bits.
所述的RS编译码器,其中,所述RS(n2,k2)编译码器包括一P*m1到T*m2总线转换模块及一T*m2到P*m1总线转换模块,在该P*m1到T*m2总线转换模块与该T*m2到P*m1总线转换模块之间为RS(n2,k2)编/译码器;对于编码器,将待编码数据送到所述P*m1到T*m2总线转换模块,插入比特0进行填充,将P*m1比特宽度的数据总线转换成T*m2比特的数据总线,T*m2比特宽度数据输入RS(n2,k2)半并行编码器进行编码,编码后的数据首先输出到T*m2到P*m1总线转换模块,去除信息组中的插入比特0,将T*m2比特宽的数据总线转换成P*m1比特宽的数据总线输出;对于译码器,将待译码数据首先送到P*m1到T*m2总线转换模块,插入比特0进行填充,将P*m1比特宽的数据总线转换成T*m2比特宽的数据总线,T*m2比特宽度数据输入RS(n2,k2)半并行译码器进行译码,译码后的数据首先输出到T*m2到P*m1总线转换模块,去除信息组中的插入比特0,将T*m2比特宽的数据总线转换成P*m1比特宽的数据总线输出。The RS codec, wherein, the RS (n2, k2) codec includes a P*m1 to T*m2 bus conversion module and a T*m2 to P*m1 bus conversion module, in the P*m1 m1 to T*m2 bus conversion module and the T*m2 to P*m1 bus conversion module is an RS (n2, k2) encoder/decoder; for the encoder, the data to be encoded is sent to the P*m1 To the T*m2 bus conversion module, insert bit 0 for filling, convert the P*m1 bit width data bus into a T*m2 bit data bus, and input the T*m2 bit width data into the RS(n2, k2) semi-parallel encoder Encode, the encoded data is first output to the T*m2 to P*m1 bus conversion module, remove the insertion bit 0 in the information group, and convert the T*m2 bit wide data bus into a P*m1 bit wide data bus output ; For the decoder, the data to be decoded is first sent to the P*m1 to T*m2 bus conversion module, inserting bit 0 for filling, and converting the P*m1 bit-wide data bus into a T*m2 bit-wide data bus , T*m2 bit width data is input to the RS(n2, k2) semi-parallel decoder for decoding, the decoded data is first output to the T*m2 to P*m1 bus conversion module, and the inserted bit 0 in the information group is removed , converting the T*m2-bit-wide data bus into a P*m1-bit-wide data bus for output.
所述的RS编译码器,其中,所述P*m1比特宽总线和T*m2比特宽总线采用相同频率的时钟,同时用使能信号标示总线上的数据是否有效,如果使能信号不使能,总线上的P*m1或者T*m2比特数据无效,否则有效。The RS codec, wherein, the P*m1 bit-wide bus and the T*m2 bit-wide bus adopt clocks of the same frequency, and an enable signal is used to indicate whether the data on the bus is valid, if the enable signal does not enable Yes, the P*m1 or T*m2 bit data on the bus is invalid, otherwise it is valid.
本发明所提供的一种数据总线转换装置及其RS编译码器,由于采用了RS(n1,k1)编译码器的输入输出总线宽度与码元宽度相同,RS(n2,k2)半并行编译码器的输入输出总线宽度是码元宽度的T倍,都不涉及不完整码元,可以用传统的RS编译码方法实现,有效解决了不完整码元无法应用于RS编译码器的问题,统一了不同RS编译码之间的输入输出接口。A data bus conversion device and its RS codec provided by the present invention, because the input and output bus width of the RS (n1, k1) codec is the same as the symbol width, the RS (n2, k2) semi-parallel codec The input and output bus width of the encoder is T times the width of the symbol, and no incomplete symbols are involved. It can be realized by the traditional RS coding method, which effectively solves the problem that the incomplete symbols cannot be applied to the RS codec. The input and output interfaces between different RS codecs are unified.
附图说明Description of drawings
图1是本发明的统一接口同时实现P路交织RS(n1,k1)复合码和RS(n2,k2)码的编译码器的系统结构图;Fig. 1 is unified interface of the present invention and realizes the system structural diagram of the codec of P way interleaving RS (n1, k1) composite code and RS (n2, k2) code simultaneously;
图2是本发明的P路交织RS(n1,k1)编码器模块结构图;Fig. 2 is P road interleaved RS (n1, k1) coder module structural diagram of the present invention;
图3是本发明的P路交织RS(n1,k1)译码器模块结构图;Fig. 3 is P way interleaved RS (n1, k1) decoder module structural diagram of the present invention;
图4是本发明的RS(n2,k2)编码器模块结构图;Fig. 4 is the RS (n2, k2) encoder module structural diagram of the present invention;
图5是本发明的RS(n2,k2)译码器模块结构图;Fig. 5 is the RS (n2, k2) decoder module structural diagram of the present invention;
图6是本发明的P*m1到T*m2总线转换模块结构图;Fig. 6 is P*m1 to T*m2 bus conversion module structural diagram of the present invention;
图7是本发明的T*m2到P*m1总线转换模块结构图。Fig. 7 is a structural diagram of the T*m2 to P*m1 bus conversion module of the present invention.
具体实施方式:Detailed ways:
下面结合附图对本发明的具体实施例加以详细描述。Specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.
本发明方法的其核心思想是:在系统中同时实现的两种RS编译码器--P路交织RS(n1,k1)复合码和RS(n2,k2)码都使用P*m1比特宽的数据总线,输入输出接口相同。P路交织RS(n1,k1)复合码通过交织和解交织模块把P*m1比特宽的数据总线分解成P路独立的具有m1比特宽的数据总线,分别提供给P个相互独立的RS(n1,k1)编译码器。RS(n2,k2)编译码器通过总线转换模块实现P*m1比特数据总线和T*m2比特数据总线之间的转换,提供T*m2比特宽数据总线给RS(n2,k2)半并行编译码器进行T路并行编译码。Its core idea of the method of the present invention is: two kinds of RS codecs realized simultaneously in the system--P way interleaved RS (n1, k1) composite code and RS (n2, k2) code all use P*m1 bit wide The data bus, the input and output interfaces are the same. The P-way interleaving RS(n1, k1) composite code decomposes the P*m1 bit-wide data bus into P-way independent data buses with m1-bit width through the interleaving and deinterleaving modules, and provides them to P mutually independent RS(n1 , k1) Codec. The RS(n2, k2) codec realizes the conversion between P*m1 bit data bus and T*m2 bit data bus through the bus conversion module, and provides T*m2 bit wide data bus for RS(n2, k2) semi-parallel compilation The encoder performs T-path parallel encoding and decoding.
其中RS(n1,k1)表示信息码元数为k1,校验码元数为(n1-k1),每个码元包含m1比特的RS码;RS(n2,k2)表示信息码元数为k2,校验码元数为(n2-k2),每个码元包含m2比特的RS码;T是RS(n2,k2)半并行编译码器并行处理的码元数。一般地,m1小于m2,m1*k1小于等于m2*k2,P*m1小于等于T*m2。Among them, RS(n1, k1) indicates that the number of information symbols is k1, the number of check symbols is (n1-k1), and each symbol contains an RS code of m1 bits; RS(n2, k2) indicates that the number of information symbols is k2, the number of check symbols is (n2-k2), and each symbol contains an RS code of m2 bits; T is the number of symbols processed in parallel by the RS (n2, k2) semi-parallel codec. Generally, m1 is smaller than m2, m1*k1 is smaller than or equal to m2*k2, and P*m1 is smaller than or equal to T*m2.
如图1所示的,总线转换模块分P*m1到T*m2总线转换模块和T*m2到P*m1总线转换模块两部分,P*m1到T*m2总线转换模块通过P*m1比特总线接收数据,存入移位寄存器组,再通过T*m2比特数据总线输入到FIFO中缓存,然后用T*m2比特数据总线输出。控制模块控制移位寄存器组在帧头和帧尾插入适当比特的0,管理FIFO,同时将接收的与P*m1比特总线同步的帧定位信息转换成与输出的T*m2比特数据总线同步的帧定位信息。T*m2到P*m1总线转换模块与P*m1到T*m2总线转换模块相似,首先通过T*m2比特总线接收数据,存入移位寄存器组,再通过P*m1比特数据总线输入到FIFO中缓存,然后用P*m1比特数据总线输出。控制模块控制移位寄存器组在帧头和帧尾插入适当比特的0,管理FIFO,同时将接收的与T*m2比特总线同步的帧定位信息转换成与输出的P*m1比特数据总线同步的帧定位信息。As shown in Figure 1, the bus conversion module is divided into two parts: the P*m1 to T*m2 bus conversion module and the T*m2 to P*m1 bus conversion module. The P*m1 to T*m2 bus conversion module passes the P*m1 bit The data is received by the bus, stored in the shift register group, and then input to the FIFO for buffering through the T*m2 bit data bus, and then output by the T*m2 bit data bus. The control module controls the shift register group to insert 0s of appropriate bits at the frame header and frame tail, manages the FIFO, and simultaneously converts the received frame alignment information synchronized with the P*m1 bit bus into a frame location synchronized with the output T*m2 bit data bus Frame alignment information. The T*m2 to P*m1 bus conversion module is similar to the P*m1 to T*m2 bus conversion module. First, it receives data through the T*m2 bit bus, stores it in the shift register group, and then inputs it to the P*m1 bit data bus. It is buffered in FIFO, and then output with P*m1 bit data bus. The control module controls the shift register group to insert 0s of appropriate bits at the frame header and frame tail, manages the FIFO, and at the same time converts the received frame alignment information synchronized with the T*m2 bit bus into one synchronized with the output P*m1 bit data bus Frame alignment information.
RS(n1,k1)编译码器的输入输出总线宽度与码元宽度相同,RS(n2,k2)半并行编译码器的输入输出总线宽度是码元宽度的T倍,都不涉及不完整码元,可以用传统的RS编译码方法实现,有效解决了不完整码元问题,统一了不同RS码之间的输入输出接口。The input and output bus width of the RS(n1, k1) codec is the same as the symbol width, and the input and output bus width of the RS(n2, k2) semi-parallel codec is T times the symbol width, which does not involve incomplete codes Elements can be realized by the traditional RS encoding and decoding method, which effectively solves the problem of incomplete code elements and unifies the input and output interfaces between different RS codes.
同时实现P路交织RS(n1,k1)复合码和RS(n2,k2)码编译码功能的RS编译码器的系统结构如图1所示,P路交织RS(n1,k1)编码器和RS(n2,k2)编码器采用相同的输入输出接口,P路交织RS(n1,k1)译码器和RS(n2,k2)译码器也采用相同的输入输出接口,总线宽度都为P*m1比特。对于编码器,输入数据进入系统后送到P路交织RS(n1,k1)编码器或者RS(n2,k2)编码器进行编码,编码后的数据通过P*m1比特宽度的数据总线输出。对于译码器,输入数据进入系统后送到P路交织RS(n1,k1)译码器或者RS(n2,k2)译码器进行译码,译码后的数据同样通过P*m1比特宽度的数据总线输出。The system structure of the RS codec that realizes P-way interleaved RS (n1, k1) composite code and RS (n2, k2) code coding and decoding functions is shown in Figure 1. The P-way interleaved RS (n1, k1) encoder and The RS (n2, k2) encoder uses the same input and output interface, and the P-way interleaved RS (n1, k1) decoder and RS (n2, k2) decoder also use the same input and output interface, and the bus width is P *m1 bits. For the encoder, the input data enters the system and is sent to the P-way interleaved RS (n1, k1) encoder or RS (n2, k2) encoder for encoding, and the encoded data is output through a data bus with a P*m1 bit width. For the decoder, after the input data enters the system, it is sent to the P-way interleaved RS (n1, k1) decoder or RS (n2, k2) decoder for decoding, and the decoded data also passes through the P*m1 bit width data bus output.
P路交织RS(n1,k1)编码器的结构如图2所示。待编码数据通过P*m1比特宽输入总线首先送到解交织模块210,解交织后通过P条m1比特宽度的数据总线分别送到P个相互独立的RS(n1,k1)编码器进行编码,编码后的数据送到交织模块220进行交织,然后通过P*m1比特宽度数据总线输出。P路交织RS(n1,k1)译码器的结构与编码器相似,如图3所示,待译码的数据通过P*m1比特宽度输入总线首先送到解交织模块210,解交织后通过P条m1比特宽度的数据总线分别送到P个独立的RS(n1,k1)译码器进行译码,译码后的数据送到交织模块220进行交织,然后通过P*m1比特宽度数据总线输出译码后数据。The structure of the P-way interleaved RS (n1, k1) encoder is shown in Fig. 2 . The data to be encoded is first sent to the deinterleaving module 210 through the P*m1 bit width input bus, and after deinterleaving, it is sent to P mutually independent RS (n1, k1) encoders for encoding through P pieces of m1 bit width data buses respectively. The coded data is sent to the interleaving module 220 for interleaving, and then output through a P*m1 bit width data bus. The structure of the P-way interleaved RS (n1, k1) decoder is similar to that of the encoder. As shown in Figure 3, the data to be decoded is first sent to the de-interleaving module 210 through the P*m1 bit width input bus, and then passed through after de-interleaving P pieces of m1-bit-width data buses are respectively sent to P independent RS (n1, k1) decoders for decoding, and the decoded data is sent to the interleaving module 220 for interleaving, and then passed through the P*m1-bit-width data bus Output the decoded data.
RS(n2,k2)编码器结构如图4所示,待编码数据首先送到P*m1到T*m2总线转换模块410,插入比特0进行填充,将P*m1比特宽度的数据总线转换成T*m2比特的数据总线。T*m2比特宽度数据输入RS(n2,k2)半并行编码器进行编码,每时钟并行处理T个码元,每个码元包含m2比特,没有不完整码元出现,仍然采用常规RS编码器实现。编码后的数据首先输出到T*m2到P*m1总线转换模块420,去除信息组中的插入比特0,将T*m2比特宽的数据总线转换成P*m1比特宽的数据总线输出。RS(n2,k2)译码器的结构与RS(n2,k2)编码器的结构相似,如图4所示,待译码数据首先送到P*m1到T*m2总线转换模块410,插入比特0进行填充,将P*m1比特宽的数据总线转换成T*m2比特宽的数据总线。T*m2比特宽度数据输入RS(n2,k2)半并行译码器进行译码,每时钟并行处理T个码元,每个码元包含m2比特。译码后的数据首先输出到T*m2到P*m1总线转换模块420,去除信息组中的插入比特,将T*m2比特宽的数据总线转换成P*m1比特宽的数据总线输出。为便于硬件实现,P*m1比特宽总线和T*m2比特宽总线采用相同频率的时钟,同时用使能信号标示总线上的数据是否有效。如果使能信号不使能,总线上的P*m1或者T*m2比特数据无效,否则有效。The structure of the RS (n2, k2) encoder is as shown in Figure 4. The data to be encoded is first sent to the P*m1 to T*m2 bus conversion module 410, and the bit 0 is inserted for filling, and the data bus of the P*m1 bit width is converted into T*m2 bit data bus. T*m2 bit width data is input into RS(n2, k2) semi-parallel encoder for encoding, each clock processes T symbols in parallel, each symbol contains m2 bits, no incomplete symbols appear, and the conventional RS encoder is still used accomplish. The encoded data is first output to the T*m2 to P*m1 bus conversion module 420, the insertion bit 0 in the information group is removed, and the T*m2 bit wide data bus is converted into a P*m1 bit wide data bus for output. The structure of the RS (n2, k2) decoder is similar to the structure of the RS (n2, k2) encoder, as shown in Figure 4, the data to be decoded is first sent to the P*m1 to T*m2 bus conversion module 410, insert Bit 0 is filled to convert the P*m1 bit wide data bus into a T*m2 bit wide data bus. The T*m2 bit width data is input to the RS (n2, k2) semi-parallel decoder for decoding, and each clock processes T symbols in parallel, and each symbol contains m2 bits. The decoded data is first output to the T*m2 to P*m1 bus conversion module 420, removes the inserted bits in the information group, and converts the T*m2 bit wide data bus into a P*m1 bit wide data bus for output. For the convenience of hardware implementation, the P*m1 bit-wide bus and the T*m2 bit-wide bus use clocks of the same frequency, and an enable signal is used to indicate whether the data on the bus is valid. If the enable signal is not enabled, the P*m1 or T*m2 bit data on the bus is invalid, otherwise it is valid.
一般地,RS(n2,k2)编码器的总线宽度为 比特,实际输入的信息组长度为 个m2比特码元。因为在信息组前面插入码元比特0不会改变校验组的值,一般需要在信息组前插入 -k2个码元比特0,同时需要在信息组末尾插入k2*m2-P*k1*m1个比特0。以16路交织RS(255,239)和RS(2720,2550)为例,因为RS(2720,2550)编码器的接口要与16路交织RS(255,239)的相同,后者采用128-bits输入输出总线,输入239个128-bits信息组以后等待16个以上的时钟周期,输出校验码元,RS(2720,2550)编码模块必须在239个时钟周期内完成校验组的计算,每个时钟周期接收 个12-bits码元,编码模块每个时钟周期并行处理11个码元,一个码字需要 个时钟周期,实际处理232*11=2552个码元。不过一个码元实际的信息比特数为16*239*8=30592,加上固定填充的8比特,还需要填充2552*12-30592-8=24比特(即2个码元0)进行计算。将24个比特0插到码字前面,RS(2720,2550)码字就变成了RS(2722,2552)码字。为了与16路交织RS(255,239)一致,在编码器的输出端必须将插入到码字前面的24个填充比特去除,将RS(2722,2552)码字转换成RS(2720,2550)码字。RS(2720,2550)译码器的接口也要与16路交织RS(255,239)的相同,255个时钟周期接收完一个RS(2720,2550)码字,每个时钟周期需要并行处理 个码元,实际处理时间为 个时钟周期,实际处理了248*11=2728个码元。所以,在并行译码前,需要在接收到的RS(2720,2550)码字前面插入6*12=72比特的0(即6个码元0),将其转换成RS(2728,2558)码字。Generally, the bus width of the RS(n2, k2) encoder is bits, the length of the actual input information group is m2 bit symbols. Because inserting code element bit 0 in front of the information group will not change the value of the check group, it is generally necessary to insert - k2 code element bits 0, and k2*m2-P*k1*m1 bit 0s need to be inserted at the end of the information group at the same time. Take the 16-way interleaved RS (255, 239) and RS (2720, 2550) as an example, because the interface of the RS (2720, 2550) encoder is the same as that of the 16-way interleaved RS (255, 239), which uses 128- bits input and output bus, after inputting 239 128-bits information groups, wait for more than 16 clock cycles, and output the check code element, the RS (2720, 2550) encoding module must complete the calculation of the check group within 239 clock cycles, Each clock cycle receives Each 12-bits symbol, the encoding module processes 11 symbols in parallel in each clock cycle, and a codeword needs clock cycle, actually process 232*11=2552 symbols. However, the actual number of information bits in a symbol is 16*239*8=30592, plus 8 bits for fixed padding, 2552*12-30592-8=24 bits (that is, 2 symbol 0s) need to be filled for calculation. By inserting 24 bits of 0 in front of the codeword, the RS(2720, 2550) codeword becomes the RS(2722, 2552) codeword. In order to be consistent with the 16-way interleaved RS (255, 239), the 24 stuffing bits inserted in front of the codeword must be removed at the output of the encoder, and the RS (2722, 2552) codeword is converted into RS (2720, 2550) Codeword. The interface of the RS (2720, 2550) decoder is also the same as that of the 16-way interleaved RS (255, 239). After receiving an RS (2720, 2550) codeword in 255 clock cycles, each clock cycle needs to be processed in parallel. code units, the actual processing time is clock cycle, 248*11=2728 symbols are actually processed. Therefore, before parallel decoding, it is necessary to insert 6*12=72 bits of 0 (that is, 6 symbol 0s) in front of the received RS (2720, 2550) codeword to convert it into RS (2728, 2558) Codeword.
图6为P*m1比特到T*m2比特总线转换模块结构图,FIFO为宽T*m2比特、深 的存储器。2*P*m1比特的移位寄存器组的寄存器从上到下编号依次为0,1,...,2*P*m1。指针pointer指向比特移位寄存器中当前有效填充数据的下一位置,编号小于pointer的寄存器内都有有效数据,编号大于等于pointer的寄存器为空。例如pointer=w,则寄存器0到寄存器w内都有有效数据。如果此时输入有效数据,输入的P*m1比特顺序放在原来剩余数据下面,即放在寄存器w到寄存器w+P*m1-1内,指针下移,指向寄存器w+P*m1。如果移位寄存器内的有效数据超过T*m2比特(指针pointer大于等于T*m2),将最上面的T*m2比特数据移出,同时将剩余数据上移T*m2比特,指针也上移T*m2比特。如果在移出数据的同时有数据输入,首先移出数据,调整剩余数据位置,然后将新输入的数据顺序放到剩余数据下面,根据新的数据位置调整指针。因为只要移位寄存器内有超过T*m2比特数据,就会将顶端数据移出,移位寄存器内的数据始终不会超过2*P*m1比特。Figure 6 is a structural diagram of the bus conversion module from P*m1 bits to T*m2 bits, and the FIFO is T*m2 bits wide and deep of memory. Registers of the 2*P*m1-bit shift register group are numbered 0, 1, . . . , 2*P*m1 from top to bottom. The pointer pointer points to the next position of the currently valid filling data in the bit shift register, and the registers with numbers smaller than pointer have valid data, and the registers with numbers greater than or equal to pointer are empty. For example, pointer=w, then there are valid data in register 0 to register w. If valid data is input at this time, the input P*m1 bit sequence is placed under the original remaining data, that is, it is placed in register w to register w+P*m1-1, and the pointer moves down to point to register w+P*m1. If the valid data in the shift register exceeds T*m2 bits (the pointer pointer is greater than or equal to T*m2), move out the top T*m2 bit data, and move the remaining data up T*m2 bits, and move up the pointer by T *m2 bits. If there is data input while data is being moved out, first move out the data, adjust the position of the remaining data, then place the newly input data under the remaining data in sequence, and adjust the pointer according to the new data position. Because as long as there is more than T*m2 bits of data in the shift register, the top data will be shifted out, and the data in the shift register will never exceed 2*P*m1 bits.
一个时钟周期输入转换模块的最多只有P*m1比特,输出转换模块的可能为T*m2比特,即使P*m1比特数据总线连续输入,T*m2比特数据输出也会有间隙(某些时钟周期数据不使能,表示没有输出)。如果在码字中间有间隙,会大大增加编码、译码的复杂度,故用FIFO对数据缓存,在一个码字开始以后先缓存足够的数据,再连续输出,从而去除码字中间的间隙。如果P*m1比特数据总线连续输入(一般情况下输入都是连续的),一个码字需要n1个时钟周期,连续以T*m2比特数据总线输出,需要 个时钟周期,要保证连续,需要先缓存 比特数据。在每个码字初始化时,将移位寄存器设为0,同时设置指针为 插入 个比特0到信息组前面;在输入P*k1*m1信息比特后,还需要添加k2*m2-k1*m1个比特0到移位寄存器。对于译码器的P*m1到T*m2转换模块,需要将移位寄存器设为0的同时设置指针为插入 个比特0到信息组前面。控制模块通过对指针的控制完成比特0的插入,它同时还控制FIFO,对帧定位信息进行转换,将输入的与P*m1比特宽数据总线同步的帧定位信号转转成与T*m2比特宽数据总线同步的帧定位信号。A clock cycle input conversion module has at most P*m1 bits, and the output conversion module may be T*m2 bits. Even if P*m1 bit data bus is continuously input, T*m2 bit data output will have gaps (some clock cycles The data is not enabled, indicating that there is no output). If there is a gap in the middle of the codeword, it will greatly increase the complexity of encoding and decoding. Therefore, FIFO is used to cache the data. After a codeword starts, enough data is buffered first, and then output continuously, thereby removing the gap in the middle of the codeword. If the P*m1 bit data bus is continuously input (in general, the input is continuous), a codeword needs n1 clock cycles, and is continuously output by the T*m2 bit data bus, which requires clock cycle, to ensure continuity, you need to cache bit data. When each codeword is initialized, the shift register is set to 0, and the pointer is set to insert bits 0 to the front of the information group; after inputting P*k1*m1 information bits, k2*m2-k1*m1 bits 0 need to be added to the shift register. For the P*m1 to T*m2 conversion module of the decoder, it is necessary to set the shift register to 0 and set the pointer to insert bits 0 to the front of the information group. The control module completes the insertion of bit 0 through the control of the pointer. It also controls the FIFO to convert the frame alignment information, and converts the input frame alignment signal synchronized with the P*m1 bit wide data bus into a T*m2 bit Frame alignment signal for wide data bus synchronization.
T*m2到P*m1总线转换模块与P*m1到T*m2转换模块类似,使用图7所示的结构。包含2*P*m1比特的移位寄存器组从上到下依次将各寄存器编号为0,1,...,2*P*m1-1。FIFO由宽度为T*m2比特、深度为 的存储器构成。指针pointer指向比特移位寄存器中当前有效填充数据的下一位置,编号小于pointer的寄存器内都有有效数据,编号大于等于pointer的寄存器为空。该模块首先通过T*m2比特数据总线从编码模块或译码模块接收数据,存入FIFO中。如果移位寄存器中有超过T*m2个寄存器为空(pointer小于2*P*m1-T*m2),从FIFO中读取T*m2比特数据,按顺序放在移位寄存器中已有数据下面,同时调整指针,指向存入数据后的相应位置。如果移位寄存器中有超过P*m1比特的有效数据,通过P*m1比特数据总线输出,同时将剩余数据移到移位寄存器顶部,调整指针。通常从FIFO读数据和从移位寄存器输出数据是同时发生的,这时首先输出P*m1比特数据,调整剩余数据位置,然后在剩余数据下面顺序存放从FIFO中读入的数据,调整指针。The T*m2 to P*m1 bus conversion module is similar to the P*m1 to T*m2 conversion module, using the structure shown in Figure 7. The shift register group comprising 2*P*m1 bits sequentially numbers each register as 0, 1, . . . , 2*P*m1-1 from top to bottom. The FIFO consists of a width of T*m2 bits and a depth of memory composition. The pointer pointer points to the next position of the currently valid filling data in the bit shift register, and the registers with numbers smaller than pointer have valid data, and the registers with numbers greater than or equal to pointer are empty. The module first receives data from the encoding module or the decoding module through the T*m2 bit data bus, and stores it in the FIFO. If more than T*m2 registers in the shift register are empty (pointer is less than 2*P*m1-T*m2), read T*m2 bits of data from the FIFO, and place the existing data in the shift register in order Next, adjust the pointer at the same time to point to the corresponding position after storing the data. If there is valid data exceeding P*m1 bits in the shift register, it will be output through the P*m1 bit data bus, and at the same time, the remaining data will be moved to the top of the shift register to adjust the pointer. Usually, reading data from FIFO and outputting data from shift register occur at the same time. At this time, first output P*m1 bit data, adjust the remaining data position, and then store the data read in from FIFO sequentially under the remaining data, and adjust the pointer.
对于编码器的P*m1到T*m2转换模块,需要丢掉每个码字最前面的比特填充值;对于译码器的P*m1到T*m2转换模块,需要丢掉每个码字最前面的 比特填充值。For the P*m1 to T*m2 conversion module of the encoder, the first part of each codeword needs to be discarded Bit stuffing value; for the P*m1 to T*m2 conversion module of the decoder, it is necessary to discard the first bit of each codeword bit padding value.
系统中的RS(n1,k1)和RS(n2,k2)编译码器每时钟周期处理一个或T个码元,不涉及不完整码元,是常规RS编译码器。The RS(n1, k1) and RS(n2, k2) codecs in the system process one or T symbols per clock cycle, do not involve incomplete symbols, and are conventional RS codecs.
本发明通过比特0的插入和剔出,实现了P*m1与T*m2比特总线之间的相互转换,避免了不完整码元的产生,巧妙地解决了数据总线不一致引起的不完整码元问题,实现了接口完全相同的P路交织RS(n1,k1)复合码和RS(n2,k2)码的编译码器。The present invention realizes the mutual conversion between P*m1 and T*m2 bit buses through the insertion and removal of bit 0, avoids the generation of incomplete code elements, and skillfully solves the incomplete code elements caused by the inconsistency of the data bus The problem is to implement a P-way interleaved RS(n1, k1) composite code and RS(n2, k2) codec with the same interface.
Claims (7)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2004100525769A CN100517982C (en) | 2004-12-08 | 2004-12-08 | Data bus converting device and its RS coder decoder |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2004100525769A CN100517982C (en) | 2004-12-08 | 2004-12-08 | Data bus converting device and its RS coder decoder |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1787385A true CN1787385A (en) | 2006-06-14 |
| CN100517982C CN100517982C (en) | 2009-07-22 |
Family
ID=36784727
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2004100525769A Expired - Lifetime CN100517982C (en) | 2004-12-08 | 2004-12-08 | Data bus converting device and its RS coder decoder |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN100517982C (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2008019611A1 (en) * | 2006-08-11 | 2008-02-21 | Huawei Technologies Co., Ltd. | Forward error correction for 64b66b coded systems |
| WO2009076801A1 (en) * | 2007-12-14 | 2009-06-25 | Zte Corporation | Device and method for interlaced encoding rs code |
| CN104734815A (en) * | 2015-04-08 | 2015-06-24 | 烽火通信科技股份有限公司 | Hardware implementation method and system for FEC in OTN system |
-
2004
- 2004-12-08 CN CNB2004100525769A patent/CN100517982C/en not_active Expired - Lifetime
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2008019611A1 (en) * | 2006-08-11 | 2008-02-21 | Huawei Technologies Co., Ltd. | Forward error correction for 64b66b coded systems |
| US8122325B2 (en) | 2006-08-11 | 2012-02-21 | Futurewei Technologies, Inc. | Forward error correction for 64b66b coded systems |
| CN101455019B (en) * | 2006-08-11 | 2012-09-19 | 华为技术有限公司 | Forward Error Correction of 64B66B Coding System |
| CN102891731A (en) * | 2006-08-11 | 2013-01-23 | 华为技术有限公司 | Forward error correction for 64b66B coded systems |
| CN102891731B (en) * | 2006-08-11 | 2015-03-11 | 华为技术有限公司 | Forward error correction for 64b66B coded systems |
| WO2009076801A1 (en) * | 2007-12-14 | 2009-06-25 | Zte Corporation | Device and method for interlaced encoding rs code |
| US8279741B2 (en) | 2007-12-14 | 2012-10-02 | Zte Corporation | Device and method for interleaved encoding RS code |
| CN104734815A (en) * | 2015-04-08 | 2015-06-24 | 烽火通信科技股份有限公司 | Hardware implementation method and system for FEC in OTN system |
| CN104734815B (en) * | 2015-04-08 | 2018-01-23 | 烽火通信科技股份有限公司 | The Hardware Implementation and system of high-throughput FEC encoder in OTN system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN100517982C (en) | 2009-07-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN1317643C (en) | Storage device, method for accessing storage device and Read-solomon decoder | |
| CN102160378B (en) | Method and apparatus for synchronizing highly compressed enhancement layer data | |
| US8543884B2 (en) | Communications channel parallel interleaver and de-interleaver | |
| CN1154237C (en) | Encoding/decoding device and encoding/decoding method | |
| US6504493B1 (en) | Method and apparatus for encoding/decoding data | |
| CN101667887A (en) | Encoding method and device thereof and decoding method and device thereof | |
| CN1040698A (en) | Error-Correcting Circuit | |
| CN1656693A (en) | Method for iterative hard-input forward error correction | |
| CN101489135B (en) | A kind of coder and coding method that facilitates the realization of LDPC long code in FPGA | |
| JPWO1999062184A1 (en) | Method and apparatus for interleaving and method and apparatus for deinterleaving | |
| CN101686104A (en) | Coding and decoding method for forward error correction, device and system thereof | |
| WO2009021065A1 (en) | Encoding and decoding using generalized concatenated codes (gcc) | |
| CN100488057C (en) | Optimized interleaving of digital signals | |
| CN1647393A (en) | Method and apparatus for embedding an additional layer of error correction into an error correcting code | |
| CN104601180B (en) | Method and device for encoding two-dimensional product codes on basis of extended hamming codes | |
| CN1316751C (en) | Method and apparatus for decoding error correction code | |
| CN1452321A (en) | Error correcting code block encoder and decoder with reduced random access memory requirement | |
| CN1787385A (en) | Data bus converting device and its RS coder decoder | |
| CN1106717C (en) | Transmission and reception of digital information signal | |
| US5574448A (en) | Method and apparatus for encoding data with variable block lengths | |
| CN110034847B (en) | Cascade coding method and device | |
| CN102318249B (en) | An interweaving and deinterleaving method,the interleaver and de-interleaver | |
| CN100536350C (en) | Circuit and method for realizing the coding | |
| CN1121758C (en) | Coding chip | |
| US20030106013A1 (en) | Architecture for multi-symbol encoding and decoding |
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 | ||
| C41 | Transfer of patent application or patent right or utility model | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20160530 Address after: 518057 Nanshan District, Guangdong high tech Industrial Park, science and Technology Industrial Park, ZTE building, block A, layer 6, layer Patentee after: ZTE Corp. Patentee after: SANECHIPS TECHNOLOGY Co.,Ltd. Address before: 518057 Nanshan District, Guangdong high tech Industrial Park, science and Technology Industrial Park, ZTE building, block A, layer 6, layer Patentee before: ZTE Corp. |
|
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20221207 Address after: 518055 Zhongxing Industrial Park, Liuxian Avenue, Xili street, Nanshan District, Shenzhen City, Guangdong Province Patentee after: SANECHIPS TECHNOLOGY Co.,Ltd. Address before: 518057, Nanshan District high tech Industrial Park, Guangdong province Shenzhen science and technology south road Zhongxing building A block 6 Patentee before: ZTE Corp. Patentee before: SANECHIPS TECHNOLOGY Co.,Ltd. |
|
| CX01 | Expiry of patent term | ||
| CX01 | Expiry of patent term |
Granted publication date: 20090722 |