A Die-to-Die Serdes interface scrambling method

Through the Die-to-Die Serdes interface scrambling method, combined with PRBs and frame synchronization scrambling, the scrambling of SerDes and the timing of PRBs code stream generation at 112Gbps transmission speed are realized, which solves the problem of being unable to generate random codes by itself in the idle state of transmission. solves the problem, reduces design complexity and power consumption, and is suitable for scenarios where the channel distance of the Die-to-Die interface is short and the consistency is good.

CN115529210BActive Publication Date: 2024-09-17ARCTIC CORE INFORMATION TECH (XIAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211055365.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2024-09-17
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

In the Die-to-Die interface scenario, the existing SerDes design cannot meet the scrambling and PRBs code stream generation requirements at 112Gbps transmission speed, and it cannot generate random codes on its own when the transmission is idle to ensure the normal operation of SerDes.

Method used

Using the Die-to-Die Serdes interface scrambling method, by deriving the 128-bit parallel calculation method and frame synchronization scrambling structure of PRBs, and combining PRBs and frame synchronization scrambling, the scrambler and descrambler at the transmitter and receiver ends are designed. It can generate random codes by itself when the transmission is idle, and switch back to the normal scrambling mode when there is a transmission task.

Benefits of technology

It realizes the scrambling of SerDes and the timing of PRBs code stream generation at 112Gbps transmission speed, ensuring the normal operation of SerDes, and generates random codes on its own when the transmission is idle, reducing design complexity and power consumption, and is suitable for die-to -Die interface has short channel distance and good consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115529210B
    Figure CN115529210B
Patent Text Reader

Abstract

This invention discloses a scrambling method for a Die-to-Die SerDes interface. First, it derives a 128-bit parallel computation method for PRBs, calculating the time values ​​over 128 clock cycles in a serial structure. Then, it derives a 128-bit parallel computation method for the frame synchronization scrambling structure, combining PRBs with frame synchronization scrambling. Substituting the PRBs31 primitive polynomial, it derives a 128-bit parallel computation method based on the PRBs31 frame synchronization scrambling structure, obtaining the 128-bit code element output for the next clock cycle. Finally, it designs a scrambling unit for the transmitter and a descrambling unit for the receiver. This invention fully satisfies the timing requirements for scrambling and PRBs code stream generation at a SerDes transmission speed of 112Gbps, and can automatically generate random codes during idle transmission to ensure normal SerDes operation, switching back to normal scrambling mode when there is a transmission task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of Serdes design, and in particular relates to a Die-to-Die Serdes interface scrambling method. Background Art

[0002] Multi-chip integration technology refers to interconnecting multiple small chips (Chiplet) through a Die-to-Die (abbreviated as: D2D) interface, and finally packaging them into a large chip. This technology is widely regarded by the industry as a continuation of Moore's Law, and has obvious cost-saving advantages compared to traditional Soc chips. The D2D interface refers to an interface for high-speed data interconnection between two small chips in the same package, usually composed of an analog PHY and a digital controller, wherein the analog PHY is implemented using a high-speed SerDes architecture or a high-density parallel architecture. The D2D interface of the present invention uses a high-speed serial SerDes, which is the abbreviation of Serialize / De-Serialize in English. This is a time-division multiplexing, point-to-point serial communication technology. The transmitting end converts the low-speed parallel signal into a high-speed serial signal, and the receiving end converts the received high-speed serial signal into a low-speed parallel signal.

[0003] Pseudo-Random Binary Sequence (PRBs) is a necessary means for SerDes testing. The test is usually divided into the transmitter and the receiver. The transmitter test includes eye diagram, jitter, signal waveform, amplitude, rise and fall time, etc. The receiver test includes bit error rate, jitter tolerance, receiver sensitivity, etc. The basic principle of PRBs generation is M sequence (short for the longest linear feedback shift register sequence). Depending on the primitive polynomial of the M sequence, the resulting sequence is also different. Commonly used ones are PRBS7, PRBS15, PRBS23 and PRBS31.

[0004] The linear feedback shift register (LFSR) is composed of n shift registers and several XOR gates (each feedback coefficient path is only composed of modulo-2 addition / XOR for linear feedback), such as Figure 1 As shown, g0~gn can only be 0 or 1, 0 means the feedback path does not exist, and the characteristic polynomial of LFSR is where x i They correspond to Xi in the figure respectively. As long as the characteristic polynomial of LFSR is a primitive polynomial, LFSR can generate M sequence.

[0005] Scrambling is to randomize the data to be transmitted at the transmitting end to avoid generating long continuous "0" or continuous "1" sequences to cause EMI noise interference to adjacent channels or abnormal SerDes at the receiving end. Decoding is to restore the random sequence at the receiving end. The basic principle of scrambling is also the M sequence. From the structure of the generated sequence, it can be divided into self-synchronous scrambling (SelfSynchronous Scrambling, referred to as SSS) and frame synchronous scrambling (Frame Synchronous Scrambling, referred to as FSS). In self-synchronous scrambling, the external input code stream participates in the next update of the LSFR status register, but in frame synchronous scrambling, the external input code stream does not participate in the next update of the LSFR status register. Frame synchronous scrambling is simple to implement but requires additional synchronization information. Self-synchronous scrambling does not require synchronization information, but if a signal deviation occurs, the error will spread.

[0006] PRBs testing and scrambling code usually exist independently in the physical coding sublayer (PCS) of SerDes, and the primitive polynomials used by the two are also different. This is related to the application scenarios of SerDes. In traditional usage scenarios, the transmission distance is long and the channel quality is difficult to be ideal. In the D2D application scenario of SerDes, the link distance is short, the loss is low, and there is no obvious discontinuity. The physical layer architecture may as well make full use of these good channel characteristics to reduce design complexity and save chip area and power consumption.

[0007] At present, the design of Die-to-Die interface based on SerDes is still a blank area in China. Compared with Die-to-Die interface, buses using SerDes, such as PCIe and 400G Ethernet, are based on long-distance, channel-inconsistent interface transmission, while Die-to-Die is used in scenarios with short channel distance, good continuity, fast transmission speed, low power consumption, low latency, and small chip area. Summary of the invention

[0008] The purpose of the present invention is to provide a Die-to-Die SerDes interface scrambling method, which fully meets the scrambling and PRBs code stream generation timing of SerDes at a transmission speed of 112Gbps, and can generate random codes by itself in the transmission idle state to ensure the normal operation of SerDes, and switch back to the normal scrambling mode when there is a transmission task.

[0009] The technical solution adopted by the present invention is a Die-to-Die Serdes interface scrambling method, which is specifically implemented according to the following steps:

[0010] Step 1, derive the 128-bit parallel calculation method of PRBs, and calculate the time value of 128 clock cycles under the serial structure;

[0011] Step 2: derive the 128-bit parallel calculation method of the frame synchronization scrambling code structure, and obtain the 128-bit parallel scrambling code element output in the next clock cycle;

[0012] Step 3: Combine PRBs with frame synchronization scrambling code;

[0013] Step 4: Substitute the PRBs31 primitive polynomial to derive a 128-bit parallel calculation method based on the PRBs31 frame synchronization scrambling structure, and obtain a 128-bit code element output in the next clock cycle;

[0014] Step 5: Design of scrambler application at transmitter end;

[0015] Step 6: Apply descrambler design at the receiver end.

[0016] The present invention is also characterized in that:

[0017] Step 1 is implemented as follows:

[0018] The primitive polynomial of PRBs31 is G(x)=x 31 +x 28 +1,s0~s 30 Represents 31 status registers, which are connected in series from left to right in ascending order of serial number, with s0 at the leftmost and s 30 On the far right, every clock cycle, all status register values ​​are shifted forward one position, that is, the value of s0 is transferred to s1, the value of s1 is transferred to s2, and so on. 29 The value is passed to s 30 ,s 30 and 27 The XOR value is passed to s0. Each time it is shifted, a 1-bit code stream is output. The code stream value is the status register s. 30 The value of If a serial structure is used to output a 128-bit signal, 128 clock cycles are required. The serial structure does not meet the requirement of outputting a 128-bit code stream in one clock cycle under a high-speed clock cycle. Indicates the value of the state machine register in the current clock cycle. Represents the value of the state register in the next clock cycle, constructs the transfer matrix T, so that S (n) =T·S (n-1) , S (n-1) Indicates the value of the status register in the n-1th clock cycle, S (n)Indicates the value of the status register in the nth clock cycle,

[0019] but

[0020]

[0021] T is a 31*31 matrix. After k clock cycles, S is obtained. (k) =T k ·S (0) , S (k) Indicates the value of the 31st status register in the kth clock cycle, T k is the product of k transfer matrices T, S (0) is the value of the 31 status registers in the current clock cycle, which is calculated in advance A total of 128 time status registers 30 The calculation formula is used to obtain a parallel 128-bit PRBs code stream. While outputting the 128-bit parallel code stream, the values ​​of all 31 status registers after 128 clock cycles from the current clock cycle in the serial structure are calculated, that is,

[0022] Step 2 is implemented as follows:

[0023] As the scrambling polynomial used by PCIe and UCIe, the primitive polynomial is G(x)=x 23 +x 21 +x 16 +x 8 +x 5 +x 2 +1, a total of 23 status registers s0~s 22 The 23 status registers are connected in series from left to right in ascending order, with s0 on the left and s 22 On the far right, every clock cycle, all status register values ​​are shifted forward one position, that is, the value of s0 is transferred to s1, the value of s1 is transferred to s2, and so on. 21 The value is passed to s 22 ,s 22 ,s 20 ,s 15, s7, s4 and s1, a total of 6 state registers, the XOR value is passed to s0, the value of state register s0 is XORed with the input 1-bit data, and 1-bit scrambled data is output. In each clock cycle, the value of s0 is updated once, and 1-bit scrambled data is output. The value of the state register updated in the next clock cycle must be XORed with the input code element to obtain the code element after scrambling. Construct the transfer matrix and calculate the calculation formula for each clock scrambling output under the serial architecture in advance. Use Indicates the value of the state machine register in the previous clock cycle, Indicates the value of the status register in the next clock cycle, S (n) =M·S (n-1) , S (n-1) Indicates the value of the status register in the n-1th clock cycle, S (n) Indicates the value of the status register in the nth clock cycle, M represents the transfer matrix, then

[0024]

[0025] According to S (k) =M k ·S (0) Calculate the 128-bit status register in advance The value of Indicates the 128-bit parallel data input in the current clock cycle. If it is input in serial data, 1 bit of data is input in the first clock cycle. 1 bit of data is input in the second clock cycle Until the 128th clock cycle, 1 bit of data is input Parallel means that 128 bits of serial data are input simultaneously in one clock cycle. Indicates that the next clock cycle outputs 128-bit parallel scrambled code elements, then

[0026] Step 3 is implemented as follows:

[0027] As the primitive polynomial of PRBs31, the primitive polynomial of PRBs31 is G(x)=x 31 +x 28 +1,s0~s 30 Represents 31 status registers, which are connected in series from left to right in ascending order of serial number, with s0 on the left and s 30 On the far right, every clock cycle, all status register values ​​are shifted forward one position, that is, the value of s0 is transferred to s1, the value of s1 is transferred to s2, and so on. 29 The value is passed to s30 ,s 30 and 27 The XORed value is passed to s0, s 30 To output the bit stream, 1 bit PRBs bit stream is output in each clock cycle. At the same time, s 30 After XORing with the input 1-bit data, it outputs a 1-bit scrambled code value.

[0028] Step 4 is implemented according to the following steps:

[0029] According to the parallel calculation formula derived previously, a total of 128-bit parallel PRBs code prbs31 can be obtained in the same clock cycle, then

[0030] make Indicates the 128-bit parallel data input at the current clock moment.

[0031] make Indicates that the next clock cycle outputs 128-bit scrambled data.

[0032] The calculation results are as follows:

[0033] The PRBs code stream is as follows:

[0034]

[0035]

[0036]

[0037]

[0038]

[0039]

[0040]

[0041]

[0042]

[0043] The scrambled code stream is as follows:

[0044]

[0045]

[0046]

[0047]

[0048]

[0049]

[0050]

[0051]

[0052]

[0053] The 31 status registers are updated as follows:

[0054]

[0055]

[0056]

[0057]

[0058]

[0059] Step 5 is implemented according to the following steps:

[0060] The asynchronous FIFO receives valid data from the upstream application. When the FIFO has data, the scrambler outputs the scrambled data of the FIFO to the encoder, which is then encoded and output to the SerDes transmitter. When the FIFO is empty, the scrambler outputs the PRBs code stream to the encoder, which is then encoded and output to the SerDes transmitter. When the SerDes test mode is entered, the clocks of the asynchronous FIFO and the encoder are turned off, and the scrambler outputs the PRBs code stream directly to the SerDes transmitter.

[0061] Step 6 is implemented according to the following steps:

[0062] After receiving the bit stream, the SerDes receiver sends it to the alignment and decoding module for data boundary alignment and decoding, and then transmits it to the descrambling module together with the original bit stream. If the descrambling module is in test mode, it compares the received data with the data generated by PRBs and outputs the statistical results. If the descrambling module is in normal working mode, it descrambles the received data and outputs it to the asynchronous FIFO.

[0063] The beneficial effect of the present invention is that a Die-to-Die Serdes interface scrambling method is proposed, a self-synchronous scrambling architecture based on PRBs primitive polynomial is proposed, and a 128-bit winding code and a PRBs code stream parallel calculation formula principle and derivation process are given at the same time, and finally a design reference for the SerDes digital logic part using this scrambling structure is given. Die-to-Die based on the SerDes architecture has a scenario with short channel distance and good consistency. From the essence of the scrambling code, it is to make the code stream as random as possible and reduce EMI noise. The above two points are the premise for the establishment of the present invention. The bit error rate cannot be reduced by relying solely on scrambling codes. In terms of ensuring transmission, it is necessary for digital design to add CRC check, error retransmission, forward error correction and other functions from the protocol layer, PCS layer, etc. to assist. The combined force of multiple functions can ensure the reliable output of the link. At the same time, considering the characteristics of the relatively single application scenario, the above-mentioned various functional designs can be simplified in a targeted manner, so as to achieve the effect of not affecting the function and saving area and reducing power consumption. This provides support for this patent. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 is a schematic diagram of a linear feedback shift register;

[0065] Figure 2 It is a schematic diagram of self-synchronizing scrambling code;

[0066] Figure 3 This is a schematic diagram of frame synchronization scrambling.

[0067] Figure 4 is the serial PRBs generation diagram;

[0068] Figure 5 It is a diagram of the serial frame synchronization scrambling architecture;

[0069] Figure 6 It is the status register S 30 The output of is used as PRBs and participates in the scrambling code diagram;

[0070] Figure 7 It is the input of the status register S0 as PRBs and participates in the scrambling diagram;

[0071] Figure 8 It is a reference diagram for the application of the transmitter scrambler;

[0072] Fig. 9 This is a reference diagram for the descrambler application at the receiving end. DETAILED DESCRIPTION

[0073] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0074] The Die-to-Die Serdes interface scrambling method of the present invention is specifically implemented according to the following steps:

