Ethernet connection information acquisition system and acquisition method

Through the combination of FPGA chip and PHY chip, the SMI read and write module and state machine are used to solve the problem that multiple PHY chip connection status and network speed cannot be obtained in the prior art, and the information acquisition of any PHY chip is achieved, which improves the improvement of System scalability and flexibility.

CN119276953AActive Publication Date: 2025-01-07TIANJIN JINHANG COMP TECH RES INST
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411456654.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-07
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

The prior art cannot effectively obtain the connection status and network rate information of multiple PHY chips. Especially in switches with multiple PHY chips, the CPU can only connect one or two PHY chips, and the information on any PHY chip cannot be realized. Get it.

Method used

Using the combination of FPGA chip and PHY chip, the connection information acquisition module and SMI read and write module in the FPGA chip are converted into SMI interface instructions, and transmitted to the PHY chip through the mdc and mdio signal lines, thereby obtaining the connection status and network Rate information, and the information is obtained and output through the state machine.

Benefits of technology

It realizes the acquisition of connection status and network rate information from any PHY chip, solves the problem of obtaining information when the CPU connects multiple PHY chips, and improves the flexibility and scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276953A_ABST
    Figure CN119276953A_ABST
Patent Text Reader

Abstract

The invention provides an Ethernet connection information acquisition system and method, the system comprises an FPGA chip and a PHY chip, the FPGA chip comprises a connection information acquisition module and an SMI read-write module, the PHY chip is connected with a host through a network cable, and the SMI read-write module is connected with the connection information acquisition module and the PHY chip; and the SMI read-write module is used for converting a read instruction of the connection information acquisition module into an instruction of an smi interface, transmitting the instruction to the PHY chip through two signal lines, namely an mdc signal line and an mdio signal line, and sending read data returned by the PHY chip to the connection information acquisition module, so that the connection information acquisition module acquires connection state information and network rate information and outputs the connection state information and the network rate information to the outside. According to the Ethernet connection information acquisition system provided by the invention, the FPGA chip is matched with the plurality of PHY chips, so that the connection state information and the network rate information of any PHY chip can be read conveniently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of network communication technology, and in particular to an Ethernet connection information acquisition system and acquisition method. Background Art

[0002] Before Ethernet data is sent or received, the devices at both ends of the network must first establish a link connection, and then send or receive data based on the Ethernet connection information. The Ethernet connection information usually includes the connection status and network rate.

[0003] The existing technology obtains the connection status and network rate from the PHY chip through the operating system in the CPU, but the CPU can only obtain the PHY chip connected to it. Generally, a CPU can only be connected to one or two PHY chips. For a switch with more than a dozen or even dozens of PHY chips, it is impossible to obtain the connection status and network rate of any PHY chip. Summary of the invention

[0004] In view of the above defects or deficiencies in the prior art, it is desirable to provide an Ethernet connection information acquisition system and acquisition method to solve the above problems.

[0005] The first aspect of the present application provides an Ethernet connection information acquisition system, including an FPGA chip and a PHY chip, the FPGA chip includes a connection information acquisition module and an SMI read-write module, the PHY chip is connected to a host via a network cable, and the SMI read-write module connects the connection information acquisition module and the PHY chip; The SMI read-write module is used to convert the read instructions of the connection information acquisition module into instructions of the SMI interface, and transmit them to the PHY chip through the two signal lines MDC and MDIO, and send the read data returned by the PHY chip to the connection information acquisition module, so that the connection information acquisition module obtains the connection status information and the network rate information and outputs them to the outside; the read instruction includes a first read request signal or a second read request signal and an address signal, the first read request signal is used to request the connection status information, the second read request signal is used to request the network rate information, and the address signal is used to indicate the location of the connection status information and the network rate information in the PHY chip.

[0006] According to the technical solution provided in the embodiment of the present application, the PHY chip is provided with a connection status register and a network rate register, the connection status register is used to store the connection status information, and the network rate register is used to store the network rate information.

[0007] According to the technical solution provided in the embodiment of the present application, the address signal includes a first address signal or a second address signal, the first address signal is used to indicate the address of the connection status register, and the second address signal is used to indicate the address of the network rate register.

