FPGA (Field Programmable Gate Array) speed reduction bridge, speed adaptation method, electronic equipment and medium
By designing a multi-rate Ethernet interface and protocol adaptation module, combining rate adaptation and frequency bias adaptation, the problem that the FPGA downspeed bridge cannot adapt to the high-speed Ethernet interface is solved, and efficient multi-rate switching and lossless transmission are achieved. Improved verification efficiency.
Patent Information
- Application Number
- CN202411163822.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-22
AI Technical Summary
The existing FPGA downspeed bridge cannot be effectively adapted to the high-speed Ethernet interface, resulting in the inability to test the real PFC/PAUSE scenarios of the ASIC DUT, and the connection rate is low, making it impossible to achieve multi-rate switching and lossless transmission.
A FPGA speed downshift bridge is designed, including a multi-rate Ethernet interface, a rate adapter module and a protocol adapter module. Through asynchronous FIFO, MAC layer codec module and PCS layer codec module, combining rate adapter and frequency bias adapter It can realize clock signal matching and data encoding, and support multiple rates and protocols.
The lossless linear rate transmission of Ethernet test equipment through the FPGA interface and the ASIC DUT is realized, which improves the connection rate to 10Gbps, solves the testing problems of multi-rate switching and real PFC/PAUSE scenarios, and improves the efficiency and convergence speed of prototype verification. .
Smart Images

