WO2022144030A1 - 一种9b/10b编解码方法 - Google Patents

一种9b/10b编解码方法 Download PDF

Info

Publication number
WO2022144030A1
WO2022144030A1 PCT/CN2022/071737 CN2022071737W WO2022144030A1 WO 2022144030 A1 WO2022144030 A1 WO 2022144030A1 CN 2022071737 W CN2022071737 W CN 2022071737W WO 2022144030 A1 WO2022144030 A1 WO 2022144030A1
Authority
WO
WIPO (PCT)
Prior art keywords
bit
source sequence
bit source
sequence
type
Prior art date
Application number
PCT/CN2022/071737
Other languages
English (en)
French (fr)
Inventor
梁科
王元龙
Original Assignee
天津瑞发科半导体技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 天津瑞发科半导体技术有限公司 filed Critical 天津瑞发科半导体技术有限公司
Publication of WO2022144030A1 publication Critical patent/WO2022144030A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M5/00Conversion of the form of the representation of individual digits
    • H03M5/02Conversion to or from representation by pulses
    • H03M5/04Conversion to or from representation by pulses the pulses having two levels
    • H03M5/14Code representation, e.g. transition, for a given bit cell depending on the information in one or more adjacent bit cells, e.g. delay modulation code, double density code

Definitions

  • the present invention relates to the technical field of communications, in particular to a method for encoding and decoding a DC balanced code.
  • DC balance code is a commonly used coding method in the field of communication. When transmitting signals on a transmission line, the use of DC balance code can make the number of "0" and “1" in the data basically equal, and eliminate the DC component of the signal during data transmission. , so that the clock and data can be recovered at the receiving end.
  • Commonly used DC balance codes include 8B/10B codes, 9B/10B codes, etc. Among them, 8B/10B codes have low coding efficiency and have 20% redundancy, while 9B/10B codes can not only achieve DC balance, but also achieve higher The coding efficiency is reduced to 10%, which can be considered as a relatively optimal coding method.
  • the technical problem to be solved by the present invention is how to encode a 9-bit sequence set into a 10-bit sequence set, eliminate the DC component of the signal in the process of data transmission, so as to restore the clock and data at the receiving end, and avoid using the table lookup method to Simplify the implementation method and reduce the problem of resource overhead.
  • the technical scheme adopted in the present invention is:
  • a 9B/10B encoding method of the present invention it is used to encode a 9-bit source sequence set into a 10-bit target sequence set, each sequence in the 9-bit source sequence set is a 9-bit binary number, and the encoded 10-bit Each sequence in the target sequence set is a 10-bit binary number, the 10-bit target sequence set includes balanced sequences and unbalanced sequences, and different 9-bit source sequences are encoded as different 10-bit target sequences.
  • the 9-bit source sequence sets include the first type of 9-bit source sequence sets, the second type of 9-bit source sequence sets, the third type of 9-bit source sequence sets, the three types of 9-bit source sequence sets are disjoint, and the three types of 9-bit source sequence sets.
  • the collection of source sequence sets has a total of 512 non-repeating 9-bit source sequences.
  • the first type of 9-bit source sequence set only includes 9-bit source sequences with difference values of 1 and -1, and 1-bit data "0" is inserted into the same position of each 9-bit source sequence in the first type of 9-bit source sequence set After or "1", the encoding is a 10-bit target balanced sequence.
  • the same position is the leftmost or rightmost of the 9-bit source sequence, and the inserted 1
  • the bit data is either the most significant or the least significant in the encoded 10-bit target balanced sequence.
  • the second type of 9-bit source sequence set alternatively includes only 9-bit source sequences with a difference value of 3 or only 9-bit source sequences with a difference value of -3.
  • the second type 9-bit source sequence set only contains 9-bit source sequences with a difference value of 3, insert 1-bit data "0" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of difference values
  • a 10-bit target unbalanced sequence of ⁇ 2 the pair of 10-bit target unbalanced sequences is the encoding of the 9-bit source sequence with a difference value of 3.
  • the second type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of -3, insert 1-bit data "1" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of differences
  • a 10-bit target unbalanced sequence with a value of ⁇ 2 this pair of 10-bit target unbalanced sequences is an encoding of the 9-bit source sequence with a difference value of -3.
  • the position of the inserted data is: for the number of "1" in the 9-bit source sequence from the lowest bit to the After the high order count is over 3, or the number of "1"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • the position of the inserted data is: for the number of "0" in the 9-bit source sequence from the lowest bit to the When the high order count is over 3, or the number of "0"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • Each 9-bit source sequence included in the third type of 9-bit source sequence set is encoded as a pair of 10-bit target unbalanced sequences that are opposite to each other.
  • the third type 9-bit source sequence set includes the fourth type 9-bit source sequence set and the fifth type 9-bit source sequence set, the fourth type and the fifth type 9-bit source sequence set are disjoint, and the fourth type and the fifth type 9-bit source sequence set are disjoint.
  • the collection of the five types of 9-bit source sequence sets is the third type of 9-bit source sequence sets.
  • the fourth type of 9-bit source sequence set optionally includes only 9-bit source sequences with a difference value of 5 or only 9-bit source sequences with a difference value of -5.
  • the fourth type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of 5, insert 1-bit data "0" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of difference values.
  • a 10-bit target unbalanced sequence of ⁇ 4 the pair of 10-bit target unbalanced sequences is the encoding of the 9-bit source sequence with a difference value of 5.
  • the fourth type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of -5, insert 1-bit data "1" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of differences
  • a 10-bit target unbalanced sequence with a value of ⁇ 4 this pair of 10-bit target unbalanced sequences is an encoding of the 9-bit source sequence with a difference value of -5.
  • the position of the inserted data is: for the number of "1" in the 9-bit source sequence from the lowest bit to the After the high order count is over 3, or the number of "1"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • the position of the inserted data is: for the number of "0" in the 9-bit source sequence from the lowest bit to the When the high order count is over 3, or the number of "0"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • Each 9-bit source sequence included in the fifth type of 9-bit source sequence set is encoded as a pair of 10-bit target unbalanced sequences that are opposite to each other.
  • the 10-bit target sequence set only includes sequences with difference values of -4, -2, 0, 2, and 4, and the 10-bit target sequence set alternatively conforms to one of the following two characteristics, the first characteristic is : The 10-bit target sequence set does not contain sequences whose lowest 4 bits are 4 bits "0000” or "1111", nor do they contain sequences whose highest 5 bits are 5 bits "00000” or "11111”; the second feature is : The 10-bit target sequence set does not include a sequence whose lowest 5 bits are 5 bits "00000” or "11111”, nor does it include a sequence whose highest 4 bits are 4 bits "0000” or "1111".
  • the 10-bit target sequence set includes 784 codewords, and the 784 codewords include 240 10-bit target balanced sequences and 544 10-bit target unbalanced sequences, and the 544 10-bit target unbalanced sequences can be composed of 272 pairs of mutually opposite 10-bit target unbalanced sequences.
  • the 240 10-bit target balanced sequences and the 272 pairs of 10-bit target unbalanced sequences are encodings of 512 9-bit source sequences in the 9-bit source sequence set.
  • the 272 pairs of 10-bit target unbalanced sequences that are opposite to each other include 189 pairs of 10-bit target unbalanced sequences with a difference value of ⁇ 2 and 83 pairs of 10-bit target unbalanced sequences with a difference value of ⁇ 4.
  • the 10-bit target sequence set also includes 16 10-bit target unbalanced sequences to represent control characters, and the 16 10-bit target unbalanced sequences can form 8 pairs of 10-bit target unbalanced sequences that are opposite numbers to each other, wherein Each pair of opposite 10-bit target unbalanced sequences is an encoding of a control character.
  • each sequence in the 9-bit source sequence set is a 9-bit binary number
  • the encoded 10 Each sequence in the bit target sequence set is a 10-bit binary number
  • the 10-bit target sequence set includes balanced sequences and unbalanced sequences
  • different 9-bit source sequences are encoded into different 10-bit target sequences.
  • the 9-bit source sequence sets include the first type of 9-bit source sequence sets, the second type of 9-bit source sequence sets, the third type of 9-bit source sequence sets, the three types of 9-bit source sequence sets are disjoint, and the three types of 9-bit source sequence sets.
  • the collection of source sequence sets has a total of 512 non-repeating 9-bit source sequences.
  • the first type of 9-bit source sequence set only includes 9-bit source sequences with difference values of 1 and -1, and 1-bit data "0" is inserted into the same position of each 9-bit source sequence in the first type of 9-bit source sequence set After or "1", the encoding is a 10-bit target balanced sequence.
  • the same position is the leftmost or rightmost of the 9-bit source sequence, and the inserted 1
  • the bit data is either the most significant or the least significant in the encoded 10-bit target balanced sequence.
  • the second type of 9-bit source sequence set alternatively includes only 9-bit source sequences with a difference value of 3 or only 9-bit source sequences with a difference value of -3.
  • the second type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of 3
  • a 10-bit target unbalanced sequence of ⁇ 2 the pair of 10-bit target unbalanced sequences is the encoding of the 9-bit source sequence with a difference value of 3.
  • the second type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of -3, insert 1-bit data "1" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of differences
  • a 10-bit target unbalanced sequence with a value of ⁇ 2 this pair of 10-bit target unbalanced sequences is an encoding of the 9-bit source sequence with a difference value of -3.
  • the position of the inserted data is: for the number of "1" in the 9-bit source sequence from the lowest bit to the After the high order count is over 3, or the number of "1"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • the position of the inserted data is: for the number of "0" in the 9-bit source sequence from the lowest bit to the When the high order count is over 3, or the number of "0"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • the third type of 9-bit source sequence set includes the third type of 9-bit source sequence subset A and the third type of 9-bit source sequence subset B, the third type of 9-bit source sequence subset A and the third type of 9-bit source sequence subset A and the third type of 9-bit source sequence
  • the sequence subsets B are disjoint, and the combination of the third type 9-bit source sequence subset A and the third type 9-bit source sequence subset B is the third type 9-bit source sequence set.
  • Each 9-bit source sequence included in the third type of 9-bit source sequence subset A is encoded as a 10-bit target balanced sequence.
  • Each 9-bit source sequence included in the third type of 9-bit source sequence subset B is encoded as a pair of 10-bit target unbalanced sequences that are opposite to each other.
  • the third type of 9-bit source sequence subset A includes two sequences: "000000000” and "111111111".
  • the third type 9-bit source sequence subset B includes the sixth type 9-bit source sequence set and the seventh type 9-bit source sequence set, the sixth type and the seventh type 9-bit source sequence set are disjoint, and the sixth type The combination with the seventh type 9-bit source sequence set is the third type 9-bit source sequence subset B.
  • the sixth type of 9-bit source sequence set alternatively includes only 9-bit source sequences with a difference value of 5 or only 9-bit source sequences with a difference value of -5.
  • the sixth type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of 5, insert 1-bit data "0" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of difference values.
  • a 10-bit target unbalanced sequence of ⁇ 4 the pair of 10-bit target unbalanced sequences is the encoding of the 9-bit source sequence with a difference value of 5.
  • the sixth type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of -5, insert 1-bit data "1" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite number constitute a pair of differences
  • a 10-bit target unbalanced sequence with a value of ⁇ 4 this pair of 10-bit target unbalanced sequences is an encoding of the 9-bit source sequence with a difference value of -5.
  • the position of the inserted data is: the number of "1" in the 9-bit source sequence from the lowest bit to the After the high order count is over 3, or the number of "1"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • the position of the inserted data is: for the number of "0" in the 9-bit source sequence from the lowest bit to the When the high order count is over 3, or the number of "0"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • Each 9-bit source sequence included in the seventh type of 9-bit source sequence set is encoded as a pair of 10-bit target unbalanced sequences that are opposite to each other.
  • the 10-bit target sequence set only includes sequences with difference values of -4, -2, 0, 2, and 4, and the 10-bit target sequence set alternatively conforms to one of the following two characteristics, the first characteristic is : The 10-bit target sequence set does not contain sequences whose lowest 4 bits are 4 bits "0000” or "1111", nor do they contain sequences whose highest 5 bits are 5 bits "00000” or "11111”; the second feature is : The 10-bit target sequence set does not include a sequence whose lowest 5 bits are 5 bits "00000” or "11111”, nor does it include a sequence whose highest 4 bits are 4 bits "0000” or "1111".
  • the 10-bit target sequence set includes 784 codewords, and the 784 codewords include 240 10-bit target balanced sequences and 544 10-bit target unbalanced sequences, and the 544 10-bit target unbalanced sequences can be composed of 272 pairs of mutually opposite 10-bit target unbalanced sequences.
  • the 240 10-bit target balanced sequences and the 272 pairs of 10-bit target unbalanced sequences are encodings of 512 9-bit source sequences in the 9-bit source sequence set.
  • the 272 pairs of 10-bit target unbalanced sequences that are opposite to each other include 189 pairs of 10-bit target unbalanced sequences with a difference value of ⁇ 2 and 83 pairs of 10-bit target unbalanced sequences with a difference value of ⁇ 4.
  • the 10-bit target sequence set also includes 16 10-bit target unbalanced sequences to represent control characters, and the 16 10-bit target unbalanced sequences can form 8 pairs of 10-bit target unbalanced sequences that are opposite numbers to each other, wherein Each pair of opposite 10-bit target unbalanced sequences is an encoding of a control character.
  • a 9B/10B decoding method of the present invention it is used for decoding a 10-bit target sequence set into a 9-bit source sequence set, and the decoding method is an inverse transform of an encoding method used to encode the 9-bit source sequence set.
  • the decoding method is an inverse transform of an encoding method used to encode the 9-bit source sequence set.
  • is a 10-bit target sequence set each sequence in the 9-bit source sequence set is a 9-bit binary number
  • each sequence in the encoded 10-bit target sequence set is a 10-bit binary number
  • the 10-bit target sequence set contains balanced Sequence and unbalanced sequences, different 9-bit source sequences are encoded into different 10-bit destination sequences.
  • the 9-bit source sequence sets include the first type of 9-bit source sequence sets, the second type of 9-bit source sequence sets, the third type of 9-bit source sequence sets, the three types of 9-bit source sequence sets are disjoint, and the three types of 9-bit source sequence sets.
  • the collection of source sequence sets has a total of 512 non-repeating 9-bit source sequences.
  • the first type of 9-bit source sequence set only includes 9-bit source sequences with difference values of 1 and -1, and 1-bit data "0" is inserted into the same position of each 9-bit source sequence in the first type of 9-bit source sequence set After or "1", the encoding is a 10-bit target balanced sequence.
  • the same position is the leftmost or rightmost of the 9-bit source sequence, and the inserted 1
  • the bit data is either the most significant or the least significant in the encoded 10-bit target balanced sequence.
  • the second type of 9-bit source sequence set alternatively includes only 9-bit source sequences with a difference value of 3 or only 9-bit source sequences with a difference value of -3.
  • the second type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of 3
  • a 10-bit target unbalanced sequence of ⁇ 2 the pair of 10-bit target unbalanced sequences is the encoding of the 9-bit source sequence with a difference value of 3.
  • the second type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of -3, insert 1-bit data "1" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of differences
  • a 10-bit target unbalanced sequence with a value of ⁇ 2 this pair of 10-bit target unbalanced sequences is an encoding of the 9-bit source sequence with a difference value of -3.
  • the position of the inserted data is: for the number of "1" in the 9-bit source sequence from the lowest bit to the After the high order count is over 3, or the number of "1"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • the position of the inserted data is: for the number of "0" in the 9-bit source sequence from the lowest bit to the When the high order count is over 3, or the number of "0"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • Each 9-bit source sequence included in the third type of 9-bit source sequence set is encoded as a pair of 10-bit target unbalanced sequences that are opposite to each other.
  • the third type 9-bit source sequence set includes the fourth type 9-bit source sequence set and the fifth type 9-bit source sequence set, the fourth type and the fifth type 9-bit source sequence set are disjoint, and the fourth type and the fifth type 9-bit source sequence set are disjoint.
  • the collection of the five types of 9-bit source sequence sets is the third type of 9-bit source sequence sets.
  • the fourth type of 9-bit source sequence set optionally includes only 9-bit source sequences with a difference value of 5 or only 9-bit source sequences with a difference value of -5.
  • the fourth type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of 5, insert 1-bit data "0" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of difference values.
  • a 10-bit target unbalanced sequence of ⁇ 4 the pair of 10-bit target unbalanced sequences is the encoding of the 9-bit source sequence with a difference value of 5.
  • the fourth type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of -5, insert 1-bit data "1" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of differences
  • a 10-bit target unbalanced sequence with a value of ⁇ 4 this pair of 10-bit target unbalanced sequences is an encoding of the 9-bit source sequence with a difference value of -5.
  • the position of the inserted data is: for the number of "1" in the 9-bit source sequence from the lowest bit to the After the high order count is over 3, or the number of "1"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • the position of the inserted data is: for the number of "0" in the 9-bit source sequence from the lowest bit to the When the high order count is over 3, or the number of "0"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • Each 9-bit source sequence included in the fifth type of 9-bit source sequence set is encoded as a pair of 10-bit target unbalanced sequences that are opposite to each other.
  • the 10-bit target sequence set only includes sequences with difference values of -4, -2, 0, 2, and 4, and the 10-bit target sequence set alternatively conforms to one of the following two characteristics, the first characteristic is : The 10-bit target sequence set does not contain sequences whose lowest 4 bits are 4 bits "0000” or "1111", nor do they contain sequences whose highest 5 bits are 5 bits "00000” or "11111”; the second feature is : The 10-bit target sequence set does not include a sequence whose lowest 5 bits are 5 bits "00000” or "11111”, nor does it include a sequence whose highest 4 bits are 4 bits "0000” or "1111".
  • the 10-bit target sequence set includes 784 codewords, and the 784 codewords include 240 10-bit target balanced sequences and 544 10-bit target unbalanced sequences, and the 544 10-bit target unbalanced sequences can be composed of 272 pairs of mutually opposite 10-bit target unbalanced sequences.
  • the 240 10-bit target balanced sequences and the 272 pairs of 10-bit target unbalanced sequences are encodings of 512 9-bit source sequences in the 9-bit source sequence set.
  • the 272 pairs of 10-bit target unbalanced sequences that are opposite to each other include 189 pairs of 10-bit target unbalanced sequences with a difference value of ⁇ 2 and 83 pairs of 10-bit target unbalanced sequences with a difference value of ⁇ 4.
  • the 10-bit target sequence set also includes 16 10-bit target unbalanced sequences to represent control characters, and the 16 10-bit target unbalanced sequences can form 8 pairs of 10-bit target unbalanced sequences that are opposite numbers to each other, wherein Each pair of opposite 10-bit target unbalanced sequences is the encoding of a control character.
  • the decoding method is an inverse transform of an encoding method used to convert the 9-bit source sequence set It is encoded as a 10-bit target sequence set, each sequence in the 9-bit source sequence set is a 9-bit binary number, and each sequence in the encoded 10-bit target sequence set is a 10-bit binary number, and the 10-bit target sequence set contains Balanced sequences and unbalanced sequences, different 9-bit source sequences are encoded into different 10-bit target sequences.
  • the 9-bit source sequence sets include the first type of 9-bit source sequence sets, the second type of 9-bit source sequence sets, the third type of 9-bit source sequence sets, the three types of 9-bit source sequence sets are disjoint, and the three types of 9-bit source sequence sets.
  • the collection of source sequence sets has a total of 512 non-repeating 9-bit source sequences.
  • the first type of 9-bit source sequence set only includes 9-bit source sequences with difference values of 1 and -1, and 1-bit data "0" is inserted into the same position of each 9-bit source sequence in the first type of 9-bit source sequence set After or "1", the encoding is a 10-bit target balanced sequence.
  • the same position is the leftmost or rightmost of the 9-bit source sequence, and the inserted 1
  • the bit data is either the most significant or the least significant in the encoded 10-bit target balanced sequence.
  • the second type of 9-bit source sequence set alternatively includes only 9-bit source sequences with a difference value of 3 or only 9-bit source sequences with a difference value of -3.
  • the second type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of 3
  • a 10-bit target unbalanced sequence of ⁇ 2 the pair of 10-bit target unbalanced sequences is the encoding of the 9-bit source sequence with a difference value of 3.
  • the second type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of -3, insert 1-bit data "1" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of differences
  • a 10-bit target unbalanced sequence with a value of ⁇ 2 this pair of 10-bit target unbalanced sequences is an encoding of the 9-bit source sequence with a difference value of -3.
  • the position of the inserted data is: for the number of "1" in the 9-bit source sequence from the lowest bit to the After the high order count is over 3, or the number of "1"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • the position of the inserted data is: for the number of "0" in the 9-bit source sequence from the lowest bit to the When the high order count is over 3, or the number of "0"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • the third type of 9-bit source sequence set includes the third type of 9-bit source sequence subset A and the third type of 9-bit source sequence subset B, the third type of 9-bit source sequence subset A and the third type of 9-bit source sequence subset A and the third type of 9-bit source sequence
  • the sequence subsets B are disjoint, and the combination of the third type 9-bit source sequence subset A and the third type 9-bit source sequence subset B is the third type 9-bit source sequence set.
  • Each 9-bit source sequence included in the third type of 9-bit source sequence subset A is encoded as a 10-bit target balanced sequence.
  • Each 9-bit source sequence included in the third type of 9-bit source sequence subset B is encoded as a pair of 10-bit target unbalanced sequences that are opposite to each other.
  • the third type of 9-bit source sequence subset A includes two sequences: "000000000” and "111111111".
  • the third type 9-bit source sequence subset B includes the sixth type 9-bit source sequence set and the seventh type 9-bit source sequence set, the sixth type and the seventh type 9-bit source sequence set are disjoint, and the sixth type The combination with the seventh type 9-bit source sequence set is the third type 9-bit source sequence subset B.
  • the sixth type of 9-bit source sequence set alternatively includes only 9-bit source sequences with a difference value of 5 or only 9-bit source sequences with a difference value of -5.
  • the sixth type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of 5, insert 1-bit data "0" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of difference values.
  • a 10-bit target unbalanced sequence of ⁇ 4 the pair of 10-bit target unbalanced sequences is the encoding of the 9-bit source sequence with a difference value of 5.
  • the sixth type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of -5, insert 1-bit data "1" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite number constitute a pair of differences
  • a 10-bit target unbalanced sequence with a value of ⁇ 4 this pair of 10-bit target unbalanced sequences is an encoding of the 9-bit source sequence with a difference value of -5.
  • the position of the inserted data is: the number of "1" in the 9-bit source sequence from the lowest bit to the After the high order count is over 3, or the number of "1"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • the position of the inserted data is: for the number of "0" in the 9-bit source sequence from the lowest bit to the When the high order count is over 3, or the number of "0"s in the 9-bit source sequence is counted from the highest order to the low order when it counts up to 3.
  • Each 9-bit source sequence included in the seventh type of 9-bit source sequence set is encoded as a pair of 10-bit target unbalanced sequences that are opposite to each other.
  • the 10-bit target sequence set only includes sequences with difference values of -4, -2, 0, 2, and 4, and the 10-bit target sequence set alternatively conforms to one of the following two characteristics, the first characteristic is : The 10-bit target sequence set does not contain sequences whose lowest 4 bits are 4 bits "0000” or "1111", nor do they contain sequences whose highest 5 bits are 5 bits "00000” or "11111”; the second feature is : The 10-bit target sequence set does not include a sequence whose lowest 5 bits are 5 bits "00000” or "11111”, nor does it include a sequence whose highest 4 bits are 4 bits "0000” or "1111".
  • the 10-bit target sequence set includes 784 codewords, and the 784 codewords include 240 10-bit target balanced sequences and 544 10-bit target unbalanced sequences, and the 544 10-bit target unbalanced sequences can be composed of 272 pairs of mutually opposite 10-bit target unbalanced sequences.
  • the 240 10-bit target balanced sequences and the 272 pairs of 10-bit target unbalanced sequences are encodings of 512 9-bit source sequences in the 9-bit source sequence set.
  • the 272 pairs of 10-bit target unbalanced sequences that are opposite to each other include 189 pairs of 10-bit target unbalanced sequences with a difference value of ⁇ 2 and 83 pairs of 10-bit target unbalanced sequences with a difference value of ⁇ 4.
  • the 10-bit target sequence set also includes 16 10-bit target unbalanced sequences to represent control characters, and the 16 10-bit target unbalanced sequences can form 8 pairs of 10-bit target unbalanced sequences that are opposite numbers to each other, wherein Each pair of opposite 10-bit target unbalanced sequences is an encoding of a control character.
  • the present invention is a 9B/10B encoding and decoding method, which encodes a 9-bit sequence set into a 10-bit sequence set by a method of classification and calculation, which limits the number of consecutive "0" or consecutive "1", and eliminates the signal in the process of data transmission. Compared with the table lookup method, it simplifies the implementation method and reduces the resource overhead.
  • FIG. 1 is a block diagram of a 9B/10B encoding and decoding method of the present invention
  • FIG. 2 is a flow chart of a method for encoding a third type of 9-bit source sequence set in a 9B/10B encoding and decoding method of the present invention
  • FIG. 3 is a flowchart of a method for encoding the fifth type of 9-bit source sequence set in a 9B/10B encoding and decoding method of the present invention
  • FIG. 4 is a trellis diagram of the first type of 9-bit source sequence set and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • FIG. 5 is a trellis diagram of the second type of 9-bit source sequence set and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • FIG. 6 is a trellis diagram of a third type of 9-bit source sequence set in a 9B/10B encoding and decoding method of the present invention.
  • FIG. 7 is a trellis diagram of the fourth type of 9-bit source sequence set and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • FIG. 8 is a trellis diagram of the fifth type 9-bit source sequence subset A and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • 9 is a trellis diagram of the fifth type of 9-bit source sequence subset B and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • FIG. 10 is a trellis diagram of the fifth type of 9-bit source sequence subset C and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • 11 is a trellis diagram of the fifth type 9-bit source sequence subset D and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • FIG. 12 is a trellis diagram of the fifth type of 9-bit source sequence subset E and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • FIG. 13 is a trellis diagram of the fifth type of 9-bit source sequence subset F and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • FIG. 14 is a trellis diagram of the fifth type 9-bit source sequence subset G and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • 15 is a trellis diagram of the fifth type 9-bit source sequence subset H and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • 16 is a trellis diagram of the fifth type of 9-bit source sequence subset I and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • 17 is a trellis diagram of the fifth type of 9-bit source sequence subset J and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • 18 is a trellis diagram of the fifth type of 9-bit source sequence subset K and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • 19 is a trellis diagram of the fifth type of 9-bit source sequence subset L and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • 20 is a trellis diagram of the fifth type of 9-bit source sequence subset M and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • 21 is a trellis diagram of the fifth type of 9-bit source sequence subset N and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • FIG. 22 is a trellis diagram of the fifth type of 9-bit source sequence subset O and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • FIG. 23 is a trellis diagram of the fifth type of 9-bit source sequence subset P and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • 24 is a trellis diagram of the fifth type of 9-bit source sequence subset Q and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention
  • 25 is a trellis diagram of the fifth type of 9-bit source sequence subset R and the 10-bit target sequence encoded into it in a 9B/10B encoding and decoding method of the present invention.
  • An application embodiment of the present invention provides a 9B/10B encoding method for encoding a 9-bit source sequence set into a 10-bit target sequence set, each sequence in the 9-bit source sequence set is a 9-bit binary number, so Each sequence in the encoded 10-bit target sequence set is a 10-bit binary number, and different 9-bit source sequences are encoded as different 10-bit target sequences.
  • the 10-bit target sequence set includes a balanced sequence and an unbalanced sequence, and a balanced sequence refers to a sequence with the same number of "0" and “1", or a sequence with a difference value of 0; an unbalanced sequence refers to "0" and "1". ”, or sequences whose difference value is not 0.
  • the definition of the difference value proposed in the present invention is: the difference value of a binary sequence is the number of "1" minus the number of "0" in this sequence. For a 10-bit binary sequence, all possible difference values are -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10.
  • Each sequence in the 9-bit source sequence set is encoded as a balanced sequence in the 10-bit target sequence set, or a pair of mutually opposite unbalanced sequences in the 10-bit target sequence set.
  • the definition of the opposite number proposed in the present invention is: after a binary sequence is bit-inverted to obtain another binary sequence, then the two binary sequences are mutually opposite numbers.
  • the 10-bit target sequence set only includes sequences with difference values of -4, -2, 0, 2, and 4, and the 10-bit target sequence set does not include the lowest 4 bits, which are 4 bits "0000” ” or “1111”, nor does it include sequences whose most significant 5 bits are 5 bits “00000” or “11111”.
  • the lowest bit of the binary sequence is the rightmost bit of the binary sequence
  • the lowest 4 bits of the binary sequence are the first 4 bits of the binary sequence counted from the rightmost to the left
  • the highest bit of the binary sequence is the binary sequence.
  • the leftmost bit of the sequence, the highest 5 bits of the binary sequence are the first 5 bits sequentially counted from the leftmost to the right of the binary sequence.
  • the 10-bit target sequence set in this embodiment only includes sequences with difference values of -4, -2, 0, 2, and 4, and the 10-bit target sequence set does not include the lowest 5 bits with 5 bits "00000” ” or “11111”, nor does it include sequences whose most significant 4 bits are 4 bits “0000” or “1111”.
  • the 10-bit target sequence set includes a total of 800 non-repeating 10-bit sequences, including 784 codewords, and the 784 codewords include 240 10-bit target balanced sequences and 544 10-bit target balanced sequences.
  • Target unbalanced sequence, the 544 10-bit target unbalanced sequences can form 272 pairs of 10-bit target unbalanced sequences that are opposite numbers to each other.
  • the codeword in the 10-bit target sequence set is defined as a 10-bit target sequence encoded by a 9-bit source sequence.
  • the 240 10-bit target balanced sequences and the 272 pairs of 10-bit target unbalanced sequences are encodings of 512 9-bit source sequences in the 9-bit source sequence set.
  • the 272 pairs of 10-bit target unbalanced sequences that are opposite to each other include 189 pairs of 10-bit target unbalanced sequences with a difference value of ⁇ 2 and 83 pairs of 10-bit target unbalanced sequences with a difference value of ⁇ 4.
  • the 10-bit target sequence set also includes 16 10-bit target unbalanced sequences to represent control characters, and the 16 10-bit target unbalanced sequences can form 8 pairs of 10 that are opposite to each other.
  • Bit target unbalanced sequence wherein each pair of 10-bit target unbalanced sequences that are opposite to each other is the encoding of a control character.
  • the above is about the total number of sequences in the 10-bit target sequence set, as well as the number of codewords, the number of sequences used to represent control characters, the number of balanced sequences, the number of unbalanced sequences, and the number of differences in the unbalanced sequences.
  • Numerical values such as the number of sequences are only preferred embodiments of the present invention, but the protection scope of the present invention is not limited by these numerical values.
  • the signal transmission process when a pair of 10-bit target unbalanced sequences that are opposite to each other is the encoding of a 9-bit source sequence or a control character, one of the pair of 10-bit target unbalanced sequences should be selected according to the operating difference.
  • the encoding of the 9-bit source sequence or control character the DC component of the signal during data transmission is eliminated, so that the clock and data can be recovered at the receiving end.
  • the definition of the running difference proposed by the present invention is: in the process of signal transmission, the number of "1" in all transmitted binary sequences after the start of counting is subtracted from the number of "0".
  • the 9-bit source sequence sets include the first type of 9-bit source sequence sets, the second type of 9-bit source sequence sets, the third type of 9-bit source sequence sets, the three types of 9-bit source sequence sets are disjoint, and the three types of 9-bit source sequence sets.
  • the collection of source sequence sets has a total of 512 non-repeating 9-bit source sequences.
  • the method flowchart of this embodiment includes:
  • the first type of 9-bit source sequence set only includes 9-bit source sequences with difference values of 1 and -1, and 1-bit data "0" is inserted into the same position of each 9-bit source sequence in the first type of 9-bit source sequence set After or "1", it is encoded as a 10-bit target balanced sequence.
  • a 9-bit source sequence with a difference value of 1 insert 1-bit data "0” and encode it as a 10-bit target balanced sequence.
  • For a 9-bit source sequence with a difference value of -1 The sequence is encoded into a 10-bit target balanced sequence after inserting 1-bit data "1".
  • the same position may also be the 9-bit source sequence except the leftmost and the rightmost
  • the inserted 1-bit data is located in the other bits except the highest and lowest bits in the encoded 10-bit target balanced sequence.
  • the second type of 9-bit source sequence set selectively includes only 9-bit source sequences with a difference value of 3 or only 9-bit source sequences with a difference value of -3.
  • the second type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of 3
  • a 10-bit target unbalanced sequence of ⁇ 2 the pair of 10-bit target unbalanced sequences is the encoding of the 9-bit source sequence with a difference value of 3.
  • the second type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of -3, insert 1-bit data "1" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of differences
  • a 10-bit target unbalanced sequence with a value of ⁇ 2 this pair of 10-bit target unbalanced sequences is an encoding of the 9-bit source sequence with a difference value of -3.
  • the position of the inserted data is: the number of "1" in the 9-bit source sequence from the lowest Bit-to-high order counts when it reaches 3;
  • the position of the inserted data is: the number of "1" in the 9-bit source sequence is from the highest bit to the lower bit. The sequence counts when it reaches 3.
  • the position of the inserted data is: Count the number of "0" in the 9-bit source sequence from the lowest order to the high order. When 3 is counted;
  • the position of the inserted data is: the number of "0" in the 9-bit source sequence is from the highest bit to the lower bit. The sequence counts when it reaches 3.
  • Each 9-bit source sequence included in the third type of 9-bit source sequence set is encoded as a pair of 10-bit target unbalanced sequences that are opposite to each other.
  • the third type 9-bit source sequence set includes the fourth type 9-bit source sequence set and the fifth type 9-bit source sequence set, the fourth type and the fifth type 9-bit source sequence set are disjoint, and the fourth type and the fifth type 9-bit source sequence set are disjoint.
  • the collection of the five types of 9-bit source sequence sets is the third type of 9-bit source sequence sets.
  • the flowchart of the method for encoding the third type of 9-bit source sequence set in this embodiment includes;
  • the fourth type of 9-bit source sequence set only includes a 9-bit source sequence with a difference value of 5, and 1-bit data "0" is inserted into the 9-bit source sequence to form a 10-bit target sequence with the same
  • the opposite numbers constitute a pair of 10-bit target unbalanced sequences with a difference value of ⁇ 4, and the pair of 10-bit target unbalanced sequences are encodings of the 9-bit source sequence with a difference value of 5;
  • the fourth type of 9-bit source sequence set only includes a 9-bit source sequence with a difference value of -5, inserting 1-bit data "1" into the 9-bit source sequence, and the formed 10-bit target sequence is composed of its opposite number
  • a pair of 10-bit target unbalanced sequences with a difference value of ⁇ 4 is an encoding of the 9-bit source sequence with a difference value of -5.
  • the position of the inserted data is: the number of "1" in the 9-bit source sequence from the lowest Bit-to-high order counts when it reaches 3;
  • the position of the inserted data is: for the number of "1" in the 9-bit source sequence from the highest order to the lower order The sequence counts when it reaches 3.
  • the position of the inserted data is: Count the number of "0" in the 9-bit source sequence from the lowest order to the high order. When 3 is counted;
  • the position of the inserted data is: the number of "0" in the 9-bit source sequence is from the highest bit to the lower bit. The sequence counts when it reaches 3.
  • Each 9-bit source sequence included in the fifth type of 9-bit source sequence set is encoded as a pair of 10-bit target unbalanced sequences that are opposite to each other.
  • the flowchart of the method for encoding the fifth type of 9-bit source sequence set in this embodiment includes;
  • the k-bit sequence is the same as the n m-bit sequences at P10 in the 10-bit target sequence subset, or after simple transformation, n m-bit sequences at P10 in the 10-bit target sequence subset can be obtained; the fifth type of 9-bit source sequence
  • the remaining 9-k bits of all sequences in the set except for P9 are n identical sequences, and the remaining 10-m bits of all sequences except P10 in the 10-bit target sequence subset are also n identical sequences.
  • the 9-bit source sequence subset of the fifth type can be easily encoded as the 10-bit target sequence subset and the opposite number of each sequence in the 10-bit target sequence subset, so that the fifth type 9
  • the bit source sequence set can be encoded by using the method of classification and calculation, which takes up less resources, while the encoding method of the first, second, and fourth types of 9-bit source sequence sets is simpler and occupies less resources.
  • the total number of sequences in these three types of sequence sets accounts for a relatively high proportion in all 512 9-bit source sequences, exceeding 70%. Therefore, the present invention can simplify the 9B10B encoding implementation method and reduce resource overhead.
  • the lattice diagram is composed of a series of line segments of equal length.
  • a small line segment from the lower left to the upper right represents a 1-bit data "1”
  • a small line segment from the upper left to the lower right represents a 1-bit data "0”.
  • the leftmost end of the lattice diagram is The lowest bit of the binary sequence, the highest bit of the binary sequence at the rightmost end, and the number next to a point in the lattice diagram indicates how many different sequences there are from the leftmost end of the lattice diagram to that point.
  • the trellis diagram of 9-bit source sequences with a difference value of 1 in the first type of 9-bit source sequences is shown in Figure 4(a).
  • the encoding method To: insert 1-bit data "0" at the leftmost of the 9-bit source sequence with a difference value of 1.
  • the trellis diagram of 9-bit source sequences with a difference value of -1 in the first type of 9-bit source sequence set is shown in Figure 4(b), there are 120 9-bit source sequences in total, and the encoding method is: A 1-bit data "1" is inserted for the leftmost of the 9-bit source sequence of -1.
  • the first type of 9-bit source sequence set has a total of 240 9-bit source sequences, and the trellis diagram of the 10-bit target sequence encoded by the first type of 9-bit source sequence set is shown in Figure 4(c). 240 10-bit target sequences.
  • the codec table of the first type of 9-bit source sequence set is shown in Table 1.
  • the second type of 9-bit source sequence set only includes 9-bit source sequences with a difference value of 3, and its lattice diagram is shown in FIG. 5(a), with a total of 84 9-bit source sequences , the encoding method is: insert 1-bit data "0" at the position after counting the number of "1" in the 9-bit source sequence from the lowest order to the high order when it reaches 3.
  • the 10-bit target sequence encoded by the second type of 9-bit source sequence set includes the trellis diagrams shown in FIG. 5(b), FIG. 5(c), FIG. 5(d), and FIG. 5(e). sequence, a total of 84 10-bit target sequences.
  • the number of "1” in the sequence is counted from the lowest position to the high position when it reaches 3, that is, the sequence starts from the lowest position to the highest position.
  • the sequence After inserting 1-bit data "0" between the 5th and 6th bits of the high order count, it is encoded as a 10-bit target sequence "1110011001" and its opposite number "0001100110".
  • the codec table of the second type of 9-bit source sequence set is shown in Table 2.
  • the third type of 9-bit source sequence set includes FIG. 6(a), FIG. 6(b), FIG. 6(c), FIG.
  • the sequences represented by the trellis diagrams shown in Figure 6(f), Figure 6(g), and Figure 6(h) have a total of 188 9-bit source sequences.
  • the third type of 9-bit source sequence set includes the fourth type of 9-bit source sequence set and the fifth type of 9-bit source sequence set.
  • the trellis diagram of the fourth type of 9-bit source sequence set is shown in Figure 6(h), with a total of 36 9-bit source sequences
  • the fifth type of 9-bit source sequence set includes Figures 6(a) and 6 (b), Fig. 6(c), Fig. 6(d), Fig. 6(e), Fig. 6(f), Fig. 6(g)
  • the fourth type of 9-bit source sequence set only includes 9-bit source sequences with a difference value of 5, and its lattice diagram is shown in FIG. 7(a), with a total of 36 9-bit source sequences , the encoding method is: insert 1-bit data "0" at the position after counting the number of "1" in the 9-bit source sequence from the lowest order to the high order when it reaches 3.
  • the 10-bit target sequence encoded by the fourth type of 9-bit source sequence set includes the sequences represented by the lattice diagrams shown in Fig. 7(b), Fig. 7(c), and Fig. 7(d), a total of 36 sequences 10-bit target sequence.
  • the sequence represented by the lattice diagram shown in Figure 8(a) is selected as the fifth type of 9-bit source sequence subset A, with a total of 56 9-bit source sequences.
  • Bit source sequence the encoding method is: the first step, the number of "0" in the sequence represented by the trellis diagram shown in Figure 8(a) is counted from the lowest bit to the high order, and 1-bit data is inserted into the position after 3 is counted "0", and delete the highest bit to obtain the sequence represented by the lattice diagram shown in Figure 8(b); in the second step, count the sequence from the lowest bit to the highest bit in the sequence represented by the lattice diagram shown in Figure 8(b) when counting 1-bit data "1" is inserted at the position after the full 2.
  • the 10-bit target sequence encoded into the 9-bit source sequence subset A of the fifth type includes the cells shown in Figure 8(c), Figure 8(d), Figure 8(e), and Figure 8(f).
  • the sequence shown in the figure a total of 56 10-bit target sequences.
  • the first step is to count the number of "0" in the sequence from the lowest order to the high order. Between the 5th and 6th bits of the count, insert 1-bit data "0”, and delete the highest bit to get the sequence "001001010”; the second step, the number of "0” in the sequence "001001010” from the lowest bit Count to the high-order position when it is full of 2, that is, between the 3rd and 4th bits of the sequence counted from the lowest order to the high order, insert 1-bit data "1”, and encode it as a 10-bit target sequence "0010011010” " and its opposite "1101100101".
  • the codec table of the fifth type of 9-bit source sequence subset A is shown in Table 4.
  • the encoding method is as follows: the first step is to count the number of "0"s in the sequence represented by the lattice diagram shown in Figure 9(a) from the lowest bit to the high bit sequence when it reaches 2 Insert 2-bit data "00” in the following position, and delete the highest 3 bits to obtain the sequence represented by the lattice diagram shown in Fig. 9(b); 1-bit data "1” is inserted on the left side, and 1-bit data "1" is also inserted on the far right side.
  • the 10-bit target sequence encoded by the fifth type of 9-bit source sequence subset B includes the sequence represented by the trellis diagram shown in FIG. 9( c ), with a total of 15 10-bit target sequences.
  • the first step is to count the number of "0" in the sequence from the lowest order to the high order. Between the 4th and 5th bits of the count, insert 2-bit data "00”, and delete the highest 3 bits to obtain the sequence "00000110”; the second step, insert 1-bit data "at the leftmost of the sequence "00000110” 1", after inserting 1-bit data "1" at the far right, it is encoded as a 10-bit target sequence "1000001101" and its opposite number "0111110010".
  • the codec table of the fifth type of 9-bit source sequence subset B is shown in Table 5.
  • the encoding method is as follows: the first step is to count the number of "0" in the sequence represented by the lattice diagram shown in Figure 10(a) from the lowest order to the high order, when it reaches 2 Insert 1-bit data "0” in the following position, and delete the highest 3 bits to obtain the sequence represented by the trellis diagram shown in Figure 10(b); 1-bit data "1” is inserted on the left, and 2-bit data "10” is inserted on the far right.
  • the 10-bit target sequence encoded by the fifth type of 9-bit source sequence subset C includes the sequence represented by the trellis diagram shown in FIG. 10( c ), with a total of six 10-bit target sequences.
  • the first step is to count the number of "0"s in the sequence from the lowest order to the high order. Between the 3rd and 4th bits of the count, insert 1-bit data "0”, and delete the highest 3 bits to get the sequence "0000010”; the second step, insert 1-bit data "in the leftmost part of the sequence "0000010” 1", after inserting the 2-bit data "10” at the far right, it is encoded as a 10-bit target sequence "1000001010” and its opposite number "0111110101".
  • the codec table of the fifth type of 9-bit source sequence subset C is shown in Table 6.
  • Step 1 Count the number of "0"s in the sequence represented by the lattice diagram shown in Figure 11(a) from the lowest order to the high order, when it reaches 2 Insert 1-bit data "0" in the following position, and delete the highest 4 bits to obtain the sequence represented by the trellis diagram shown in Figure 11(b); 2-bit data "01” is inserted on the left, and 2-bit data "10” is inserted on the far right.
  • the 10-bit target sequence encoded by the fifth type of 9-bit source sequence subset D includes the sequence represented by the trellis diagram shown in FIG. 11( c ), and there are five 10-bit target sequences in total.
  • the first step is to count the number of "0"s in the sequence from the lowest order to the high order. Between the 3rd and 4th bits of the count, insert 1-bit data "0”, and delete the highest 4 bits to get the sequence "000010”; the second step, insert 2-bit data at the leftmost of the sequence "000010”” 01", after inserting the 2-bit data "10” at the far right, it is encoded as a 10-bit target sequence "0100001010" and its opposite number "1011110101".
  • Step 1 delete the sequence represented by the lattice diagram shown in Figure 12(a) and count from the highest order to the low order except for the second and fourth bits.
  • Step 2 insert 2-bit data "00" at the leftmost of the sequence shown in the trellis diagram shown in Figure 12(b), and the rightmost 6-bit data "100010" is inserted.
  • the 10-bit target sequence encoded by the fifth type of 9-bit source sequence subset E includes the sequences represented by the trellis diagram shown in FIG. 12( c ), and there are two 10-bit target sequences in total.
  • the first step is to delete the remaining bits except the 2nd and 4th bits in the sequence from the highest order to the low order, and obtain the sequence "01"; the second step , after inserting 2-bit data "00” at the far left of the sequence "01” and inserting 6-bit data "100010” at the far right, it is encoded into a 10-bit target sequence "0001100010” and its opposite "1110011101".
  • the 10-bit target sequence encoded by the fifth type of 9-bit source sequence subset F includes the sequences represented by the lattice diagrams shown in Figure 13(c) and Figure 13(d), a total of 20 10-bit target sequences .
  • the 10-bit target sequence encoded into the fifth type 9-bit source sequence subset G includes the sequence represented by the trellis diagram shown in FIG. 14( c ), and there are 10 10-bit target sequences in total.
  • the codec table of the fifth type of 9-bit source sequence subset G is shown in Table 10.
  • the 10-bit target sequence encoded into the fifth type of 9-bit source sequence subset H includes the sequence represented by the trellis diagram shown in FIG. 15( c ), with a total of four 10-bit target sequences.
  • Step 1 delete the 2nd to 5th bits counted from the lowest order to the high order in the sequence represented by the trellis diagram shown in Figure 16(a), and obtain The sequence represented by the trellis diagram shown in Fig. 16(b); in the second step, 3-bit data "001" is inserted at the far left of the sequence represented by the trellis diagram shown in Fig. 16(b), and 2-bit data "" is inserted at the far right 10".
  • the 10-bit target sequence encoded by the fifth type of 9-bit source sequence subset I includes the sequence represented by the trellis diagram shown in FIG. 16( c ), and there are two 10-bit target sequences in total.
  • the 10-bit target sequence encoded by the subset J of the 9-bit source sequence of the fifth type includes the sequence represented by the trellis diagram shown in FIG. 17( c ), and there are four 10-bit target sequences in total.
  • the 10-bit target sequence encoded into the fifth type of 9-bit source sequence subset K includes the sequence represented by the trellis diagram shown in FIG. 18( c ), with a total of three 10-bit target sequences.
  • the codec table of the fifth type of 9-bit source sequence subset K is shown in Table 14.
  • the 10-bit target sequence encoded by the fifth type of 9-bit source sequence subset L includes the sequence represented by the trellis diagram shown in FIG. 19( c ), with a total of two 10-bit target sequences.
  • the codec table of the fifth type of 9-bit source sequence subset L is shown in Table 15.
  • Step 1 delete the highest 3 bits of the sequence represented by the trellis diagram shown in Figure 20(a) to obtain the sequence represented by the trellis diagram shown in Figure 20(b) ;
  • Step 2 insert 1-bit data "1" at the leftmost side of the sequence represented by the trellis diagram shown in Figure 20(b), and insert 3-bit data "110" at the rightmost side.
  • the 10-bit target sequence encoded by the fifth type of 9-bit source sequence subset M includes the sequence represented by the trellis diagram shown in FIG. 20( c ), with a total of four 10-bit target sequences.
  • the codec table of the fifth type of 9-bit source sequence subset M is shown in Table 16.
  • the fifth type of 9-bit source sequence set uncoded 9-bit source sequences are selected to form the fifth type of 9-bit source sequence subset N, and the lattice diagram is shown in Figure 21(a)
  • the encoding method is as follows: Step 1, delete the lowest 6 bits of the sequence represented by the trellis diagram shown in Figure 21(a) to obtain the sequence represented by the trellis diagram shown in Figure 21(b) ; In the second step, insert 1-bit data "1" at the leftmost side of the sequence represented by the trellis diagram shown in Figure 21(b), and insert 6-bit data "100010" at the rightmost side.
  • the 10-bit target sequence encoded into the fifth type of 9-bit source sequence subset N includes the sequence represented by the trellis diagram shown in FIG. 21( c ), and there are a total of three 10-bit target sequences.
  • the codec table of the fifth type of 9-bit source sequence subset N is shown in Table 17.
  • the encoding method is as follows: Step 1, delete the highest 6 bits of the sequence represented by the trellis diagram shown in Figure 22(a) to obtain the sequence represented by the trellis diagram shown in Figure 22(b). ; In the second step, insert 2-bit data "11" at the leftmost side of the sequence represented by the trellis diagram shown in Figure 22(b), and insert 5-bit data "00010" at the rightmost side.
  • the 10-bit target sequence encoded into the fifth type of 9-bit source sequence subset O includes the sequences represented by the trellis diagram shown in FIG. 22(c), and there are two 10-bit target sequences in total.
  • the codec table of the fifth type of 9-bit source sequence subset O is shown in Table 18.
  • the 10-bit target sequence encoded by the 9-bit source sequence subset P of the fifth type includes the sequence represented by the trellis diagram shown in FIG. 23(d), and there are a total of six 10-bit target sequences.
  • the codec table of the fifth type of 9-bit source sequence subset P is shown in Table 19.
  • the fifth type of 9-bit source sequence set uncoded 9-bit source sequences are selected to form the fifth type of 9-bit source sequence subset Q, and its trellis is shown in Figure 24(a)
  • the encoding method is: the first step, according to the lowest and highest 5 bits in the 9-bit source sequence represented by the trellis diagram shown in Figure 24(a), select Figure 24(b)
  • One of the six 4-bit balanced sequences represented by the trellis diagram shown is used as the result of the first encoding of the 9-bit source sequence; The number is counted from the lowest order to the high order.
  • the 10-bit target sequence encoded by the 9-bit source sequence subset Q of the fifth type includes the sequence represented by the trellis diagram shown in FIG. 24(d), and there are a total of 6 10-bit target sequences.
  • the codec table of the fifth type of 9-bit source sequence subset Q is shown in Table 20.
  • the 10-bit target sequence encoded by the 9-bit source sequence subset R of the fifth type includes the sequences represented by the trellis diagrams shown in Fig. 25(c) and Fig. 25(d), and there are two 10-bit target sequences in total .
  • the codec table of the fifth type of 9-bit source sequence subset R is shown in Table 21.
  • the encoding of the 9-bit source sequence subset R of the fifth type may also be a 10-bit unbalanced sequence in the 10-bit target sequence set and not represented by the trellis diagrams shown in FIGS. 5 and 7 to 25 .
  • the unused 10-bit unbalanced sequence in the 10-bit target sequence set can be used as the code of the control character, and the codec table of the control character is shown in Table 22.
  • the total 9B10B codec table is shown in Table 23.
  • the 9B10B total codec table is shown in Table 24.
  • the 9-bit source sequence set also includes the first type of 9-bit source sequence set, the second type of 9-bit source sequence set, and the third type of 9-bit source sequence set.
  • the three types of 9-bit source sequence sets are disjoint, and the collection of the three types of 9-bit source sequence sets has a total of 512 non-repeating 9-bit source sequences.
  • the first type of 9-bit source sequence set only includes 9-bit source sequences with difference values of 1 and -1, and 1-bit data "0" is inserted into the same position of each 9-bit source sequence in the first type of 9-bit source sequence set After or "1", the encoding is a 10-bit target balanced sequence.
  • the second type of 9-bit source sequence set alternatively includes only 9-bit source sequences with a difference value of 3 or only 9-bit source sequences with a difference value of -3.
  • the second type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of 3
  • a 10-bit target unbalanced sequence of ⁇ 2 the pair of 10-bit target unbalanced sequences is the encoding of the 9-bit source sequence with a difference value of 3.
  • the second type of 9-bit source sequence set only contains a 9-bit source sequence with a difference value of -3, insert 1-bit data "1" into the 9-bit source sequence, and the formed 10-bit target sequence and its opposite form a pair of differences
  • a 10-bit target unbalanced sequence with a value of ⁇ 2 this pair of 10-bit target unbalanced sequences is an encoding of the 9-bit source sequence with a difference value of -3.
  • the third type of 9-bit source sequence set includes the third type of 9-bit source sequence subset A and the third type of 9-bit source sequence subset B, the third type of 9-bit source sequence subset A and the third type of 9-bit source sequence subset A and the third type of 9-bit source sequence
  • the sequence subsets B are disjoint, and the combination of the third type 9-bit source sequence subset A and the third type 9-bit source sequence subset B is the third type 9-bit source sequence set.
  • Each 9-bit source sequence included in the third type of 9-bit source sequence subset A is encoded as a 10-bit target balanced sequence.
  • Each 9-bit source sequence included in the third type of 9-bit source sequence subset B is encoded as a pair of 10-bit target unbalanced sequences that are opposite to each other.
  • the first type of 9-bit source sequence set does not include the 9-bit source sequences "011111000” and "100000111”
  • the third type of 9-bit source sequence sub- Set A contains the 9-bit source sequences "000000000” and "111111111”
  • the third type 9-bit source sequence subset B contains the sixth type 9-bit source sequence set and the seventh type 9-bit source sequence set, the sixth type and the seventh type
  • the sets of 9-bit source sequences of the class are disjoint, and the combination of the sets of 9-bit source sequences of the sixth and seventh classes is the subset B of the 9-bit source sequences of the third class.
  • the seventh type of 9-bit source sequence set in the embodiment shown in Table 24 includes 9-bit source sequences "011111000” and "100000111", The 9-bit source sequences "000000000” and "111111111" are not included.
  • the second type of 9-bit source sequence set in the embodiment shown in Table 24 is the same as the 9-bit source sequence included in the second type of 9-bit source sequence set in the embodiment shown in Table 23.
  • the sixth type of 9-bit source sequence set in the embodiment shown in Table 24 is the same as the 9-bit source sequence included in the fourth type of 9-bit source sequence set in the embodiment shown in Table 23.
  • the 9-bit source sequences "000000000” and “111111111” are encoded into 10-bit target balanced sequences "0011111000” and “1100000111", respectively, and Table 23 corresponds to the two 10-bit target balanced sequences
  • the 9-bit source sequences "011111000” and “100000111” are respectively encoded as 10-bit target unbalanced sequences "0100111101” and their opposites, and "1010011110” and their opposites in the embodiment shown in Table 24.
  • the output of the system in the reset state or low power consumption mode is often fixed data "0" or "1".
  • the input data at this time is the 9-bit source sequence "000000000” or "" 111111111"
  • the 9B10B encoding module will select one of the pair of 10-bit target unbalanced sequences according to the running difference, and output the two 10-bit target unbalanced sequences alternately. It will increase the power consumption of the system, and is not conducive to parsing the 9-bit source sequence "000000000” or "111111111” from the output encoded data.
  • the 9-bit source sequence "000000000” or “111111111” is encoded as the above-mentioned 10-bit target balanced sequence
  • the output of the 9B10B encoding module is a fixed 10-bit data, if it is transmitted in the form of serial data, it is an alternating five "0” ” and five “1” can be regarded as a low-speed clock signal, because the signal flip frequency is reduced, which is beneficial to reduce the system power consumption in the reset state or low-power mode, and it is easy to parse from the serial data that the system is in reset. state or low power mode.
  • the third type of 9-bit source sequence subset A may also include 9-bit source sequences other than "000000000” and "111111111", or other 9-bit source sequences but not "000000000” and "111111111” as required.
  • the 9B10B codec table shown in Table 24 can be obtained by the method of classification calculation, but after the 9B10B codec table is obtained according to the present invention, the traditional table lookup method can still be used to encode the 9-bit source sequence into 10 Bit target sequence.
  • the 9-bit source sequence "110110110” is encoded, and after obtaining Table 24, one of the 10-bit target sequences "1101010110” and "0010101001” is selected as the 9-bit source according to the table lookup result and the running difference Encoding of the sequence "110110110".
  • Different implementations of obtaining and encoding the 9B10B codec table according to the present invention all fall within the protection scope of the present invention.
  • the encoding method for encoding a 9-bit source sequence set into a 10-bit target sequence set can obtain a decoding method for decoding the 10-bit target sequence set into a 9-bit source sequence set, and the decoding method is the inverse transformation of the encoding method, That is, according to the codec tables 23 and 24, the corresponding 9-bit source sequence can be obtained from the 10-bit target sequence.
  • the 10-bit target sequence "1101010110” is decoded, and after obtaining Table 24, according to the table lookup result , the decoding result of the 10-bit target sequence is the 9-bit source sequence "110110110".
  • the inverse transformation of the encoding method can also be implemented by other methods such as classification calculation.
  • decoding for a 10-bit target balanced sequence obtained by encoding the sequence in the first type of 9-bit source sequence set, delete the 10-bit target balanced sequence. Bit the highest bit of the target balanced sequence to obtain the decoded 9-bit source sequence.
  • a pair of 10-bit target unbalanced sequences with a difference value of ⁇ 2 obtained by encoding the sequences in the second type of 9-bit source sequence set take the 10-bit target unbalanced sequence with a difference value of 2.
  • Balanced sequence the number of "1" in the sequence is counted from the lowest bit to the high order.
  • the readable storage medium is, for example, a read-only memory, a random access memory, a magnetic disk, an optical disk, a USB flash drive, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

