WO2018090644A1 - Adaptive network speed matching method and device, and data storage medium - Google Patents

Adaptive network speed matching method and device, and data storage medium Download PDF

Info

Publication number
WO2018090644A1
WO2018090644A1 PCT/CN2017/091422 CN2017091422W WO2018090644A1 WO 2018090644 A1 WO2018090644 A1 WO 2018090644A1 CN 2017091422 W CN2017091422 W CN 2017091422W WO 2018090644 A1 WO2018090644 A1 WO 2018090644A1
Authority
WO
WIPO (PCT)
Prior art keywords
ethernet port
test
pcs
transmission rate
state parameter
Prior art date
Application number
PCT/CN2017/091422
Other languages
French (fr)
Chinese (zh)
Inventor
杨意
杨健
杨婧
Original Assignee
深圳市中兴微电子技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市中兴微电子技术有限公司 filed Critical 深圳市中兴微电子技术有限公司
Publication of WO2018090644A1 publication Critical patent/WO2018090644A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0002Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate

Definitions

  • the present invention relates to the field of communication networks, and in particular, to a method and apparatus for adaptive network speed matching method, and a storage medium.
  • the Physical Coding Sublayer (PCS) located in the physical layer has different implementation methods at different network speeds, such as: (1) 100BASE-X protocol, PCS 4B/5B Coding, through Media Independent Interface (MII) and media access control (MAC, Media Access Control) sub-layer interconnection; (2) 1GBASE-R protocol stipulates that PCS adopts 8bB/10B encoding method, independent through Gigabit media The interface (GMII, Gigabit Medium Independent Interface) is interconnected with the MAC sublayer. (3) The 10GBASE-R protocol stipulates that the PCS adopts the 64B/66B encoding method and passes the 10Gb independent media interface (XGMII, 10Gigabit Media Independent Interface) and the MAC sub-interface. Layer interconnection. Therefore, the PCS needs to make adaptive adjustments to different transmission rates, so there is an urgent need in the PCS for a method that can adaptively adjust the current network speed.
  • MII Media Independent Interface
  • MAC Media Access Control sub-layer interconnection
  • 1GBASE-R protocol stipulate
  • the embodiments of the present invention are directed to a method and apparatus for adaptive network speed matching, and a storage medium, which can adaptively adjust the current network speed.
  • An embodiment of the present invention provides an adaptive network speed matching method, where the method includes:
  • the first test instance is selected in all test cases of the Ethernet port, where the test case includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate;
  • the method further includes:
  • the second test example is selected in all test cases of the Ethernet port;
  • the detected Ethernet port based on the configuration of the communication parameter of the second test example
  • data is transmitted by using the communication parameter currently configured by the Ethernet port
  • test cases are selected in all test cases of the Ethernet port until the communication parameter configuration is completed for the Ethernet port, or until all test cases of the Ethernet port are selected.
  • the communication parameter configuration of the Ethernet port according to the transmission rate supported by the Ethernet port included in the first test instance and the network type corresponding to the transmission rate includes:
  • the codec mode According to the transmission rate supported by the Ethernet port included in the first test example and the network type corresponding to the transmission rate, the codec mode, the descrambling mode, the synchronization detection mode, the error detection mode, and the bit of the PCS Wide conversion mode for communication parameter configuration;
  • the communication parameter configuration of the Ethernet port according to the transmission rate supported by the Ethernet port included in the second test instance and the network type corresponding to the transmission rate includes:
  • the codec mode According to the transmission rate supported by the Ethernet port included in the second test example and the network type corresponding to the transmission rate, the codec mode, the descrambling mode, the synchronization detection mode, the error detection mode and the bit of the PCS Wide conversion mode for communication parameter configuration.
  • the state parameter of the PCS includes: a codeword synchronization state value
  • the state parameters of the PCS include: a codeword synchronization state value, a bit error rate judgment value, a number of data decoding errors, and a number of times of the error reception state value;
  • the difference between the detected state parameter of the PCS and the theoretical state parameter is in accordance with the pre-
  • the condition is as follows: when the codeword synchronization state value is true, the bit error rate judgment value is no, and the sum of the number of times of the data decoding error and the error reception state value is less than a preset value, the preset condition is met. Otherwise it does not meet the preset conditions.
  • the first test case is selected in all the test cases of the Ethernet port
  • the second test case or other test cases are selected in all the test cases of the Ethernet port
  • test case which is not selected it is preferable to select a test case having a large transfer rate.
  • An embodiment of the present invention further provides an adaptive network speed matching apparatus, including a test instance generating module, a configuration module, and a first determining module, where:
  • the test instance generating module is configured to select a first test instance in all test cases of the Ethernet port, where the test case includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate;
  • a configuration module configured to perform communication parameter configuration on the Ethernet port according to a transmission rate supported by the Ethernet port included in the first test instance and a network type corresponding to the transmission rate;
  • the first judging module is configured to detect a state parameter of the PCS of the Ethernet port after the communication parameter configuration in the data transmission process, and compare the state parameter of the detected PCS with the corresponding theory of the first test example The state parameters are compared. When the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, data is transmitted by using the communication parameter currently configured by the Ethernet port.
  • the device further includes:
  • a second test module configured to select a second test in all test cases of the Ethernet port when the difference between the detected state parameter of the PCS and the theoretical state parameter corresponding to the first test instance does not meet the preset condition a test example; according to the transmission rate supported by the Ethernet port included in the second test instance and the network type corresponding to the transmission rate, the Ethernet end Performing communication parameter configuration; and detecting, during data transmission, a state parameter of the PCS based on the Ethernet port configured by the communication parameter of the second test example, and detecting the detected communication based on the second test example Comparing the state parameter of the PCS of the Ethernet port after the parameter configuration with the theoretical state parameter corresponding to the second test example; and detecting the Ethernet port after the configuration based on the communication parameter of the second test example is detected When the difference between the state parameter of the PCS and the theoretical state parameter corresponding to the second test case meets a preset condition, data transmission is performed with the communication parameter currently configured by the Ethernet port; when the detected is based on the In the second test example, when the difference between the
  • the first determining module is further configured to: encode and decode the PCS according to a transmission rate supported by the Ethernet port included in the first test instance and a network type corresponding to the transmission rate, Adding descrambling mode, synchronous detection mode, error correction detection mode and bit width conversion mode for communication parameter configuration;
  • the second judging module is further configured to: according to the transmission rate supported by the Ethernet port included in the second test instance and the network type corresponding to the transmission rate, the codec mode and the descrambling mode of the PCS , synchronous detection mode, error detection detection mode and bit width conversion mode for communication parameter configuration.
  • An embodiment of the present invention further provides an adaptive network speed matching apparatus, including: a processor and a memory for storing a computer program capable of running on a processor, wherein the processor is configured to execute when the computer program is executed The steps of the method described above.
  • Embodiments of the present invention also provide a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the method described above.
  • a first test example is selected in all the test cases of the Ethernet port, where the test case includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate; and the Ethernet is according to the first test example.
  • the port performs communication parameter configuration; during the data transmission, the state parameter of the PCS of the Ethernet port is detected, and the detected state parameter of the PCS is compared with the corresponding theoretical state parameter of the first test example, and the detected When the difference between the state parameter of the PCS and the theoretical state parameter meets a preset condition, data transmission is performed with the communication parameter currently configured by the Ethernet port. In this way, the purpose of adaptive adjustment to the current network speed is achieved.
  • FIG. 1 is a flowchart of implementing an adaptive network speed matching method according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a structure of an adaptive network speed matching apparatus according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a specific structure of an adaptive network speed matching apparatus according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a specific PCS path module according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of an operation of an apparatus for adaptive network speed matching according to an embodiment of the present invention.
  • a first test instance is selected in all the test cases of the Ethernet port, where the test instance includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate;
  • the test example configures communication parameters of the Ethernet port; during the data transmission process, the state parameter of the PCS of the Ethernet port is detected, and the state of the detected PCS is compared with the theory of the first test example. The state parameters are compared. When the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, data is transmitted by using the communication parameter currently configured by the Ethernet port.
  • the embodiment of the invention provides a method for adaptive network speed matching method, as shown in FIG. 1 .
  • the method includes:
  • Step 101 Select a first test instance in all test cases of the Ethernet port, where the test case includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate.
  • Ethernet There are many transmission rates for Ethernet, such as 10Mbps, 100Mbps, and 1000Mbps. Each different rate corresponds to one or more network types. For example, 10Mbps corresponds to 10base-T, 100Mbps corresponds to 100base-TX, 100base-FX, etc. 1000Mbps corresponds to 1000base-T; in practice, generally Ethernet ports support multiple rates. Therefore, there may be multiple test cases for one transmission rate. For example, there are 100Mbps 100base-TX and 100Mbps 100base-FX test cases at 100Mbps. The examples need to be tested separately.
  • a test case selected in the test case supported by the Ethernet port is tested. It may be that the transmission rate of the test case is not equal to the current actual transmission rate of the Ethernet port or the network type is not equal to the The type of network type currently used by the Ethernet port.
  • Step 102 Perform communication parameter configuration on the Ethernet port according to the first test example.
  • Step 103 In the data transmission process, detecting a state parameter of the PCS of the Ethernet port after the communication parameter is configured, and comparing the detected state parameter of the PCS with a corresponding theoretical state parameter of the first test example, When the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, data transmission is performed by using the communication parameter currently configured by the Ethernet port.
  • the PCS is in the physical layer, and the PCS is located between the RS (Reconciliation Sublayer) and the PMA (Physical Medium Attachment).
  • the PCS is responsible for mapping well-defined Ethernet MAC functions to existing code and physical layer signal system functions.
  • PCS requires different implementation methods, such as codec method, scrambling and descrambling method, synchronization detection method, error detection detection method and so on.
  • the state parameter of the PCS can be used to determine whether the transmission rate in the first test example is equal to the current actual transmission rate of the Ethernet port, and whether the network type in the first test example is equal to the current use of the Ethernet port.
  • Network Type This method has the advantages of simplicity, convenience and high accuracy.
  • the adaptive network speed matching method further includes: when all the difference between the detected state parameter of the PCS and the theoretical state parameter does not meet the preset condition, in all test cases of the Ethernet port Selecting a second test example; configuring communication parameters of the Ethernet port according to a transmission rate supported by the Ethernet port included in the second test instance and a network type corresponding to the transmission rate; and during data transmission And detecting, according to the state parameter of the PCS of the Ethernet port after the communication parameter configuration of the second test example, detecting the PCS of the Ethernet port that is configured based on the communication parameter of the second test example The state parameter is compared with a corresponding theoretical state parameter of the second test case;
  • the current configuration of the Ethernet port is configured. Communication parameters for data transmission;
  • the transmission rate in the first test example is not equal to the current actual transmission rate of the Ethernet port or the network type in the first test example is not equal to the Ethernet.
  • the network type currently used by the network port in this case, you need to continue the test, that is, select a test case from the transmission rate supported by the Ethernet port, test again, repeat the above test until the PCS status parameter is normal or All test cases were tested.
  • the communication parameter configuration of the Ethernet port according to the first test example includes: a transmission rate supported by an Ethernet port included in the first test example, and a transmission rate.
  • Corresponding network type, the PCS codec mode, the descrambling mode, the synchronous detection mode, the error correction detection mode and the bit width conversion mode are configured for communication parameters;
  • the configuration of the communication parameter of the Ethernet port according to the second test example includes: according to the transmission rate supported by the Ethernet port included in the second test example, and the network type corresponding to the transmission rate,
  • the communication parameters are configured for the codec mode, the descrambling mode, the synchronous detection mode, the error correction detection mode, and the bit width conversion mode of the PCS.
  • the state parameter of the PCS includes: a codeword synchronization state value
  • the codeword synchronization state value (block_lock) is a Boolean type. When the codeword received by the PCS from the PMA satisfies the block division, the codeword synchronization state value is true, and the meaning represented by it is the synchronization state of the received codeword.
  • Different transmission rates correspond to different synchronization detection mechanisms, mainly including: synchronous detection of 8b ⁇ 10b codec, synchronous detection of 64b ⁇ 66b codec, synchronous detection of FEC and RS-FEC synchronization detection, etc.; if the PCS is not working properly, an error occurs when these synchronization mechanisms are performed, that is, the codeword synchronization status value is set to No.
  • the state parameters of the PCS include: a codeword synchronization state value, a bit error rate judgment value, a number of data decoding errors, and a number of times of incorrect reception state values;
  • the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition including: the codeword synchronization state value is true, the error rate determination value is no, and the data decoding error occurs.
  • the preset condition is met, otherwise the preset condition is not met.
  • bit error rate judgment value is a Boolean type; when the bit error rate is greater than 10 ⁇ -4, the bit error rate judgment value is set to No at this time. In this way, the bit error rate determination value can be used to determine whether the PCS is working properly.
  • PCS One of the functions of PCS is codec, for example: 8b ⁇ 10b codec, 64b ⁇ 66b codec, etc., errors will occur during this decoding process; therefore, the number of data decoding errors can be used to determine whether the PCS is working properly.
  • the status value is used to indicate the working state of the PCS; and when the state value of the PCS is RX_E, it indicates that an error has occurred; therefore, the number of times the error receiving state value can be set to the state value of the PCS RX_E The number of times, the number of times the status value is incorrectly received to determine whether the PCS is working properly.
  • the first test case is selected in all the test cases of the Ethernet port
  • the second test case or other test cases are selected in all the test cases of the Ethernet port
  • the principle followed is:
  • a test case having a large transfer rate is preferably selected.
  • the rate can be negotiated between Ethernet ports.
  • the principle of negotiation takes precedence over the maximum transmission rate supported by both parties. Therefore, in order to reduce the number of tests, it is possible to give priority to a large transfer rate.
  • the embodiment of the invention provides an adaptive network speed matching method.
  • the method attempts to use the test example supported by the Ethernet port to connect to the Ethernet port.
  • the communication parameter configuration is performed.
  • several state parameters of the PCS are obtained, and then the state parameters are used to determine whether the PCS is working normally; if the operation is normal, it indicates that the communication parameter at this time conforms to the Ethernet network port. Otherwise, you need to obtain untested test cases to continue testing.
  • An embodiment of the present invention provides an adaptive network speed matching apparatus, as shown in FIG. 2, including a test instance generation module 1, a configuration module 2, and a first judgment module 3, wherein:
  • the test instance generating module 1 is configured to select a first test instance in all test cases of the Ethernet port, where the test case includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate;
  • Ethernet There are many transmission rates for Ethernet, such as 10Mbps, 100Mbps, and 1000Mbps. Each different rate corresponds to one or more network types. For example, 10Mbps corresponds to 10base-T, 100Mbps corresponds to 100base-TX, 100base-FX, etc. 1000Mbps corresponds to 1000base-T; in practice, generally Ethernet ports support multiple rates. Therefore, there may be multiple test cases for one transmission rate. For example, there are 100Mbps 100base-TX and 100Mbps 100base-FX test cases at 100Mbps. The examples need to be tested separately.
  • a test case selected in the test case supported by the Ethernet port is tested. It may happen that the transmission rate of the test case is not equal to the current actual transmission rate of the Ethernet port or the network type is not equal to the The type of network type currently used by the Ethernet port.
  • the configuration module 2 is configured to perform communication parameter configuration on the Ethernet port according to the first test example
  • the first judging module 3 is configured to detect a state parameter of the PCS of the Ethernet port after the communication parameter configuration in the data transmission process, and compare the state parameter of the detected PCS with the corresponding theory of the first test example. The state parameters are compared. When the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, data is transmitted by using the communication parameter currently configured by the Ethernet port.
  • the PCS is in the physical layer, and the PCS is located between the RS (Reconciliation Sublayer) and the PMA (Physical Medium Attachment).
  • the PCS is responsible for mapping well-defined Ethernet MAC functions to existing code and physical layer signal system functions.
  • PCS requires different implementation methods, such as codec method, scrambling and descrambling method, synchronization detection method, error detection detection method and so on.
  • the state parameter of the PCS can be used to determine whether the transmission rate in the first test example is equal to the current actual transmission rate of the Ethernet port, and whether the network type in the first test example is equal to the current use of the Ethernet port.
  • Network Type The device has the advantages of simplicity, convenience and high accuracy.
  • the device further includes:
  • the second test module 4 is configured to select a second in all test cases of the Ethernet port when the difference between the detected state parameter of the PCS and the theoretical state parameter corresponding to the first test instance does not meet the preset condition.
  • a test example configuring communication parameters of the Ethernet port according to a transmission rate supported by the Ethernet port included in the second test instance and a network type corresponding to the transmission rate; and detecting during the data transmission process Based on the state parameter of the PCS of the Ethernet port after the communication parameter configuration of the second test example, the detected based on the second test Comparing the state parameter of the PCS of the Ethernet port after the configuration of the communication parameter with the theoretical state parameter corresponding to the second test example; when the detected communication parameter configuration based on the second test example is detected When the difference between the state parameter of the PCS of the Ethernet port and the theoretical state parameter corresponding to the second test example meets a preset condition, data is transmitted by using the communication parameter currently configured by the Ethernet port; when detected The difference between the state parameter of the PCS of the Ethernet port and the theoretical state parameter
  • the transmission rate in the first test example is not equal to the current actual transmission rate of the Ethernet port or the network type in the first test example is not equal to the Ethernet.
  • the network type currently used by the network port at this time, you need to continue testing, that is, select a test case from the transmission rate supported by the Ethernet port, test again, repeat the above test until the PCS status parameter is normal. Or all test cases are tested.
  • the first determining module 3 is further configured to: edit the PCS according to the transmission rate supported by the Ethernet port included in the first test example and the network type corresponding to the transmission rate. Decoding mode, plus descrambling mode, synchronous detection mode, error correction detection mode and bit width conversion mode for communication parameter configuration;
  • the second determining module 4 is further configured to: encode and decode the PCS according to the transmission rate supported by the Ethernet port included in the second test instance and the network type corresponding to the transmission rate, and add and de-scramble
  • the method, the synchronous detection mode, the error detection detection mode and the bit width conversion mode perform communication parameter configuration.
  • PCS In an Ethernet port, PCS requires different implementation methods when the transmission rate or network type is different. Therefore, when configuring different transmission rates or network types for Ethernet ports, you need to PCS makes adaptive adjustments.
  • the state parameter of the PCS includes: a codeword synchronization state value
  • the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, including: the codeword synchronization state value is true; otherwise, the preset condition is not met.
  • the codeword synchronization state value (block_lock) is a Boolean type. When the codeword received by the PCS from the PMA satisfies the block division, the codeword synchronization state value is true, and the meaning represented by it is the synchronization state of the received codeword.
  • Different transmission rates correspond to different synchronization detection mechanisms, mainly including: synchronous detection of 8b ⁇ 10b codec, synchronization detection of 64b ⁇ 66b codec, synchronization detection of FEC, and synchronization detection of RS-FEC; if PCS is abnormal At work, an error occurs when these synchronization mechanisms are performed, that is, the codeword synchronization status value is set to No.
  • the state parameters of the PCS include: a codeword synchronization state value, a bit error rate judgment value, a number of data decoding errors, and a number of times of incorrect reception state values;
  • the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition including: the codeword synchronization state value is true, the error rate determination value is no, and the data decoding error occurs.
  • the preset condition is met, otherwise the preset condition is not met.
  • bit error rate judgment value is a Boolean type; when the bit error rate is greater than 10 ⁇ -4, the bit error rate judgment value is set to No at this time. In this way, the bit error rate determination value can be used to determine whether the PCS is working properly.
  • PCS One of the functions of PCS is codec, for example: 8b ⁇ 10b codec, 64b ⁇ 66b codec, etc., errors will occur during this decoding process; therefore, the number of data decoding errors can be used to determine whether the PCS is working properly.
  • the PCS When the PCS receives the codeword, it uses the status value to indicate the working status of the PCS; and when the status value of the PCS is RX_E, it indicates that an error has occurred; therefore, the number of times the status value was received incorrectly It can be set to the number of times the status value of the PCS is RX_E, and the number of times the status value is incorrectly received to determine whether the PCS is working properly.
  • the first test case is selected in all the test cases of the Ethernet port
  • the second test case or other test cases are selected in all the test cases of the Ethernet port
  • the principle followed is:
  • a test case having a large transfer rate is preferably selected.
  • the rate can be negotiated between Ethernet ports.
  • the principle of negotiation takes precedence over the maximum transmission rate supported by both parties. Therefore, in order to reduce the number of tests, it is possible to give priority to a large transfer rate.
  • test instance generation module 1, the configuration module 2, the first determination module 3, and the second determination module 4 described in this embodiment may each be a central processing unit (CPU), a microprocessor (MPU, a Micro Processor). Unit), Digital Signal Processor (DSP), or Field Programmable Gate Array (FPGA).
  • CPU central processing unit
  • MPU microprocessor
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • the adaptive network speed matching apparatus includes: a processor and a memory for storing a computer program capable of running on a processor, wherein when the processor is configured to run the computer program, Perform the steps of the method described above.
  • the processor may be an integrated circuit chip with signal processing capabilities.
  • each step of the above method may be completed by an integrated logic circuit of hardware in a processor or an instruction in a form of software.
  • the above described processor may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or the like.
  • the processor may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present invention.
  • a general purpose processor can be a microprocessor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiment of the present invention may be directly implemented as a hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a storage medium, the storage medium being located in the memory, the processor reading the information in the memory, and completing the steps of the foregoing methods in combination with the hardware thereof.
  • the embodiment of the invention provides an adaptive network speed matching device, which works on an Ethernet port.
  • the device will try to use the test examples supported by the Ethernet port to configure the communication parameters of the Ethernet port, obtain several state parameters of the PCS during the process of sending data, and then use these state parameters to determine the PCS. Whether it works normally; if it works normally, it means that the communication parameters at this time conform to the Ethernet network port, otherwise it is necessary to obtain the untested test case to continue the test.
  • An embodiment of the present invention provides an apparatus for adaptive network speed matching, as shown in FIG. 3, which is composed of the following modules:
  • the bit width conversion module is configured to connect to the Serdes interface, and perform bit width conversion on the data received from the Serdes interface, and send the converted data to the dynamic PCS path module; receive the configuration of the control module, thereby implementing the Serdes interface. Conversion between the data bit width and the data bit width required by the Ethernet protocol standard to be tested, and the rate matching between the Serdes interface and the Serdes interface can be completed;
  • the dynamic PCS path module is configured to acquire the running state of the PCS (including obtaining a codeword synchronization state value, a bit error rate judgment value, a data decoding error number, and an error receiving state value number, etc.), and sending the same to the control module, and according to the ether to be tested
  • the network protocol standard is used for codec decoding, scrambling and descrambling, synchronous detection, error detection detection, etc., and the data is sent to the adaptive interface module; the specific implementation manner of the dynamic PCS path module is shown in FIG. 4;
  • the adaptive interface module is configured to generate a medium independent interface (MII/GMII/XGMII/XLGMII, etc.) according to the configuration of the control module according to the Ethernet protocol standard to be tested (for example, generating a MII interface signal standard at 100M, 1G) Generate GMII interface signal standard, generate XGMII interface standard when 25G and 40G, generate XLGMII interface standard when 100M), and be responsible for data interaction with MAC;
  • MII/GMII/XGMII/XLGMII medium independent interface
  • the control module is configured to select an Ethernet standard to be tested from all Ethernet standard protocols, configure the bit width conversion module, the dynamic PCS path module, and the adaptive interface module according to the Ethernet protocol standard to be tested, and adjust the PCS to the The implementation method specified by the Ethernet protocol standard; determining whether the PCS is working normally according to the operating state received from the dynamic PCS path module.
  • the device working process of the adaptive network speed matching method is:
  • Step 501 The control module obtains a test instance from the list.
  • Step 502 The control module configures a bit width conversion module, a dynamic PCS path module, and an adaptive interface module according to the test example; different test cases have bit width conversion, codec, scrambling and descrambling, synchronization detection, error detection, and the like. Specific settings, therefore, these modules need to be adaptively configured;
  • Step 503 After the Ethernet port is running for a period of time, the dynamic PCS path module acquires the running state of the PCS (including obtaining the codeword synchronization state value, the bit error rate judgment value, the data decoding error number, and the error receiving state value number, etc.). Send to the control module;
  • Step 504 Determine the value of the synchronization state of the received codeword, if not, then run step 506; otherwise, run step 505;
  • Step 505 Monitor whether a parameter such as a bit error rate within a certain time limit meets a preset condition (ie, determine that the bit error rate judgment value is no and the sum of the data decoding error number and the error reception state value number is less than a preset value). If not, then go to step 506; otherwise, run step 507;
  • a parameter such as a bit error rate within a certain time limit meets a preset condition (ie, determine that the bit error rate judgment value is no and the sum of the data decoding error number and the error reception state value number is less than a preset value). If not, then go to step 506; otherwise, run step 507;
  • Step 506 The control module acquires the next test instance from the list, and clears the PCS status register.
  • Step 507 The PCS maintains the Ethernet protocol and reports a rate matching result.
  • Step 508 The PCS performs data interaction with the MAC according to the media independent interface corresponding to the Ethernet protocol.
  • the list access module 1, the setting module 2, the state obtaining module 3, and the determining module 4 may be implemented by a CPU, an MPU, a DSP, an FPGA, or the like of the base station server.
  • Embodiments of the present invention also provide a computer readable storage medium, such as a memory including a computer program executable by a processor of an adaptive network speed matching device to perform the steps of the foregoing method.
  • the computer readable storage medium may be a magnetic random access memory (FRAM), a read only memory (ROM, Read Only Memory), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), EEPROM (EEPROM) (Electrically Erasable Programmable Read-Only Memory), Flash Memory, Magnetic Surface Memory, Optical Disk, or CD-ROM (Compact Disc Read-Only Memory); or may include the above memory One or any combination of various devices.
  • FRAM magnetic random access memory
  • ROM read only memory
  • PROM Programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM EEPROM
  • Flash Memory Magnetic Surface Memory, Optical Disk, or CD-ROM (Compact Disc Read-Only Memory
  • embodiments of the invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • a first test instance is selected in all the test cases of the Ethernet port, where the test instance includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate; according to the first test
  • the communication parameter is configured on the Ethernet port; during the data transmission, the state parameter of the PCS of the Ethernet port is detected, and the state parameter of the detected PCS is compared with the theoretical state of the first test instance. The parameters are compared. When the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, data is transmitted by using the communication parameter currently configured by the Ethernet port. In this way, the purpose of adaptively adjusting the current network speed is achieved.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Quality & Reliability (AREA)
  • Communication Control (AREA)

Abstract

The embodiments of the invention provide an adaptive network speed matching method comprising: selecting, from all test cases of an Ethernet port, a first test case, wherein the test cases comprise a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate; configuring, according to the first test case, a communication parameter of the Ethernet port; detecting, in a data transmission process, a state parameter of a physical coding sublayer (PCS) of the Ethernet port; comparing the detected state parameter of the PCS and a theoretical state parameter corresponding to the first test case; when a difference between the detected state parameter of the PCS and the theoretical state parameter corresponding to the first test case satisfies a preconfigured criterion, employing the communication parameter being configured for the Ethernet port to perform data transmission. The embodiments of the invention also provide an adaptive network speed matching device and a data storage medium.

Description

一种自适应网速匹配方法的方法和装置、存储介质Method and device for adaptive network speed matching method, storage medium
相关申请的交叉引用Cross-reference to related applications
本申请基于申请号为201611009929.6、申请日为2016年11月16日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。The present application is based on a Chinese patent application filed on Jan. 16, 2016, the entire disclosure of which is hereby incorporated by reference.
技术领域Technical field
本发明涉及通信网络领域,尤其涉及一种自适应网速匹配方法的方法和装置、存储介质。The present invention relates to the field of communication networks, and in particular, to a method and apparatus for adaptive network speed matching method, and a storage medium.
背景技术Background technique
依据IEEE 802.3协议标准,在不同网速下,位于物理层中的物理编码子层(PCS,Physical Coding Sublayer)具有不同的实现方法,比如:(1)100BASE-X协议规定,PCS采用4B/5B编码,通过介质无关接口(MII,Media Independent Interface)与媒体访问控制(MAC,Media Access Control)子层互联;(2)1GBASE-R协议规定,PCS采用8bB/10B编码方法,通过千兆媒体独立接口(GMII,Gigabit Medium Independent Interface)与MAC子层互联;(3)10GBASE-R协议规定,PCS采用64B/66B编码方法,通过10Gb独立于媒体的接口(XGMII,10Gigabit Media Independent Interface)与MAC子层互联。因此,PCS需要对不同的传输速率做出自适应性调整,所以在PCS中急需一种能够对当前网速做出自适应调整的方法。 According to the IEEE 802.3 protocol standard, the Physical Coding Sublayer (PCS) located in the physical layer has different implementation methods at different network speeds, such as: (1) 100BASE-X protocol, PCS 4B/5B Coding, through Media Independent Interface (MII) and media access control (MAC, Media Access Control) sub-layer interconnection; (2) 1GBASE-R protocol stipulates that PCS adopts 8bB/10B encoding method, independent through Gigabit media The interface (GMII, Gigabit Medium Independent Interface) is interconnected with the MAC sublayer. (3) The 10GBASE-R protocol stipulates that the PCS adopts the 64B/66B encoding method and passes the 10Gb independent media interface (XGMII, 10Gigabit Media Independent Interface) and the MAC sub-interface. Layer interconnection. Therefore, the PCS needs to make adaptive adjustments to different transmission rates, so there is an urgent need in the PCS for a method that can adaptively adjust the current network speed.
发明内容Summary of the invention
有鉴于此,本发明实施例期望提供一种自适应网速匹配方法的方法和装置、存储介质,能够对当前网速做出自适应调整。In view of this, the embodiments of the present invention are directed to a method and apparatus for adaptive network speed matching, and a storage medium, which can adaptively adjust the current network speed.
为达到上述目的,本发明实施例的技术方案是这样实现的:To achieve the above objective, the technical solution of the embodiment of the present invention is implemented as follows:
本发明实施例提供一种自适应网速匹配方法,所述方法包括:An embodiment of the present invention provides an adaptive network speed matching method, where the method includes:
在以太网端口的全部测试例中选用第一测试例,所述测试例包括该以太网端口所支持的传输速率以及该传输速率所对应的网络类型;The first test instance is selected in all test cases of the Ethernet port, where the test case includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate;
根据所述第一测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置;And configuring communication parameters of the Ethernet port according to a transmission rate supported by the Ethernet port included in the first test instance and a network type corresponding to the transmission rate;
检测出通信参数配置后的所述以太网端口的物理编码子层PCS的状态参数,将所检测的PCS的状态参数与所述第一测试例对应的理论状态参数进行比较,所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输。Detecting a state parameter of a physical coding sublayer PCS of the Ethernet port after the communication parameter is configured, and comparing the detected state parameter of the PCS with a theoretical state parameter corresponding to the first test example, where the detected PCS is When the difference between the state parameter and the theoretical state parameter meets a preset condition, data transmission is performed with the communication parameter currently configured by the Ethernet port.
上述方案中,所述方法还包括:In the above solution, the method further includes:
所检测的PCS的状态参数与所述第一测试例对应的理论状态参数之间的差别不符合预设条件时,在以太网端口的全部测试例中选用第二测试例;When the difference between the detected state parameter of the PCS and the theoretical state parameter corresponding to the first test example does not meet the preset condition, the second test example is selected in all test cases of the Ethernet port;
根据所述第二测试例所包含的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置;并在数据传输过程中,检测出基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数,将所检测的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数进行比较;And configuring a communication parameter of the Ethernet port according to a transmission rate supported by the Ethernet port included in the second test instance and a network type corresponding to the transmission rate; and detecting, according to the data transmission process, The state parameter of the PCS of the Ethernet port after the communication parameter configuration in the second test example, and the detected state parameter of the PCS of the Ethernet port based on the communication parameter of the second test example and the The theoretical state parameters corresponding to the two test cases are compared;
当检测出的基于所述第二测试例通信参数配置后的所述以太网端口 的PCS的状态参数与所述第二测试例对应的理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输;The detected Ethernet port based on the configuration of the communication parameter of the second test example When the difference between the state parameter of the PCS and the theoretical state parameter corresponding to the second test instance meets a preset condition, data is transmitted by using the communication parameter currently configured by the Ethernet port;
当检测出的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数之间的差别不符合预设条件时,在以太网端口的全部测试例中选用其他测试例,直至为所述以太网端口完成通信参数配置,或直至所述以太网端口的全部测试例全部被选用。When the detected difference between the state parameter of the PCS of the Ethernet port and the theoretical state parameter corresponding to the second test instance based on the communication parameter configuration of the second test example does not meet the preset condition, Other test cases are selected in all test cases of the Ethernet port until the communication parameter configuration is completed for the Ethernet port, or until all test cases of the Ethernet port are selected.
上述方案中,所述根据所述第一测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置,包括:In the above solution, the communication parameter configuration of the Ethernet port according to the transmission rate supported by the Ethernet port included in the first test instance and the network type corresponding to the transmission rate includes:
根据所述第一测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型,对PCS的编解码方式、加解扰方式,同步检测方式,纠错检测方式和位宽转换方式进行通信参数配置;According to the transmission rate supported by the Ethernet port included in the first test example and the network type corresponding to the transmission rate, the codec mode, the descrambling mode, the synchronization detection mode, the error detection mode, and the bit of the PCS Wide conversion mode for communication parameter configuration;
对应地,所述根据所述第二测试例所包含的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置,包括:Correspondingly, the communication parameter configuration of the Ethernet port according to the transmission rate supported by the Ethernet port included in the second test instance and the network type corresponding to the transmission rate includes:
根据所述第二测试例所包含的以太网端口所支持的传输速率以及该传输速率所对应的网络类型,对PCS的编解码方式、加解扰方式,同步检测方式,纠错检测方式和位宽转换方式进行通信参数配置。According to the transmission rate supported by the Ethernet port included in the second test example and the network type corresponding to the transmission rate, the codec mode, the descrambling mode, the synchronization detection mode, the error detection mode and the bit of the PCS Wide conversion mode for communication parameter configuration.
上述方案中,所述PCS的状态参数包括:码字同步状态值;In the above solution, the state parameter of the PCS includes: a codeword synchronization state value;
所述所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件,包括:所述码字同步状态值为真;否则,不符合预设条件。The difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, including: the codeword synchronization state value is true; otherwise, the preset condition is not met.
上述方案中,所述PCS的状态参数包括:码字同步状态值、误码率判断值、数据解码错误的次数和错误接收状态值的次数;In the above solution, the state parameters of the PCS include: a codeword synchronization state value, a bit error rate judgment value, a number of data decoding errors, and a number of times of the error reception state value;
所述所检测的PCS的状态参数与所述理论状态参数之间的差值符合预 设条件,包括:所述码字同步状态值为真、误码率判断值为否且所述数据解码错误的次数和错误接收状态值的次数之和小于预设值时,符合预设条件,否则不符合预设条件。The difference between the detected state parameter of the PCS and the theoretical state parameter is in accordance with the pre- The condition is as follows: when the codeword synchronization state value is true, the bit error rate judgment value is no, and the sum of the number of times of the data decoding error and the error reception state value is less than a preset value, the preset condition is met. Otherwise it does not meet the preset conditions.
上述方案中,所述在以太网端口的全部测试例中选用第一测试例和在以太网端口的全部测试例中选用第二测试例或其他测试例,所遵循的原则为:In the above solution, the first test case is selected in all the test cases of the Ethernet port, and the second test case or other test cases are selected in all the test cases of the Ethernet port, and the following principles are:
在未被选用的测试例中优选选择传输速率大的测试例。In the test case which is not selected, it is preferable to select a test case having a large transfer rate.
本发明实施例还提供一种自适应网速匹配装置,包括测试例生成模块、配置模块和第一判断模块,其中:An embodiment of the present invention further provides an adaptive network speed matching apparatus, including a test instance generating module, a configuration module, and a first determining module, where:
测试例生成模块,配置为在以太网端口的全部测试例中选用第一测试例,所述测试例包括该以太网端口所支持的传输速率以及该传输速率所对应的网络类型;The test instance generating module is configured to select a first test instance in all test cases of the Ethernet port, where the test case includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate;
配置模块,配置为根据所述第一测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置;a configuration module configured to perform communication parameter configuration on the Ethernet port according to a transmission rate supported by the Ethernet port included in the first test instance and a network type corresponding to the transmission rate;
第一判断模块,配置为在数据传输过程中,检测出通信参数配置后的所述以太网端口的PCS的状态参数,将所检测的PCS的状态参数与所述第一测试例的对应的理论状态参数进行比较,所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输。The first judging module is configured to detect a state parameter of the PCS of the Ethernet port after the communication parameter configuration in the data transmission process, and compare the state parameter of the detected PCS with the corresponding theory of the first test example The state parameters are compared. When the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, data is transmitted by using the communication parameter currently configured by the Ethernet port.
上述方案中,所述装置还包括:In the above solution, the device further includes:
第二测试模块,配置为在所检测的PCS的状态参数与所述第一测试例对应的理论状态参数之间的差别不符合预设条件时,在以太网端口的全部测试例中选用第二测试例;根据所述第二测试例所包含的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端 口进行通信参数配置;并在数据传输过程中,检测出基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数,将所检测的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数进行比较;当检测出的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输;当检测出的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数之间的差别不符合预设条件时,在以太网端口的全部测试例中选用其他测试例,直至为所述以太网端口完成通信参数配置,或直至所述以太网端口的全部测试例全部被选用。a second test module configured to select a second test in all test cases of the Ethernet port when the difference between the detected state parameter of the PCS and the theoretical state parameter corresponding to the first test instance does not meet the preset condition a test example; according to the transmission rate supported by the Ethernet port included in the second test instance and the network type corresponding to the transmission rate, the Ethernet end Performing communication parameter configuration; and detecting, during data transmission, a state parameter of the PCS based on the Ethernet port configured by the communication parameter of the second test example, and detecting the detected communication based on the second test example Comparing the state parameter of the PCS of the Ethernet port after the parameter configuration with the theoretical state parameter corresponding to the second test example; and detecting the Ethernet port after the configuration based on the communication parameter of the second test example is detected When the difference between the state parameter of the PCS and the theoretical state parameter corresponding to the second test case meets a preset condition, data transmission is performed with the communication parameter currently configured by the Ethernet port; when the detected is based on the In the second test example, when the difference between the state parameter of the PCS of the Ethernet port and the theoretical state parameter corresponding to the second test example is not in accordance with the preset condition, all test cases on the Ethernet port are used. Other test cases are selected until the communication parameter configuration is completed for the Ethernet port, or until all test cases of the Ethernet port are selected.
上述方案中,所述第一判断模块,还配置为:根据所述第一测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型,对PCS的编解码方式、加解扰方式,同步检测方式,纠错检测方式和位宽转换方式进行通信参数配置;In the foregoing solution, the first determining module is further configured to: encode and decode the PCS according to a transmission rate supported by the Ethernet port included in the first test instance and a network type corresponding to the transmission rate, Adding descrambling mode, synchronous detection mode, error correction detection mode and bit width conversion mode for communication parameter configuration;
所述第二判断模块,还配置为:根据所述第二测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型,对PCS的编解码方式、加解扰方式,同步检测方式,纠错检测方式和位宽转换方式进行通信参数配置。The second judging module is further configured to: according to the transmission rate supported by the Ethernet port included in the second test instance and the network type corresponding to the transmission rate, the codec mode and the descrambling mode of the PCS , synchronous detection mode, error detection detection mode and bit width conversion mode for communication parameter configuration.
本发明实施例又提供一种自适应网速匹配装置,包括:处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行以上所述方法的步骤。An embodiment of the present invention further provides an adaptive network speed matching apparatus, including: a processor and a memory for storing a computer program capable of running on a processor, wherein the processor is configured to execute when the computer program is executed The steps of the method described above.
本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以上所述方法的步骤。Embodiments of the present invention also provide a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the method described above.
本发明实施例提供的一种自适应网速匹配方法和装置、存储介质,在 以太网端口的全部测试例中选用第一测试例,所述测试例包括该以太网端口所支持的传输速率以及该传输速率所对应的网络类型;根据所述第一测试例对所述以太网端口进行通信参数配置;数据传输过程中,检测出所述以太网端口的PCS的状态参数,将所检测的PCS的状态参数与所述第一测试例的对应的理论状态参数进行比较,所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输。如此,实现对当前网速做出自适应调整的目的。An adaptive network speed matching method and device, and a storage medium provided by an embodiment of the present invention A first test example is selected in all the test cases of the Ethernet port, where the test case includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate; and the Ethernet is according to the first test example. The port performs communication parameter configuration; during the data transmission, the state parameter of the PCS of the Ethernet port is detected, and the detected state parameter of the PCS is compared with the corresponding theoretical state parameter of the first test example, and the detected When the difference between the state parameter of the PCS and the theoretical state parameter meets a preset condition, data transmission is performed with the communication parameter currently configured by the Ethernet port. In this way, the purpose of adaptive adjustment to the current network speed is achieved.
附图说明DRAWINGS
图1为本发明实施例提供的自适应网速匹配方法的实现流程图;FIG. 1 is a flowchart of implementing an adaptive network speed matching method according to an embodiment of the present invention;
图2为本发明实施例提供的自适应网速匹配装置的组成结构示意图;2 is a schematic structural diagram of a structure of an adaptive network speed matching apparatus according to an embodiment of the present invention;
图3为本发明实施例提供的自适应网速匹配装置的具体组成结构示意图;3 is a schematic structural diagram of a specific structure of an adaptive network speed matching apparatus according to an embodiment of the present invention;
图4为本发明实施例提供的动态PCS通路模块的具体组成结构示意图;4 is a schematic structural diagram of a specific PCS path module according to an embodiment of the present invention;
图5为本发明实施例提供的自适应网速匹配方法的装置的运行流程图。FIG. 5 is a flowchart of an operation of an apparatus for adaptive network speed matching according to an embodiment of the present invention.
具体实施方式detailed description
本发明实施例中,在以太网端口的全部测试例中选用第一测试例,所述测试例包括该以太网端口所支持的传输速率以及该传输速率所对应的网络类型;根据所述第一测试例对所述以太网端口进行通信参数配置;数据传输过程中,检测出所述以太网端口的PCS的状态参数,将所检测的PCS的状态参数与所述第一测试例的对应的理论状态参数进行比较,所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输。In the embodiment of the present invention, a first test instance is selected in all the test cases of the Ethernet port, where the test instance includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate; The test example configures communication parameters of the Ethernet port; during the data transmission process, the state parameter of the PCS of the Ethernet port is detected, and the state of the detected PCS is compared with the theory of the first test example. The state parameters are compared. When the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, data is transmitted by using the communication parameter currently configured by the Ethernet port.
下面结合实施例对本发明再作进一步详细的说明。The present invention will be further described in detail below with reference to the embodiments.
本发明实施例提供了一种自适应网速匹配方法的方法,如图1所示, 所述方法包括:The embodiment of the invention provides a method for adaptive network speed matching method, as shown in FIG. 1 . The method includes:
步骤101:在以太网端口的全部测试例中选用第一测试例,所述测试例包括该以太网端口所支持的传输速率以及该传输速率所对应的网络类型;Step 101: Select a first test instance in all test cases of the Ethernet port, where the test case includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate.
以太网的传输速率有多种,例如:10Mbps,100Mbps,1000Mbps等。每种不同的速率都会对应有一种或多种网络类型,例如,10Mbps对应有10base-T等,100Mbps对应有100base-TX、100base-FX等,1000Mbps对应有1000base-T等;在实际中,一般以太网端口都会支持多种速率,因此,一个传输速率就有可能有多个测试例,例如:传输速率100Mbps就有100Mbps 100base-TX和100Mbps 100base-FX等多种测试例,对这多种测试例需要分别进行测试。There are many transmission rates for Ethernet, such as 10Mbps, 100Mbps, and 1000Mbps. Each different rate corresponds to one or more network types. For example, 10Mbps corresponds to 10base-T, 100Mbps corresponds to 100base-TX, 100base-FX, etc. 1000Mbps corresponds to 1000base-T; in practice, generally Ethernet ports support multiple rates. Therefore, there may be multiple test cases for one transmission rate. For example, there are 100Mbps 100base-TX and 100Mbps 100base-FX test cases at 100Mbps. The examples need to be tested separately.
在该步骤中,是对该以太网端口所支持的测试例中选用一个测试例进行测试,就有可能出现测试例的传输速率不等于该以太网端口当前的实际传输速率或网络类型不等于该以太网端口当前所使用的网络类型的情况。In this step, a test case selected in the test case supported by the Ethernet port is tested. It may be that the transmission rate of the test case is not equal to the current actual transmission rate of the Ethernet port or the network type is not equal to the The type of network type currently used by the Ethernet port.
步骤102:根据所述第一测试例对所述以太网端口进行通信参数配置;Step 102: Perform communication parameter configuration on the Ethernet port according to the first test example.
获取第一测试例对应的传输速率和网络类型,获取以太网协议中有关该传输速率和网络类型的通信参数,从而对该以太网端口进行通信参数配置,以使得该以太网端口以第一测试例对应的传输速率和网络类型进行数据传输。Obtaining a transmission rate and a network type corresponding to the first test instance, obtaining communication parameters related to the transmission rate and the network type in the Ethernet protocol, thereby configuring communication parameters of the Ethernet port, so that the Ethernet port is tested by the first test For example, the corresponding transmission rate and network type are used for data transmission.
在该步骤中,在完成对所述以太网端口进行通信参数配置之后,需要将PCS的状态寄存器给清空置零。In this step, after the communication parameter configuration of the Ethernet port is completed, the status register of the PCS needs to be cleared to zero.
步骤103:数据传输过程中,检测出通信参数配置后的所述以太网端口的PCS的状态参数,将所检测的PCS的状态参数与所述第一测试例的对应的理论状态参数进行比较,所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输。 Step 103: In the data transmission process, detecting a state parameter of the PCS of the Ethernet port after the communication parameter is configured, and comparing the detected state parameter of the PCS with a corresponding theoretical state parameter of the first test example, When the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, data transmission is performed by using the communication parameter currently configured by the Ethernet port.
PCS处于物理层,PCS位于RS(Reconciliation Sublayer,协调子层)和PMA(Physical Medium Attachment物理媒体接入子层)之间。PCS负责将经过完善定义的以太网MAC功能映射到现存的编码和物理层信号系统的功能上去。针对不同的传输速率和网络类型,PCS需要不同的实现方法,例如:编解码方法、加扰解扰方法,同步检测方法,纠错检测方法等等。当第一测试例对应的传输速率不等于该以太网端口当前传输数据过程中实际的传输速率或网络类型不等于该以太网端口当前所使用的网络类型的情况时,PCS的状态参数会出现一些异常;因此,可以利用PCS的状态参数来判断第一测试例中的传输速率是否等于该以太网端口当前的实际传输速率、第一测试例中的网络类型是否等于该以太网端口当前所使用的网络类型。这种方法具有简单、方便准确率高的优点。The PCS is in the physical layer, and the PCS is located between the RS (Reconciliation Sublayer) and the PMA (Physical Medium Attachment). The PCS is responsible for mapping well-defined Ethernet MAC functions to existing code and physical layer signal system functions. For different transmission rates and network types, PCS requires different implementation methods, such as codec method, scrambling and descrambling method, synchronization detection method, error detection detection method and so on. When the transmission rate corresponding to the first test instance is not equal to the actual transmission rate during the current data transmission of the Ethernet port or the network type is not equal to the network type currently used by the Ethernet port, the status parameter of the PCS may appear. Abnormal; therefore, the state parameter of the PCS can be used to determine whether the transmission rate in the first test example is equal to the current actual transmission rate of the Ethernet port, and whether the network type in the first test example is equal to the current use of the Ethernet port. Network Type. This method has the advantages of simplicity, convenience and high accuracy.
本发明实施例中,所述自适应网速匹配方法还包括:所检测的PCS的状态参数与所述理论状态参数之间的差别不符合预设条件时,在以太网端口的全部测试例中选用第二测试例;根据所述第二测试例所包含的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置;并在数据传输过程中,检测出基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数,将检测出的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例的对应的理论状态参数进行比较;In the embodiment of the present invention, the adaptive network speed matching method further includes: when all the difference between the detected state parameter of the PCS and the theoretical state parameter does not meet the preset condition, in all test cases of the Ethernet port Selecting a second test example; configuring communication parameters of the Ethernet port according to a transmission rate supported by the Ethernet port included in the second test instance and a network type corresponding to the transmission rate; and during data transmission And detecting, according to the state parameter of the PCS of the Ethernet port after the communication parameter configuration of the second test example, detecting the PCS of the Ethernet port that is configured based on the communication parameter of the second test example The state parameter is compared with a corresponding theoretical state parameter of the second test case;
当所检测的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输;When the detected difference between the state parameter of the PCS of the Ethernet port based on the communication parameter configuration of the second test instance and the theoretical state parameter meets a preset condition, the current configuration of the Ethernet port is configured. Communication parameters for data transmission;
当所检测的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述理论状态参数之间的差别不符合预设条件时,在以太网端口的全部测试例中选用其他测试例,直至为所述以太网端口完成通 信参数配置,或所述以太网端口的全部测试例全部被选用。When the detected difference between the state parameter of the PCS of the Ethernet port and the theoretical state parameter based on the communication parameter configuration of the second test example does not meet the preset condition, all test cases on the Ethernet port Use other test cases until the completion of the Ethernet port The parameter configuration, or all test cases of the Ethernet port are all selected.
这里,当所检测的PCS的状态参数出现异常时,就可以判断出,第一测试例中的传输速率不等于该以太网端口当前的实际传输速率或第一测试例中的网络类型不等于该以太网端口当前所使用的网络类型;此时,还需要继续进行测试,即从以太网端口所支持的传输速率再选择出一个测试例,再次进行测试,重复以上测试,直至PCS的状态参数正常或所有的测试例都测试完毕。Here, when the detected status parameter of the PCS is abnormal, it can be determined that the transmission rate in the first test example is not equal to the current actual transmission rate of the Ethernet port or the network type in the first test example is not equal to the Ethernet. The network type currently used by the network port; in this case, you need to continue the test, that is, select a test case from the transmission rate supported by the Ethernet port, test again, repeat the above test until the PCS status parameter is normal or All test cases were tested.
本发明实施例中,所述根据所述第一测试例对所述以太网端口进行通信参数配置,包括:根据所述第一测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型,对PCS的编解码方式、加解扰方式,同步检测方式,纠错检测方式和位宽转换方式进行通信参数配置;In the embodiment of the present invention, the communication parameter configuration of the Ethernet port according to the first test example includes: a transmission rate supported by an Ethernet port included in the first test example, and a transmission rate. Corresponding network type, the PCS codec mode, the descrambling mode, the synchronous detection mode, the error correction detection mode and the bit width conversion mode are configured for communication parameters;
所述根据所述第二测试例对所述以太网端口进行通信参数配置,包括:根据所述第二测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型,对PCS的编解码方式、加解扰方式,同步检测方式,纠错检测方式和位宽转换方式进行通信参数配置。The configuration of the communication parameter of the Ethernet port according to the second test example includes: according to the transmission rate supported by the Ethernet port included in the second test example, and the network type corresponding to the transmission rate, The communication parameters are configured for the codec mode, the descrambling mode, the synchronous detection mode, the error correction detection mode, and the bit width conversion mode of the PCS.
在以太网端口中,当传输速率或网络类型不同时,PCS需要不同的实现方法;因此,当对以太网端口配置不同传输速率或网络类型时,需要对PCS作出自适应性调整。In an Ethernet port, when the transmission rate or network type is different, the PCS needs different implementation methods; therefore, when configuring different transmission rates or network types for the Ethernet port, it is necessary to make an adaptive adjustment to the PCS.
本发明实施例中,所述PCS的状态参数包括:码字同步状态值;In the embodiment of the present invention, the state parameter of the PCS includes: a codeword synchronization state value;
所述所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件,包括:所述码字同步状态值为真;否则,不符合预设条件。The difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, including: the codeword synchronization state value is true; otherwise, the preset condition is not met.
码字同步状态值(block_lock)为布尔类型,当PCS从PMA所接收的码字满足区块划分时,码字同步状态值为真,其所代表的含义是接收码字的同步状态。不同的传输速率对应着不同的同步检测机制,主要有:8b\10b编解码的同步检测,64b\66b编解码的同步检测,FEC的同步检测以及 RS-FEC的同步检测等;如果PCS不正常工作,在进行这些同步机制时会发生错误,即码字同步状态值会被设为否。The codeword synchronization state value (block_lock) is a Boolean type. When the codeword received by the PCS from the PMA satisfies the block division, the codeword synchronization state value is true, and the meaning represented by it is the synchronization state of the received codeword. Different transmission rates correspond to different synchronization detection mechanisms, mainly including: synchronous detection of 8b\10b codec, synchronous detection of 64b\66b codec, synchronous detection of FEC and RS-FEC synchronization detection, etc.; if the PCS is not working properly, an error occurs when these synchronization mechanisms are performed, that is, the codeword synchronization status value is set to No.
本发明实施例中,所述PCS的状态参数包括:码字同步状态值、误码率判断值、数据解码错误的次数和错误接收状态值的次数;In the embodiment of the present invention, the state parameters of the PCS include: a codeword synchronization state value, a bit error rate judgment value, a number of data decoding errors, and a number of times of incorrect reception state values;
所述所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件,包括:所述码字同步状态值为真、误码率判断值为否且所述数据解码错误的次数和错误接收状态值的次数之和小于预设值时,符合预设条件,否则不符合预设条件。The difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, including: the codeword synchronization state value is true, the error rate determination value is no, and the data decoding error occurs. When the sum of the number of times and the number of times of receiving the status value is less than the preset value, the preset condition is met, otherwise the preset condition is not met.
这里,误码率判断值为布尔类型;当比特错误率大于10^-4时,此时误码率判断值被设为否。以此,可以利用误码率判断值来判断PCS是否工作正常。Here, the bit error rate judgment value is a Boolean type; when the bit error rate is greater than 10^-4, the bit error rate judgment value is set to No at this time. In this way, the bit error rate determination value can be used to determine whether the PCS is working properly.
PCS的一项功能就是编解码,例如:8b\10b编解码,64b\66b编解码等,在这个解码的过程中会出现错误;因此可以利用数据解码错误次数来判断PCS是否工作正常。One of the functions of PCS is codec, for example: 8b\10b codec, 64b\66b codec, etc., errors will occur during this decoding process; therefore, the number of data decoding errors can be used to determine whether the PCS is working properly.
在PCS接收码字时,会使用状态值来表示PCS的工作状态;且PCS的状态值为RX_E时,就代表发生了错误;因此,错误接收状态值的次数可以设置为PCS的状态值为RX_E的次数,错误接收状态值的次数来判断PCS是否工作正常。When the PCS receives the codeword, the status value is used to indicate the working state of the PCS; and when the state value of the PCS is RX_E, it indicates that an error has occurred; therefore, the number of times the error receiving state value can be set to the state value of the PCS RX_E The number of times, the number of times the status value is incorrectly received to determine whether the PCS is working properly.
本发明实施例中,所述在以太网端口的全部测试例中选用第一测试例和在以太网端口的全部测试例中选用第二测试例或其他测试例,所遵循的原则为:在未被选用的测试例中优选选择传输速率大的测试例。In the embodiment of the present invention, the first test case is selected in all the test cases of the Ethernet port, and the second test case or other test cases are selected in all the test cases of the Ethernet port, and the principle followed is: Among the selected test examples, a test case having a large transfer rate is preferably selected.
以太网端口之间可以协商速率,协商的原则优先使用双方都支持的最大传输速率。因此,为了降低测试的次数,可以优先尝试值大的传输速率。The rate can be negotiated between Ethernet ports. The principle of negotiation takes precedence over the maximum transmission rate supported by both parties. Therefore, in order to reduce the number of tests, it is possible to give priority to a large transfer rate.
本发明实施例提供了一种自适应网速匹配方法,在以太网端口的工作过程中,该方法会尝试着利用该以太网端口支持的测试例来对以太网端口 进行通信参数配置,在发送数据的过程中,获取PCS的几个状态参数,然后利用这些状态参数来判断PCS是否正常工作;如果工作正常,则表示此时的通信参数符合该以太网网端口,否则还需要获取未测试的测试例继续进行测试。The embodiment of the invention provides an adaptive network speed matching method. During the working process of the Ethernet port, the method attempts to use the test example supported by the Ethernet port to connect to the Ethernet port. The communication parameter configuration is performed. During the process of transmitting data, several state parameters of the PCS are obtained, and then the state parameters are used to determine whether the PCS is working normally; if the operation is normal, it indicates that the communication parameter at this time conforms to the Ethernet network port. Otherwise, you need to obtain untested test cases to continue testing.
本发明实施例提供了一种自适应网速匹配装置,如图2所示,包括测试例生成模块1、配置模块2和第一判断模块3,其中:An embodiment of the present invention provides an adaptive network speed matching apparatus, as shown in FIG. 2, including a test instance generation module 1, a configuration module 2, and a first judgment module 3, wherein:
测试例生成模块1,配置为在以太网端口的全部测试例中选用第一测试例,所述测试例包括该以太网端口所支持的传输速率以及该传输速率所对应的网络类型;The test instance generating module 1 is configured to select a first test instance in all test cases of the Ethernet port, where the test case includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate;
以太网的传输速率有多种,例如:10Mbps,100Mbps,1000Mbps等。每种不同的速率都会对应有一种或多种网络类型,例如,10Mbps对应有10base-T等,100Mbps对应有100base-TX、100base-FX等,1000Mbps对应有1000base-T等;在实际中,一般以太网端口都会支持多种速率,因此,一个传输速率就有可能有多个测试例,例如:传输速率100Mbps就有100Mbps 100base-TX和100Mbps 100base-FX等多种测试例,对这多种测试例需要分别进行测试。There are many transmission rates for Ethernet, such as 10Mbps, 100Mbps, and 1000Mbps. Each different rate corresponds to one or more network types. For example, 10Mbps corresponds to 10base-T, 100Mbps corresponds to 100base-TX, 100base-FX, etc. 1000Mbps corresponds to 1000base-T; in practice, generally Ethernet ports support multiple rates. Therefore, there may be multiple test cases for one transmission rate. For example, there are 100Mbps 100base-TX and 100Mbps 100base-FX test cases at 100Mbps. The examples need to be tested separately.
在该模块中,是对该以太网端口所支持的测试例中选用一个测试例进行测试,就有可能出现测试例的传输速率不等于该以太网端口当前的实际传输速率或网络类型不等于该以太网端口当前所使用的网络类型的情况。In this module, a test case selected in the test case supported by the Ethernet port is tested. It may happen that the transmission rate of the test case is not equal to the current actual transmission rate of the Ethernet port or the network type is not equal to the The type of network type currently used by the Ethernet port.
配置模块2,配置为根据所述第一测试例对所述以太网端口进行通信参数配置;The configuration module 2 is configured to perform communication parameter configuration on the Ethernet port according to the first test example;
获取第一测试例对应的传输速率和网络类型,获取以太网协议中有关该传输速率和网络类型的通信参数,从而对该以太网端口进行通信参数配置,以使得该以太网端口以第一测试例对应的传输速率和网络类型进行数据传输。 Obtaining a transmission rate and a network type corresponding to the first test instance, obtaining communication parameters related to the transmission rate and the network type in the Ethernet protocol, thereby configuring communication parameters of the Ethernet port, so that the Ethernet port is tested by the first test For example, the corresponding transmission rate and network type are used for data transmission.
在该模块中,在完成对所述以太网端口进行通信参数配置之后,需要将PCS的状态寄存器给清空置零。In this module, after the communication parameter configuration of the Ethernet port is completed, the status register of the PCS needs to be cleared to zero.
第一判断模块3,配置为在数据传输过程中,检测出通信参数配置后所述以太网端口的PCS的状态参数,将所检测的PCS的状态参数与所述第一测试例的对应的理论状态参数进行比较,所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输。The first judging module 3 is configured to detect a state parameter of the PCS of the Ethernet port after the communication parameter configuration in the data transmission process, and compare the state parameter of the detected PCS with the corresponding theory of the first test example. The state parameters are compared. When the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, data is transmitted by using the communication parameter currently configured by the Ethernet port.
PCS处于物理层,PCS位于RS(Reconciliation Sublayer,协调子层)和PMA(Physical Medium Attachment物理媒体接入子层)之间。PCS负责将经过完善定义的以太网MAC功能映射到现存的编码和物理层信号系统的功能上去。针对不同的传输速率和网络类型,PCS需要不同的实现方法,例如:编解码方法、加扰解扰方法,同步检测方法,纠错检测方法等等。当第一测试例对应的传输速率不等于该以太网端口当前传输数据过程中实际的传输速率或网络类型不等于该以太网端口当前所使用的网络类型的情况时,PCS的状态参数会出现一些异常;因此,可以利用PCS的状态参数来判断第一测试例中的传输速率是否等于该以太网端口当前的实际传输速率、第一测试例中的网络类型是否等于该以太网端口当前所使用的网络类型。装置具有简单、方便准确率高的优点。The PCS is in the physical layer, and the PCS is located between the RS (Reconciliation Sublayer) and the PMA (Physical Medium Attachment). The PCS is responsible for mapping well-defined Ethernet MAC functions to existing code and physical layer signal system functions. For different transmission rates and network types, PCS requires different implementation methods, such as codec method, scrambling and descrambling method, synchronization detection method, error detection detection method and so on. When the transmission rate corresponding to the first test instance is not equal to the actual transmission rate during the current data transmission of the Ethernet port or the network type is not equal to the network type currently used by the Ethernet port, the status parameter of the PCS may appear. Abnormal; therefore, the state parameter of the PCS can be used to determine whether the transmission rate in the first test example is equal to the current actual transmission rate of the Ethernet port, and whether the network type in the first test example is equal to the current use of the Ethernet port. Network Type. The device has the advantages of simplicity, convenience and high accuracy.
本发明实施例中,所述装置还包括:In the embodiment of the present invention, the device further includes:
第二测试模块4,配置为所检测的PCS的状态参数与所述第一测试例对应的理论状态参数之间的差别不符合预设条件时,在以太网端口的全部测试例中选用第二测试例;根据所述第二测试例所包含的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置;并在数据传输过程中,检测出基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数,将所检测的基于所述第二测 试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数进行比较;当检测出的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输;当检测出的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数之间的差别不符合预设条件时,在以太网端口的全部测试例中选用其他测试例,直至为所述以太网端口完成通信参数配置,或直至所述以太网端口的全部测试例全部被选用。The second test module 4 is configured to select a second in all test cases of the Ethernet port when the difference between the detected state parameter of the PCS and the theoretical state parameter corresponding to the first test instance does not meet the preset condition. a test example; configuring communication parameters of the Ethernet port according to a transmission rate supported by the Ethernet port included in the second test instance and a network type corresponding to the transmission rate; and detecting during the data transmission process Based on the state parameter of the PCS of the Ethernet port after the communication parameter configuration of the second test example, the detected based on the second test Comparing the state parameter of the PCS of the Ethernet port after the configuration of the communication parameter with the theoretical state parameter corresponding to the second test example; when the detected communication parameter configuration based on the second test example is detected When the difference between the state parameter of the PCS of the Ethernet port and the theoretical state parameter corresponding to the second test example meets a preset condition, data is transmitted by using the communication parameter currently configured by the Ethernet port; when detected The difference between the state parameter of the PCS of the Ethernet port and the theoretical state parameter corresponding to the second test instance after the communication parameter configuration of the second test example does not meet the preset condition, at the Ethernet port Other test cases are selected in all test cases until the communication parameters are configured for the Ethernet port, or until all test cases of the Ethernet port are selected.
这里,当所检测的PCS的状态参数出现异常时,就可以判断出,第一测试例中的传输速率不等于该以太网端口当前的实际传输速率或第一测试例中的网络类型不等于该以太网端口当前所使用的网络类型;则此时,还需要继续进行测试,即从以太网端口所支持的传输速率再选择出一个测试例,再次进行测试,重复以上测试,直至PCS的状态参数正常或所有的测试例都测试完毕。Here, when the detected status parameter of the PCS is abnormal, it can be determined that the transmission rate in the first test example is not equal to the current actual transmission rate of the Ethernet port or the network type in the first test example is not equal to the Ethernet. The network type currently used by the network port; at this time, you need to continue testing, that is, select a test case from the transmission rate supported by the Ethernet port, test again, repeat the above test until the PCS status parameter is normal. Or all test cases are tested.
本发明实施例中,所述第一判断模块3,还配置为:根据所述第一测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型,对PCS的编解码方式、加解扰方式,同步检测方式,纠错检测方式和位宽转换方式进行通信参数配置;In the embodiment of the present invention, the first determining module 3 is further configured to: edit the PCS according to the transmission rate supported by the Ethernet port included in the first test example and the network type corresponding to the transmission rate. Decoding mode, plus descrambling mode, synchronous detection mode, error correction detection mode and bit width conversion mode for communication parameter configuration;
所述第二判断模块4,还配置为:根据所述第二测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型,对PCS的编解码方式、加解扰方式,同步检测方式,纠错检测方式和位宽转换方式进行通信参数配置。The second determining module 4 is further configured to: encode and decode the PCS according to the transmission rate supported by the Ethernet port included in the second test instance and the network type corresponding to the transmission rate, and add and de-scramble The method, the synchronous detection mode, the error detection detection mode and the bit width conversion mode perform communication parameter configuration.
在以太网端口中,当传输速率或网络类型不同时,PCS需要不同的实现方法;因此,当对以太网端口配置不同传输速率或网络类型时,需要对 PCS作出自适应性调整。In an Ethernet port, PCS requires different implementation methods when the transmission rate or network type is different. Therefore, when configuring different transmission rates or network types for Ethernet ports, you need to PCS makes adaptive adjustments.
本发明实施例中,所述PCS的状态参数包括:码字同步状态值;In the embodiment of the present invention, the state parameter of the PCS includes: a codeword synchronization state value;
对应地,所述所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件,包括:所述码字同步状态值为真;否则,不符合预设条件。Correspondingly, the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, including: the codeword synchronization state value is true; otherwise, the preset condition is not met.
码字同步状态值(block_lock)为布尔类型,当PCS从PMA所接收的码字满足区块划分时,码字同步状态值为真,其所代表的含义是接收码字的同步状态。不同的传输速率对应着不同的同步检测机制,主要有:8b\10b编解码的同步检测,64b\66b编解码的同步检测,FEC的同步检测以及RS-FEC的同步检测等;如果PCS不正常工作,在进行这些同步机制时会发生错误,即码字同步状态值会被设为否。The codeword synchronization state value (block_lock) is a Boolean type. When the codeword received by the PCS from the PMA satisfies the block division, the codeword synchronization state value is true, and the meaning represented by it is the synchronization state of the received codeword. Different transmission rates correspond to different synchronization detection mechanisms, mainly including: synchronous detection of 8b\10b codec, synchronization detection of 64b\66b codec, synchronization detection of FEC, and synchronization detection of RS-FEC; if PCS is abnormal At work, an error occurs when these synchronization mechanisms are performed, that is, the codeword synchronization status value is set to No.
本发明实施例中,所述PCS的状态参数包括:码字同步状态值、误码率判断值、数据解码错误的次数和错误接收状态值的次数;In the embodiment of the present invention, the state parameters of the PCS include: a codeword synchronization state value, a bit error rate judgment value, a number of data decoding errors, and a number of times of incorrect reception state values;
所述所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件,包括:所述码字同步状态值为真、误码率判断值为否且所述数据解码错误的次数和错误接收状态值的次数之和小于预设值时,符合预设条件,否则不符合预设条件。The difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, including: the codeword synchronization state value is true, the error rate determination value is no, and the data decoding error occurs. When the sum of the number of times and the number of times of receiving the status value is less than the preset value, the preset condition is met, otherwise the preset condition is not met.
这里,误码率判断值为布尔类型;当比特错误率大于10^-4时,此时误码率判断值被设为否。以此,可以利用误码率判断值来判断PCS是否工作正常。Here, the bit error rate judgment value is a Boolean type; when the bit error rate is greater than 10^-4, the bit error rate judgment value is set to No at this time. In this way, the bit error rate determination value can be used to determine whether the PCS is working properly.
PCS的一项功能就是编解码,例如:8b\10b编解码,64b\66b编解码等,在这个解码的过程中会出现错误;因此可以利用数据解码错误次数来判断PCS是否工作正常。One of the functions of PCS is codec, for example: 8b\10b codec, 64b\66b codec, etc., errors will occur during this decoding process; therefore, the number of data decoding errors can be used to determine whether the PCS is working properly.
在PCS接收码字时,会使用状态值来表示PCS的工作状态;且PCS的状态值为RX_E时,就代表发生了错误;因此,错误接收状态值的次数 可以设置为PCS的状态值为RX_E的次数,错误接收状态值的次数来判断PCS是否工作正常。When the PCS receives the codeword, it uses the status value to indicate the working status of the PCS; and when the status value of the PCS is RX_E, it indicates that an error has occurred; therefore, the number of times the status value was received incorrectly It can be set to the number of times the status value of the PCS is RX_E, and the number of times the status value is incorrectly received to determine whether the PCS is working properly.
本发明实施例中,所述在以太网端口的全部测试例中选用第一测试例和在以太网端口的全部测试例中选用第二测试例或其他测试例,所遵循的原则为:在未被选用的测试例中优选选择传输速率大的测试例。In the embodiment of the present invention, the first test case is selected in all the test cases of the Ethernet port, and the second test case or other test cases are selected in all the test cases of the Ethernet port, and the principle followed is: Among the selected test examples, a test case having a large transfer rate is preferably selected.
以太网端口之间可以协商速率,协商的原则优先使用双方都支持的最大传输速率。因此,为了降低测试的次数,可以优先尝试值大的传输速率。The rate can be negotiated between Ethernet ports. The principle of negotiation takes precedence over the maximum transmission rate supported by both parties. Therefore, in order to reduce the number of tests, it is possible to give priority to a large transfer rate.
这里,本实施例所述的测试例生成模块1、配置模块2、第一判断模块3和第二判断模块4均可由中央处理器(CPU,Central Processing Unit)、微处理器(MPU,Micro Processor Unit)、数字信号处理器(DSP,Digital Signal Processor)、或现场可编程门阵列(FPGA,Field Programmable Gate Array)等实现。Here, the test instance generation module 1, the configuration module 2, the first determination module 3, and the second determination module 4 described in this embodiment may each be a central processing unit (CPU), a microprocessor (MPU, a Micro Processor). Unit), Digital Signal Processor (DSP), or Field Programmable Gate Array (FPGA).
在一具体实施例中,所述自适应网速匹配装置,包括:处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行以上所述方法的步骤。这里,所述处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本发明实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成前述方法的步骤。In a specific embodiment, the adaptive network speed matching apparatus includes: a processor and a memory for storing a computer program capable of running on a processor, wherein when the processor is configured to run the computer program, Perform the steps of the method described above. Here, the processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in a processor or an instruction in a form of software. The above described processor may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or the like. The processor may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present invention. A general purpose processor can be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiment of the present invention may be directly implemented as a hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, the storage medium being located in the memory, the processor reading the information in the memory, and completing the steps of the foregoing methods in combination with the hardware thereof.
本发明实施例提供了一种自适应网速匹配装置,在以太网端口的工作 过程中,该装置会尝试着利用该以太网端口支持的测试例来对以太网端口进行通信参数配置,在发送数据的过程中,获取PCS的几个状态参数,然后利用这些状态参数来判断PCS是否正常工作;如果工作正常,则表示此时的通信参数符合该以太网网端口,否则还需要获取未测试的测试例继续进行测试。The embodiment of the invention provides an adaptive network speed matching device, which works on an Ethernet port. In the process, the device will try to use the test examples supported by the Ethernet port to configure the communication parameters of the Ethernet port, obtain several state parameters of the PCS during the process of sending data, and then use these state parameters to determine the PCS. Whether it works normally; if it works normally, it means that the communication parameters at this time conform to the Ethernet network port, otherwise it is necessary to obtain the untested test case to continue the test.
本发明实施例提供了一种自适应网速匹配方法的装置,如图3所示,其由以下模块组成:An embodiment of the present invention provides an apparatus for adaptive network speed matching, as shown in FIG. 3, which is composed of the following modules:
位宽转换模块,配置为连接Serdes接口,并将从Serdes接口接收到的数据进行位宽转换,并将转换完的数据发送给动态PCS通路模块;接收控制模块的配置,从而实现了Serdes接口的数据位宽与待测试以太网协议标准所需的数据位宽之间的转换,且可以完成与Serdes接口之间的速率匹配;The bit width conversion module is configured to connect to the Serdes interface, and perform bit width conversion on the data received from the Serdes interface, and send the converted data to the dynamic PCS path module; receive the configuration of the control module, thereby implementing the Serdes interface. Conversion between the data bit width and the data bit width required by the Ethernet protocol standard to be tested, and the rate matching between the Serdes interface and the Serdes interface can be completed;
动态PCS通路模块,配置为获取PCS的运行状态并(包括获取码字同步状态值、误码率判断值、数据解码错误次数和错误接收状态值次数等)发送给控制模块,且按照待测试以太网协议标准来进行编解码、加扰解扰,同步检测,纠错检测等,并将数据发送自适应接口模块;动态PCS通路模块的具体实现方式如图4所示;The dynamic PCS path module is configured to acquire the running state of the PCS (including obtaining a codeword synchronization state value, a bit error rate judgment value, a data decoding error number, and an error receiving state value number, etc.), and sending the same to the control module, and according to the ether to be tested The network protocol standard is used for codec decoding, scrambling and descrambling, synchronous detection, error detection detection, etc., and the data is sent to the adaptive interface module; the specific implementation manner of the dynamic PCS path module is shown in FIG. 4;
自适应接口模块,配置为依据控制模块的配置,根据待测试以太网协议标准来生成介质独立接口(MII/GMII/XGMII/XLGMII等)信号(比如,在100M时生成MII接口信号标准,1G时生成GMII接口信号标准,25G及40G时生成XGMII接口标准,100M时生成XLGMII接口标准),并负责与MAC的数据交互;The adaptive interface module is configured to generate a medium independent interface (MII/GMII/XGMII/XLGMII, etc.) according to the configuration of the control module according to the Ethernet protocol standard to be tested (for example, generating a MII interface signal standard at 100M, 1G) Generate GMII interface signal standard, generate XGMII interface standard when 25G and 40G, generate XLGMII interface standard when 100M), and be responsible for data interaction with MAC;
控制模块,配置为从所有以太网标准协议中选择出待测试以太网标准,根据待测试以太网协议标准对位宽转换模块、动态PCS通路模块和自适应接口模块进行配置,将PCS调整至所述以太网协议标准规定的实现方法;根据从动态PCS通路模块所接收到的运行状态来判断PCS是否正常工作。 The control module is configured to select an Ethernet standard to be tested from all Ethernet standard protocols, configure the bit width conversion module, the dynamic PCS path module, and the adaptive interface module according to the Ethernet protocol standard to be tested, and adjust the PCS to the The implementation method specified by the Ethernet protocol standard; determining whether the PCS is working normally according to the operating state received from the dynamic PCS path module.
如图5所示,该自适应网速匹配方法的装置工作过程为:As shown in FIG. 5, the device working process of the adaptive network speed matching method is:
步骤501:控制模块从列表中获取测试例;Step 501: The control module obtains a test instance from the list.
步骤502:控制模块依据测试例配置位宽转换模块、动态PCS通路模块和自适应接口模块;不同的测试例对于位宽转换、编解码、加扰解扰,同步检测,纠错检测等都有特定的设置,因此,需要对这些模块进行自适应性配置;Step 502: The control module configures a bit width conversion module, a dynamic PCS path module, and an adaptive interface module according to the test example; different test cases have bit width conversion, codec, scrambling and descrambling, synchronization detection, error detection, and the like. Specific settings, therefore, these modules need to be adaptively configured;
步骤503:以太网端口在运行一段时间后,动态PCS通路模块会获取PCS的运行状态(包括获取码字同步状态值、误码率判断值、数据解码错误次数和错误接收状态值次数等)并发送给控制模块;Step 503: After the Ethernet port is running for a period of time, the dynamic PCS path module acquires the running state of the PCS (including obtaining the codeword synchronization state value, the bit error rate judgment value, the data decoding error number, and the error receiving state value number, etc.). Send to the control module;
步骤504:判断接收码字的同步状态的值,如果为否,则运行步骤506;否则运行步骤505;Step 504: Determine the value of the synchronization state of the received codeword, if not, then run step 506; otherwise, run step 505;
步骤505:监测一定时限内误码率等参数是否符合预设条件(即判断误码率判断值为否且所述数据解码错误次数与所述错误接收状态值次数之和小于预设值)?如果为否,则运行步骤506;否则运行步骤507;Step 505: Monitor whether a parameter such as a bit error rate within a certain time limit meets a preset condition (ie, determine that the bit error rate judgment value is no and the sum of the data decoding error number and the error reception state value number is less than a preset value). If not, then go to step 506; otherwise, run step 507;
步骤506:控制模块获取从列表中获取下一个测试例,并将PCS状态寄存器清零;Step 506: The control module acquires the next test instance from the list, and clears the PCS status register.
步骤507:PCS维持该以太网协议,并上报速率匹配结果;Step 507: The PCS maintains the Ethernet protocol and reports a rate matching result.
步骤508:PCS根据该以太网协议多对应的介质无关接口与MAC进行数据交互。Step 508: The PCS performs data interaction with the MAC according to the media independent interface corresponding to the Ethernet protocol.
在实际应用中,所述列表访问模块1、设置模块2、状态获取模块3和判断模块4可以由基站服务器的CPU、MPU、DSP、FPGA等实现。In practical applications, the list access module 1, the setting module 2, the state obtaining module 3, and the determining module 4 may be implemented by a CPU, an MPU, a DSP, an FPGA, or the like of the base station server.
本发明的实施例还提供了一种计算机可读存储介质,例如包括计算机程序的存储器,上述计算机程序可由自适应网速匹配装置的处理器执行,以完成前述方法所述步骤。计算机可读存储介质可以是磁性随机存取存储器(FRAM,ferromagnetic random access memory)、只读存储器(ROM, Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory)等存储器;也可以是包括上述存储器之一或任意组合的各种设备。Embodiments of the present invention also provide a computer readable storage medium, such as a memory including a computer program executable by a processor of an adaptive network speed matching device to perform the steps of the foregoing method. The computer readable storage medium may be a magnetic random access memory (FRAM), a read only memory (ROM, Read Only Memory), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), EEPROM (EEPROM) (Electrically Erasable Programmable Read-Only Memory), Flash Memory, Magnetic Surface Memory, Optical Disk, or CD-ROM (Compact Disc Read-Only Memory); or may include the above memory One or any combination of various devices.
本领域内的技术人员应明白,本发明的实施例可提供为方法、装置、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(装置)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of a method, apparatus, apparatus, and computer program product according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机 实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on the computer or other programmable device to produce the computer The implemented processing, such as instructions executed on a computer or other programmable device, provides steps for implementing the functions specified in one or more blocks of the flowchart or in a block or blocks of the flowchart.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.
工业实用性Industrial applicability
本发明实施例通过在以太网端口的全部测试例中选用第一测试例,所述测试例包括该以太网端口所支持的传输速率以及该传输速率所对应的网络类型;根据所述第一测试例对所述以太网端口进行通信参数配置;数据传输过程中,检测出所述以太网端口的PCS的状态参数,将所检测的PCS的状态参数与所述第一测试例的对应的理论状态参数进行比较,所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输。如此,实现了对当前网速做出自适应调整的目的。 In the embodiment of the present invention, a first test instance is selected in all the test cases of the Ethernet port, where the test instance includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate; according to the first test For example, the communication parameter is configured on the Ethernet port; during the data transmission, the state parameter of the PCS of the Ethernet port is detected, and the state parameter of the detected PCS is compared with the theoretical state of the first test instance. The parameters are compared. When the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, data is transmitted by using the communication parameter currently configured by the Ethernet port. In this way, the purpose of adaptively adjusting the current network speed is achieved.