[0008] According to the technical solution provided in the embodiment of the present application, the PHY chip returns a first read data signal according to the first read request signal, and the PHY chip returns a second read data signal according to the second read request signal. The first read data signal is used by the connection information acquisition module to read the connection status information, and the second read data signal is used by the connection information acquisition module to read the network rate information.

[0009] According to the technical solution provided in the embodiment of the present application, the function of the connection information acquisition module is implemented through a state machine.

[0010] A second aspect of the present application provides a method for obtaining Ethernet connection information, based on the Ethernet connection information obtaining system as described above, comprising: After the connection information acquisition module determines that the system is started, it enters the connection state request state; The connection information acquisition module sends a first read request signal to the SMI read-write module, so that the SMI read-write module forwards the first read request signal to the PYH chip; the connection information acquisition module jumps to the connection status reading state; When the connection information acquisition module determines to be placed in the connection status reading state, the first address signal is sent to the SMI read-write module, so that the PHY chip reads the connection status signal according to the first address signal forwarded by the SMI, and sends a first read completion signal and a first read data signal after the PHY chip completes the reading; When the connection information acquisition module receives the first read completion signal and determines that it is at a high level, it jumps to a connection status check state; When the connection information acquisition module is in the connection status check state, it determines whether the network is connected according to the first read data signal, and if so, the output connection status is set to a high level, otherwise, the output connection status is set to a low level; the connection information acquisition module jumps to the network rate request state; When the connection information acquisition module determines that the state is set to the network rate request state, the second read request signal is sent to the SMI read-write module, so that the SMI read-write module forwards the second read request signal to the PYH chip; the connection information acquisition module jumps to the network rate reading state; When the connection information acquisition module determines to be placed in the network rate reading state, the second address signal is sent to the SMI read-write module, so that the PHY chip reads the network rate signal according to the second address signal forwarded by the SMI read-write module, and sends a read completion signal and a second read data signal after the PHY chip completes the reading; When the connection information acquisition module receives the second read completion signal and determines that it is at a high level, it jumps to a network rate check state; When the connection information acquisition module determines to be in the network rate checking state, the actual network rate is obtained according to the second read data signal; the connection information acquisition module jumps to the waiting state, and jumps to the connection state requesting state after the waiting state lasts for a first preset time.

[0011] According to the technical solution provided in the embodiment of the present application, the connection information acquisition module enters the connection state request state after determining that the system is started, including: The connection information acquisition module determines that the system is started and enters an idle state; After the connection information acquisition module determines that the idle state is in the first preset time period, the connection information acquisition module jumps to the connection state request state.

[0012] Compared with the prior art, the beneficial effect of the present application is that the Ethernet connection information acquisition system provided by the present application includes an FPGA chip and a PHY chip, and the FPGA chip includes a connection information acquisition module and an SMI read-write module. The read instruction is sent through the connection information acquisition module and forwarded to the PHY chip through the SMI read-write module, and then the connection status and network rate are obtained from the PHY chip; since the FPGA chip can establish a one-to-many connection with the PHY chip, the present application can obtain the connection status and network rate from any PHY chip through the connection between the FPGA chip and the PHY chip. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings: Figure 1 A schematic diagram of the structure of the Ethernet connection information acquisition system provided in Example 1; Figure 2 This is a flowchart of the method for obtaining Ethernet connection information provided in Example 2.

[0014] Figure numbers: 1. FPGA chip; 11. Connection information acquisition module; 12. SMI read-write module; 2. PHY chip. DETAILED DESCRIPTION

[0015] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.

[0016] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0017] Example 1 Please refer to Figure 1 , the present application provides an Ethernet connection information acquisition system, including an FPGA chip 1 and a PHY chip 2, the FPGA chip 1 includes a connection information acquisition module 11 and an SMI read-write module 12, the PHY chip 2 is connected to a host via a network cable, and the SMI read-write module 12 connects the connection information acquisition module 11 and the PHY chip 2; The SMI read-write module 12 is used to convert the read instruction of the connection information acquisition module 11 into an instruction of the SMI interface, and transmit it to the PHY chip 2 through the two signal lines MDC and MDIO, and send the read data returned by the PHY chip 2 to the connection information acquisition module 11, so that the connection information acquisition module 11 obtains the connection status information and the network rate information and outputs them to the outside; the read instruction includes a first read request signal or a second read request signal and an address signal, the first read request signal is used to request the connection status information, the second read request signal is used to request the network rate information, and the address signal is used to indicate the location of the connection status information and the network rate information in the PHY chip 2.