[0075] Step 1, derive the 128-bit parallel calculation method of PRBs, and calculate the time value of 128 clock cycles under the serial structure;

[0076] Combination Figure 2 , step 1 is implemented according to the following steps:

[0077] The PRBs serial circuit structure is shown in the figure below. Figure 4 As shown, the primitive polynomial of PRBs31 is G(x)=x 31 +x 28 +1,s0~s 30 Represents 31 status registers, which are connected in series from left to right in ascending order of serial number, with s0 at the leftmost and s 30 On the far right, every clock cycle, all status register values ​​are shifted forward one position, that is, the value of s0 is transferred to s1, the value of s1 is transferred to s2, and so on. 29 The value is passed to s 30 ,s 30 and 27 The XOR value is passed to s0. Each time it is shifted, a 1-bit code stream is output. The code stream value is the status register s. 30 The value of If a serial structure is used to output a 128-bit signal, 128 clock cycles are required. The serial structure does not meet the requirement of outputting a 128-bit code stream in one clock cycle under a high-speed clock cycle. Indicates the value of the state machine register in the current clock cycle. Represents the value of the state register in the next clock cycle, constructs the transfer matrix T, so that S (n) =T·S (n-1) , S (n-1) Indicates the value of the status register in the n-1th clock cycle, S (n) Indicates the value of the status register in the nth clock cycle,