本发明公开了一种9B/10B编码方法,用于将9比特源序列集编码为10比特目标序列集。所述9比特源序列集包含第一类9比特源序列集、第二类9比特源序列集、第三类9比特源序列集。第一类9比特源序列集只包含差异值为1和-1的9比特源序列,在第一类9比特源序列集中每一个序列的同一位置插入1比特数据"0"或"1"后,编码为10比特目标平衡序列;第二类9比特源序列集择一地只包含差异值为3的9比特源序列或只包含差异值为-3的9比特源序列,在第二类9比特源序列集中的每一个序列插入1比特数据"0"或"1",编码为一对差异值为±2的10比特目标非平衡序列;第三类9比特源序列集中的每一个序列编码为一对互为相反数的10比特目标非平衡序列。

Description

一种9B/10B编解码方法 技术领域
本发明涉及通信技术领域,具体涉及一种直流平衡码的编解码方法。
背景技术
直流平衡码是通信领域常用的一种编码方法,在传输线路上传输信号时,采用直流平衡码可以使数据中“0”和“1”的个数基本相等,消除数据传输过程中信号的直流分量,以便于在接收端恢复出时钟和数据。常用的直流平衡码有8B/10B码、9B/10B码等,其中8B/10B码编码效率不高,有20%的冗余,而9B/10B码不仅可以实现直流平衡,还能够达到较高的编码效率,将冗余降低到10%,可以认为是一种相对较优的编码方式。
现有的9B/10B码多数是采用查表方法或复杂的分类和计算方法对9比特数据进行编码,导致实现时消耗资源较多,因此有必要研究新的9B/10B编解码方法,以简化实现方法,降低资源开销。
发明内容
本发明所要解决的技术问题是,如何将9比特序列集编码为10比特序列集,消除数据传输过程中信号的直流分量,以便于在接收端恢复出时钟和数据,同时避免采用查表方法以简化实现方法,降低资源开销的问题。
为了解决上述技术问题,本发明采用的技术方案是:
作为本发明的一种9B/10B编码方法,用于将9比特源序列集编码为10比特目标序列集,9比特源序列集中的每个序列为一个9比特二进制数,所编码为的10比特目标序列集中的每个序列为一个10比特二进制数,10比特目标序列集包含平衡序列和非平衡序列,不同的9比特源序列编码为不同的10比特目标序列。
所述9比特源序列集包含第一类9比特源序列集、第二类9比特源序列集、第三类9比特源序列集,三类9比特源序列集不相交,并且三类9比特源序列集的合集共有512个互不重复的9比特源序列。
所述第一类9比特源序列集只包含差异值为1和-1的9比特源序列,在第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据“0”或“1”后,编码为10比特目标平衡序列。
优选地,在所述第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据时,所述同一位置为9比特源序列的最左侧或最右侧,插入的1比特数据在所编码为的10比特目标平衡序列中位于最高位或最低位。
所述第二类9比特源序列集择一地只包含差异值为3的9比特源序列或只包含差异值为-3的9比特源序列。
若第二类9比特源序列集只包含差异值为3的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为3的9比特源序列的编码。
若第二类9比特源序列集只包含差异值为-3的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对 10比特目标非平衡序列为所述差异值为-3的9比特源序列的编码。
优选地,在所述第二类9比特源序列集的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后。
优选地,在所述第二类9比特源序列集的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
所述第三类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
所述第三类9比特源序列集包含第四类9比特源序列集和第五类9比特源序列集,第四类和第五类9比特源序列集不相交,并且第四类和第五类9比特源序列集的合集为第三类9比特源序列集。
所述第四类9比特源序列集择一地只包含差异值为5的9比特源序列或只包含差异值为-5的9比特源序列。
若第四类9比特源序列集只包含差异值为5的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为5的9比特源序列的编码。
若第四类9比特源序列集只包含差异值为-5的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-5的9比特源序列的编码。
优选地,在所述第四类9比特源序列集中的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后。
优选地,在所述第四类9比特源序列集中的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
所述第五类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,且所述10比特目标序列集择一地符合以下两个特征之一,第一个特征为:所述10比特目标序列集不包含最低4位为4比特“0000”或“1111”的序列,也不包含最高5位为5比特“00000”或“11111”的序列;第二个特征为:所述10比特目标序列集不包含最低5位为5比特“00000”或“11111”的序列,也不包含最高4位为4比特“0000”或“1111”的序列。
所述10比特目标序列集包含784个码字,所述784个码字中包含240个10比特目标平衡序列和544个10比特目标非平衡序列,所述544个10比特目标非平衡序列可组成272对互为相反数的10比特目标非平衡序列。
所述240个10比特目标平衡序列和所述272对10比特目标非平衡序列为所述9比特源序列集中512个9比特源序列的编码。
所述272对互为相反数的10比特目标非平衡序列中包含189对差异值为±2的10比特目标非平衡序列和83对差异值为±4的10比特目标非平衡序列。
所述10比特目标序列集还包含16个10比特目标非平衡序列用以表示控制字符,所述16个10比特目标非平衡序列可组成8对互为相反数的10比特目标非平衡序列,其中每一对互为相反数的10比特目标非平衡序列为一个控制字符的编码。
作为本发明的另一种9B/10B编码方法,用于将9比特源序列集 编码为10比特目标序列集,9比特源序列集中的每个序列为一个9比特二进制数,所编码为的10比特目标序列集中的每个序列为一个10比特二进制数,10比特目标序列集包含平衡序列和非平衡序列,不同的9比特源序列编码为不同的10比特目标序列。
所述9比特源序列集包含第一类9比特源序列集、第二类9比特源序列集、第三类9比特源序列集,三类9比特源序列集不相交,并且三类9比特源序列集的合集共有512个互不重复的9比特源序列。
所述第一类9比特源序列集只包含差异值为1和-1的9比特源序列,在第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据“0”或“1”后,编码为10比特目标平衡序列。
优选地,在所述第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据时,所述同一位置为9比特源序列的最左侧或最右侧,插入的1比特数据在所编码为的10比特目标平衡序列中位于最高位或最低位。
所述第二类9比特源序列集择一地只包含差异值为3的9比特源序列或只包含差异值为-3的9比特源序列。
若第二类9比特源序列集只包含差异值为3的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为3的9比特源序列的编码。
若第二类9比特源序列集只包含差异值为-3的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-3的9比特源序列的编码。
优选地,在所述第二类9比特源序列集的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中 “1”的个数从最高位向低位顺序计数当计满3之后。
优选地,在所述第二类9比特源序列集的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
所述第三类9比特源序列集包含第三类9比特源序列子集A和第三类9比特源序列子集B,第三类9比特源序列子集A和第三类9比特源序列子集B不相交,并且第三类9比特源序列子集A和第三类9比特源序列子集B的合集为第三类9比特源序列集。
所述第三类9比特源序列子集A包含的每一个9比特源序列编码为一个10比特目标平衡序列。
所述第三类9比特源序列子集B包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
优选地,所述第三类9比特源序列子集A包含两个序列:“000000000”和“111111111”。
所述第三类9比特源序列子集B包含第六类9比特源序列集和第七类9比特源序列集,第六类和第七类9比特源序列集不相交,并且第六类和第七类9比特源序列集的合集为第三类9比特源序列子集B。
所述第六类9比特源序列集择一地只包含差异值为5的9比特源序列或只包含差异值为-5的9比特源序列。
若第六类9比特源序列集只包含差异值为5的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为5的9比特源序列的编码。
若第六类9比特源序列集只包含差异值为-5的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对 10比特目标非平衡序列为所述差异值为-5的9比特源序列的编码。
优选地,在所述第六类9比特源序列集中的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后。
优选地,在所述第六类9比特源序列集中的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
所述第七类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,且所述10比特目标序列集择一地符合以下两个特征之一,第一个特征为:所述10比特目标序列集不包含最低4位为4比特“0000”或“1111”的序列,也不包含最高5位为5比特“00000”或“11111”的序列;第二个特征为:所述10比特目标序列集不包含最低5位为5比特“00000”或“11111”的序列,也不包含最高4位为4比特“0000”或“1111”的序列。
所述10比特目标序列集包含784个码字,所述784个码字中包含240个10比特目标平衡序列和544个10比特目标非平衡序列,所述544个10比特目标非平衡序列可组成272对互为相反数的10比特目标非平衡序列。
所述240个10比特目标平衡序列和所述272对10比特目标非平衡序列为所述9比特源序列集中512个9比特源序列的编码。
所述272对互为相反数的10比特目标非平衡序列中包含189对差异值为±2的10比特目标非平衡序列和83对差异值为±4的10比特目标非平衡序列。
所述10比特目标序列集还包含16个10比特目标非平衡序列用 以表示控制字符,所述16个10比特目标非平衡序列可组成8对互为相反数的10比特目标非平衡序列,其中每一对互为相反数的10比特目标非平衡序列为一个控制字符的编码。
作为本发明的一种9B/10B解码方法,用于将10比特目标序列集解码为9比特源序列集,解码方法为编码方法的逆变换,所述编码方法用于将9比特源序列集编码为10比特目标序列集,9比特源序列集中的每个序列为一个9比特二进制数,所编码为的10比特目标序列集中的每个序列为一个10比特二进制数,10比特目标序列集包含平衡序列和非平衡序列,不同的9比特源序列编码为不同的10比特目标序列。
所述9比特源序列集包含第一类9比特源序列集、第二类9比特源序列集、第三类9比特源序列集,三类9比特源序列集不相交,并且三类9比特源序列集的合集共有512个互不重复的9比特源序列。
所述第一类9比特源序列集只包含差异值为1和-1的9比特源序列,在第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据“0”或“1”后,编码为10比特目标平衡序列。
优选地,在所述第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据时,所述同一位置为9比特源序列的最左侧或最右侧,插入的1比特数据在所编码为的10比特目标平衡序列中位于最高位或最低位。
所述第二类9比特源序列集择一地只包含差异值为3的9比特源序列或只包含差异值为-3的9比特源序列。
若第二类9比特源序列集只包含差异值为3的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为3的9比特源序列的编码。
若第二类9比特源序列集只包含差异值为-3的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-3的9比特源序列的编码。
优选地,在所述第二类9比特源序列集的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后。
优选地,在所述第二类9比特源序列集的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
所述第三类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
所述第三类9比特源序列集包含第四类9比特源序列集和第五类9比特源序列集,第四类和第五类9比特源序列集不相交,并且第四类和第五类9比特源序列集的合集为第三类9比特源序列集。
所述第四类9比特源序列集择一地只包含差异值为5的9比特源序列或只包含差异值为-5的9比特源序列。
若第四类9比特源序列集只包含差异值为5的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为5的9比特源序列的编码。
若第四类9比特源序列集只包含差异值为-5的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-5的9比特源序列的编码。
优选地,在所述第四类9比特源序列集中的9比特源序列插入1 比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后。
优选地,在所述第四类9比特源序列集中的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
所述第五类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,且所述10比特目标序列集择一地符合以下两个特征之一,第一个特征为:所述10比特目标序列集不包含最低4位为4比特“0000”或“1111”的序列,也不包含最高5位为5比特“00000”或“11111”的序列;第二个特征为:所述10比特目标序列集不包含最低5位为5比特“00000”或“11111”的序列,也不包含最高4位为4比特“0000”或“1111”的序列。
所述10比特目标序列集包含784个码字,所述784个码字中包含240个10比特目标平衡序列和544个10比特目标非平衡序列,所述544个10比特目标非平衡序列可组成272对互为相反数的10比特目标非平衡序列。
所述240个10比特目标平衡序列和所述272对10比特目标非平衡序列为所述9比特源序列集中512个9比特源序列的编码。
所述272对互为相反数的10比特目标非平衡序列中包含189对差异值为±2的10比特目标非平衡序列和83对差异值为±4的10比特目标非平衡序列。
所述10比特目标序列集还包含16个10比特目标非平衡序列用以表示控制字符,所述16个10比特目标非平衡序列可组成8对互为相反数的10比特目标非平衡序列,其中每一对互为相反数的10 比特目标非平衡序列为一个控制字符的编码。
作为本发明的另一种9B/10B解码方法,用于将10比特目标序列集解码为9比特源序列集,解码方法为编码方法的逆变换,所述编码方法用于将9比特源序列集编码为10比特目标序列集,9比特源序列集中的每个序列为一个9比特二进制数,所编码为的10比特目标序列集中的每个序列为一个10比特二进制数,10比特目标序列集包含平衡序列和非平衡序列,不同的9比特源序列编码为不同的10比特目标序列。
所述9比特源序列集包含第一类9比特源序列集、第二类9比特源序列集、第三类9比特源序列集,三类9比特源序列集不相交,并且三类9比特源序列集的合集共有512个互不重复的9比特源序列。
所述第一类9比特源序列集只包含差异值为1和-1的9比特源序列,在第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据“0”或“1”后,编码为10比特目标平衡序列。
优选地,在所述第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据时,所述同一位置为9比特源序列的最左侧或最右侧,插入的1比特数据在所编码为的10比特目标平衡序列中位于最高位或最低位。
所述第二类9比特源序列集择一地只包含差异值为3的9比特源序列或只包含差异值为-3的9比特源序列。
若第二类9比特源序列集只包含差异值为3的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为3的9比特源序列的编码。
若第二类9比特源序列集只包含差异值为-3的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列 与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-3的9比特源序列的编码。
优选地,在所述第二类9比特源序列集的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后。
优选地,在所述第二类9比特源序列集的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
所述第三类9比特源序列集包含第三类9比特源序列子集A和第三类9比特源序列子集B,第三类9比特源序列子集A和第三类9比特源序列子集B不相交,并且第三类9比特源序列子集A和第三类9比特源序列子集B的合集为第三类9比特源序列集。
所述第三类9比特源序列子集A包含的每一个9比特源序列编码为一个10比特目标平衡序列。
所述第三类9比特源序列子集B包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
优选地,所述第三类9比特源序列子集A包含两个序列:“000000000”和“111111111”。
所述第三类9比特源序列子集B包含第六类9比特源序列集和第七类9比特源序列集,第六类和第七类9比特源序列集不相交,并且第六类和第七类9比特源序列集的合集为第三类9比特源序列子集B。
所述第六类9比特源序列集择一地只包含差异值为5的9比特源序列或只包含差异值为-5的9比特源序列。
若第六类9比特源序列集只包含差异值为5的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列 与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为5的9比特源序列的编码。
若第六类9比特源序列集只包含差异值为-5的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-5的9比特源序列的编码。
优选地,在所述第六类9比特源序列集中的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后。
优选地,在所述第六类9比特源序列集中的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
所述第七类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,且所述10比特目标序列集择一地符合以下两个特征之一,第一个特征为:所述10比特目标序列集不包含最低4位为4比特“0000”或“1111”的序列,也不包含最高5位为5比特“00000”或“11111”的序列;第二个特征为:所述10比特目标序列集不包含最低5位为5比特“00000”或“11111”的序列,也不包含最高4位为4比特“0000”或“1111”的序列。
所述10比特目标序列集包含784个码字,所述784个码字中包含240个10比特目标平衡序列和544个10比特目标非平衡序列,所述544个10比特目标非平衡序列可组成272对互为相反数的10比特目标非平衡序列。
所述240个10比特目标平衡序列和所述272对10比特目标非 平衡序列为所述9比特源序列集中512个9比特源序列的编码。
所述272对互为相反数的10比特目标非平衡序列中包含189对差异值为±2的10比特目标非平衡序列和83对差异值为±4的10比特目标非平衡序列。
所述10比特目标序列集还包含16个10比特目标非平衡序列用以表示控制字符,所述16个10比特目标非平衡序列可组成8对互为相反数的10比特目标非平衡序列,其中每一对互为相反数的10比特目标非平衡序列为一个控制字符的编码。
本发明的有益效果是:
本发明一种9B/10B编解码方法,通过分类计算的方法将9比特序列集编码为10比特序列集,限制了连“0”或连“1”的个数,消除数据传输过程中信号的直流分量,以便于在接收端恢复出时钟和数据,与查表方法相比,简化了实现方法,降低了资源开销。
附图说明
图1是本发明一种9B/10B编解码方法的框图;
图2是本发明一种9B/10B编解码方法中对第三类9比特源序列集进行编码的方法流程图;
图3是本发明一种9B/10B编解码方法中对第五类9比特源序列集进行编码的方法流程图;
图4是本发明一种9B/10B编解码方法中第一类9比特源序列集及其所编码为的10比特目标序列的格图;
图5是本发明一种9B/10B编解码方法中第二类9比特源序列集及其所编码为的10比特目标序列的格图;
图6是本发明一种9B/10B编解码方法中第三类9比特源序列集的格图;
图7是本发明一种9B/10B编解码方法中第四类9比特源序列集及其所编码为的10比特目标序列的格图;
图8是本发明一种9B/10B编解码方法中第五类9比特源序列子集A及其所编码为的10比特目标序列的格图;
图9是本发明一种9B/10B编解码方法中第五类9比特源序列子集B及其所编码为的10比特目标序列的格图;
图10是本发明一种9B/10B编解码方法中第五类9比特源序列子集C及其所编码为的10比特目标序列的格图;
图11是本发明一种9B/10B编解码方法中第五类9比特源序列子集D及其所编码为的10比特目标序列的格图;
图12是本发明一种9B/10B编解码方法中第五类9比特源序列子集E及其所编码为的10比特目标序列的格图;
图13是本发明一种9B/10B编解码方法中第五类9比特源序列子集F及其所编码为的10比特目标序列的格图;
图14是本发明一种9B/10B编解码方法中第五类9比特源序列子集G及其所编码为的10比特目标序列的格图;
图15是本发明一种9B/10B编解码方法中第五类9比特源序列子集H及其所编码为的10比特目标序列的格图;
图16是本发明一种9B/10B编解码方法中第五类9比特源序列子集I及其所编码为的10比特目标序列的格图;
图17是本发明一种9B/10B编解码方法中第五类9比特源序列子集J及其所编码为的10比特目标序列的格图;
图18是本发明一种9B/10B编解码方法中第五类9比特源序列子集K及其所编码为的10比特目标序列的格图;
图19是本发明一种9B/10B编解码方法中第五类9比特源序列子集L及其所编码为的10比特目标序列的格图;
图20是本发明一种9B/10B编解码方法中第五类9比特源序列子集M及其所编码为的10比特目标序列的格图;
图21是本发明一种9B/10B编解码方法中第五类9比特源序列子集N及其所编码为的10比特目标序列的格图;
图22是本发明一种9B/10B编解码方法中第五类9比特源序列子集O及其所编码为的10比特目标序列的格图;
图23是本发明一种9B/10B编解码方法中第五类9比特源序列子集P及其所编码为的10比特目标序列的格图;
图24是本发明一种9B/10B编解码方法中第五类9比特源序列子集Q及其所编码为的10比特目标序列的格图;
图25是本发明一种9B/10B编解码方法中第五类9比特源序列子集R及其所编码为的10比特目标序列的格图。
具体实施方式
下面将结合附图对本发明实施例中的技术方案进行清楚、完整地描述,可以理解的是,所描述的实施例仅是本发明的一部分实施例,而不是全部实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明的一个应用实施例提供了一种9B/10B编码方法,用于将9比特源序列集编码为10比特目标序列集,9比特源序列集中的每个序列为一个9比特二进制数,所编码为的10比特目标序列集中的每个序列为一个10比特二进制数,不同的9比特源序列编码为不同的10比特目标序列。
所述10比特目标序列集包含平衡序列和非平衡序列,平衡序列指“0”和“1”的个数相同的序列,或差异值为0的序列;非平衡序列指“0”和“1”的个数不相同的序列,或差异值不为0的序列。本发明所提出的差异值的定义为:一段二进制序列的差异值为这段序列中“1”的个数减去“0”的个数。对于10比特二进制序列,所 有可能的差异值有-10、-8、-6、-4、-2、0、2、4、6、8、10。
所述9比特源序列集中的每个序列编码为10比特目标序列集中的一个平衡序列,或10比特目标序列集中的一对互为相反数的非平衡序列。本发明所提出的相反数的定义为:一个二进制序列按位取反后得到另一个二进制序列,那么这两个二进制序列互为相反数。
在本实施例中,所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,且所述10比特目标序列集不包含最低4位为4比特“0000”或“1111”的序列,也不包含最高5位为5比特“00000”或“11111”的序列。本发明中,二进制序列的最低位为该二进制序列最右侧的比特,二进制序列的最低4位为该二进制序列从最右侧向左顺序计数的前4比特,二进制序列的最高位为该二进制序列最左侧的比特,二进制序列的最高5位为该二进制序列从最左侧向右顺序计数的前5比特。
或者,本实施例的所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,且所述10比特目标序列集不包含最低5位为5比特“00000”或“11111”的序列,也不包含最高4位为4比特“0000”或“1111”的序列。
本实施例中,所述10比特目标序列集共包含800个互不重复的10比特序列,其中包含784个码字,这784个码字中包含240个10比特目标平衡序列和544个10比特目标非平衡序列,所述544个10比特目标非平衡序列可组成272对互为相反数的10比特目标非平衡序列。在本发明中,10比特目标序列集中的码字的定义为:由9比特源序列编码得到的10比特目标序列。
所述240个10比特目标平衡序列和所述272对10比特目标非平衡序列为所述9比特源序列集中512个9比特源序列的编码。
所述272对互为相反数的10比特目标非平衡序列中包含189对差异值为±2的10比特目标非平衡序列和83对差异值为±4的10比特目标非平衡序列。
除784个码字外,所述10比特目标序列集还包含16个10比特目标非平衡序列用以表示控制字符,所述16个10比特目标非平衡序列可组成8对互为相反数的10比特目标非平衡序列,其中每一对互为相反数的10比特目标非平衡序列为一个控制字符的编码。
以上关于10比特目标序列集中序列的总数,以及其中码字的个数、用以表示控制字符的序列个数、平衡序列的个数、非平衡序列的个数、非平衡序列中各差异值的序列个数等数值仅为本发明较佳的实施方式,但本发明的保护范围并不受这些数值限制。
在信号传输过程中,当一对互为相反数的10比特目标非平衡序列为一个9比特源序列或一个控制字符的编码时,应根据运行差异选择这对10比特目标非平衡序列中的一个作为该9比特源序列或控制字符的编码,从而消除数据传输过程中信号的直流分量,以便于在接收端恢复出时钟和数据。本发明所提出的运行差异的定义为:在信号传输过程中,从开始计数后所有传输的二进制序列中“1”的个数减去“0”的个数。
所述9比特源序列集包含第一类9比特源序列集、第二类9比特源序列集、第三类9比特源序列集,三类9比特源序列集不相交,并且三类9比特源序列集的合集共有512个互不重复的9比特源序列。
如图1所示,本实施例的方法流程图包括:
S101,对第一类9比特源序列集进行编码。
所述第一类9比特源序列集只包含差异值为1和-1的9比特源序列,在第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据“0”或“1”后,编码为10比特目标平衡序列,对于差异值为1的9比特源序列插入1比特数据“0”后编码为10比特目标平衡序列,对于差异值为-1的9比特源序列插入1比特数据“1”后编码为10比特目标平衡序列。
本实施例中,在所述第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据时,所述同一位置为9比特源序列的最左侧,插入的1比特数据在所编码为的10比特目标平衡序列中位于最高位;
或者,在本实施例所述第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据时,所述同一位置为9比特源序列的最右侧,插入的1比特数据在所编码为的10比特目标平衡序列中位于最低位;
或者,在本实施例所述第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据时,所述同一位置也可以为9比特源序列除最左侧和最右侧外的其他位,这时插入的1比特数据在所编码为的10比特目标平衡序列中位于除最高位和最低位外的其他位。
S102,对第二类9比特源序列集进行编码。
在本实施例中,所述第二类9比特源序列集择一地只包含差异值为3的9比特源序列或只包含差异值为-3的9比特源序列。
若第二类9比特源序列集只包含差异值为3的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为3的9比特源序列的编码。
若第二类9比特源序列集只包含差异值为-3的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-3的9比特源序列的编码。
本实施例中,在所述第二类9比特源序列集的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后;
或者,在所述第二类9比特源序列集的9比特源序列插入1比 特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后。
在所述第二类9比特源序列集的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后;
或者,在所述第二类9比特源序列集的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
S103,对第三类9比特源序列集进行编码。
所述第三类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
所述第三类9比特源序列集包含第四类9比特源序列集和第五类9比特源序列集,第四类和第五类9比特源序列集不相交,并且第四类和第五类9比特源序列集的合集为第三类9比特源序列集。
如图2所示,本实施例中对第三类9比特源序列集进行编码的方法流程图包括;
S201,对第四类9比特源序列集进行编码。
在本实施例中,所述第四类9比特源序列集只包含差异值为5的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为5的9比特源序列的编码;
或者,所述第四类9比特源序列集只包含差异值为-5的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-5的9比特源序列的编码。
本实施例中,在所述第四类9比特源序列集的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后;
或者,在所述第四类9比特源序列集的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后。
在所述第四类9比特源序列集的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后;
或者,在所述第四类9比特源序列集的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
S202,完成第四类9比特源序列集的编码后,对第五类9比特源序列集进行编码。
所述第五类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
如图3所示,本实施例中对第五类9比特源序列集进行编码的方法流程图包括;
S301,对第五类9比特源序列子集进行编码。
在所述第五类9比特源序列集中选取n个未编码的9比特源序列作为第五类9比特源序列子集,在所述10比特目标序列集中选取n个未与已编码9比特源序列对应的10比特目标序列作为10比特目标序列子集,使得所述第五类9比特源序列子集中的9比特源序列与所述10比特目标序列子集中的10比特目标序列个数相同,且满足以下条件:
选择第五类9比特源序列子集每个序列中k比特的位置P9和10比特目标序列子集每个序列中m比特的位置P10,第五类9比特源序 列子集中P9处的n个k比特序列与10比特目标序列子集中P10处的n个m比特序列相同,或经简单变换后可以得到10比特目标序列子集中P10处的n个m比特序列;第五类9比特源序列子集中所有序列除P9处外其余的9-k比特为n个相同的序列,10比特目标序列子集中所有序列除P10处外其余的10-m比特也为n个相同的序列。
满足上述条件时,所述第五类9比特源序列子集可以较为便捷地编码为所述10比特目标序列子集及所述10比特目标序列子集中各序列的相反数,使得第五类9比特源序列集采用分类计算的方法占用较少的资源即可实现编码,而第一类、第二类、第四类9比特源序列集的编码方法则更为简单,占用的资源更少,且这三类序列集中的序列总数在所有512个9比特源序列中占比较高,超过70%,因而本发明可以简化9B10B编码实现方法,降低资源开销。
对第五类9比特源序列子集编码后,选取第五类9比特源序列集中未编码的9比特源序列组成新的第五类9比特源序列子集,并重复执行S301步骤,直至所有第五类9比特源序列集完成编码。
根据由二进制序列组成的格图对本实施例做进一步说明。格图由一系列等长的线段组成,从左下至右上的一小段线段表示1比特数据“1”,从左上至右下的一小段线段表示1比特数据“0”,格图中最左端为二进制序列的最低位,最右端为二进制序列的最高位,格图中某一点旁边的数字表示从格图的最左端至该点有多少个不同的序列。
如图4所示,本实施例中,第一类9比特源序列集中差异值为1的9比特源序列的格图如图4(a)所示,共120个9比特源序列,编码方法为:在差异值为1的9比特源序列的最左侧插入1比特数据“0”。
本实施例中,第一类9比特源序列集中差异值为-1的9比特源 序列的格图如图4(b)所示,共120个9比特源序列,编码方法为:在差异值为-1的9比特源序列的最左侧插入1比特数据“1”。
本实施例中,第一类9比特源序列集共240个9比特源序列,第一类9比特源序列集所编码为的10比特目标序列的格图如图4(c)所示,共240个10比特目标序列。
例如:对差异值为1的9比特源序列“010111100”编码,在该序列最左侧插入1比特数据“0”后,编码为10比特目标序列“0010111100”;对差异值为-1的9比特源序列“001110010”编码,在该序列最左侧插入1比特数据“1”后,编码为10比特目标序列“1001110010”。
第一类9比特源序列集的编解码表如表1所示。
表1第一类9比特源序列集的编解码表
Figure PCTCN2022071737-appb-000001
Figure PCTCN2022071737-appb-000002
Figure PCTCN2022071737-appb-000003
如图5所示,本实施例中,第二类9比特源序列集只包含差异值为3的9比特源序列,其格图如图5(a)所示,共84个9比特源序列,编码方法为:在对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后的位置插入1比特数据“0”。
本实施例中,第二类9比特源序列集所编码为的10比特目标序列包含图5(b)、图5(c)、图5(d)、图5(e)所示格图表示的序列,共84个10比特目标序列。
例如:对差异值为3的9比特源序列“111011001”编码,在对 该序列中“1”的个数从最低位向高位顺序计数当计满3之后的位置,即该序列从最低位向高位顺序计数的第5位和第6位之间,插入1比特数据“0”后,编码为10比特目标序列“1110011001”及其相反数“0001100110”。
第二类9比特源序列集的编解码表如表2所示。
表2第二类9比特源序列集的编解码表
Figure PCTCN2022071737-appb-000004
Figure PCTCN2022071737-appb-000005
如图6所示,本实施例中,第三类9比特源序列集包含图6(a)、图6(b)、图6(c)、图6(d)、图6(e)、图6(f)、图6(g)、图6(h)所示格图表示的序列,共188个9比特源序列。
第三类9比特源序列集包含第四类9比特源序列集和第五类9比特源序列集。本实施例中,第四类9比特源序列集的格图如图6(h)所示,共36个9比特源序列,第五类9比特源序列集包含图6(a)、图6(b)、图6(c)、图6(d)、图6(e)、图6(f)、图6(g)所示格图表示的序列,共152个9比特源序列。
如图7所示,本实施例中,第四类9比特源序列集只包含差异值为5的9比特源序列,其格图如图7(a)所示,共36个9比特源序列,编码方法为:在对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后的位置插入1比特数据“0”。
本实施例中,第四类9比特源序列集所编码为的10比特目标序列包含图7(b)、图7(c)、图7(d)所示格图表示的序列,共36个10比特目标序列。
例如:对差异值为5的9比特源序列“110111101”编码,在对该序列中“1”的个数从最低位向高位顺序计数当计满3之后的位置,即该序列从最低位向高位顺序计数的第4位和第5位之间,插入1比特数据“0”后,编码为10比特目标序列“1101101101”及其相反数“0010010010”。
第四类9比特源序列集的编解码表如表3所示。
表3第四类9比特源序列集的编解码表
Figure PCTCN2022071737-appb-000006
Figure PCTCN2022071737-appb-000007
如图8所示,本实施例中,在第五类9比特源序列集中,选取图8(a)所示格图表示的序列作为第五类9比特源序列子集A,共56个9比特源序列,编码方法为:第一步,对图8(a)所示格图表示的序列中“0”的个数从最低位向高位顺序计数当计满3之后的位置插入1比特数据“0”,并删除最高位,得到图8(b)所示格图表示的序列;第二步,对图8(b)所示格图表示的序列中从最低位向高位顺序计数当计满2之后的位置插入1比特数据“1”。
本实施例中,第五类9比特源序列子集A所编码为的10比特目标序列包含图8(c)、图8(d)、图8(e)、图8(f)所示格图表示的序列,共56个10比特目标序列。
例如:对9比特源序列“000101010”编码,第一步,对该序列中“0”的个数从最低位向高位顺序计数当计满3之后的位置,即该序列从最低位向高位顺序计数的第5位和第6位之间,插入1比特数据“0”,并删除最高位,得到序列“001001010”;第二步,对序列“001001010”中“0”的个数从最低位向高位顺序计数当计满2之后的位置,即该序列从最低位向高位顺序计数的第3位和第4位之间,插入1比特数据“1”后,编码为10比特目标序列“0010011010”及其相反数“1101100101”。
第五类9比特源序列子集A的编解码表如表4所示。
表4第五类9比特源序列子集A的编解码表
Figure PCTCN2022071737-appb-000008
如图9所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集B,其格图如图9(a)所示,共15个9比特源序列,编码方法为:第一步,对图9(a)所示格图表示的序列中“0”的个数从最低位向高位顺序计数当计满2之后的位置插入2比特数据“00”,并删除最高3位,得到图9(b)所示格图表示的序列;第二步,在图9(b)所示格图表示的序列的最左侧插入1比特数据“1”,最右侧也插入1比特数据“1”。
本实施例中,第五类9比特源序列子集B所编码为的10比特目标序列包含图9(c)所示格图表示的序列,共15个10比特目标序列。
例如:对9比特源序列“100000110”编码,第一步,对该序列中“0”的个数从最低位向高位顺序计数当计满2之后的位置,即该 序列从最低位向高位顺序计数的第4位和第5位之间,插入2比特数据“00”,并删除最高3位,得到序列“00000110”;第二步,在序列“00000110”的最左侧插入1比特数据“1”,最右侧也插入1比特数据“1”后,编码为10比特目标序列“1000001101”及其相反数“0111110010”。
第五类9比特源序列子集B的编解码表如表5所示。
表5第五类9比特源序列子集B的编解码表
Figure PCTCN2022071737-appb-000009
如图10所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集C,其格图如图10(a)所示,共6个9比特源序列,编码方法为:第一步,对图10(a)所示格图表示的序列中“0”的个数从最低位向高位顺序计数当计满2之后的位置插入1比特数据“0”,并删除最高3位,得到图10(b)所示格图表示的序列;第二步,在图10(b)所示格图表示的序列的最左侧插入1比特数据“1”,最右侧插入2比特数据“10”。
本实施例中,第五类9比特源序列子集C所编码为的10比特目标序列包含图10(c)所示格图表示的序列,共6个10比特目标序列。
例如:对9比特源序列“110000010”编码,第一步,对该序列中“0”的个数从最低位向高位顺序计数当计满2之后的位置,即该序列从最低位向高位顺序计数的第3位和第4位之间,插入1比特数据“0”,并删除最高3位,得到序列“0000010”;第二步,在序列“0000010”的最左侧插入1比特数据“1”,最右侧插入2比特数 据“10”后,编码为10比特目标序列“1000001010”及其相反数“0111110101”。
第五类9比特源序列子集C的编解码表如表6所示。
表6第五类9比特源序列子集C的编解码表
Figure PCTCN2022071737-appb-000010
如图11所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集D,其格图如图11(a)所示,共5个9比特源序列,编码方法为:第一步,对图11(a)所示格图表示的序列中“0”的个数从最低位向高位顺序计数当计满2之后的位置插入1比特数据“0”,并删除最高4位,得到图11(b)所示格图表示的序列;第二步,在图11(b)所示格图表示的序列的最左侧插入2比特数据“01”,最右侧插入2比特数据“10”。
本实施例中,第五类9比特源序列子集D所编码为的10比特目标序列包含图11(c)所示格图表示的序列,共5个10比特目标序列。
例如:对9比特源序列“101000010”编码,第一步,对该序列中“0”的个数从最低位向高位顺序计数当计满2之后的位置,即该序列从最低位向高位顺序计数的第3位和第4位之间,插入1比特数据“0”,并删除最高4位,得到序列“000010”;第二步,在序列“000010”的最左侧插入2比特数据“01”,最右侧插入2比特数据“10”后,编码为10比特目标序列“0100001010”及其相反数“1011110101”。
第五类9比特源序列子集D的编解码表如表7所示。
表7第五类9比特源序列子集D的编解码表
Figure PCTCN2022071737-appb-000011
Figure PCTCN2022071737-appb-000012
如图12所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集E,其格图如图12(a)所示,共2个9比特源序列,编码方法为:第一步,删除图12(a)所示格图表示的序列中从最高位向低位顺序计数除第2位和第4位之外的其余位,得到图12(b)所示格图表示的序列;第二步,在图12(b)所示格图表示的序列的最左侧插入2比特数据“00”,最右侧插入6比特数据“100010”。
本实施例中,第五类9比特源序列子集E所编码为的10比特目标序列包含图12(c)所示格图表示的序列,共2个10比特目标序列。
例如:对9比特源序列“101100000”编码,第一步,删除该序列中从最高位向低位顺序计数除第2位和第4位之外的其余位,得到序列“01”;第二步,在序列“01”的最左侧插入2比特数据“00”,最右侧插入6比特数据“100010”后,编码为10比特目标序列“0001100010”及其相反数“1110011101”。
第五类9比特源序列子集E的编解码表如表8所示。
表8第五类9比特源序列子集E的编解码表
Figure PCTCN2022071737-appb-000013
如图13所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集F,其格图如图13(a)和图13(b)所示,共20个9比特源序列,编码方法为:在9比特源序列的最右侧插入1比特数据“1”。
本实施例中,第五类9比特源序列子集F所编码为的10比特目标序列包含图13(c)和图13(d)所示格图表示的序列,共20个10比特目标序列。
例如:对9比特源序列“001010000”编码,在该序列最右侧插入1比特数据“1”后,编码为10比特目标序列“0010100001”及其相反数“1101011110”。
第五类9比特源序列子集F的编解码表如表9所示。
表9第五类9比特源序列子集F的编解码表
Figure PCTCN2022071737-appb-000014
如图14所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集G,其格图如图14(a)所示,共10个9比特源序列,编码方法为:第一步,删除图14(a)所示格图表示的序列的最高4位,得到图14(b)所示格图表示的序列;第二步,在图14(b)所示格图表示的序列的最右侧插入5比特数据“00100”。
本实施例中,第五类9比特源序列子集G所编码为的10比特目标序列包含图14(c)所示格图表示的序列,共10个10比特目标序列。
例如:对9比特源序列“000001100”编码,第一步,删除该序列的最高4位,得到序列“01100”;第二步,在序列“01100”的最右侧插入5比特数据“00100”后,编码为10比特目标序列“0110000100”及其相反数“1001111011”。
第五类9比特源序列子集G的编解码表如表10所示。
表10第五类9比特源序列子集G的编解码表
Figure PCTCN2022071737-appb-000015
Figure PCTCN2022071737-appb-000016
如图15所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集H,其格图如图15(a)所示,共4个9比特源序列,编码方法为:第一步,删除图15(a)所示格图表示的序列的最低4位,得到图15(b)所示格图表示的序列;第二步,在图15(b)所示格图表示的序列的最右侧插入5比特数据“01100”。
本实施例中,第五类9比特源序列子集H所编码为的10比特目标序列包含图15(c)所示格图表示的序列,共4个10比特目标序列。
例如:对9比特源序列“010001000”编码,第一步,删除该序列的最低4位,得到序列“01000”;第二步,在序列“01000”的最右侧插入5比特数据“01100”后,编码为10比特目标序列“0100001100”及其相反数“1011110011”。
第五类9比特源序列子集H的编解码表如表11所示。
表11第五类9比特源序列子集H的编解码表
Figure PCTCN2022071737-appb-000017
如图16所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集I,其格图如图16(a)所示,共2个9比特源序列,编码方法为:第一步,删除图16(a)所示格图表示的序列中从最低位向高位顺序计数的第2位到第5位,得到图16(b)所示格图表示的序列;第二步,在图16(b)所示格图表示的序列的最左侧插入3比特数据“001”,最右侧插入2比特数据“10”。
本实施例中,第五类9比特源序列子集I所编码为的10比特目标序列包含图16(c)所示格图表示的序列,共2个10比特目标序列。
例如:对9比特源序列“110000000”编码,第一步,删除该序列中从最低位向高位顺序计数的第2位到第5位,得到序列“11000”;第二步,在序列“11000”的最左侧插入3比特数据“001”,最右侧插入2比特数据“10”后,编码为10比特目标序列“0011100010”及其相反数“1100011101”。
第五类9比特源序列子集I的编解码表如表12所示。
表12第五类9比特源序列子集I的编解码表
Figure PCTCN2022071737-appb-000018
如图17所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集J,其格图如图17(a)所示,共4个9比特源序列,编码方法为:第一步,删除图17(a)所示格图表示的序列的最高2位和最低位,得到图17(b)所示格图表示的序列;第二步,在图17(b)所示格图表示的序列的最左侧插入2比特数据“10”,最右侧插入2比特数据“00”。
本实施例中,第五类9比特源序列子集J所编码为的10比特目标序列包含图17(c)所示格图表示的序列,共4个10比特目标序列。
例如:对9比特源序列“111111011”编码,第一步,删除该序列的最高2位和最低位,得到序列“111101”;第二步,在序列“111101”的最左侧插入2比特数据“10”,最右侧插入2比特数据“00”后,编码为10比特目标序列“1011110100”及其相反数“0100001011”。
第五类9比特源序列子集J的编解码表如表13所示。
表13第五类9比特源序列子集J的编解码表
Figure PCTCN2022071737-appb-000019
如图18所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集K,其格图如图18(a)所示,共3个9比特源序列,编码方法为:第一步,删除图18(a)所示格图表示的序列的最高4位,得到图18(b)所示格图表示的序列;第二步,在图18(b)所示格图表示的序列的最左侧插入2比特数据“10”,最右侧插入3比特数据“010”。
本实施例中,第五类9比特源序列子集K所编码为的10比特目标序列包含图18(c)所示格图表示的序列,共3个10比特目标序列。
例如:对9比特源序列“111110111”编码,第一步,删除该序列的最高4位,得到序列“10111”;第二步,在序列“10111”的最左侧插入2比特数据“10”,最右侧插入3比特数据“010”后,编码为10比特目标序列“1010111010”及其相反数“0101000101”。
第五类9比特源序列子集K的编解码表如表14所示。
表14第五类9比特源序列子集K的编解码表
Figure PCTCN2022071737-appb-000020
如图19所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集L,其格图如图19(a)所示,共2个9比特源序列,编码方法为:第一步,删除图19(a)所示格图表示的序列的最低3位,得到图19(b)所示格图表示的序列;第二步,在图19(b)所示格图表示的序列的最左侧插入3比特数据“100”,最右侧插入1比特数据“0”。
本实施例中,第五类9比特源序列子集L所编码为的10比特目标序列包含图19(c)所示格图表示的序列,共2个10比特目标序列。
例如:对9比特源序列“101111111”编码,第一步,删除该序 列的最低3位,得到序列“101111”;第二步,在序列“101111”的最左侧插入3比特数据“100”,最右侧插入1比特数据“0”后,编码为10比特目标序列“1001011110”及其相反数“0110100001”。
第五类9比特源序列子集L的编解码表如表15所示。
表15第五类9比特源序列子集L的编解码表
Figure PCTCN2022071737-appb-000021
如图20所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集M,其格图如图20(a)所示,共4个9比特源序列,编码方法为:第一步,删除图20(a)所示格图表示的序列的最高3位,得到图20(b)所示格图表示的序列;第二步,在图20(b)所示格图表示的序列的最左侧插入1比特数据“1”,最右侧插入3比特数据“110”。
本实施例中,第五类9比特源序列子集M所编码为的10比特目标序列包含图20(c)所示格图表示的序列,共4个10比特目标序列。
例如:对9比特源序列“000010000”编码,第一步,删除该序列的最高3位,得到序列“010000”;第二步,在序列“010000”的最左侧插入1比特数据“1”,最右侧插入3比特数据“110”后,编码为10比特目标序列“1010000110”及其相反数“0101111001”。
第五类9比特源序列子集M的编解码表如表16所示。
表16第五类9比特源序列子集M的编解码表
Figure PCTCN2022071737-appb-000022
如图21所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集N,其格图如图21(a)所示,共3个9比特源序列,编码方法为:第一步,删除图21(a) 所示格图表示的序列的最低6位,得到图21(b)所示格图表示的序列;第二步,在图21(b)所示格图表示的序列的最左侧插入1比特数据“1”,最右侧插入6比特数据“100010”。
本实施例中,第五类9比特源序列子集N所编码为的10比特目标序列包含图21(c)所示格图表示的序列,共3个10比特目标序列。
例如:对9比特源序列“001000000”编码,第一步,删除该序列的最低6位,得到序列“001”;第二步,在序列“001”的最左侧插入1比特数据“1”,最右侧插入6比特数据“100010”后,编码为10比特目标序列“1001100010”及其相反数“0110011101”。
第五类9比特源序列子集N的编解码表如表17所示。
表17第五类9比特源序列子集N的编解码表
Figure PCTCN2022071737-appb-000023
如图22所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集O,其格图如图22(a)所示,共2个9比特源序列,编码方法为:第一步,删除图22(a)所示格图表示的序列的最高6位,得到图22(b)所示格图表示的序列;第二步,在图22(b)所示格图表示的序列的最左侧插入2比特数据“11”,最右侧插入5比特数据“00010”。
本实施例中,第五类9比特源序列子集O所编码为的10比特目标序列包含图22(c)所示格图表示的序列,共2个10比特目标序列。
例如:对9比特源序列“000000100”编码,第一步,删除该序列的最高6位,得到序列“100”;第二步,在序列“100”的最左侧插入2比特数据“11”,最右侧插入5比特数据“00010”后,编码为10比特目标序列“1110000010”及其相反数“0001111101”。
第五类9比特源序列子集O的编解码表如表18所示。
表18第五类9比特源序列子集O的编解码表
Figure PCTCN2022071737-appb-000024
如图23所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集P,其格图如图23(a)所示,共6个9比特源序列,编码方法为:第一步,根据图23(a)所示格图表示的9比特源序列中的最低位和最高5位,选择图23(b)所示格图表示的6个4比特平衡序列之一作为该9比特源序列第一步编码的结果;第二步,对图23(b)所示格图表示的序列中“0”的个数从最低位向高位顺序计数当计满2之后的位置插入2比特数据“00”,得到图23(c)所示格图表示的序列;第三步,在图23(c)所示格图表示的序列的最左侧插入3比特数据“001”,最右侧插入1比特数据“1”。
本实施例中,第五类9比特源序列子集P所编码为的10比特目标序列包含图23(d)所示格图表示的序列,共6个10比特目标序列。
例如:对9比特源序列“100001111”编码,第一步,由于该序列的最低位为“1”且从最高位向低位顺序计数的第1位为“1”,选择序列“1010”作为第一步编码的结果;第二步,对序列“1010”中“0”的个数从最低位向高位顺序计数当计满2之后的位置,即该序列从最低位向高位顺序计数的第3位和第4位之间,插入2比特数据“00”,得到序列“100010”;第三步,在序列“100010”的最左侧插入3比特数据“001”,最右侧插入1比特数据“1”后,编码为10比特目标序列“0011000101”及其相反数“1100111010”。
第五类9比特源序列子集P的编解码表如表19所示。
表19第五类9比特源序列子集P的编解码表
Figure PCTCN2022071737-appb-000025
如图24所示,本实施例中,在第五类9比特源序列集中,选取未编码的9比特源序列组成第五类9比特源序列子集Q,其格图如图24(a)所示,共6个9比特源序列,编码方法为:第一步,根据图24(a)所示格图表示的9比特源序列中的最低位和最高5位,选择图24(b)所示格图表示的6个4比特平衡序列之一作为该9比特源序列第一步编码的结果;第二步,对图24(b)所示格图表示的序列中“0”的个数从最低位向高位顺序计数当计满1之后的位置插入2比特数据“00”,得到图24(c)所示格图表示的序列;第三步,在图24(c)所示格图表示的序列的最左侧插入2比特数据“01”,最右侧插入2比特数据“10”。
本实施例中,第五类9比特源序列子集Q所编码为的10比特目标序列包含图24(d)所示格图表示的序列,共6个10比特目标序列。
例如:对9比特源序列“110110000”编码,第一步,由于该序列的最低位为“0”且从最高位向低位顺序计数的第3位为“0”,选择序列“1001”作为第一步编码的结果;第二步,对序列“1001”中“0”的个数从最低位向高位顺序计数当计满1之后的位置,即该序列从最低位向高位顺序计数的第2位和第3位之间,插入2比特数据“00”,得到序列“100001”;第三步,在序列“100001”的最左侧插入2比特数据“01”,最右侧插入2比特数据“10”后,编码为10比特目标序列“0110000110”及其相反数“1001111001”。
第五类9比特源序列子集Q的编解码表如表20所示。
表20第五类9比特源序列子集Q的编解码表
Figure PCTCN2022071737-appb-000026
如图25所示,本实施例中,在第五类9比特源序列集中,选取 未编码的9比特源序列组成第五类9比特源序列子集R,其格图如图25(a)和图25(b)所示,共2个9比特源序列。
本实施例中,第五类9比特源序列子集R所编码为的10比特目标序列包含图25(c)和图25(d)所示格图表示的序列,共2个10比特目标序列。
第五类9比特源序列子集R的编解码表如表21所示。
表21第五类9比特源序列子集R的编解码表
Figure PCTCN2022071737-appb-000027
或者,第五类9比特源序列子集R的编码也可以为在10比特目标序列集中且未被图5及图7至图25所示格图表示的10比特非平衡序列。
另外本实施例中,在10比特目标序列集中且未被使用的10比特非平衡序列可作为控制字符的编码,控制字符的编解码表如表22所示。
表22控制字符的编解码表
Figure PCTCN2022071737-appb-000028
本实施例中,总的9B10B编解码表如表23所示。
表23本发明的一个应用实施例的9B10B总编解码表
Figure PCTCN2022071737-appb-000029
Figure PCTCN2022071737-appb-000030
Figure PCTCN2022071737-appb-000031
Figure PCTCN2022071737-appb-000032
Figure PCTCN2022071737-appb-000033
Figure PCTCN2022071737-appb-000034
Figure PCTCN2022071737-appb-000035
Figure PCTCN2022071737-appb-000036
Figure PCTCN2022071737-appb-000037
Figure PCTCN2022071737-appb-000038
Figure PCTCN2022071737-appb-000039
在本发明的另一个应用实施例中,9B10B总编解码表如表24所示。
与表23所示实施例相比,表24所示实施例中,9比特源序列集也包含第一类9比特源序列集、第二类9比特源序列集、第三类9比特源序列集,三类9比特源序列集不相交,并且三类9比特源序列集的合集共有512个互不重复的9比特源序列。
所述第一类9比特源序列集只包含差异值为1和-1的9比特源序列,在第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据“0”或“1”后,编码为10比特目标平衡序列。
所述第二类9比特源序列集择一地只包含差异值为3的9比特源序列或只包含差异值为-3的9比特源序列。
若第二类9比特源序列集只包含差异值为3的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对 10比特目标非平衡序列为所述差异值为3的9比特源序列的编码。
若第二类9比特源序列集只包含差异值为-3的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-3的9比特源序列的编码。
所述第三类9比特源序列集包含第三类9比特源序列子集A和第三类9比特源序列子集B,第三类9比特源序列子集A和第三类9比特源序列子集B不相交,并且第三类9比特源序列子集A和第三类9比特源序列子集B的合集为第三类9比特源序列集。
所述第三类9比特源序列子集A包含的每一个9比特源序列编码为一个10比特目标平衡序列。
所述第三类9比特源序列子集B包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
与表23所示实施例不同的是,在表24所示实施例中,第一类9比特源序列集不包含9比特源序列“011111000”和“100000111”,第三类9比特源序列子集A包含9比特源序列“000000000”和“111111111”,第三类9比特源序列子集B包含第六类9比特源序列集和第七类9比特源序列集,第六类和第七类9比特源序列集不相交,并且第六类和第七类9比特源序列集的合集为第三类9比特源序列子集B。
与表23所示实施例中的第五类9比特源序列集不同的是,表24所示实施例中的第七类9比特源序列集包含9比特源序列“011111000”和“100000111”,不包含9比特源序列“000000000”和“111111111”。
表24所示实施例中的第二类9比特源序列集与表23所示实施例中的第二类9比特源序列集包含的9比特源序列相同。
表24所示实施例中的第六类9比特源序列集与表23所示实施例中的第四类9比特源序列集包含的9比特源序列相同。
在表24所示实施例中,将9比特源序列“000000000”和“111111111”分别编码为10比特目标平衡序列“0011111000”和“1100000111”,表23中与这两个10比特目标平衡序列对应的9比特源序列“011111000”和“100000111”,在表24所示实施例中则分别编码为10比特目标非平衡序列“0100111101”及其相反数,以及“1010011110”及其相反数。
在数据传输系统中,系统在复位状态或低功耗模式下的输出往往是固定数据“0”或“1”,对于9B10B编码模块,此时的输入数据为9比特源序列“000000000”或“111111111”,若将其编码为一对10比特目标非平衡序列,9B10B编码模块将根据运行差异选择这对10比特目标非平衡序列其中之一,交替输出这两个10比特目标非平衡序列,这将增加系统功耗,且不利于从输出的编码数据中解析出9比特源序列“000000000”或“111111111”。将9比特源序列“000000000”或“111111111”编码为上述10比特目标平衡序列,9B10B编码模块的输出为一个固定的10比特数据,如果以串行数据形式传输,则为交替的五个“0”及五个“1”,可看做为低速时钟信号,因为降低了信号翻转频率,有利于降低复位状态或低功耗模式下的系统功耗,并且易于从串行数据解析出系统处于复位状态或低功耗模式。
第三类9比特源序列子集A根据需要,也可以包含“000000000”和“111111111”之外的9比特源序列,或者包含其他的9比特源序列但不包含“000000000”和“111111111”。
表24本发明的另一个应用实施例的9B10B总编解码表
Figure PCTCN2022071737-appb-000040
Figure PCTCN2022071737-appb-000041
Figure PCTCN2022071737-appb-000042
Figure PCTCN2022071737-appb-000043
Figure PCTCN2022071737-appb-000044
Figure PCTCN2022071737-appb-000045
Figure PCTCN2022071737-appb-000046
Figure PCTCN2022071737-appb-000047
Figure PCTCN2022071737-appb-000048
Figure PCTCN2022071737-appb-000049
Figure PCTCN2022071737-appb-000050
本实施例中,采用分类计算的方法即可得到表24所示的9B10B编解码表,但根据本发明得到9B10B编解码表后,仍可以采用传统的查表方法将9比特源序列编码为10比特目标序列。例如,本实施例中,对9比特源序列“110110110”编码,在得到表24后,根据查表结果和运行差异,选择10比特目标序列“1101010110”和“0010101001”其中之一作为9比特源序列“110110110”的编码。根据本发明得到9B10B编解码表并进行编码的不同实现方式都在本发明保护范围之内。
由本发明给出的将9比特源序列集编码为10比特目标序列集的编码方法,可以得到将10比特目标序列集解码为9比特源序列集的解码方法,解码方法为编码方法的逆变换,即依据编解码表23及24,从10比特目标序列可以得到相应的9比特源序列,例如,本实施例 中,对10比特目标序列“1101010110”解码,在得到表24后,根据查表结果,该10比特目标序列的解码结果为9比特源序列“110110110”。
编码方法的逆变换即解码也可通过分类计算等其他方式实现,例如,在本实施例中,对于由第一类9比特源序列集中的序列编码得到的一个10比特目标平衡序列,删除该10比特目标平衡序列的最高位,即可得到解码后的9比特源序列。又例如,在本实施例中,对于由第二类9比特源序列集中的序列编码得到的一对差异值为±2的10比特目标非平衡序列,取其中差异值为2的10比特目标非平衡序列,在对该序列中“1”的个数从最低位向高位顺序计数当计满3之后的位置有1比特数据“0”,删除这1比特数据“0”,即可得到解码后的9比特源序列。根据本发明得到9B10B编解码表并进行解码的不同实现方式都在本发明保护范围之内。
本领域普通技术人员可以理解,实现上述实施例中的全部或部分步骤可以通过程序来指令相关的硬件完成,所述的程序可以存储于一计算机可读存储介质中。该可读存储介质例如只读存储器、随机存取存储器、磁盘、光盘、优盘等。
以上所述,仅为本发明较佳的实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应该涵盖在本发明的保护范围之内。