[0018] Specifically, the connection information acquisition module 11 is used to generate a read instruction, wherein the read instruction includes two signals, a 1-bit request read_req and a 5-bit address reg_addr, wherein the 1-bit request includes the first read request signal or the second read request signal, a 5-bit address and the address signal indicating the position of the PHY chip 2. When it is necessary to obtain the connection status, the connection information acquisition module 11 sends the first read request signal to the SMI read-write module 12, and the SMI read-write module 12 converts the first read request signal into an instruction of the smi interface and transmits it to the PHY chip 2 through two signal lines, mdc and mdio. Then, the connection information acquisition module 11 sends the address signal to the SMI read-write module 12, which is also converted by the SMI read-write module 12 and sent to the PHY chip 2. The SMI read-write module 12 obtains the connection status of the corresponding position from the PHY chip 2, and returns the connection status of the corresponding position to the connection information acquisition module 11 through 16-bit read data read_data.

[0019] When it is necessary to obtain the network rate, the connection information acquisition module 11 sends the second read request signal to the SMI read-write module 12, and the SMI read-write module 12 converts the second read request signal into an instruction of the smi interface and transmits it to the PHY chip 2 through the two signal lines of mdc and mdio. Then the connection information acquisition module 11 sends the address signal to the SMI read-write module 12, which is also converted by the SMI read-write module 12 and sent to the PHY chip 2. The SMI read-write module 12 obtains the network rate of the corresponding position from the PHY chip 2, and returns the network rate of the corresponding position to the connection information acquisition module 11 through 16-bit read data read_data.

[0020] In addition to sending read instructions, the connection information acquisition module 11 can also send write instructions to the SMI read-write module. The write instructions include three signals: 1-bit write request write_req, 16-bit write data write_data and 5-bit address reg_addr. Since the relevant content of the write instruction is not involved in this application, no further details will be given here.

[0021] Furthermore, the PHY chip 2 is provided with a connection status register and a network rate register, the connection status register is used to store the connection status information, and the network rate register is used to store the network rate information.

[0022] Specifically, the connection status information and the network rate information are respectively stored through the connection status register and the network rate register. When the PHY chip 2 receives the corresponding address information, the connection status information and the network rate information are returned from the corresponding registers to the SMI read-write module 2, and sent to the connection information acquisition module 11 through the SMI read-write module.

[0023] Furthermore, the address signal includes a first address signal or a second address signal, the first address signal is used to indicate the address of the connection status register, and the second address signal is used to indicate the address of the network rate register.

[0024] Specifically, the addresses of the connection status register and the network rate register can be accurately located through the first address signal and the second address signal.

[0025] Further, the PHY chip 2 returns a first read data signal according to the first read request signal, and the PHY chip 2 returns a second read data signal according to the second read request signal, the first read data signal is used by the connection information acquisition module 11 to read the connection status information, and the second read data signal is used by the connection information acquisition module 11 to read the network rate information.

[0026] Furthermore, the function of the connection information acquisition module 11 is implemented through a state machine.