[0078] but

[0079]

[0080] T is a 31*31 matrix. After k clock cycles, S is obtained. (k) =T k ·S (0) , S (k) Indicates the value of the 31st status register in the kth clock cycle, Tk is the product of k transfer matrices T, S (0) is the value of the 31 status registers in the current clock cycle, which is calculated in advance A total of 128 time status registers 30 The calculation formula is used to obtain a parallel 128-bit PRBs code stream. While outputting the 128-bit parallel code stream, the values ​​of all 31 status registers after 128 clock cycles from the current clock cycle in the serial structure are calculated, that is,

[0081] Step 2: derive the 128-bit parallel calculation method of the frame synchronization scrambling code structure, and obtain the 128-bit parallel scrambling code element output in the next clock cycle;

[0082] Combination Figure 3 , step 2 is implemented according to the following steps:

[0083] As the scrambling polynomial used by PCIe and UCIe, the Scramble serial circuit structure is as follows Figure 5 As shown, the primitive polynomial is G(x)=x 23 +x 21 +x 16 +x 8 +x 5 +x 2 +1, a total of 23 status registers s0~s 22 The 23 status registers are connected in series from left to right in ascending order, with s0 on the left and s 22 On the far right, every clock cycle, all status register values ​​are shifted forward one position, that is, the value of s0 is transferred to s1, the value of s1 is transferred to s2, and so on. 21 The value is passed to s 22 ,s 22 ,s 20 ,s 15 , s7, s4 and s1, a total of 6 status registers, after XORing, the values ​​are passed to s0. The value of status register s0 is XORed with the input 1-bit data, and 1-bit scrambled data is output. In each clock cycle, the value of s0 is updated once, and 1-bit scrambled data is output. It is not difficult to see that the serial scrambling structure is similar to the serial PRBs structure. The difference is that the value of the status register updated in the next clock cycle must be XORed with the input code element to obtain the code element output after scrambling. Similarly, in the serial structure, it takes 128 clock cycles to obtain a 128-bit scrambled code element. In order to calculate the 128-bit scrambling code in parallel in 1 clock cycle, it is necessary to construct a transfer matrix and calculate the calculation formula for each clock scrambling output in the serial architecture in advance. Here we still use Indicates the value of the state machine register in the previous clock cycle, Indicates the value of the status register in the next clock cycle, S (n) =M·S (n-1) , S (n-1) Indicates the value of the status register in the n-1th clock cycle, S (n) Indicates the value of the status register in the nth clock cycle, M represents the transfer matrix, then