Claims (42)

  1. 一种9B/10B编码方法,用于将9比特源序列集编码为10比特目标序列集,9比特源序列集中的每个序列为一个9比特二进制数,所编码为的10比特目标序列集中的每个序列为一个10比特二进制数,10比特目标序列集包含平衡序列和非平衡序列,不同的9比特源序列编码为不同的10比特目标序列,
    其特征在于:
    所述9比特源序列集包含第一类9比特源序列集、第二类9比特源序列集、第三类9比特源序列集,三类9比特源序列集不相交,并且三类9比特源序列集的合集共有512个互不重复的9比特源序列,
    所述第一类9比特源序列集只包含差异值为1和-1的9比特源序列,在第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据“0”或“1”后,编码为10比特目标平衡序列,
    所述第二类9比特源序列集择一地只包含差异值为3的9比特源序列或只包含差异值为-3的9比特源序列,
    若第二类9比特源序列集只包含差异值为3的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为3的9比特源序列的编码,
    若第二类9比特源序列集只包含差异值为-3的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-3的9比特源序列的编码,
    所述第三类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
  2. 根据权利要求1所述的一种9B/10B编码方法,其特征在于:
    在所述第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据时,所述同一位置为9比特源序列的最左侧或最右侧,插入的1比特数据在所编码为的10比特目标平衡序列中位于最高位或最低位。
  3. 根据权利要求1所述的一种9B/10B编码方法,其特征在于:
    在所述第二类9比特源序列集的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后;
    在所述第二类9比特源序列集的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
  4. 根据权利要求1所述的一种9B/10B编码方法,其特征在于:
    所述第三类9比特源序列集包含第四类9比特源序列集和第五类9比特源序列集,第四类和第五类9比特源序列集不相交,并且第四类和第五类9比特源序列集的合集为第三类9比特源序列集,
    所述第四类9比特源序列集择一地只包含差异值为5的9比特源序列或只包含差异值为-5的9比特源序列,
    若第四类9比特源序列集只包含差异值为5的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为5的9比特源序列的编码,
    若第四类9比特源序列集只包含差异值为-5的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列 与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-5的9比特源序列的编码,
    所述第五类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
  5. 根据权利要求4所述的一种9B/10B编码方法,其特征在于:
    在所述第四类9比特源序列集中的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后;
    在所述第四类9比特源序列集中的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
  6. 根据权利要求1所述的一种9B/10B编码方法,其特征在于:
    所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,
    所述10比特目标序列集不包含最低4位为4比特“0000”或“1111”的序列,也不包含最高5位为5比特“00000”或“11111”的序列。
  7. 根据权利要求1所述的一种9B/10B编码方法,其特征在于:
    所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,
    所述10比特目标序列集不包含最低5位为5比特“00000”或“11111”的序列,也不包含最高4位为4比特“0000”或“1111”的序列。
  8. 根据权利要求1所述的一种9B/10B编码方法,其特征在于:
    所述10比特目标序列集包含784个码字,所述784个码字中包含240个10比特目标平衡序列和544个10比特目标非平衡序列,所述544个10比特目标非平衡序列可组成272对互为相反数的10比特目标非平衡序列。
    所述240个10比特目标平衡序列和所述272对10比特目标非平衡序列为所述9比特源序列集中512个9比特源序列的编码。
  9. 根据权利要求8所述的一种9B/10B编码方法,其特征在于:
    所述272对互为相反数的10比特目标非平衡序列中包含189对差异值为±2的10比特目标非平衡序列和83对差异值为±4的10比特目标非平衡序列。
  10. 根据权利要求8所述的一种9B/10B编码方法,其特征在于:
    所述10比特目标序列集还包含16个10比特目标非平衡序列用以表示控制字符,所述16个10比特目标非平衡序列可组成8对互为相反数的10比特目标非平衡序列,其中每一对互为相反数的10比特目标非平衡序列为一个控制字符的编码。
  11. 一种9B/10B编码方法,用于将9比特源序列集编码为10比特目标序列集,9比特源序列集中的每个序列为一个9比特二进制数,所编码为的10比特目标序列集中的每个序列为一个10比特二进制数,10比特目标序列集包含平衡序列和非平衡序列,不同的9比特源序列编码为不同的10比特目标序列,
    其特征在于:
    所述9比特源序列集包含第一类9比特源序列集、第二类9比特源序列集、第三类9比特源序列集,三类9比特源序列集不相交, 并且三类9比特源序列集的合集共有512个互不重复的9比特源序列,
    所述第一类9比特源序列集只包含差异值为1和-1的9比特源序列,在第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据“0”或“1”后,编码为10比特目标平衡序列,
    所述第二类9比特源序列集择一地只包含差异值为3的9比特源序列或只包含差异值为-3的9比特源序列,
    若第二类9比特源序列集只包含差异值为3的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为3的9比特源序列的编码,
    若第二类9比特源序列集只包含差异值为-3的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-3的9比特源序列的编码,
    所述第三类9比特源序列集包含第三类9比特源序列子集A和第三类9比特源序列子集B,第三类9比特源序列子集A和第三类9比特源序列子集B不相交,并且第三类9比特源序列子集A和第三类9比特源序列子集B的合集为第三类9比特源序列集,
    所述第三类9比特源序列子集A包含的每一个9比特源序列编码为一个10比特目标平衡序列,
    所述第三类9比特源序列子集B包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
  12. 根据权利要求11所述的一种9B/10B编码方法,其特征在于:
    所述第三类9比特源序列子集A包含两个序列:“000000000”和“111111111”。
  13. 根据权利要求11所述的一种9B/10B编码方法,其特征在于:
    在所述第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据时,所述同一位置为9比特源序列的最左侧或最右侧,插入的1比特数据在所编码为的10比特目标平衡序列中位于最高位或最低位。
  14. 根据权利要求11所述的一种9B/10B编码方法,其特征在于:
    在所述第二类9比特源序列集的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后;
    在所述第二类9比特源序列集的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
  15. 根据权利要求11所述的一种9B/10B编码方法,其特征在于:
    所述第三类9比特源序列子集B包含第六类9比特源序列集和第七类9比特源序列集,第六类和第七类9比特源序列集不相交,并且第六类和第七类9比特源序列集的合集为第三类9比特源序列子集B,
    所述第六类9比特源序列集择一地只包含差异值为5的9比特源序列或只包含差异值为-5的9比特源序列,
    若第六类9比特源序列集只包含差异值为5的9比特源序列, 在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为5的9比特源序列的编码,
    若第六类9比特源序列集只包含差异值为-5的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-5的9比特源序列的编码,
    所述第七类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
  16. 根据权利要求15所述的一种9B/10B编码方法,其特征在于:
    在所述第六类9比特源序列集中的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后;
    在所述第六类9比特源序列集中的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
  17. 根据权利要求11所述的一种9B/10B编码方法,其特征在于:
    所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,
    所述10比特目标序列集不包含最低4位为4比特“0000”或“1111”的序列,也不包含最高5位为5比特“00000”或“11111”的序列。
  18. 根据权利要求11所述的一种9B/10B编码方法,其特征在于:
    所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,
    所述10比特目标序列集不包含最低5位为5比特“00000”或“11111”的序列,也不包含最高4位为4比特“0000”或“1111”的序列。
  19. 根据权利要求11所述的一种9B/10B编码方法,其特征在于:
    所述10比特目标序列集包含784个码字,所述784个码字中包含240个10比特目标平衡序列和544个10比特目标非平衡序列,所述544个10比特目标非平衡序列可组成272对互为相反数的10比特目标非平衡序列。
    所述240个10比特目标平衡序列和所述272对10比特目标非平衡序列为所述9比特源序列集中512个9比特源序列的编码。
  20. 根据权利要求19所述的一种9B/10B编码方法,其特征在于:
    所述272对互为相反数的10比特目标非平衡序列中包含189对差异值为±2的10比特目标非平衡序列和83对差异值为±4的10比特目标非平衡序列。
  21. 根据权利要求19所述的一种9B/10B编码方法,其特征在于:
    所述10比特目标序列集还包含16个10比特目标非平衡序列用以表示控制字符,所述16个10比特目标非平衡序列可组成8对互 为相反数的10比特目标非平衡序列,其中每一对互为相反数的10比特目标非平衡序列为一个控制字符的编码。
  22. 一种9B/10B解码方法,用于将10比特目标序列集解码为9比特源序列集,解码方法为编码方法的逆变换,所述编码方法用于将9比特源序列集编码为10比特目标序列集,9比特源序列集中的每个序列为一个9比特二进制数,所编码为的10比特目标序列集中的每个序列为一个10比特二进制数,10比特目标序列集包含平衡序列和非平衡序列,不同的9比特源序列编码为不同的10比特目标序列,
    其特征在于:
    所述9比特源序列集包含第一类9比特源序列集、第二类9比特源序列集、第三类9比特源序列集,三类9比特源序列集不相交,并且三类9比特源序列集的合集共有512个互不重复的9比特源序列,
    所述第一类9比特源序列集只包含差异值为1和-1的9比特源序列,在第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据“0”或“1”后,编码为10比特目标平衡序列,
    所述第二类9比特源序列集择一地只包含差异值为3的9比特源序列或只包含差异值为-3的9比特源序列,
    若第二类9比特源序列集只包含差异值为3的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为3的9比特源序列的编码,
    若第二类9比特源序列集只包含差异值为-3的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-3的9比特源序列的编码,
    所述第三类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
  23. 根据权利要求22所述的一种9B/10B解码方法,其特征在于:
    在所述第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据时,所述同一位置为9比特源序列的最左侧或最右侧,插入的1比特数据在所编码为的10比特目标平衡序列中位于最高位或最低位。
  24. 根据权利要求22所述的一种9B/10B解码方法,其特征在于:
    在所述第二类9比特源序列集的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后;
    在所述第二类9比特源序列集的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
  25. 根据权利要求22所述的一种9B/10B解码方法,其特征在于:
    所述第三类9比特源序列集包含第四类9比特源序列集和第五类9比特源序列集,第四类和第五类9比特源序列集不相交,并且第四类和第五类9比特源序列集的合集为第三类9比特源序列集,
    所述第四类9比特源序列集择一地只包含差异值为5的9比特源序列或只包含差异值为-5的9比特源序列,
    若第四类9比特源序列集只包含差异值为5的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为5的9比特源序列的编码,
    若第四类9比特源序列集只包含差异值为-5的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-5的9比特源序列的编码,
    所述第五类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
  26. 根据权利要求25所述的一种9B/10B解码方法,其特征在于:
    在所述第四类9比特源序列集中的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后;
    在所述第四类9比特源序列集中的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
  27. 根据权利要求22所述的一种9B/10B解码方法,其特征在于:
    所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,
    所述10比特目标序列集不包含最低4位为4比特“0000”或“1111”的序列,也不包含最高5位为5比特“00000”或“11111” 的序列。
  28. 根据权利要求22所述的一种9B/10B解码方法,其特征在于:
    所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,
    所述10比特目标序列集不包含最低5位为5比特“00000”或“11111”的序列,也不包含最高4位为4比特“0000”或“1111”的序列。
  29. 根据权利要求22所述的一种9B/10B解码方法,其特征在于:
    所述10比特目标序列集包含784个码字,所述784个码字中包含240个10比特目标平衡序列和544个10比特目标非平衡序列,所述544个10比特目标非平衡序列可组成272对互为相反数的10比特目标非平衡序列。
    所述240个10比特目标平衡序列和所述272对10比特目标非平衡序列为所述9比特源序列集中512个9比特源序列的编码。
  30. 根据权利要求29所述的一种9B/10B解码方法,其特征在于:
    所述272对互为相反数的10比特目标非平衡序列中包含189对差异值为±2的10比特目标非平衡序列和83对差异值为±4的10比特目标非平衡序列。
  31. 根据权利要求29所述的一种9B/10B解码方法,其特征在于:
    所述10比特目标序列集还包含16个10比特目标非平衡序列用 以表示控制字符,所述16个10比特目标非平衡序列可组成8对互为相反数的10比特目标非平衡序列,其中每一对互为相反数的10比特目标非平衡序列为一个控制字符的编码。
  32. 一种9B/10B解码方法,用于将10比特目标序列集解码为9比特源序列集,解码方法为编码方法的逆变换,所述编码方法用于将9比特源序列集编码为10比特目标序列集,9比特源序列集中的每个序列为一个9比特二进制数,所编码为的10比特目标序列集中的每个序列为一个10比特二进制数,10比特目标序列集包含平衡序列和非平衡序列,不同的9比特源序列编码为不同的10比特目标序列,
    其特征在于:
    所述9比特源序列集包含第一类9比特源序列集、第二类9比特源序列集、第三类9比特源序列集,三类9比特源序列集不相交,并且三类9比特源序列集的合集共有512个互不重复的9比特源序列,
    所述第一类9比特源序列集只包含差异值为1和-1的9比特源序列,在第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据“0”或“1”后,编码为10比特目标平衡序列,
    所述第二类9比特源序列集择一地只包含差异值为3的9比特源序列或只包含差异值为-3的9比特源序列,
    若第二类9比特源序列集只包含差异值为3的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为3的9比特源序列的编码,
    若第二类9比特源序列集只包含差异值为-3的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±2的10比特目标非平衡序列,这对 10比特目标非平衡序列为所述差异值为-3的9比特源序列的编码,
    所述第三类9比特源序列集包含第三类9比特源序列子集A和第三类9比特源序列子集B,第三类9比特源序列子集A和第三类9比特源序列子集B不相交,并且第三类9比特源序列子集A和第三类9比特源序列子集B的合集为第三类9比特源序列集,
    所述第三类9比特源序列子集A包含的每一个9比特源序列编码为一个10比特目标平衡序列,
    所述第三类9比特源序列子集B包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
  33. 根据权利要求32所述的一种9B/10B解码方法,其特征在于:
    所述第三类9比特源序列子集A包含两个序列:“000000000”和“111111111”。
  34. 根据权利要求32所述的一种9B/10B解码方法,其特征在于:
    在所述第一类9比特源序列集中每一个9比特源序列的同一位置插入1比特数据时,所述同一位置为9比特源序列的最左侧或最右侧,插入的1比特数据在所编码为的10比特目标平衡序列中位于最高位或最低位。
  35. 根据权利要求32所述的一种9B/10B解码方法,其特征在于:
    在所述第二类9比特源序列集的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后;
    在所述第二类9比特源序列集的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
  36. 根据权利要求32所述的一种9B/10B解码方法,其特征在于:
    所述第三类9比特源序列子集B包含第六类9比特源序列集和第七类9比特源序列集,第六类和第七类9比特源序列集不相交,并且第六类和第七类9比特源序列集的合集为第三类9比特源序列子集B,
    所述第六类9比特源序列集择一地只包含差异值为5的9比特源序列或只包含差异值为-5的9比特源序列,
    若第六类9比特源序列集只包含差异值为5的9比特源序列,在该9比特源序列中插入1比特数据“0”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为5的9比特源序列的编码,
    若第六类9比特源序列集只包含差异值为-5的9比特源序列,在该9比特源序列中插入1比特数据“1”,形成的10比特目标序列与其相反数构成一对差异值为±4的10比特目标非平衡序列,这对10比特目标非平衡序列为所述差异值为-5的9比特源序列的编码,
    所述第七类9比特源序列集包含的每一个9比特源序列编码为一对互为相反数的10比特目标非平衡序列。
  37. 根据权利要求36所述的一种9B/10B解码方法,其特征在于:
    在所述第六类9比特源序列集中的9比特源序列插入1比特数据“0”时,插入数据的位置为:对9比特源序列中“1”的个数从 最低位向高位顺序计数当计满3之后,或对9比特源序列中“1”的个数从最高位向低位顺序计数当计满3之后;
    在所述第六类9比特源序列集中的9比特源序列插入1比特数据“1”时,插入数据的位置为:对9比特源序列中“0”的个数从最低位向高位顺序计数当计满3之后,或对9比特源序列中“0”的个数从最高位向低位顺序计数当计满3之后。
  38. 根据权利要求32所述的一种9B/10B解码方法,其特征在于:
    所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,
    所述10比特目标序列集不包含最低4位为4比特“0000”或“1111”的序列,也不包含最高5位为5比特“00000”或“11111”的序列。
  39. 根据权利要求32所述的一种9B/10B解码方法,其特征在于:
    所述10比特目标序列集只包含差异值为-4、-2、0、2、4的序列,
    所述10比特目标序列集不包含最低5位为5比特“00000”或“11111”的序列,也不包含最高4位为4比特“0000”或“1111”的序列。
  40. 根据权利要求32所述的一种9B/10B解码方法,其特征在于:
    所述10比特目标序列集包含784个码字,所述784个码字中包含240个10比特目标平衡序列和544个10比特目标非平衡序列,所述544个10比特目标非平衡序列可组成272对互为相反数的10 比特目标非平衡序列。
    所述240个10比特目标平衡序列和所述272对10比特目标非平衡序列为所述9比特源序列集中512个9比特源序列的编码。
  41. 根据权利要求40所述的一种9B/10B解码方法,其特征在于:
    所述272对互为相反数的10比特目标非平衡序列中包含189对差异值为±2的10比特目标非平衡序列和83对差异值为±4的10比特目标非平衡序列。
  42. 根据权利要求40所述的一种9B/10B解码方法,其特征在于:
    所述10比特目标序列集还包含16个10比特目标非平衡序列用以表示控制字符,所述16个10比特目标非平衡序列可组成8对互为相反数的10比特目标非平衡序列,其中每一对互为相反数的10比特目标非平衡序列为一个控制字符的编码。