Figure CN119070953A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of chip technology, and in particular relates to an FPGA speed reduction bridge and rate adaptation method, electronic equipment and medium. Background Art
[0002] As ASIC (Application-Specific Integrated Circuit) becomes larger and more complex, it must be fully verified before tape-out. In addition to verification methods such as EDA / EMU, FPGA (Field-Programmable Gate Array) prototype verification is becoming an indispensable means to accelerate verification convergence for large SOC chips.
[0003] The Ethernet interface rate is getting higher and higher. The maximum rate of a single 1ink of the ETH interface standard based on the IEEE 802.3 protocol has reached 1.6Tbps. At the same time, in order to make ASIC chips competent for more scenarios, the interface is often allowed to support multiple rates, and generally backward compatible with multiple rates. For example, the rate of a single link of the Ethernet interface supports 400G / 200G / 100G / 50G / 25G / 10G / 1G multiple rate modes, making its application scenarios more diverse. However, since ASIC logic is generally more complex, it can generally only run at tens of MHz on the FPGA platform, so the ASIC logic needs to be down-clocked. Summary of the invention
[0004] The purpose of this application is to provide an FPGA speed reduction bridge and rate adaptation method, electronic device and medium, aiming to solve the problems of protocol adaptation, rate adaptation and lossless transmission.
[0005] In a first aspect of the present application, an FPGA speed reduction bridge is provided, comprising: an FPGA multi-rate Ethernet interface, a rate adaptation module, a rate adaptation control module and a protocol adaptation module; wherein:
[0006] The FPGA multi-rate Ethernet interface can be configured to one of a plurality of different configuration rates, and is connected to an external Ethernet device and performs data communication with the Ethernet device at the configured configuration rate;
[0007] The rate adaptation module is connected to the FPGA multi-rate Ethernet interface, and includes an asynchronous FIFO for caching Ethernet message data received by the FPGA multi-rate Ethernet interface from the Ethernet device;
[0008] The protocol adaptation module is connected to the rate adaptation module, and includes a MAC layer encoding and decoding module and a PCS layer encoding and decoding module, wherein the MAC layer encoding and decoding module is used to perform MAC layer encoding on the Ethernet message data stored in the asynchronous FIFO, and the PCS layer encoding and decoding module is used to perform PCS layer encoding on the encoded data output by the MAC layer encoding and decoding module;
[0009] The rate adaptation control module is used to adapt the configuration rate of the FPGA multi-rate Ethernet interface, and output the clock signal used by the MAC layer codec module and the PCS layer codec module based on the adapted configuration rate.
[0010] In an optional embodiment, the FPGA multi-rate Ethernet interface includes a first DRP dynamic configuration module, a first memory, a first QPLL frequency synthesizer and a first register; the first memory is used to store configuration parameters corresponding to one or more configuration rates, the first DRP dynamic configuration module receives a first configuration signal from external software through a software control interface, and configures the first QPLL frequency synthesizer according to the configuration parameters corresponding to the configuration rate specified by the first configuration signal, after the first QPLL frequency synthesizer is configured, the configuration parameters corresponding to the configuration rate specified by the first configuration signal are written into the first register; the configuration rate specified by the first configuration signal is one of the configuration rates corresponding to the configuration parameters stored in the first memory or the configuration rate specified by the external software.
[0011] In an optional embodiment, the rate adaptation control module includes: a second DRP dynamic configuration module, a second memory, a second QPLL frequency synthesizer, a CPLL frequency synthesizer and a second register; the second memory is used to store configuration parameters corresponding to one or more configuration rates, the second DRP dynamic configuration module receives a second configuration signal from external software through a software control interface, and configures the second QPLL frequency synthesizer and CPLL frequency synthesizer according to the configuration parameters corresponding to the configuration rate specified by the second configuration signal. After the second QPLL frequency synthesizer and CPLL frequency synthesizer are configured, the configuration parameters corresponding to the configuration rate specified by the second configuration signal are written into the second register; the configuration rate specified by the second configuration signal is one of the configuration rates corresponding to the configuration parameters stored in the second memory or the configuration rate specified by the external software.
[0012] In an optional implementation, the rate adaptation control module further includes: a first clock buffer, a second clock buffer, and a third clock buffer;
[0013] The second register is provided with a user-configured frequency division interface. By configuring the user-configured frequency division interface to 32-division, a 32-division clock signal is obtained, and the 32-division clock signal is stored in the first clock buffer to obtain a 32-division clock signal output to the PCS layer codec module. The 32-division clock signal is turned off once every 32 cycles and then stored in the second clock buffer to obtain a 33-division clock signal output to the MAC layer codec module. The 32-division clock signal is turned off once every 1 cycle, and two are turned off every 32 cycles and then stored in the third clock buffer to obtain a 66-division clock signal output to the PCS layer codec module.
[0014] In an optional implementation, the asynchronous FIFO in the rate adaptation module is provided with: a nearly full alarm watermark threshold, a nearly empty alarm watermark threshold, and a read start watermark threshold. When the amount of data in the asynchronous FIFO is greater than or equal to the nearly full alarm watermark threshold, the external software is triggered to reconfigure the configuration value of the minimum average frame interval of the MAC layer codec module to reduce it; when the amount of data in the asynchronous FIFO is less than or equal to the nearly empty alarm watermark threshold, the external software is triggered to reconfigure the read start watermark threshold to increase it.
[0015] In an optional implementation, the asynchronous FIFO in the rate adaptation module is provided with: a nearly full alarm watermark threshold, a release nearly full alarm watermark threshold, a nearly empty alarm watermark threshold, a release nearly empty alarm watermark threshold and a read start watermark threshold;
[0016] When the amount of data in the asynchronous FIFO is greater than or equal to the almost-full alarm watermark threshold, if the rate adaptation module is configured in an adaptive inter-frame interval adjustment mode, the MAC layer codec module is triggered to periodically delete the inter-frame interval of the Ethernet message data until the amount of data in the asynchronous FIFO is less than or equal to the threshold for releasing the almost-full alarm watermark; if the cumulative number of times the almost-full alarm watermark threshold is greater than or equal to the first set threshold, the configuration value of the minimum average frame interval of the MAC layer codec module is reduced;
[0017] When the amount of data in the asynchronous FIFO is less than or equal to the empty alarm watermark threshold, if the rate adaptation module is configured as the adaptive inter-frame interval adjustment mode, the MAC layer codec module is triggered to periodically insert inter-frame intervals into the Ethernet message data until the amount of data in the asynchronous FIFO is greater than or equal to the release of the empty alarm watermark threshold; if the cumulative number of times the empty alarm watermark threshold is greater than or equal to the second set threshold, the read start watermark threshold is raised.
[0018] In an optional implementation, the following thresholds are ordered from large to small as follows: almost full alarm waterline threshold, released almost full alarm waterline threshold, read start waterline threshold, released almost empty alarm waterline threshold, almost empty alarm waterline threshold.
[0019] A second aspect of the present application provides a rate adaptation method, which is implemented using the FPGA speed reduction bridge described in the first aspect, and includes:
[0020] The FPGA multi-rate Ethernet interface is configured to one of a plurality of different configuration rates;
[0021] The rate adaptation control module is used to adapt the configuration rate configured by the FPGA multi-rate Ethernet interface, and output the clock signal used by the MAC layer codec module and the PCS layer codec module; the configuration rate adapted by the rate adaptation control module has a preset adaptation relationship with the configuration rate configured by the FPGA multi-rate Ethernet interface.
[0022] In an alternative embodiment, the FPGA multi-rate Ethernet interface is configured to one of a plurality of different configuration rates, including:
[0023] The first DRP dynamic configuration module of the rate adaptation control module receives a first configuration signal received from external software through a software control interface;
[0024] Configure the first QPLL frequency synthesizer of the rate adaptation control module according to the configuration parameters corresponding to the configuration rate specified by the first configuration signal;
[0025] If the first QPLL frequency synthesizer is configured, the configuration parameters corresponding to the configuration rate specified by the first configuration signal are written into the first register of the rate adaptation control module; the configuration rate specified by the first configuration signal is one of the configuration rates corresponding to the configuration parameters stored in the first memory of the rate adaptation control module or the configuration rate specified by the external software.
[0026] In an optional implementation, using a rate adaptation control module to adapt the configured rate of the FPGA multi-rate Ethernet interface, and outputting a clock signal used by a MAC layer codec module and a PCS layer codec module, includes:
[0027] The second DRP dynamic configuration module of the rate adaptation control module receives a second configuration signal from external software through a software control interface;
[0028] Configure the second QPLL frequency synthesizer and the CPLL frequency synthesizer of the rate adaptation control module according to the configuration parameters corresponding to the configuration rate specified by the second configuration signal;
[0029] If the second QPLL frequency synthesizer and CPLL frequency synthesizer are configured, the configuration parameters corresponding to the configuration rate specified by the second configuration signal are written into the second register of the rate adaptation control module; the configuration rate specified by the second configuration signal is one of the configuration rates corresponding to the configuration parameters stored in the second memory of the rate adaptation control module or the configuration rate specified by the external software.
[0030] In an optional embodiment, the method further comprises:
[0031] The user-configured frequency division interface of the second register is configured to be divided by 32, so as to obtain a divided-by-32 clock signal;
[0032] The 32-frequency clock signal is stored in a first clock buffer to obtain a 32-frequency clock signal output to the PCS layer encoding and decoding module;
[0033] The 32-frequency divided clock signal is turned off once every 32 cycles and then stored in a second clock buffer to obtain a 33-frequency divided clock signal output to the MAC layer encoding and decoding module;
[0034] The 32-frequency-divided clock signal is turned off by one per cycle, and by two per 32 cycles, and then stored in a third clock buffer to obtain a 66-frequency-divided clock signal output to the PCS layer encoding and decoding module.
[0035] In an optional embodiment, the method further comprises:
[0036] Setting a nearly full alarm watermark threshold, a nearly empty alarm watermark threshold and a read start watermark threshold for the asynchronous FIFO in the rate adaptation module;
[0037] If it is detected that the amount of data in the asynchronous FIFO is greater than or equal to the full alarm waterline threshold, trigger the external software to reconfigure the configuration value of the minimum average frame interval of the MAC layer codec module to reduce it;
[0038] If it is detected that the amount of data in the asynchronous FIFO is less than or equal to the empty alarm watermark threshold, external software is triggered to reconfigure the read start watermark threshold to increase it.
[0039] In an optional embodiment, the method further comprises:
[0040] Setting a nearly full alarm watermark threshold, a release nearly full alarm watermark threshold, a nearly empty alarm watermark threshold, a release nearly empty alarm watermark threshold and a read start watermark threshold for the asynchronous FIFO in the rate adaptation module;
[0041] If it is detected that the amount of data in the asynchronous FIFO is greater than or equal to the almost-full alarm watermark threshold, and the rate adaptation module is configured in an adaptive interframe interval adjustment mode, the MAC layer codec module is triggered to periodically delete the interframe interval of the Ethernet message data until the amount of data in the asynchronous FIFO is less than or equal to the release of the almost-full alarm watermark threshold;
[0042] If the accumulated number of times the alarm waterline threshold is about to be full is greater than or equal to the first set threshold, reducing the configuration value of the minimum average frame interval of the MAC layer encoding and decoding module;
[0043] If it is detected that the amount of data in the asynchronous FIFO is less than or equal to the empty alarm watermark threshold, and the rate adaptation module is configured in the adaptive interframe interval adjustment mode, the MAC layer codec module is triggered to periodically insert an interframe interval into the Ethernet message data until the amount of data in the asynchronous FIFO is greater than or equal to the release empty alarm watermark threshold;
[0044] If the accumulated number of times the empty alarm watermark threshold is reached is greater than or equal to the second set threshold, the read start watermark threshold is increased.
[0045] A third aspect of the present application provides an electronic device, including a processor and a memory, wherein the memory stores a plurality of instructions, and the processor is used to read the instructions and execute the method of the first aspect.
[0046] A fourth aspect of the present application provides a computer-readable storage medium, which stores a plurality of instructions, and the plurality of instructions can be read by a processor to execute the method of the first aspect.
[0047] Compared with the related art, the technical solution of the present application has at least the following advantages:
[0048] The present application solves the problem of lossless line rate transparent transmission of Ethernet test equipment traffic through an FPGA speed reduction bridge by combining rate adaptation and frequency deviation adaptation; it also solves the problem in related technologies that the FPGA speed reduction bridge cannot test the real PFC / PAUSE of ASIC DUT by matching the rate of the real Ethernet test equipment through flow control; it also increases the connection rate with the real Ethernet test equipment to up to 10Gbps, speeds up verification efficiency, and improves the convergence speed of prototype verification; it realizes multi-rate connection between the FPGA speed reduction bridge and the real Ethernet test equipment, and solves the problem of multi-rate switching.
[0049] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained through the structures and processes indicated in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. It is obvious that the drawings described below are certain embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0051] Figure 1 It is a structural block diagram of an implementation of an FPGA speed reduction bridge according to related technologies.
[0052] Figure 2 It is a structural block diagram of an implementation of an FPGA speed reduction bridge according to an exemplary embodiment of the present application.
[0053] Figure 3 It is a structural block diagram of an FPGA multi-rate Ethernet interface according to an exemplary embodiment of the present application.
[0054] Figure 4 It is a rate adaptation flow chart of an FPGA multi-rate Ethernet interface according to an exemplary embodiment of the present application.
[0055] Figure 5 is a structural block diagram of a rate adaptation control module according to an exemplary embodiment of the present application.
[0056] Figure 6 is a rate adaptation flow chart of a rate adaptation control module according to an exemplary embodiment of the present application.
[0057] Figure 7 It is a block diagram of an equivalent frequency division structure of a rate adaptation control module according to an exemplary embodiment of the present application.
[0058] Figure 8 It is a structural block diagram of frequency offset adaptation according to an exemplary embodiment of the present application.
[0059] Fig. 9 It is a diagram showing the high and low effects of various waterlines set for an asynchronous FIFO according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0061] The method provided in the present application can be implemented in the following terminal environment, and the terminal may include one or more of the following components: a processor, a memory, and a display screen. The memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the method described in the following embodiments.
[0062] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect various parts of the entire terminal, and executes various functions of the terminal and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory.
[0063] The memory may include random access memory (RAM) or read-only memory (ROM). The memory may be used to store instructions, programs, codes, code sets or instructions.
[0064] The display screen is used to display the user interface of each application.
[0065] In addition, those skilled in the art can understand that the structure of the above terminal does not constitute a limitation on the terminal, and the terminal may include more or fewer components, or combine certain components, or arrange the components differently. For example, the terminal also includes components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, and a power supply, which will not be described in detail here.
[0066] In view of the current state of the art mentioned in the background art, in order to be able to connect with a real test instrument, a speed reduction bridge needs to be added in front of the ASIC to be tested logic to match the speed of the real test instrument and the ASIC after speed reduction.
[0067] The inventor of this application found that the core problems that the speed reduction bridge needs to solve are:
[0068] 1. Rate adaptation essentially solves the problem of clock matching.
[0069] 2. Protocol adaptation: The lower Ethernet interface protocol connected to the real instrument is completely different from the actual ASIC DUT high-speed Ethernet interface protocol; the relevant technology is the adaptation of 1G to 10G / 100G high-speed Ethernet protocol.
[0070] As an auxiliary verification method in ASIC verification, the inventor of the present application found through search that the related technology is directly connected to the DUT after MAC layer encoding, such as Figure 1 In the FPGA speed reduction bridge structure of the related art shown, some functions are not realized, and only the problem of whether there is traffic is solved.
[0071] Therefore, the FPGA speed reduction bridge in the related art has the following defects:
[0072] The protocol adaptation only reaches the MAC layer coding, and cannot test and cover the PCS logic of the ASIC. The possible reason is that the rate adaptation problem cannot be solved, resulting in the abandonment of PCS testing on the FPGA prototype;
[0073] The interface connected to the tester only supports 1G rate and cannot cover the multi-rate switching scenario;
[0074] During rate adaptation, packets are violently dropped through the FIFO status or the tester is paused from sending packets by sending PAUSE flow control frames, resulting in the inability to test lossless transmission scenarios such as ROCE of ASIC DUT. Many extreme situations in line speed scenarios cannot be effectively covered in the FPGA prototype, and stress testing cannot be effectively tested in the FPGA prototype. Only functional testing can be performed.
[0075] Based on the above analysis, in order to solve the problems existing in the related technology, the present application proposes an FPGA speed reduction bridge and a rate adaptation method, which solves the problem of rate matching between the real Ethernet test equipment and the ASIC DUT after frequency reduction through the FPGA interface. The present application solves the problem of lossless line rate transparent transmission of Ethernet test equipment traffic through the FPGA speed reduction bridge by combining rate adaptation and frequency offset adaptation; it also solves the problem in the related technology that the FPGA speed reduction bridge cannot test the real PFC / PAUSE of the ASIC DUT because the real Ethernet test equipment matches the rate through flow control; it also increases the connection rate with the real Ethernet test equipment to up to 10Gbps, speeds up the verification efficiency, and improves the convergence speed of prototype verification; realizes multi-rate connection between the FPGA speed reduction bridge and the real Ethernet test equipment, and solves the problem of multi-rate switching.
[0076] See also Figure 2 As shown, the present application exemplarily proposes an FPGA speed reduction bridge, including: an FPGA multi-rate Ethernet interface, a rate adaptation module, a rate adaptation control module and a protocol adaptation module; wherein,
[0077] The FPGA multi-rate Ethernet interface can be configured to one of a plurality of different configuration rates, and is connected to an external Ethernet device and performs data communication with the Ethernet device at the configured configuration rate;
[0078] The rate adaptation module is connected to the FPGA multi-rate Ethernet interface, and includes an asynchronous FIFO for caching Ethernet message data received by the FPGA multi-rate Ethernet interface from the Ethernet device;
[0079] The protocol adaptation module is connected to the rate adaptation module, and includes a MAC layer encoding and decoding module and a PCS layer encoding and decoding module, wherein the MAC layer encoding and decoding module is used to perform MAC layer encoding on the Ethernet message data stored in the asynchronous FIFO, and the PCS layer encoding and decoding module is used to perform PCS layer encoding on the encoded data output by the MAC layer encoding and decoding module;
[0080] The rate adaptation control module is used to adapt the configuration rate of the FPGA multi-rate Ethernet interface, and output the clock signal used by the MAC layer codec module and the PCS layer codec module based on the adapted configuration rate.
[0081] In an optional embodiment of the present application, the FPGA multi-rate Ethernet interface includes a first DRP dynamic configuration module, a first memory, a first QPLL frequency synthesizer and a first register; the first memory is used to store configuration parameters corresponding to one or more configuration rates, the first DRP dynamic configuration module receives a first configuration signal from external software through a software control interface, and configures the first QPLL frequency synthesizer according to the configuration parameters corresponding to the configuration rate specified by the first configuration signal. After the first QPLL frequency synthesizer is configured, the configuration parameters corresponding to the configuration rate specified by the first configuration signal are written into the first register; the configuration rate specified by the first configuration signal is one of the configuration rates corresponding to the configuration parameters stored in the first memory or the configuration rate specified by the external software.
[0082] In some embodiments, the first register is an FPGA Serdes, such as GTY. In this embodiment, the first QPLL frequency synthesizer is located in GTY.
[0083] As an alternative implementation, see Figure 3 As shown, the external software configures the DRP (Dynamic Reconfiguration Port) of the FPGA multi-rate Ethernet interface through the APB (Advanced Peripheral Bus) software control interface. The first memory of the FPGA multi-rate Ethernet interface can be a ROM, which can save the configuration parameters of multiple configuration rates, such as the Serdes configuration parameters of four configuration rates of 1G / 2.5G / 5G / 10G. After the external software issues a switching rate command through the APB software control interface, the DRP dynamic configuration module Figure 4The exemplary process shown reads the Serdes configuration parameters of the corresponding configuration rate from the ROM, and writes them to the Serdes lane (i.e., the first register) through the Serdes DRP interface. After the configuration is completed, the Serdes lane is reset; alternatively, external software can also drive the DRP dynamic configuration module through the APB software control interface, and dynamically configure the serdes configuration parameters corresponding to the configuration rate specified by the external software to the Serdes lane through the Serdes DRP interface to complete the speed switching of the FPGA multi-rate Ethernet interface.
[0084] See also Figure 4 As shown, exemplarily, first, if a CPLL clock lock signal or a QPLL clock lock signal is detected, it is determined whether a configuration signal for rate switching is received; if so, the corresponding ROM address in the FPGA multi-rate Ethernet interface is selected according to the configuration rate specified in the configuration signal, and the corresponding second register (GTY, i.e., FPGASerdes) address is read; after waiting for the DRP interface to be ready, the field to be reconfigured in the second register is masked, and the field to be reconfigured is written to the second register; after waiting for the DRP interface to be ready again, it is determined whether the configuration of the second register is completed, and if completed, GTY is reset. If not completed, return to wait for the next configuration.
[0085] In an optional embodiment of the present application, the rate adaptation control module includes: a second DRP dynamic configuration module, a second memory, a second QPLL frequency synthesizer, a CPLL frequency synthesizer and a second register; the second memory is used to store configuration parameters corresponding to one or more configuration rates, the second DRP dynamic configuration module receives a second configuration signal from external software through a software control interface, and configures the second QPLL frequency synthesizer and the CPLL frequency synthesizer according to the configuration parameters corresponding to the configuration rate specified by the second configuration signal. After the second QPLL frequency synthesizer and the CPLL frequency synthesizer are configured, the configuration parameters corresponding to the configuration rate specified by the second configuration signal are written into the second register; the configuration rate specified by the second configuration signal is one of the configuration rates corresponding to the configuration parameters stored in the second memory or the configuration rate specified by the external software.
[0086] The configuration rate specified by the second configuration signal has a preset adaptation relationship with the configuration rate specified by the first configuration signal used to configure the configuration rate of the FPGA multi-rate Ethernet interface.
[0087] In some embodiments, the second register is an FPGA Serdes, such as GTY. In this embodiment, the second QPLL frequency synthesizer and the CPLL frequency synthesizer are located in GTY.
[0088] In another optional embodiment of the present application, the rate adaptation control module further includes: a first clock buffer, a second clock buffer and a third clock buffer;
[0089] The second register is provided with a user-configured frequency division interface. By configuring the user-configured frequency division interface to 32-division, a 32-division clock signal is obtained, and the 32-division clock signal is stored in the first clock buffer to obtain a 32-division clock signal output to the PCS layer codec module. The 32-division clock signal is turned off once every 32 cycles and then stored in the second clock buffer to obtain a 33-division clock signal output to the MAC layer codec module. The 32-division clock signal is turned off once every 1 cycle, and two are turned off every 32 cycles and then stored in the third clock buffer to obtain a 66-division clock signal output to the PCS layer codec module.
[0090] In the embodiment of the present application, the adaptation between the rate of the Ethernet test equipment and the ASIC DUT to be tested logic is mainly completed through the two steps of rate adaptation and frequency deviation adaptation, and the multiple rate switching adaptation of the ASIC DUT is completed through the FPGA multi-rate Ethernet interface.
[0091] During the rate adaptation process, in an optional embodiment of the present application, after the ASIC DUT to be tested logic is down-clocked by 10 times as a whole, the business logic clock is 50MHz, and the FPGA multi-rate Ethernet interface logic frequency is the highest 83.0125MHz, and the timing is relatively easy to converge, so a two-step rate adaptation method is adopted in this embodiment:
[0092] The first step is transmission rate adaptation. Solve the Base-x to Base-R line rate adaptation (1.25Gbps (1G) <-> 1.03125Gbps (after 10G downscaling)), 3.125Gbps (2.5G) <-> 2.578125Gbps (after 25G downscaling)), Base-R to Base-R RS-FEC rate adaptation (10.3125Gbps (10G) <-> 10.625Gpbs (after 100G RS-FEC 544 downscaling), etc.); although the line rate of 1G / 2.5G is higher than the line rate of 10G / 25G after downscaling, 1G / 2.5G is 8b / 10b encoding, and the encoding efficiency is not as high as 10G / 25G's 64b / 66b encoding, so the overall rate can match.
[0093] Step 2: Frequency deviation adaptation. The Ethernet protocol requires the ability to handle jitters of plus or minus 100ppm. The rate adaptation module of the speed reduction bridge can accurately match the rate to ensure that there is no interruption of the flow at a frequency deviation of plus 100ppm and no packet loss at a frequency deviation of minus 100ppm.
[0094] Through the above two steps, the FPGA speed reduction bridge can losslessly transmit the traffic of all Ethernet test equipment, so that various stress tests can be performed on the ASIC DUT test logic after proportional frequency reduction. At the same time, it solves the problem that the relevant technical solutions cannot test PCS layer coding and cannot perform lossless business testing. The constructed scenario can effectively simulate various extreme situations of the digital logic part of the actual ASIC scenario, especially the Ethernet interface part, and truly scales and simulates the duty cycle of the ASIC generated clock.
[0095] Transmission rate adaptation essentially aims to achieve the matching of the asynchronous FIFO read and write clocks in the rate adaptation module with the clocks of the MAC layer encoding and decoding module and the PCS layer encoding and decoding module. Taking 1G<->10G rate adaptation as an example, the 1G Ethernet interface recovery clock is 125MHz, and the clock signals required by the 10G MAC layer, PCS layer and PMA layer are 312.5MHz, 156.25MHz and 322.265625MHz respectively. After 10 times of frequency reduction, they are 31.25MHz, 15.625MHz and 32.265625MHz respectively. Obviously, it is impossible to obtain 32.2265625MHz by simply dividing the recovered 125MHz clock. At the same time, FPGA does not recommend Serdes (deserializer) recovery clock cascade PLL (phase-locked loop) for frequency division, because the recovered clock jitter is large, and exceeding the threshold of the PLL will cause the PLL to fail to lock, which will introduce additional unstable factors and increase the difficulty of problem locating. Therefore, the optional embodiment of the present application adopts the following Figure 5 The rate adaptation control module shown obtains the line rate 32 / 33 / 66 divided clock required by the protocol adaptation module and the rate adaptation module.
[0096] The rate adaptation control module supports two modes of rate adaptation: hardware automatic configuration mode and software and hardware combined configuration mode.
[0097] In the hardware automatic configuration mode, the ROM serving as the second memory stores multiple configuration rates, such as the Serdes configuration parameters of the four configuration rates of 10G / 25G / 50G / 100G. The multiple configuration rates maintained by the second memory can correspond one-to-one to the multiple configuration rates stored in the FPGA multi-rate Ethernet interface, and have a set adaptation relationship. For example, the four configuration rates of 10G / 25G / 50G / 100G are respectively adapted to the four configuration rates stored in the FPGA multi-rate Ethernet interface. That is to say, the Serdes configuration parameters of the multiple configuration rates stored in the second memory of the rate adaptation controller are the Serdes configuration parameters of the reduction rates of the multiple configuration rates stored in the second memory of the FPGA multi-rate Ethernet interface.
[0098] During adaptation, after the external software issues a speed cut command through the APB (Advanced Peripheral Bus) software control port, the DRP dynamic configuration module follows the following steps: Figure 6 The exemplary process shown reads the Serdes configuration parameters of the corresponding rate from the second memory ROM, and writes them into the second register Serdes through the Serdes DRP interface. After the configuration is completed, the second register Serdes is reset.
[0099] See also Figure 6 As shown, exemplarily, first, if a CPLL clock lock signal or a QPLL clock lock signal is detected, it is determined whether a configuration signal for rate switching is received; if so, the corresponding ROM address is selected according to the configuration rate specified in the configuration signal, and the corresponding GTY (FPGA Serdes) address is read from the selected ROM address; after waiting for the DRP interface to be ready, the VCO frequency of the second QPLL frequency synthesizer, as well as the source clock and division ratio of the CPLL frequency synthesizer are configured; after waiting for the DRP interface to be ready again, it is determined whether the second QPLL frequency synthesizer or the CPLL frequency synthesizer is configured, and if so, the GTY is reset. If not, it returns to wait for the next configuration.
[0100] In the hardware and software combined configuration mode, since the second memory ROM only stores a limited number of multiple Serdes configuration parameters, for other speed reduction rates such as 40G / 200G / 400G / 800G, external software can drive the DRP dynamic configuration module through the APB software control interface to write its corresponding serdes configuration parameter process into Serdes through the DRP interface.
[0101] Due to the limitation of the Serdes structure of the second register of FPGA, there is only one user-configured frequency division interface open to users. Direct frequency division of counter or cascaded PLL is not friendly to FPGA implementation. In order to obtain the three clocks of 32 / 33 / 66 frequency division required by the protocol adapter module through the only user-configured frequency division interface, the user-configured frequency division interface reserved by the Serdes of the second register of FPGA is configured to 32 frequency division, and then the 32 frequency division clock is used to obtain the 33 frequency division and 66 frequency division clocks using the gating clock equivalent frequency division method, as shown in the following figure: Figure 7 shown.
[0102] 32-division clock: The Serdes 32-division clock is directly obtained after passing through the first clock buffer BUFGCE;
[0103] 33-division clock: After every 32 cycles of the Serdes 32-division clock, one cycle of the clock is turned off to obtain an equivalent line rate 33-division clock;
[0104] 66-divided clock: After every cycle of the Serdes 32-divided clock, one cycle of the clock is turned off, and two cycles of the clock are turned off every 32 cycles to obtain an equivalent line rate 66-divided clock.
[0105] Frequency deviation adaptation is mainly to match the traffic adaptation caused by the frequency deviation of the RX recovery clock in the receiving direction of the FPGA multi-rate Ethernet interface and the local frequency-divided clock in the sending direction of the FPGA speed reduction bridge to the ASIC DUT. Frequency deviation refers to the deviation of the crystal oscillator relative to the nominal center frequency. The 802.3 protocol allows the frequency deviation between the connection partners to be within plus or minus 100ppm. Figure 8 As shown, exemplarily, when the RX recovery clock frequency deviation in the receiving direction is positive and the local divided clock frequency deviation is negative, the data flow in the receiving direction per unit time is greater than the data flow that can be sent in the sending direction, which will cause the waterline of the asynchronous FIFO in the rate adaptation module to rise. After a period of time, it will cause the asynchronous FIFO to be full and the Ethernet message data to be discarded.
[0106] When the recovered clock frequency deviation in the receiving direction is negative and the local divided clock frequency deviation is positive, the data flow in the receiving direction is smaller than the data flow that can be sent in the sending direction per unit time, which will cause the asynchronous FIFO waterline in the rate adaptation module to drop. After a period of accumulation, the asynchronous FIFO will be read empty. If the asynchronous FIFO is read empty during the transmission of an Ethernet message data, the message flow will be interrupted, which will cause the Ethernet message data received by the ASIC DUT to be erroneous.
[0107] In order to solve the above two problems, in an optional embodiment of the present application, a fine-tuning frame interval (IPG) method of software and hardware combined coarse adjustment and hardware adaptive adjustment can be used to adapt the frequency deviation.
[0108] In an optional embodiment of the present application, in a software-hardware joint coarse adjustment mode, the following settings can be set for the asynchronous FIFO in the rate adaptation module: a full alarm watermark threshold, an empty alarm watermark threshold, and a read start watermark threshold. When the amount of data in the asynchronous FIFO is greater than or equal to the full alarm watermark threshold, the external software is triggered to reconfigure the configuration value of the minimum average frame interval of the MAC layer codec module to reduce it; when the amount of data in the asynchronous FIFO is less than or equal to the empty alarm watermark threshold, the external software is triggered to reconfigure the read start watermark threshold to increase it. In some embodiments, when the watermark of the asynchronous FIFO reaches the read start watermark threshold, the read enable of the asynchronous FIFO is set to valid, thereby starting the process of reading data out of the FIFO.
[0109] In some optional embodiments, when the FIFO is about to be full of waterline alarm, that is, the amount of data in the asynchronous FIFO is greater than or equal to the full alarm waterline threshold, an interrupt can be triggered to report to the external software, and the external software reconfigures the minimum average IPG value of the MAC coding layer decoding module, such as reducing it by 1, and clears the interrupt. If the FIFO is triggered again to trigger the interrupt of the full waterline alarm, the external software can continue to reconfigure the minimum average IPG value of the MAC coding layer decoding module, such as reducing it by 1. In this way, when the RX recovery clock frequency deviation in the receiving direction is positive and the local frequency division clock frequency deviation is negative, the data flow in the receiving direction per unit time is greater than the data flow that can be sent in the sending direction, which causes the asynchronous FIFO to be full and discard Ethernet message data.
[0110] In other optional embodiments, when the FIFO will alarm the empty waterline, that is, the amount of data in the asynchronous FIFO is less than or equal to the empty alarm waterline threshold, an interrupt is triggered to report to the external software, and the external software configures the asynchronous FIFO to increase the read start waterline threshold by 1, and clears the interrupt. If the FIFO is triggered again to alarm the empty waterline interrupt, the external software continues to increase the read start waterline threshold of the asynchronous FIFO by 1. This method can solve the problem that when the RX recovery clock frequency deviation in the receiving direction is negative and the local frequency division clock frequency deviation is positive, the data flow in the receiving direction per unit time is less than the data flow that can be sent in the sending direction, which causes errors in the Ethernet message data received by the ASIC DUT.
[0111] In an optional embodiment of the present application, in the hardware adaptive fine-tuning mode, the following settings may be provided for the asynchronous FIFO in the rate adaptation module: a threshold value for a nearly full alarm waterline, a threshold value for releasing a nearly full alarm waterline, a threshold value for an empty alarm waterline, a threshold value for releasing a nearly empty alarm waterline, and a read start waterline threshold;
[0112] When the amount of data in the asynchronous FIFO is greater than or equal to the almost-full alarm watermark threshold, if the rate adaptation module is configured in an adaptive inter-frame interval adjustment mode, the MAC layer codec module is triggered to periodically delete the inter-frame interval of the Ethernet message data until the amount of data in the asynchronous FIFO is less than or equal to the threshold for releasing the almost-full alarm watermark; if the cumulative number of times the almost-full alarm watermark threshold is greater than or equal to the first set threshold, the configuration value of the minimum average frame interval of the MAC layer codec module is reduced;
[0113] When the amount of data in the asynchronous FIFO is less than or equal to the empty alarm watermark threshold, if the rate adaptation module is configured as the adaptive inter-frame interval adjustment mode, the MAC layer codec module is triggered to periodically insert inter-frame intervals into the Ethernet message data until the amount of data in the asynchronous FIFO is greater than or equal to the release of the empty alarm watermark threshold; if the cumulative number of times the empty alarm watermark threshold is greater than or equal to the second set threshold, the read start watermark threshold is raised.
[0114] In some embodiments, when the asynchronous FIFO of the rate adaptation module reaches or is lower than the empty alarm waterline, an empty waterline alarm should be generated. The rate adaptation module decides whether to perform adaptive IPG (inter-frame gap) adjustment according to the pre-configuration of the external software. If adaptive IPG adjustment is performed, the MAC layer codec module periodically inserts IPG into the Ethernet message data based on the DIC (Deficit IDLE Count) algorithm until the FIFO waterline is greater than or equal to the threshold value of the empty alarm waterline. The MAC layer codec module stops inserting the IPG value and continues to send the IPG according to the DIC algorithm. In addition, the number of empty alarms can also be counted. When the number of this count is greater than the first set threshold, the read start waterline of the asynchronous FIFO of the rate adaptation module should be increased. In this way, when the RX recovery clock frequency deviation in the receiving direction is positive and the local frequency division clock frequency deviation is negative, the data flow in the receiving direction per unit time is greater than the data flow that can be sent in the sending direction, which causes the asynchronous FIFO to be full and discard the Ethernet message data.
[0115] In other embodiments, when the asynchronous FIFO of the rate adaptation module reaches or exceeds the full alarm waterline, a FIFO full alarm is generated, the rate adaptation module decides whether to perform adaptive IPG adjustment according to the pre-configuration of the external software, and the MAC layer codec module periodically deletes the IPG of the Ethernet message data based on the DIC algorithm until the FIFO waterline is less than or equal to the value of releasing the full alarm waterline. In addition, the number of full waterline alarms can be counted, and when the number of this count is greater than the second set threshold, the configuration value of the minimum average frame interval is reduced. Among them, when executing periodic deletion of IPG, the average minimum average frame interval requirements of the 802.3 receiving end should be met. This method can solve the problem that when the RX recovery clock frequency deviation in the receiving direction is negative and the local frequency division clock frequency deviation is positive, the data flow in the receiving direction per unit time is less than the data flow that can be sent in the sending direction, resulting in errors in the Ethernet message data received by the ASIC DUT.
[0116] The above-mentioned software and hardware combined coarse adjustment method and hardware adaptive fine adjustment method can cooperate with each other and complement each other to jointly complete frequency deviation adaptation. Fig. 9, exemplarily, the following thresholds are ordered from large to small as follows: the almost full alarm waterline threshold, the release of the almost full alarm waterline threshold, the read start waterline threshold, the release of the almost empty alarm waterline threshold, and the almost empty alarm waterline threshold.
[0117] Accordingly, exemplarily, the present application provides a rate adaptation method in a second aspect, which is implemented by using the FPGA speed reduction bridge proposed in the first aspect, and the method includes:
[0118] The FPGA multi-rate Ethernet interface is configured to one of a plurality of different configuration rates;
[0119] The rate adaptation control module is used to adapt the configuration rate configured by the FPGA multi-rate Ethernet interface, and output the clock signal used by the MAC layer codec module and the PCS layer codec module; the configuration rate adapted by the rate adaptation control module has a preset adaptation relationship with the configuration rate configured by the FPGA multi-rate Ethernet interface.
[0120] In an optional embodiment of the present application, the FPGA multi-rate Ethernet interface is configured to one of a plurality of different configuration rates, including:
[0121] The first DRP dynamic configuration module of the rate adaptation control module receives a first configuration signal received from external software through a software control interface;
[0122] Configure the first QPLL frequency synthesizer of the rate adaptation control module according to the configuration parameters corresponding to the configuration rate specified by the first configuration signal;
[0123] If the first QPLL frequency synthesizer is configured, the configuration parameters corresponding to the configuration rate specified by the first configuration signal are written into the first register of the rate adaptation control module; the configuration rate specified by the first configuration signal is one of the configuration rates corresponding to the configuration parameters stored in the first memory of the rate adaptation control module or the configuration rate specified by the external software.
[0124] In an optional embodiment of the present application, the rate adaptation control module is used to adapt the configured rate of the FPGA multi-rate Ethernet interface, and output the clock signal used by the MAC layer codec module and the PCS layer codec module, including:
[0125] The second DRP dynamic configuration module of the rate adaptation control module receives a second configuration signal from external software through a software control interface;
[0126] Configure the second QPLL frequency synthesizer and the CPLL frequency synthesizer of the rate adaptation control module according to the configuration parameters corresponding to the configuration rate specified by the second configuration signal;
[0127] If the second QPLL frequency synthesizer and CPLL frequency synthesizer are configured, the configuration parameters corresponding to the configuration rate specified by the second configuration signal are written into the second register of the rate adaptation control module; the configuration rate specified by the second configuration signal is one of the configuration rates corresponding to the configuration parameters stored in the second memory of the rate adaptation control module or the configuration rate specified by the external software.
[0128] The configuration rate specified by the second configuration signal has a preset adaptation relationship with the configuration rate specified by the first configuration signal used to configure the configuration rate of the FPGA multi-rate Ethernet interface.
[0129] In an optional embodiment of the present application, the method further includes:
[0130] The user-configured frequency division interface of the second register is configured to be divided by 32, so as to obtain a divided-by-32 clock signal;
[0131] The 32-frequency clock signal is stored in a first clock buffer to obtain a 32-frequency clock signal output to the PCS layer encoding and decoding module;
[0132] The 32-frequency divided clock signal is turned off once every 32 cycles and then stored in a second clock buffer to obtain a 33-frequency divided clock signal output to the MAC layer encoding and decoding module;
[0133] The 32-frequency-divided clock signal is turned off by one per cycle, and by two per 32 cycles, and then stored in a third clock buffer to obtain a 66-frequency-divided clock signal output to the PCS layer encoding and decoding module.
[0134] In an optional embodiment of the present application, the method further includes:
[0135] Setting a nearly full alarm watermark threshold, a nearly empty alarm watermark threshold and a read start watermark threshold for the asynchronous FIFO in the rate adaptation module;
[0136] If it is detected that the amount of data in the asynchronous FIFO is greater than or equal to the full alarm waterline threshold, trigger the external software to reconfigure the configuration value of the minimum average frame interval of the MAC layer codec module to reduce it;
[0137] If it is detected that the amount of data in the asynchronous FIFO is less than or equal to the empty alarm watermark threshold, external software is triggered to reconfigure the read start watermark threshold to increase it.
[0138] In an optional embodiment of the present application, the method further includes:
[0139] Setting a nearly full alarm watermark threshold, a release nearly full alarm watermark threshold, a nearly empty alarm watermark threshold, a release nearly empty alarm watermark threshold and a read start watermark threshold for the asynchronous FIFO in the rate adaptation module;
[0140] If it is detected that the amount of data in the asynchronous FIFO is greater than or equal to the almost-full alarm watermark threshold, and the rate adaptation module is configured in an adaptive interframe interval adjustment mode, the MAC layer codec module is triggered to periodically delete the interframe interval of the Ethernet message data until the amount of data in the asynchronous FIFO is less than or equal to the release of the almost-full alarm watermark threshold;
[0141] If the accumulated number of times the alarm waterline threshold is about to be full is greater than or equal to the first set threshold, reducing the configuration value of the minimum average frame interval of the MAC layer encoding and decoding module;
[0142] If it is detected that the amount of data in the asynchronous FIFO is less than or equal to the empty alarm watermark threshold, and the rate adaptation module is configured in the adaptive interframe interval adjustment mode, the MAC layer codec module is triggered to periodically insert an interframe interval into the Ethernet message data until the amount of data in the asynchronous FIFO is greater than or equal to the release empty alarm watermark threshold;
[0143] If the accumulated number of times the empty alarm watermark threshold is reached is greater than or equal to the second set threshold, the read start watermark threshold is increased.
[0144] The specific implementation details of the above rate adaptation method can be found in the description of the embodiment of the first aspect, and will not be repeated here.
[0145] It is understood that the circuit structures, names and parameters described in the above embodiments are only examples. Those skilled in the art can also easily combine and adjust the structural features of the above embodiments according to the use requirements, and should not limit the concept of the present application to the specific details of the above examples.
[0146] The present application also provides an electronic device, including a processor and a memory, wherein the memory stores a plurality of instructions, and the processor is used to read the instructions and execute any one of the methods in the aforementioned first aspect. The processor and the memory can be connected via a bus or other means, taking the bus connection as an example. The processor can be a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components and other chips, or a combination of the above-mentioned various types of chips.
[0147] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method in the embodiment of the present application. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above method embodiment.
[0148] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0149] Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that he or she may still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An FPGA speed reduction bridge, characterized in that: include: FPGA multi-rate Ethernet interface, rate adaptation module, rate adaptation control module and protocol adaptation module; wherein, The FPGA multi-rate Ethernet interface can be configured to one of a plurality of different configuration rates, and is connected to an external Ethernet device and performs data communication with the Ethernet device at the configured configuration rate; The rate adaptation module is connected to the FPGA multi-rate Ethernet interface, and includes an asynchronous FIFO for caching Ethernet message data received by the FPGA multi-rate Ethernet interface from the Ethernet device; The protocol adaptation module is connected to the rate adaptation module, and includes a MAC layer encoding and decoding module and a PCS layer encoding and decoding module, wherein the MAC layer encoding and decoding module is used to perform MAC layer encoding on the Ethernet message data stored in the asynchronous FIFO, and the PCS layer encoding and decoding module is used to perform PCS layer encoding on the encoded data output by the MAC layer encoding and decoding module; The rate adaptation control module is used to adapt the configuration rate of the FPGA multi-rate Ethernet interface, and output the clock signal used by the MAC layer codec module and the PCS layer codec module based on the adapted configuration rate.
2. The FPGA speed reduction bridge according to claim 1, characterized in that: The FPGA multi-rate Ethernet interface includes a first DRP dynamic configuration module, a first memory, a first QPLL frequency synthesizer and a first register; the first memory is used to store configuration parameters corresponding to one or more configuration rates, the first DRP dynamic configuration module receives a first configuration signal from external software through a software control interface, and configures the first QPLL frequency synthesizer according to the configuration parameters corresponding to the configuration rate specified by the first configuration signal. After the first QPLL frequency synthesizer is configured, the configuration parameters corresponding to the configuration rate specified by the first configuration signal are written into the first register; the configuration rate specified by the first configuration signal is one of the configuration rates corresponding to the configuration parameters stored in the first memory or the configuration rate specified by the external software.
3. The FPGA speed reduction bridge according to claim 1, characterized in that: The rate adaptation control module includes: a second DRP dynamic configuration module, a second memory, a second QPLL frequency synthesizer, a CPLL frequency synthesizer and a second register; the second memory is used to store configuration parameters corresponding to one or more configuration rates, the second DRP dynamic configuration module receives a second configuration signal from external software through a software control interface, and configures the second QPLL frequency synthesizer and the CPLL frequency synthesizer according to the configuration parameters corresponding to the configuration rate specified by the second configuration signal. After the second QPLL frequency synthesizer and the CPLL frequency synthesizer are configured, the configuration parameters corresponding to the configuration rate specified by the second configuration signal are written into the second register; the configuration rate specified by the second configuration signal is one of the configuration rates corresponding to the configuration parameters stored in the second memory or the configuration rate specified by the external software.
4. The FPGA speed reduction bridge according to claim 3, characterized in that: The rate adaptation control module further includes: a first clock buffer, a second clock buffer and a third clock buffer; The second register is provided with a user-configured frequency division interface. By configuring the user-configured frequency division interface to 32-division, a 32-division clock signal is obtained, and the 32-division clock signal is stored in the first clock buffer to obtain a 32-division clock signal output to the PCS layer codec module. The 32-division clock signal is turned off once every 32 cycles and then stored in the second clock buffer to obtain a 33-division clock signal output to the MAC layer codec module. The 32-division clock signal is turned off once every 1 cycle, and two are turned off every 32 cycles and then stored in the third clock buffer to obtain a 66-division clock signal output to the PCS layer codec module.
5. The FPGA speed reduction bridge according to claim 1, characterized in that: The asynchronous FIFO in the rate adaptation module is provided with: a nearly full alarm watermark threshold, an almost empty alarm watermark threshold and a read start watermark threshold. When the amount of data in the asynchronous FIFO is greater than or equal to the nearly full alarm watermark threshold, the external software is triggered to reconfigure the configuration value of the minimum average frame interval of the MAC layer codec module to reduce it; When the amount of data in the asynchronous FIFO is less than or equal to the empty alarm watermark threshold, external software is triggered to reconfigure the read start watermark threshold to increase it.
6. The FPGA speed reduction bridge according to claim 1, characterized in that: The asynchronous FIFO in the rate adaptation module is provided with: a threshold value for a nearly full alarm watermark, a threshold value for releasing a nearly full alarm watermark, a threshold value for an empty alarm watermark, a threshold value for releasing an nearly empty alarm watermark, and a read start watermark threshold; When the amount of data in the asynchronous FIFO is greater than or equal to the almost-full alarm watermark threshold, if the rate adaptation module is configured in an adaptive interframe interval adjustment mode, the MAC layer codec module is triggered to periodically delete the interframe interval of the Ethernet message data until the amount of data in the asynchronous FIFO is less than or equal to the release of the almost-full alarm watermark threshold; If the accumulated number of times the alarm waterline threshold is about to be full is greater than or equal to the first set threshold, reducing the configuration value of the minimum average frame interval of the MAC layer encoding and decoding module; When the amount of data in the asynchronous FIFO is less than or equal to the empty alarm watermark threshold, if the rate adaptation module is configured as an adaptive interframe interval adjustment mode, the MAC layer codec module is triggered to periodically insert an interframe interval into the Ethernet message data until the amount of data in the asynchronous FIFO is greater than or equal to the release empty alarm watermark threshold; If the accumulated number of times the empty alarm watermark threshold is reached is greater than or equal to the second set threshold, the read start watermark threshold is increased.
7. The FPGA speed reduction bridge according to claim 6, characterized in that: The following thresholds are sorted from large to small as follows: almost full alarm watermark threshold, almost full alarm watermark threshold, read start watermark threshold, almost empty alarm watermark threshold, almost empty alarm watermark threshold.
8. A rate adaptation method, characterized in that: The method is implemented using the FPGA speed reduction bridge according to any one of claims 1 to 7, and the method comprises: The FPGA multi-rate Ethernet interface is configured to one of a plurality of different configuration rates; The rate adaptation control module is used to adapt the configuration rate configured by the FPGA multi-rate Ethernet interface, and output the clock signal used by the MAC layer codec module and the PCS layer codec module; the configuration rate adapted by the rate adaptation control module has a preset adaptation relationship with the configuration rate configured by the FPGA multi-rate Ethernet interface.
9. The rate adaptation method according to claim 8, characterized in that: The FPGA Multi-Rate Ethernet interface is configured to one of several different configuration rates, including: The first DRP dynamic configuration module of the rate adaptation control module receives a first configuration signal received from external software through a software control interface; Configure the first QPLL frequency synthesizer of the rate adaptation control module according to the configuration parameters corresponding to the configuration rate specified by the first configuration signal; If the first QPLL frequency synthesizer is configured, the configuration parameters corresponding to the configuration rate specified by the first configuration signal are written into the first register of the rate adaptation control module; the configuration rate specified by the first configuration signal is one of the configuration rates corresponding to the configuration parameters stored in the first memory of the rate adaptation control module or the configuration rate specified by the external software.
10. The rate adaptation method according to claim 8, characterized in that: Adapting the configured rate of the FPGA multi-rate Ethernet interface using the rate adaptation control module, and outputting the clock signal used by the MAC layer codec module and the PCS layer codec module, including: The second DRP dynamic configuration module of the rate adaptation control module receives a second configuration signal from external software through a software control interface; Configure the second QPLL frequency synthesizer and the CPLL frequency synthesizer of the rate adaptation control module according to the configuration parameters corresponding to the configuration rate specified by the second configuration signal; If the second QPLL frequency synthesizer and CPLL frequency synthesizer are configured, the configuration parameters corresponding to the configuration rate specified by the second configuration signal are written into the second register of the rate adaptation control module; the configuration rate specified by the second configuration signal is one of the configuration rates corresponding to the configuration parameters stored in the second memory of the rate adaptation control module or the configuration rate specified by the external software.
11. The rate adaptation method according to claim 10, characterized in that: The method further comprises: The user-configured frequency division interface of the second register is configured to be divided by 32, so as to obtain a divided-by-32 clock signal; The 32-frequency clock signal is stored in a first clock buffer to obtain a 32-frequency clock signal output to the PCS layer encoding and decoding module; The 32-frequency divided clock signal is turned off once every 32 cycles and then stored in a second clock buffer to obtain a 33-frequency divided clock signal output to the MAC layer encoding and decoding module; The 32-frequency-divided clock signal is turned off by one per cycle, and by two per 32 cycles, and then stored in a third clock buffer to obtain a 66-frequency-divided clock signal output to the PCS layer encoding and decoding module.
12. The rate adaptation method according to claim 8, characterized in that: The method further comprises: Setting a nearly full alarm watermark threshold, a nearly empty alarm watermark threshold and a read start watermark threshold for the asynchronous FIFO in the rate adaptation module; If it is detected that the amount of data in the asynchronous FIFO is greater than or equal to the full alarm waterline threshold, trigger the external software to reconfigure the configuration value of the minimum average frame interval of the MAC layer codec module to reduce it; If it is detected that the amount of data in the asynchronous FIFO is less than or equal to the empty alarm watermark threshold, external software is triggered to reconfigure the read start watermark threshold to increase it.
13. The rate adaptation method according to claim 8, characterized in that: The method further comprises: Setting a nearly full alarm watermark threshold, a release nearly full alarm watermark threshold, a nearly empty alarm watermark threshold, a release nearly empty alarm watermark threshold and a read start watermark threshold for the asynchronous FIFO in the rate adaptation module; If it is detected that the amount of data in the asynchronous FIFO is greater than or equal to the almost-full alarm watermark threshold, and the rate adaptation module is configured in an adaptive interframe interval adjustment mode, the MAC layer codec module is triggered to periodically delete the interframe interval of the Ethernet message data until the amount of data in the asynchronous FIFO is less than or equal to the release of the almost-full alarm watermark threshold; If the accumulated number of times the alarm waterline threshold is about to be full is greater than or equal to the first set threshold, reducing the configuration value of the minimum average frame interval of the MAC layer encoding and decoding module; If it is detected that the amount of data in the asynchronous FIFO is less than or equal to the empty alarm watermark threshold, and the rate adaptation module is configured in the adaptive interframe interval adjustment mode, the MAC layer codec module is triggered to periodically insert an interframe interval into the Ethernet message data until the amount of data in the asynchronous FIFO is greater than or equal to the release empty alarm watermark threshold; If the accumulated number of times the empty alarm watermark threshold is reached is greater than or equal to the second set threshold, the read start watermark threshold is increased.
14. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions, and the processor is used to read the instructions and execute the rate adaptation method as described in any one of claims 8 to 13.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the plurality of instructions can be read by a processor and executed by the rate adaptation method as described in any one of claims 8-13.
Citation Information
Patent Citations
Serdes multi-rate dynamic reconfiguration system and field programmable gate array
CN114153762A
Ethernet speed reduction method and system, medium and FPGA verification platform
CN115526142A
Ethernet gigabit and 10-gigabit adaptive connection device and method and electronic equipment
CN116156029A
Ethernet gigabit and 10-gigabit rate switching device based on FPGA (Field Programmable Gate Array)
CN116708045A
Ethernet speed reducer of FPGA prototype verification platform and data transmission method
CN116996590A