Claims (14)

  1. 一种自适应网速匹配方法,所述方法包括:An adaptive network speed matching method, the method comprising:
    在以太网端口的全部测试例中选用第一测试例,所述测试例包括该以太网端口所支持的传输速率以及该传输速率所对应的网络类型;The first test instance is selected in all test cases of the Ethernet port, where the test case includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate;
    根据所述第一测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置;And configuring communication parameters of the Ethernet port according to a transmission rate supported by the Ethernet port included in the first test instance and a network type corresponding to the transmission rate;
    检测出通信参数配置后的所述以太网端口的物理编码子层PCS的状态参数,将所检测的PCS的状态参数与所述第一测试例对应的理论状态参数进行比较,所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输。Detecting a state parameter of a physical coding sublayer PCS of the Ethernet port after the communication parameter is configured, and comparing the detected state parameter of the PCS with a theoretical state parameter corresponding to the first test example, where the detected PCS is When the difference between the state parameter and the theoretical state parameter meets a preset condition, data transmission is performed with the communication parameter currently configured by the Ethernet port.
  2. 根据权利要求1所述的自适应网速匹配方法,其中,所述方法还包括:The adaptive network speed matching method according to claim 1, wherein the method further comprises:
    所检测的PCS的状态参数与所述第一测试例对应的理论状态参数之间的差别不符合预设条件时,在以太网端口的全部测试例中选用第二测试例;When the difference between the detected state parameter of the PCS and the theoretical state parameter corresponding to the first test example does not meet the preset condition, the second test example is selected in all test cases of the Ethernet port;
    根据所述第二测试例所包含的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置;并在数据传输过程中,检测出基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数,将所检测的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数进行比较;And configuring a communication parameter of the Ethernet port according to a transmission rate supported by the Ethernet port included in the second test instance and a network type corresponding to the transmission rate; and detecting, according to the data transmission process, The state parameter of the PCS of the Ethernet port after the communication parameter configuration in the second test example, and the detected state parameter of the PCS of the Ethernet port based on the communication parameter of the second test example and the The theoretical state parameters corresponding to the two test cases are compared;
    当检测出的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输; When the detected difference between the state parameter of the PCS of the Ethernet port and the theoretical state parameter corresponding to the second test instance based on the configuration of the communication parameter of the second test example meets a preset condition, The communication parameters currently configured by the Ethernet port are used for data transmission;
    当检测出的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数之间的差别不符合预设条件时,在以太网端口的全部测试例中选用其他测试例,直至为所述以太网端口完成通信参数配置,或直至所述以太网端口的全部测试例全部被选用。When the detected difference between the state parameter of the PCS of the Ethernet port and the theoretical state parameter corresponding to the second test instance based on the communication parameter configuration of the second test example does not meet the preset condition, Other test cases are selected in all test cases of the Ethernet port until the communication parameter configuration is completed for the Ethernet port, or until all test cases of the Ethernet port are selected.
  3. 根据权利要求2所述的自适应网速匹配方法,其中,The adaptive network speed matching method according to claim 2, wherein
    所述根据所述第一测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置,包括:The communication parameter configuration of the Ethernet port according to the transmission rate supported by the Ethernet port included in the first test instance and the network type corresponding to the transmission rate, including:
    根据所述第一测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型,对PCS的编解码方式、加解扰方式,同步检测方式,纠错检测方式和位宽转换方式进行通信参数配置;According to the transmission rate supported by the Ethernet port included in the first test example and the network type corresponding to the transmission rate, the codec mode, the descrambling mode, the synchronization detection mode, the error detection mode, and the bit of the PCS Wide conversion mode for communication parameter configuration;
    对应地,所述根据所述第二测试例所包含的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置,包括:Correspondingly, the communication parameter configuration of the Ethernet port according to the transmission rate supported by the Ethernet port included in the second test instance and the network type corresponding to the transmission rate includes:
    根据所述第二测试例所包含的以太网端口所支持的传输速率以及该传输速率所对应的网络类型,对PCS的编解码方式、加解扰方式,同步检测方式,纠错检测方式和位宽转换方式进行通信参数配置。According to the transmission rate supported by the Ethernet port included in the second test example and the network type corresponding to the transmission rate, the codec mode, the descrambling mode, the synchronization detection mode, the error detection mode and the bit of the PCS Wide conversion mode for communication parameter configuration.
  4. 根据权利要求1所述的自适应网速匹配方法,其中,The adaptive network speed matching method according to claim 1, wherein
    所述PCS的状态参数包括:码字同步状态值;The state parameter of the PCS includes: a codeword synchronization state value;
    对应地,所述所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件,包括:所述码字同步状态值为真;否则,不符合预设条件。Correspondingly, the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, including: the codeword synchronization state value is true; otherwise, the preset condition is not met.
  5. 根据权利要求1所述的自适应网速匹配方法,其中,The adaptive network speed matching method according to claim 1, wherein
    所述PCS的状态参数包括:码字同步状态值、误码率判断值、数据 解码错误的次数和错误接收状态值的次数;The state parameters of the PCS include: a codeword synchronization state value, a bit error rate judgment value, and data. The number of times the error is decoded and the number of times the error is received.
    所述所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件,包括:所述码字同步状态值为真、误码率判断值为否且所述数据解码错误的次数和错误接收状态值的次数之和小于预设值时,符合预设条件,否则不符合预设条件。The difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, including: the codeword synchronization state value is true, the error rate determination value is no, and the data decoding error occurs. When the sum of the number of times and the number of times of receiving the status value is less than the preset value, the preset condition is met, otherwise the preset condition is not met.
  6. 根据权利要求1所述的自适应网速匹配方法,其中,The adaptive network speed matching method according to claim 1, wherein
    所述在以太网端口的全部测试例中选用第一测试例和在以太网端口的全部测试例中选用第二测试例或其他测试例,所遵循的原则为:The first test case is selected in all the test cases of the Ethernet port, and the second test case or other test cases are selected in all the test cases of the Ethernet port, and the following principles are:
    在未被选用的测试例中优选选择传输速率大的测试例。In the test case which is not selected, it is preferable to select a test case having a large transfer rate.
  7. 一种自适应网速匹配装置,包括测试例生成模块、配置模块和第一判断模块,其中:An adaptive network speed matching device includes a test case generation module, a configuration module, and a first judgment module, wherein:
    测试例生成模块,配置为在以太网端口的全部测试例中选用第一测试例,所述测试例包括该以太网端口所支持的传输速率以及该传输速率所对应的网络类型;The test instance generating module is configured to select a first test instance in all test cases of the Ethernet port, where the test case includes a transmission rate supported by the Ethernet port and a network type corresponding to the transmission rate;
    配置模块,配置为根据所述第一测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置;a configuration module configured to perform communication parameter configuration on the Ethernet port according to a transmission rate supported by the Ethernet port included in the first test instance and a network type corresponding to the transmission rate;
    第一判断模块,配置为在数据传输过程中,检测出通信参数配置后的所述以太网端口的PCS的状态参数,将所检测的PCS的状态参数与所述第一测试例的对应的理论状态参数进行比较,所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输。The first judging module is configured to detect a state parameter of the PCS of the Ethernet port after the communication parameter configuration in the data transmission process, and compare the state parameter of the detected PCS with the corresponding theory of the first test example The state parameters are compared. When the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, data is transmitted by using the communication parameter currently configured by the Ethernet port.
  8. 根据权利要求7所述的自适应网速匹配装置,其中,所述装置还包括:The adaptive network speed matching device according to claim 7, wherein the device further comprises:
    第二测试模块,配置为在所检测的PCS的状态参数与所述第一测试 例对应的理论状态参数之间的差别不符合预设条件时,在以太网端口的全部测试例中选用第二测试例;根据所述第二测试例所包含的以太网端口所支持的传输速率以及该传输速率所对应的网络类型对所述以太网端口进行通信参数配置;并在数据传输过程中,检测出基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数,将所检测的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数进行比较;当检测出的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数之间的差值符合预设条件时,以所述以太网端口当前配置的通信参数进行数据传输;当检测出的基于所述第二测试例通信参数配置后的所述以太网端口的PCS的状态参数与所述第二测试例对应的理论状态参数之间的差别不符合预设条件时,在以太网端口的全部测试例中选用其他测试例,直至为所述以太网端口完成通信参数配置,或直至所述以太网端口的全部测试例全部被选用。a second test module configured to detect a status parameter of the PCS and the first test When the difference between the theoretical state parameters corresponding to the example does not meet the preset condition, the second test example is selected in all test cases of the Ethernet port; according to the transmission rate supported by the Ethernet port included in the second test example And configuring, by the network type corresponding to the transmission rate, the communication parameter configuration of the Ethernet port; and detecting, during the data transmission, the state of the PCS of the Ethernet port configured according to the communication parameter of the second test example a parameter, comparing the detected state parameter of the PCS of the Ethernet port configured based on the communication parameter of the second test instance with a theoretical state parameter corresponding to the second test instance; when the detected is based on the In the second test example, when the difference between the state parameter of the PCS of the Ethernet port and the theoretical state parameter corresponding to the second test instance is in accordance with a preset condition, the current configuration of the Ethernet port is configured. The communication parameter performs data transmission; when the detected state parameter of the PCS of the Ethernet port based on the communication parameter configuration of the second test example is detected When the difference between the theoretical state parameters corresponding to the second test case does not meet the preset condition, other test cases are selected in all test cases of the Ethernet port until the communication parameter configuration is completed for the Ethernet port, or until All test cases of the Ethernet port are selected.
  9. 根据权利要求8所述的自适应网速匹配装置,其中,The adaptive network speed matching device according to claim 8, wherein
    所述第一判断模块,还配置为:根据所述第一测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型,对PCS的编解码方式、加解扰方式,同步检测方式,纠错检测方式和位宽转换方式进行通信参数配置;The first determining module is further configured to: according to a transmission rate supported by the Ethernet port included in the first test instance and a network type corresponding to the transmission rate, a codec mode and a descrambling mode of the PCS , synchronous detection mode, error correction detection mode and bit width conversion mode for communication parameter configuration;
    所述第二判断模块,还配置为:根据所述第二测试例所包括的以太网端口所支持的传输速率以及该传输速率所对应的网络类型,对PCS的编解码方式、加解扰方式,同步检测方式,纠错检测方式和位宽转换方式进行通信参数配置。The second judging module is further configured to: according to the transmission rate supported by the Ethernet port included in the second test instance and the network type corresponding to the transmission rate, the codec mode and the descrambling mode of the PCS , synchronous detection mode, error detection detection mode and bit width conversion mode for communication parameter configuration.
  10. 根据权利要求7所述的自适应网速匹配装置,所述PCS的状态参数包括:码字同步状态值; The adaptive network speed matching apparatus according to claim 7, wherein the state parameter of the PCS comprises: a codeword synchronization state value;
    对应地,所述所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件,包括:所述码字同步状态值为真;否则,不符合预设条件。Correspondingly, the difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, including: the codeword synchronization state value is true; otherwise, the preset condition is not met.
  11. 根据权利要求7所述的自适应网速匹配装置,其中,所述PCS的状态参数包括:码字同步状态值、误码率判断值、数据解码错误的次数和错误接收状态值的次数;The adaptive network speed matching apparatus according to claim 7, wherein the state parameters of the PCS include: a codeword synchronization state value, a bit error rate judgment value, a number of data decoding errors, and a number of times of an incorrect reception state value;
    所述所检测的PCS的状态参数与所述理论状态参数之间的差值符合预设条件,包括:所述码字同步状态值为真、误码率判断值为否且所述数据解码错误的次数和错误接收状态值的次数之和小于预设值时,符合预设条件,否则不符合预设条件。The difference between the detected state parameter of the PCS and the theoretical state parameter meets a preset condition, including: the codeword synchronization state value is true, the error rate determination value is no, and the data decoding error occurs. When the sum of the number of times and the number of times of receiving the status value is less than the preset value, the preset condition is met, otherwise the preset condition is not met.
  12. 根据权利要求7所述的自适应网速匹配装置,其中,The adaptive network speed matching device according to claim 7, wherein
    所述在以太网端口的全部测试例中选用第一测试例和在以太网端口的全部测试例中选用第二测试例或其他测试例,所遵循的原则为:在未被选用的测试例中优选选择传输速率大的测试例。The first test case is selected in all the test cases of the Ethernet port, and the second test case or other test cases are selected in all the test cases of the Ethernet port, and the principle is as follows: in the test case that is not selected. It is preferable to select a test case in which the transmission rate is large.
  13. 一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现权利要求1至6所述方法的步骤。A computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the method of claims 1 to 6.
  14. 一种自适应网速匹配装置,包括:处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行权利要求1至6所述方法的步骤。 An adaptive network speed matching apparatus comprising: a processor and a memory for storing a computer program executable on a processor, wherein the processor is configured to perform the functions of claims 1 to 6 when the computer program is executed The steps of the method.