PCT/CN2022/071737 2020-12-30 2022-01-13 一种9b/10b编解码方法 WO2022144030A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011617755.8 2020-12-30
CN202011617755.8A CN112838868B (zh) 2020-12-30 2020-12-30 一种9b/10b编解码方法

Publications (1)

Publication Number Publication Date
WO2022144030A1 true WO2022144030A1 (zh) 2022-07-07

Family

ID=75923966

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/071737 WO2022144030A1 (zh) 2020-12-30 2022-01-13 一种9b/10b编解码方法

Country Status (2)

Country Link
CN (1) CN112838868B (zh)
WO (1) WO2022144030A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112838868B (zh) * 2020-12-30 2022-09-09 天津瑞发科半导体技术有限公司 一种9b/10b编解码方法
CN114598579B (zh) * 2022-03-03 2023-07-07 天津瑞发科半导体技术有限公司 一种适用于低通和带通信道的9b/10b编解码方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7405679B1 (en) * 2007-01-30 2008-07-29 International Business Machines Corporation Techniques for 9B10B and 7B8B coding and decoding
EP1988637A2 (en) * 2007-05-03 2008-11-05 Thomson Licensing Method and apparatus for channel coding and decoding
CN101764617A (zh) * 2009-12-22 2010-06-30 清华大学 一种9b/10b码的编码方法
CN101777966A (zh) * 2010-01-05 2010-07-14 中国矿业大学 一种千兆以太网扩展实时数据通道的方法
CN101847997A (zh) * 2010-04-26 2010-09-29 瑞斯康达科技发展股份有限公司 一种9b/10b编解码器及其实现方法
CN112838868A (zh) * 2020-12-30 2021-05-25 天津瑞发科半导体技术有限公司 一种9b/10b编解码方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3985173B2 (ja) * 1998-05-29 2007-10-03 ソニー株式会社 変調装置および方法、復調装置および方法、並びにデータ格納媒体
US6614369B1 (en) * 2002-03-05 2003-09-02 International Business Machines Corporation DC balanced 7B/8B, 9B/10B, and partitioned DC balanced 12B/14B, 17B/20B, and 16B/18B transmission codes
US6876315B1 (en) * 2004-03-12 2005-04-05 International Business Machines Corporation DC-balanced 6B/8B transmission code with local parity
US7088270B1 (en) * 2005-01-21 2006-08-08 Rambus, Inc. Low power, DC-balanced serial link
WO2010133033A1 (zh) * 2009-05-21 2010-11-25 华为技术有限公司 线路编码的方法及装置
US9722630B1 (en) * 2017-03-28 2017-08-01 Andes Technology Corporation Decoding apparatus and method for decoding a serially transmitted signal thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7405679B1 (en) * 2007-01-30 2008-07-29 International Business Machines Corporation Techniques for 9B10B and 7B8B coding and decoding
EP1988637A2 (en) * 2007-05-03 2008-11-05 Thomson Licensing Method and apparatus for channel coding and decoding
CN101764617A (zh) * 2009-12-22 2010-06-30 清华大学 一种9b/10b码的编码方法
CN101777966A (zh) * 2010-01-05 2010-07-14 中国矿业大学 一种千兆以太网扩展实时数据通道的方法
CN101847997A (zh) * 2010-04-26 2010-09-29 瑞斯康达科技发展股份有限公司 一种9b/10b编解码器及其实现方法
CN112838868A (zh) * 2020-12-30 2021-05-25 天津瑞发科半导体技术有限公司 一种9b/10b编解码方法