[0084]

[0085] According to S (k) =M k ·S (0) Calculate the 128-bit status register in advance The value of Indicates the 128-bit parallel data input in the current clock cycle. If it is input in serial data, 1 bit of data is input in the first clock cycle. 1 bit of data is input in the second clock cycle Until the 128th clock cycle, 1 bit of data is input Parallel means that 128 bits of serial data are input simultaneously in one clock cycle. Indicates that the next clock cycle outputs 128-bit parallel scrambled code elements, then

[0086] Step 3: Combine PRBs with frame synchronization scrambling code;

[0087] Step 3 is implemented as follows:

[0088] As the primitive polynomial of PRBs31, the serial structure diagram is as follows Figure 6 , Figure 7 As shown, Figure 6 The display is based on the status register S 30 The output is used as the PRBs code stream and participates in scrambling. Figure 7 The display shows that the input based on the status register S0 is used as the PRBs code stream and participates in scrambling. The two structures are essentially the same, but Figure 6 The architecture uses fewer logical resources. Of course, there are more ways to combine PRBs and frame synchronization scrambling. You can also use the input of the status register S0 to participate in the scrambling while letting the status register S 30 The output is used as a PRBs code stream, but except Figure 6 and Figure 7 Except for the structure of Figure 6 It is the least used XOR gate among all structures.