PCT/CN2017/091422 2016-11-16 2017-07-03 Adaptive network speed matching method and device, and data storage medium WO2018090644A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611009929.6 2016-11-16
CN201611009929.6A CN108075937A (en) 2016-11-16 2016-11-16 A kind of method and apparatus of adaptive network speed matching process

Publications (1)

Publication Number Publication Date
WO2018090644A1 true WO2018090644A1 (en) 2018-05-24

Family

ID=62146086

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/091422 WO2018090644A1 (en) 2016-11-16 2017-07-03 Adaptive network speed matching method and device, and data storage medium

Country Status (2)

Country Link
CN (1) CN108075937A (en)
WO (1) WO2018090644A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113160726A (en) * 2020-01-03 2021-07-23 西安诺瓦星云科技股份有限公司 Power-on self-detection method and power-on self-detection device
CN113765834A (en) * 2021-11-05 2021-12-07 新华三技术有限公司 Chip, signal recovery device, signal adjustment method and signal recovery method
US11463560B2 (en) 2021-01-20 2022-10-04 Jump Algorithms, Llc Network interface architecture having a directly modifiable pre-stage packet transmission buffer
CN115714941A (en) * 2023-01-05 2023-02-24 北京工蜂电子技术有限公司 Optical interface rate self-adaption method, device, medium and equipment of network communication equipment
CN115801159A (en) * 2021-09-09 2023-03-14 苏州盛科通信股份有限公司 Method, device and storage medium for improving PHY layer time precision synchronization under multiple rates

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111385678B (en) * 2018-12-29 2023-05-12 中兴通讯股份有限公司 Method and device for realizing optical link channel auto-negotiation
CN110719535B (en) * 2019-09-02 2021-09-14 北方工业大学 Adaptive equalization adjustment method for downlink video stream code rate at video source end
CN111385065B (en) * 2020-05-29 2020-09-11 湖南戎腾网络科技有限公司 Interface rate self-adaption device and method
WO2022068302A1 (en) * 2020-09-30 2022-04-07 华为技术有限公司 Chip, communication system and communication method
CN112821985B (en) * 2020-12-31 2021-11-30 珠海格力电器股份有限公司 Control method and control device of encoder, servo motor and encoder
CN115242627B (en) * 2022-09-20 2023-01-24 北京智芯微电子科技有限公司 TSN (traffic service network) configuration method, system and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0863640A2 (en) * 1997-03-04 1998-09-09 Texas Instruments Incorporated Improved physical layer interface device
CN103095367A (en) * 2013-01-25 2013-05-08 中兴通讯股份有限公司 Optical-fiber interface speed self-adapting method and optical-fiber network device
CN103391329A (en) * 2013-07-12 2013-11-13 青岛海信宽带多媒体技术有限公司 Interface module and method thereof for supporting multiple interface standards

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101583054A (en) * 2009-06-12 2009-11-18 中兴通讯股份有限公司 Method for realizing that optical interface supports multiple rate patterns by adopting optical module and device
CN102098814A (en) * 2009-12-11 2011-06-15 中兴通讯股份有限公司 Ethernet port adaptation realization method, network system and network equipment
CN102355321A (en) * 2011-06-29 2012-02-15 中兴通讯股份有限公司 Multi-rate self-adaption method of communication interface and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0863640A2 (en) * 1997-03-04 1998-09-09 Texas Instruments Incorporated Improved physical layer interface device
CN103095367A (en) * 2013-01-25 2013-05-08 中兴通讯股份有限公司 Optical-fiber interface speed self-adapting method and optical-fiber network device
CN103391329A (en) * 2013-07-12 2013-11-13 青岛海信宽带多媒体技术有限公司 Interface module and method thereof for supporting multiple interface standards

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113160726A (en) * 2020-01-03 2021-07-23 西安诺瓦星云科技股份有限公司 Power-on self-detection method and power-on self-detection device
CN113160726B (en) * 2020-01-03 2023-11-14 西安诺瓦星云科技股份有限公司 Power-on self-detection method and power-on self-detection device
US11463560B2 (en) 2021-01-20 2022-10-04 Jump Algorithms, Llc Network interface architecture having a directly modifiable pre-stage packet transmission buffer
CN115801159A (en) * 2021-09-09 2023-03-14 苏州盛科通信股份有限公司 Method, device and storage medium for improving PHY layer time precision synchronization under multiple rates
CN113765834A (en) * 2021-11-05 2021-12-07 新华三技术有限公司 Chip, signal recovery device, signal adjustment method and signal recovery method
CN115714941A (en) * 2023-01-05 2023-02-24 北京工蜂电子技术有限公司 Optical interface rate self-adaption method, device, medium and equipment of network communication equipment
CN115714941B (en) * 2023-01-05 2023-04-07 北京工蜂电子技术有限公司 Optical port rate self-adaption method, device, medium and equipment of network communication equipment