Also Published As

Publication number Publication date
CN112838868A (zh) 2021-05-25
CN112838868B (zh) 2022-09-09

Similar Documents

Publication Publication Date Title
WO2022144030A1 (zh) 一种9b/10b编解码方法
US4528550A (en) Method and apparatus for code conversion of binary of multilevel signals
US4547890A (en) Apparatus and method for forming d.c. free codes
WO2023165289A1 (zh) 一种适用于低通和带通信道的9b/10b编解码方法
JP2022529393A (ja) 短ブロック長分布マッチングアルゴリズム
CN116634029B (zh) 基于区块链的用工平台数据快速传输方法
WO2021027487A1 (zh) 一种编码方法及相关设备
BG105877A (bg) Метод за преобразуване на поток от битове данни на двоичен информационен сигнал в поток от битове данни на ограничен двоичен канален сигнал, устройство за кодиране, сигнал съдържащ поток от битове данни на ограничен двоичен канален сигнал , носител на запис и устройство за декодиране
US20090267811A1 (en) Code design with decreased transition density and reduced running digital sum
JP6426212B2 (ja) 制限されたキャリー演算による算術コーディングを遂行するための方法及び装置
JP2001036410A (ja) 符号化方法
CN116708845B (zh) 基于5g技术的肠胃医疗图像通讯传输方法
Khayrallah et al. Coding for channels with cost constraints
JPH0824311B2 (ja) 情報伝送方法及び該方法に使用する符号化及び復号化装置
JP3947510B2 (ja) データ変調方法、データ復調方法及びコード配置方法
CN114866091A (zh) 基于划分组参考数的差值编码压缩及解压缩方法
KR20040033022A (ko) 변조 코드 시스템 및 다수의 적분에 의해 신호를 인코딩및 디코딩하는 방법
JP4780350B2 (ja) シリアルデータ通信のための符号化方式
JP2003087121A (ja) コードレートを増加させるためのブロック符号化/復号化方法及び装置
US6538585B2 (en) Distance-enhancing coding method
RU2491716C1 (ru) Способ кодирования и декодирования информации на основе запрета определенных последовательностей данных
US7102546B2 (en) State modulation method and apparatus for inserting state control codes
CN114942901A (zh) 一种串行编码的方法、装置、设备及可读介质
Blaum et al. Variable span Fibonacci modulation codes with limited byte error propagation
Stupachenko Neural network concatenation for Polar Codes

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22734755

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 18279425

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 22734755

Country of ref document: EP

Kind code of ref document: A1