[0089] The primitive polynomial for PRBs31 is G(x)=x 31 +x 28 +1,s0~s 30 Represents 31 status registers, which are connected in series from left to right in ascending order of serial number, with s0 on the left and s 30 On the far right, every clock cycle, all status register values ​​are shifted forward one position, that is, the value of s0 is transferred to s1, the value of s1 is transferred to s2, and so on. 29 The value is passed to s 30 ,s 30 and 27 The XORed value is passed to s0, s 30 To output the bit stream, 1 bit PRBs bit stream is output in each clock cycle. At the same time, s 30 After XORing with the input 1-bit data, it outputs a 1-bit scrambled code value.

[0090] Step 4: Substitute the PRBs31 primitive polynomial to derive a 128-bit parallel calculation method based on the PRBs31 frame synchronization scrambling structure, and obtain a 128-bit code element output in the next clock cycle;

[0091] Step 4 is implemented according to the following steps:

[0092] exist Figure 6 Under the architecture, according to the parallel calculation formula derived previously, a total of 128-bit parallel PRBs code prbs31 can be obtained in the same clock cycle, then

[0093] make Indicates the 128-bit parallel data input at the current clock moment.

[0094] make Indicates that 128-bit scrambled data is output in the next clock cycle.

[0095] The calculation results are as follows:

[0096] The PRBs code stream is as follows:

[0097]

[0098]

[0099]

[0100]

[0101]

[0102]

[0103]

[0104]

[0105]

[0106] The scrambled code stream is as follows:

[0107]

[0108]

[0109]

[0110]

[0111]

[0112]

[0113]

[0114]

[0115]

[0116] The 31 status registers are updated as follows:

[0117]

[0118]

[0119]

[0120]

[0121]

[0122] Step 5: Design of scrambler application at transmitter end;

[0123] Step 5 is implemented according to the following steps:

[0124] The reference design of the transmitter application scrambler is as follows Figure 8As shown, the asynchronous FIFO receives valid data from the upstream application. When the FIFO has data, the scrambler outputs the scrambled data of the FIFO to the encoder, which is then output to the SerDes transmitter after encoding. When the FIFO is empty, the scrambler outputs the PRBs code stream to the encoder, which is then output to the SerDes transmitter after encoding. When the SerDes test mode is entered, the clocks of the asynchronous FIFO and the encoder are turned off, and the scrambler outputs the PRBs code stream directly to the SerDes transmitter.

[0125] Step 6: Apply descrambler design at the receiver end.

[0126] Step 6 is implemented according to the following steps:

[0127] The reference design of the receiver application descrambler is as follows Fig. 9 As shown, after receiving the code stream, the SerDes receiver sends it to the alignment and decoding module for data boundary alignment and decoding, and then transmits it to the descrambling module together with the original code stream. If the descrambling module is in the test mode, it compares the received data with the data generated by PRBs and outputs the statistical results. If the descrambling module is in the normal working mode, it descrambles the received data and outputs it to the asynchronous FIFO.

[0128] The DC synthesis results are given: This design uses a 12nm library process, and there is no timing violation at a 1GHz clock. The combinatorial logic area of ​​the single-channel scrambler module is 156.086783, the non-combinatorial logic area is 28.498177, and the total area is 184.584960.

[0129] The scrambling code initial value, that is, the LFSR initial seed value, cannot be set to all 0s. In the case of multiple channels, adjacent channels cannot be the same. The initial seed values ​​of channel numbers 0 to 7 are shown in Table 1. For channel numbers 8 and above, the seed value is set according to the channel number value calculated modulo 8. Channels 8, 16, 24, etc. correspond to the seed value of channel 0, channels 9, 17, 25, etc. correspond to the seed value of channel 1, and so on.