[0027] Example 2 Please refer to Figure 2 This embodiment provides a method for obtaining external network connection information, based on the Ethernet connection information obtaining system as described in Embodiment 1, including: S100, the connection information acquisition module 11 determines that the system is started and enters the connection state request state; S200, the connection information acquisition module 11 sends a first read request signal to the SMI read-write module 12, so that the SMI read-write module 12 forwards the first read request signal to the PYH chip; the connection information acquisition module 11 jumps to the connection status reading state; S300, when the connection information acquisition module 11 determines to be in the connection status reading state, the first address signal is sent to the SMI read-write module 12, so that the PHY chip 2 reads the connection status signal according to the first address signal forwarded by the SMI read-write module 12, and sends a first read completion signal and a first read data signal after the PHY chip 2 completes the reading; S400, when the connection information acquisition module 11 receives the first read completion signal and determines that it is at a high level, it jumps to a connection status check state; S500, when the connection information acquisition module 11 is in the connection status check state, it determines whether the network is connected according to the first read data signal, and if so, the output connection status is set to a high level, otherwise, the output connection status is set to a low level; the connection information acquisition module 11 jumps to the network rate request state; S600, when the connection information acquisition module 11 determines to be in the network rate request state, it sends a second read request signal to the SMI read-write module 12, so that the SMI read-write module 12 forwards the second read request signal to the PYH chip; the connection information acquisition module 11 jumps to the network rate reading state; S700, when the connection information acquisition module 11 determines to be in the network rate reading state, the second address signal is sent to the SMI read-write module 12, so that the PHY chip 2 reads the network rate signal according to the second address signal forwarded by the SMI read-write module 12, and sends a read completion signal and a second read data signal after the PHY chip 2 completes the reading; S800: When the connection information acquisition module 11 receives the second read completion signal and determines that it is at a high level, it jumps to a network rate check state; S900, when the connection information acquisition module 11 determines to be in the network rate checking state, the actual network rate is obtained according to the second read data signal; the connection information acquisition module 11 jumps to the waiting state, and jumps to the connection state requesting state after the waiting state lasts for a first preset time.

[0028] Specifically, Figure 2As shown, after the system is started, the connection information acquisition module 11 enters the connection status request state. In the connection status request state, the connection information acquisition module 11 sends the first read request signal read_req to the SMI read-write module 12, and jumps to the connection status read state. In the connection status read state, the connection information acquisition module 11 sends the first address signal reg_addr to the SMI read-write module 12. At this time, the address reg_addr is the connection status register address of the PHY chip 2, and then waits for the first read completion signal done. When the first read completion signal done becomes a high level, it indicates that the SMI read-write module 12 has returned the first read data signal read_data, and the data of the signal is the connection status value, and jumps to the connection status check state. In the connection status check state, the connection status value is judged. If the value is 1, it means that the network is connected, the connection status link output by the connection information acquisition module 11 is set to a high level, and jumps to the network rate request state. Otherwise, the value is 0, which means that the network is not connected. The connection status link output by the connection information acquisition module 11 is set to a low level and jumps to the waiting state.

[0029] In the network rate request state, the connection information acquisition module 11 sends a second read request signal read_req to the SMI read-write module 12, and jumps to the network rate reading state. In the network rate reading state, the connection information acquisition module 11 sends a second address signal reg_addr to the SMI read-write module 12, and the address reg_addr at this time is the network rate register address of the PHY chip 2, and then waits for the second read completion signal done. When the second read completion signal done becomes a high level, it indicates that the SMI read-write module 12 has returned the second read data signal read_data, and the data guard of the signal is the network rate value, and jumps to the network rate check state. In the network speed check state, the current speed is determined according to the network speed. If the network speed value is 001, which indicates a 10M speed, the network speed output by the connection information acquisition module 11 is set to 01; if the network speed value is 010, which indicates a 100M speed, the network speed output by the connection information acquisition module 11 is set to 10; if the network speed value is 100, which indicates a 1000M speed, the network speed output by the connection information acquisition module 11 is set to 11; then jump to the waiting state. In the waiting state, after timing for 1 second, jump to the connection state request state.

[0030] Furthermore, the connection information acquisition module 11 determines that the system is started and enters the connection state request state, including: The connection information acquisition module 11 determines that the system is started and enters an idle state; After the connection information acquisition module 11 determines that the idle state is in the first preset time period, it jumps to the connection state request state.

[0031] Specifically, after the system is started, the connection information acquisition module 11 enters the idle state by default, counts for 1 second in the idle state to ensure that the PHY chip 2 is initialized, and jumps to the connection state request state after 1 second.

[0032] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.

Claims