Also Published As

Publication number Publication date
CN108075937A (en) 2018-05-25

Similar Documents

Publication Publication Date Title
WO2018090644A1 (en) Adaptive network speed matching method and device, and data storage medium
US6580697B1 (en) Advanced ethernet auto negotiation
TWI528750B (en) Network system configured for resolving forward error correction during a data mode
US8576727B2 (en) System and method for unique identifier exchange during auto-negotiation
US7701862B2 (en) Method and system for PHY loop detection
WO2013182137A1 (en) Throughput test method and apparatus
TWI753165B (en) Method for controlling wireless device under test using non-link testing resources
US20090245120A1 (en) Ethernet Physical Layer Transceiver with Auto-Ranging Function
US7742439B2 (en) Automated correction of duplex mismatches
US9455867B2 (en) Automatic configuration of a repeater
TW202206836A (en) Automated test equipment and method using a trigger generation
US20110255427A1 (en) System and Method for Physical Layer Device Enabled Clock Diagnostics
EP3319249B1 (en) Transmission checking method, node, system and computer storage medium
US7428599B2 (en) Method for detecting link partner state during auto negotiation and switching local state to establish link
US11824657B2 (en) Frame processing method and apparatus
CN108259254B (en) Path quality detection method and network equipment
WO2011144124A2 (en) Interface unit of base station control system and detection method thereof
WO2020063350A1 (en) Quantum key distribution method and device
US6687754B1 (en) Method of detecting a device in a network
CN115396382B (en) Operation method of network device and control chip of network device
TWI763470B (en) Operation method of network device and control chip of network device
US11388111B1 (en) Systems and methods for providing a compatible backplane operation mechanism for 2.5-gigabit high-speed ethernet
JP5156703B2 (en) Transmission device, communication system and communication method
JP6537393B2 (en) Loop prevention device and program
CN118101516A (en) Message transmission method and device

Legal Events

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

Ref document number: 17872200

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17872200

Country of ref document: EP

Kind code of ref document: A1