[0130] Table 1 Correspondence between channel number and seed value

[0131] Channel Number Seed value 0 0x7FFF_FFFF 1 0x02D7_2D72 2 0x146E_7238 3 0x2380_380E 4 0x7F0E_0F1F 5 0x7103_10C2 6 0x72C4_D3B2 7 0x363B_6EA1

[0132] Aiming at the special scenario of D2D, the present invention designs a frame synchronization scrambling code based on PRBs, adopts 128-bit code stream polynomial parallelization and logic expansion, and integrates the module of PRBS and FSS scrambling codes, which fully meets the scrambling and PRBs code stream generation timing of SerDes at a transmission speed of 112Gbps, and can generate random codes by itself in the transmission idle state to ensure the normal operation of SerDes, and switch back to normal scrambling mode when there is a transmission task.

[0133] The present invention proposes a low-complexity SerDes scrambling code design, which combines the scrambling code with PRBs, adopts the method of polynomial pre-calculation and logic expansion, and parallelly calculates the 128-bit scrambling code and PRBs code. In the SerDes test mode, it switches to the PRBs code stream output mode, and switches back to the scrambling code mode to output the scrambled code stream when a transmission task arrives. When the upstream bus is idle, the transmission layer clock can be turned off, and only the scrambler clock is retained. The PRBs code stream is automatically generated to maintain the stable operation of the SerDes.

Claims

1. Die-to-Die Serdes interface scrambling method, characterized in that: Follow the steps below to implement it: Step 1, derive the 128-bit parallel calculation method of PRBs, and calculate the time value of 128 clock cycles under the serial structure; The step 1 is specifically implemented according to the following steps: The primitive polynomial of PRBs31 is G(x)=x 31 +x 28 +1,s0~s 30 Represents 31 status registers, which are connected in series from left to right in ascending order of serial number, with s0 at the leftmost and s 30 On the far right, every clock cycle, all status register values ​​are shifted forward one position, that is, the value of s0 is transferred to s1, the value of s1 is transferred to s2, and so on. 29 The value is passed to s 30 ,s 30 and 27 The XOR value is passed to s0. Each time it is shifted, a 1-bit code stream is output. The code stream value is the status register s. 30 The value of If a serial structure is used to output a 128-bit signal, 128 clock cycles are required. The serial structure does not meet the requirement of outputting a 128-bit code stream in one clock cycle under a high-speed clock cycle. Indicates the value of the state machine register in the current clock cycle. Represents the value of the state register in the next clock cycle, constructs the transfer matrix T, so that S (n) =T·S (n-1) , S (n-1) Indicates the value of the status register in the n-1th clock cycle, S (n) Indicates the value of the status register in the nth clock cycle, but T is a matrix with 31 rows and 31 columns. After k clock cycles, S (k) =T k ·S (0) , S (k) Indicates the value of the 31st status register in the kth clock cycle, T k is the product of k transfer matrices T, which is still a matrix with 31 rows and 31 columns. (0) is the value of the 31 status registers in the current clock cycle, which is calculated in advance A total of 128 time status registers 30 The calculation formula is used to obtain a parallel 128-bit PRBs code stream. While outputting the 128-bit parallel code stream, the values ​​of all 31 status registers after 128 clock cycles from the current clock cycle in the serial structure are calculated, that is, Step 2: derive the 128-bit parallel calculation method of the frame synchronization scrambling code structure, and obtain the 128-bit parallel scrambling code element output in the next clock cycle; The step 2 is specifically implemented according to the following steps: As the scrambling polynomial used by PCIe and UCIe, the primitive polynomial is G(x)=x 23 +x 21 +x 16 +x 8 +x 5 +x 2 +1, a total of 23 status registers s0~s 22 The 23 status registers are connected in series from left to right in ascending order, with s0 on the left and s 22 On the far right, every clock cycle, all status register values ​​are shifted forward one position, that is, the value of s0 is transferred to s1, the value of s1 is transferred to s2, and so on. 21 The value is passed to s 22 ,s 22 ,s 20 ,s 15 , s7, s4 and s1, a total of 6 state registers, the XOR value is passed to s0, the value of state register s0 is XORed with the input 1-bit data, and 1-bit scrambled data is output. In each clock cycle, the value of s0 is updated once, and 1-bit scrambled data is output. The value of the state register updated in the next clock cycle must be XORed with the input code element to obtain the code element after scrambling. Construct the transfer matrix and calculate the calculation formula for each clock scrambling output under the serial architecture in advance. Use Indicates the value of the state machine register in the previous clock cycle, Indicates the value of the status register in the next clock cycle, S (n) =M·S (n-1) , S (n-1) Indicates the value of the status register in the n-1th clock cycle, S (n) Indicates the value of the status register in the nth clock cycle, M represents a transfer matrix with 23 rows and 23 columns, then According to S (k) =M k ·S (0) Calculate the 128-bit status register in advance The value of M k Represents the product of k M matrices, which is still a transfer matrix with 23 rows and 23 columns. Indicates the 128-bit parallel data input in the current clock cycle. If it is input in serial data, 1 bit of data is input in the first clock cycle. 1 bit of data is input in the second clock cycle Until the 128th clock cycle, 1 bit of data is input Parallel means that 128 bits of serial data are input simultaneously in one clock cycle. Indicates that the next clock cycle outputs 128-bit parallel scrambled code elements, then Step 3: Combine PRBs with frame synchronization scrambling code; The step 3 is specifically implemented according to the following steps: As the primitive polynomial of PRBs31, the primitive polynomial of PRBs31 is G(x)=x 31 +x 28 +1,s0~s 30 Represents 31 status registers, which are connected in series from left to right in ascending order of serial number, with s0 on the left and s 30 On the far right, every clock cycle, all status register values ​​are shifted forward one position, that is, the value of s0 is transferred to s1, the value of s1 is transferred to s2, and so on. 29 The value is passed to s 30 ,s 30 and 27 The XORed value is passed to s0, s 30 To output the bit stream, 1 bit PRBs bit stream is output in each clock cycle. At the same time, s 30 After XORing with the input 1-bit data, output 1-bit scrambling code value; Step 4: Substitute the PRBs31 primitive polynomial to derive a 128-bit parallel calculation method based on the PRBs31 frame synchronization scrambling structure, and obtain a 128-bit code element output in the next clock cycle; Step 5: Design of scrambler application at transmitter end; Step 6: Apply descrambler design at the receiver end.