1. An Ethernet connection information acquisition system, characterized in that: Comprising an FPGA chip (1) and a PHY chip (2), the FPGA chip (1) comprising a connection information acquisition module (11) and an SMI read-write module (12), the PHY chip (2) being connected to a host via a network cable, and the SMI read-write module (12) being connected to the connection information acquisition module (11) and the PHY chip (2); The SMI read / write module (12) is used to convert the read instruction of the connection information acquisition module (11) into an instruction of the SMI interface, and transmit it to the PHY chip (2) through two signal lines, MDC and MDIO, and send the read data returned by the PHY chip (2) to the connection information acquisition module (11), so that the connection information acquisition module (11) obtains the connection status information and the network rate information and outputs them externally; the read instruction includes a first read request signal or a second read request signal and an address signal, the first read request signal is used to request the connection status information, the second read request signal is used to request the network rate information, and the address signal is used to indicate the location of the connection status information and the network rate information in the PHY chip (2).

2. The Ethernet connection information acquisition system according to claim 1, characterized in that: The PHY chip (2) is provided with a connection status register and a network rate register, wherein the connection status register is used to store the connection status information, and the network rate register is used to store the network rate information.

3. The Ethernet connection information acquisition system according to claim 2, characterized in that: The address signal includes a first address signal or a second address signal, the first address signal is used to indicate the address of the connection status register, and the second address signal is used to indicate the address of the network rate register.

4. The Ethernet connection information acquisition system according to claim 3, characterized in that: The PHY chip (2) returns a first read data signal according to the first read request signal, and the PHY chip (2) returns a second read data signal according to the second read request signal, the first read data signal is used by the connection information acquisition module (11) to read the connection status information, and the second read data signal is used by the connection information acquisition module (11) to read the network rate information.

5. The Ethernet connection information acquisition system according to claim 4, characterized in that: The function of the connection information acquisition module (11) is implemented through a state machine.

6. A method for obtaining Ethernet connection information, characterized in that: The Ethernet connection information acquisition system according to claim 5 comprises: The connection information acquisition module (11) enters a connection state request state after determining that the system is started; The connection information acquisition module (11) sends a first read request signal to the SMI read / write module (12), so that the SMI read / write module (12) forwards the first read request signal to the PYH chip; the connection information acquisition module (11) jumps to a connection status reading state; When the connection information acquisition module (11) determines that the connection status is in the reading state, the first address signal is sent to the SMI read / write module (12), so that the PHY chip (2) reads the connection status signal according to the first address signal forwarded by the SMI read / write module (12), and sends a first read completion signal and a first read data signal after the PHY chip (2) completes the reading; When the connection information acquisition module (11) receives the first read completion signal and determines that it is at a high level, it jumps to a connection status check state; When the connection information acquisition module (11) is in the connection status check state, it determines whether the network is connected according to the first read data signal, and if so, the connection status is output at a high level, and if not, the connection status is output at a low level; the connection information acquisition module (11) jumps to the network rate request state; When the connection information acquisition module (11) determines that the network rate request state is set, the second read request signal is sent to the SMI read / write module (12), so that the SMI read / write module (12) forwards the second read request signal to the PYH chip; the connection information acquisition module (11) jumps to the network rate reading state; When the connection information acquisition module (11) determines to be in the network rate reading state, it sends the second address signal to the SMI read / write module (12), so that the PHY chip (2) reads the network rate signal according to the second address signal forwarded by the SMI, and sends a read completion signal and a second read data signal after the PHY chip (2) completes the reading; When the connection information acquisition module (11) receives the second read completion signal and determines that it is at a high level, it jumps to a network rate check state; When the connection information acquisition module (11) determines that it is in the network rate checking state, it obtains the actual network rate according to the second read data signal; the connection information acquisition module (11) jumps to the waiting state, and jumps to the connection state requesting state after the waiting state continues for a first preset time length.

7. The method for obtaining Ethernet connection information according to claim 6, characterized in that: The connection information acquisition module (11) determines that the system is started and enters a connection state request state, including: The connection information acquisition module (11) determines that the system is started and enters an idle state; The connection information acquisition module (11) jumps to the connection state request state after determining that the idle state has been in the idle state for a first preset time period.

Citation Information

Patent Citations

  • Port state monitoring method and apparatus

    CN108848006A

  • FPGA-based wake-up UDP transmission protocol implementation method and system

    CN112202740A

  • Electrical port module, method for acquiring working state of electrical port module, and computer storage medium

    CN113765749A

  • Control method and device of Ethernet physical layer chip

    CN117111539A