2. The Die-to-Die Serdes interface scrambling method according to claim 1, characterized in that: The step 4 is specifically implemented according to the following steps: According to the parallel calculation formula derived previously, a total of 128-bit parallel PRBs code prbs31 is obtained in the same clock cycle, then make Indicates the 128-bit parallel data input at the current clock moment. make Indicates that 128-bit scrambled data is output in the next clock cycle. The calculation results are as follows: The PRBs code stream is as follows: The scrambled code stream is as follows: The 31 status registers are updated as follows:

3. The Die-to-Die Serdes interface scrambling method according to claim 2, characterized in that: The step 5 is specifically implemented according to the following steps: The asynchronous FIFO receives valid data from the upstream application. When the FIFO has data, the scrambler outputs the scrambled data of the FIFO to the encoder, which is then encoded and output to the SerDes transmitter. When the FIFO is empty, the scrambler outputs the PRBs code stream to the encoder, which is then encoded and output to the SerDes transmitter. When the SerDes test mode is entered, the clocks of the asynchronous FIFO and the encoder are turned off, and the scrambler outputs the PRBs code stream directly to the SerDes transmitter.

4. The Die-to-Die Serdes interface scrambling method according to claim 3, characterized in that: The step 6 is specifically implemented according to the following steps: After receiving the bit stream, the SerDes receiver sends it to the alignment and decoding module for data boundary alignment and decoding, and then transmits it to the descrambling module together with the original bit stream. If the descrambling module is in test mode, it compares the received data with the data generated by PRBs and outputs the statistical results. If the descrambling module is in normal working mode, it descrambles the received data and outputs it to the asynchronous FIFO.