A method and related apparatus for configuring a physical interface chip

By acquiring and parsing data from the bus interface and configuring the PHY chip using the MDIO communication format, the problems of low transmission efficiency and poor adaptability in PHY chip configuration are solved, realizing efficient data transmission and the function of multiple chips sharing addresses.

CN115695176BActive Publication Date: 2026-03-10INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-28
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, PHY chips only support MDIO interface communication, which prevents system devices from directly accessing internal registers. The I2C communication rate is difficult to adapt to high-speed requirements, resulting in problems such as low port compatibility and low transmission rate.

Method used

By obtaining the data to be parsed from the bus interface, parsing it based on the communication format of the bus interface, obtaining the configuration data, and sending it to the physical interface chip based on the MDIO communication format, software configuration is achieved, avoiding the need for the interface conversion module.

Benefits of technology

It improves data transmission efficiency and adaptability, can handle data transmission on different buses, frees up the I2C interface of system devices, and enables multiple PHY chips to share the same address.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695176B_ABST
    Figure CN115695176B_ABST
Patent Text Reader

Abstract

This application discloses a method for configuring a physical interface chip, comprising: acquiring data to be parsed from a bus interface; parsing the data to be parsed based on the communication format corresponding to the bus interface to obtain configuration data; and sending the configuration data to the physical interface chip based on the MDIO communication format, so that the physical interface chip can perform software configuration based on the configuration data. First, the data to be parsed is acquired from the bus interface; then, the data to be parsed is parsed based on the communication format corresponding to the bus interface to obtain configuration data; finally, the configuration data is sent to the physical interface chip based on the MDIO communication format to achieve the corresponding software configuration, eliminating the need for an interface adapter module, thus improving transmission efficiency. Furthermore, it can handle data transmitted from different buses, improving adaptability. This application also discloses a device, computing device, and computer-readable storage medium for configuring a physical interface chip, possessing the above-mentioned beneficial effects.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a method and device for configuring a physical interface chip, a computing device and a computer readable storage medium. BACKGROUND

[0002] A traditional Ethernet circuit mainly consists of a CPU (central processing unit), a MAC (Media Access Control) controller, a PHY (Physical Layer) chip, a network transformer and an RJ45 connector. The PHY chip is a physical interface transceiver used for receiving and transmitting data from the MAC. The configuration of the PHY chip can be divided into hardware configuration and software configuration.

[0003] In the related art, since the PHY chip only supports MDIO (Management Data Input / Output) interface communication, most system devices cannot directly access the internal registers of the PHY chip. Therefore, to realize the configuration function of the PHY chip, the system device generally needs to first configure an SFP (Small Form Pluggable) interface module through I2C (Inter-Integrated Circuit), and then the interface module configures the PHY chip through MDIO. However, the communication rate of I2C is difficult to adapt to the case of high speed requirement, and the SFP interface module only supports I2C protocol, so that the system device can only configure the PHY chip through the I2C interface. There are problems such as low port adaptability and low transmission rate.

[0004] Therefore, how to realize high-speed configuration of the physical interface chip based on the existing interface and avoid the problem of low transmission efficiency of configuration data is the focus of the technical personnel in the field. SUMMARY

[0005] The purpose of the present application is to provide a method and device for configuring a physical interface chip, a computing device and a computer readable storage medium, which improves the transmission efficiency of configuration data based on the existing interface.

[0006] To solve the above technical problems, the present application provides a method for configuring a physical interface chip, comprising:

[0007] obtaining to-be-analyzed data from a bus interface;

[0008] analyzing the to-be-analyzed data based on the communication format corresponding to the bus interface to obtain configuration data;

[0009] The configuration data is sent to the physical interface chip based on a format of MDIO communication, so that the physical interface chip implements software configuration based on the configuration data.

[0010] Optionally, the data to be parsed is obtained from the bus interface, including:

[0011] The FPGA obtains the data to be parsed from the bus interface.

[0012] Optionally, the data to be parsed is parsed based on a communication format corresponding to the bus interface to obtain configuration data, including:

[0013] The interface information of the bus interface is matched with the corresponding communication format.

[0014] The data to be parsed is parsed based on the communication format to obtain the configuration data.

[0015] Optionally, the configuration data is sent to the physical interface chip based on a format of MDIO communication, including:

[0016] The configuration data is converted based on a format of MDIO communication to obtain an MDIO frame.

[0017] The MDIO frame is sent to the physical interface chip.

[0018] Optionally, the configuration data is sent to the physical interface chip based on a format of MDIO communication, including:

[0019] The configuration data is sent to an MDIO interface of the physical interface chip based on a format of MDIO communication, so that the physical interface chip receives the configuration data from the MDIO interface.

[0020] Optionally, the method further includes:

[0021] In response to a read operation instruction, data to be read is obtained from the physical interface chip based on a format of MDIO communication;

[0022] The data to be read is converted into a corresponding communication frame based on a communication format of a bus corresponding to the read operation instruction.

[0023] The communication frame is sent through the bus corresponding to the read operation instruction.

[0024] Optionally, the method further includes:

[0025] Chip selection data is obtained from the data to be parsed.

[0026] A configuration physical interface chip to be configured is determined based on the chip selection data.

[0027] Correspondingly, the configuration data is sent to the physical interface chip based on the format of MDIO communication, comprising:

[0028] The configuration data is sent to the configuration physical interface chip to be configured based on the format of MDIO communication.

[0029] The application further provides an apparatus for configuring a physical layer chip, comprising:

[0030] A data acquisition module is configured to acquire to-be-analyzed data from a bus interface;

[0031] A data analysis module is configured to analyze the to-be-analyzed data based on a communication format corresponding to the bus interface to obtain configuration data.

[0032] A configuration data sending module is configured to send the configuration data to a physical interface chip based on the format of MDIO communication, so that the physical interface chip implements software configuration based on the configuration data.

[0033] The application further provides a computing device, comprising:

[0034] A memory is configured to store a computer program;

[0035] A processor is configured to implement the steps of the method for configuring a physical interface chip when executing the computer program.

[0036] The application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method for configuring a physical interface chip.

[0037] The application provides a method for configuring a physical interface chip, comprising: acquiring to-be-analyzed data from a bus interface; analyzing the to-be-analyzed data based on a communication format corresponding to the bus interface to obtain configuration data; and sending the configuration data to a physical interface chip based on the format of MDIO communication, so that the physical interface chip implements software configuration based on the configuration data.

[0038] First, to-be-analyzed data is acquired from a bus interface, then the to-be-analyzed data is analyzed based on a communication format corresponding to the bus interface to obtain configuration data, and finally the configuration data is sent to a physical interface chip based on the format of MDIO communication to implement corresponding software configuration, without connecting an interface switching module, thereby improving transmission efficiency, and different bus transmission data can be coped with, thereby improving adaptability.

[0039] The application further provides an apparatus for configuring a physical interface chip, a computing device, and a computer readable storage medium, which have the above beneficial effects, and details are not repeated here. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0041] Figure 1 A flowchart illustrating a method for configuring a physical interface chip, provided in an embodiment of this application;

[0042] Figure 2 A schematic diagram of the frame format for a method of configuring a physical interface chip provided in an embodiment of this application;

[0043] Figure 3 This is a schematic diagram of a method for configuring a physical interface chip provided in an embodiment of this application;

[0044] Figure 4 This is a schematic diagram of a device for configuring a physical layer chip, provided in an embodiment of this application.

[0045] Figure 5 This application provides a schematic diagram of the structure of a computing device. Detailed Implementation

[0046] The core of this application is to provide a method, apparatus, computing device, and computer-readable storage medium for configuring physical interface chips, thereby improving the transmission efficiency of configuration data based on existing interfaces.

[0047] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0048] In related technologies, because PHY chips only support MDIO interface communication, most system devices cannot directly access the PHY chip's internal registers. Therefore, to configure the PHY chip, the system device typically needs to first configure the SFP interface module via I2C, and then the interface module configures the PHY chip via MDIO. However, the communication rate of I2C is difficult to adapt to high-speed requirements, and the SFP interface module only supports the I2C protocol, forcing system devices to configure the PHY chip only through the I2C interface. This results in problems such as low port compatibility and low transmission rates.

[0049] Therefore, this application provides a method for configuring a physical interface chip. First, the data to be parsed is obtained from the bus interface. Then, the data to be parsed is parsed according to the communication format corresponding to the bus interface to obtain configuration data. Finally, the configuration data is sent to the physical interface chip according to the MDIO communication format to realize the corresponding software configuration. This eliminates the need to connect an interface conversion module, improves transmission efficiency, and can also handle data transmitted from different buses, thus improving adaptability.

[0050] The following embodiment illustrates a method for configuring a physical interface chip provided in this application.

[0051] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a method for configuring a physical interface chip, as provided in an embodiment of this application.

[0052] In this embodiment, the method may include:

[0053] S101, obtain the data to be parsed from the bus interface;

[0054] This step aims to obtain the data to be parsed from the bus interface. In this embodiment, the main focus is on software configuration of the physical interface chip, i.e., sending configuration data to the physical interface chip. In existing technologies, the configuration data is typically sent to the physical interface chip via a bus interface adapter, which can easily lead to reduced data transmission efficiency. Therefore, the technical solution of this application obtains the data to be parsed directly from the bus interface. This data to be parsed includes configuration data for software configuration.

[0055] The data to be parsed is encapsulated in the communication format corresponding to the bus. Normally, data from this bus interface cannot be directly sent to the physical interface chip. Therefore, in this embodiment, the data is transmitted through a parsing and transmission process, improving the compatibility with the configuration chip.

[0056] Furthermore, this step may include:

[0057] The FPGA obtains the data to be parsed from the bus interface.

[0058] As can be seen, this alternative solution can also acquire the data to be parsed based on an FPGA (Field Programmable Gate Array). The FPGA can improve the efficiency of data processing and avoid slowing down the data processing speed.

[0059] S102, based on the communication format corresponding to the bus interface, parse the data to be parsed to obtain the configuration data;

[0060] Based on S101, this step aims to parse the data to be parsed based on the communication format corresponding to the bus interface to obtain the configuration data.

[0061] Furthermore, in this step, the data frame of the data to be parsed can be redefined based on the MDIO communication format. That is, the parts of the data to be parsed that are the same as those in the MDIO format are mapped to ensure that the data to be parsed can be effectively transmitted to the physical interface chip.

[0062] Furthermore, this step may include:

[0063] Step 1: Match the corresponding communication format based on the interface information of the bus interface;

[0064] Step 2: Parse the data to be parsed based on the communication format to obtain the configuration data.

[0065] As can be seen, this optional solution mainly describes how to parse and obtain configuration data. In this optional solution, the interface information of the bus interface is matched with the corresponding communication format; based on the communication format, the data to be parsed is parsed to obtain the configuration data. That is, first, it is determined what kind of bus the bus interface is, then the format corresponding to that bus is determined, and the data to be parsed is parsed to obtain the configuration data. The configuration data includes not only the data used for configuration but also parameter information constituting MDIO data. Therefore, the configuration data can include operands, physical interface chip addresses, device addresses, and communication data in MDIO communication.

[0066] S103 sends configuration data to the physical interface chip based on the MDIO communication format, so that the physical interface chip can perform software configuration based on the configuration data.

[0067] Building upon S102, this step aims to send configuration data to the physical interface chip using the MDIO communication format, so that the physical interface chip can perform software configuration based on the configuration data.

[0068] The number of physical interface chips can be one or more. When multiple physical interface chips are present, the chip selection information can be used to select the corresponding chip and send the data.

[0069] The physical interface chip communicates with the outside world only through its MDIO interface. Therefore, this step involves sending data to the chip in the MDIO communication format so that the chip can receive the corresponding data and perform software configuration.

[0070] Furthermore, this step may include:

[0071] Step 1: Convert the configuration data based on the MDIO communication format to obtain MDIO frames;

[0072] Step 2: Send the MDIO frame to the physical interface chip.

[0073] As can be seen, this optional solution mainly describes how to send configuration data. In this optional solution, the configuration data is converted based on the MDIO communication format to obtain MDIO frames; the MDIO frames are then sent to the physical interface chip. The process of converting the configuration data based on the MDIO communication format can employ any conversion method provided by existing technology, and is not specifically limited here.

[0074] Furthermore, this step may include:

[0075] The configuration data is sent to the MDIO interface of the physical interface chip using the MDIO communication format, so that the physical interface chip can receive the configuration data from the MDIO interface.

[0076] As can be seen, this optional solution mainly describes how to send configuration data. In this optional solution, the configuration data is sent to the MDIO interface of the physical interface chip based on the MDIO communication format, so that the physical interface chip can receive the configuration data from the MDIO interface.

[0077] Furthermore, this embodiment may also include:

[0078] Step 1: In response to the read operation command, obtain the data to be read from the physical interface chip based on the MDIO communication format;

[0079] Step 2: Convert the data to be read into the corresponding communication frame based on the communication format of the bus corresponding to the read operation instruction;

[0080] Step 3: Send a communication frame through the bus corresponding to the read operation command.

[0081] As can be seen, this optional solution mainly describes how to read data from the physical interface chip. In this optional solution, in response to a read operation command, the data to be read is obtained from the physical interface chip based on the MDIO communication format; the data to be read is converted into a corresponding communication frame based on the communication format of the bus corresponding to the read operation command; and the communication frame is sent through the bus corresponding to the read operation command. In other words, when an external device needs to read data from the physical interface chip, it can obtain the data through the reverse process described above. That is, the data to be read is obtained from the physical interface chip based on the MDIO communication format; the data to be read is converted into a corresponding communication frame based on the communication format of the bus corresponding to the read operation command; and the communication frame is sent through the bus corresponding to the read operation command. The data to be read is contained in the communication frame.

[0082] Furthermore, this embodiment may also include:

[0083] Step 1: Obtain chip selection data from the data to be parsed;

[0084] Step 2: Determine the physical interface chip to be configured based on the chip selection data;

[0085] Step 3: Send the configuration data to the physical interface chip to be configured based on the MDIO communication format.

[0086] As can be seen, this optional solution mainly describes how to transmit data when multiple chips are involved. In this optional solution, chip selection data is obtained from the data to be parsed; the configuration physical interface chip to be configured is determined based on the chip selection data; and the configuration data is sent to the configuration physical interface chip to be configured based on the MDIO communication format. In other words, this optional solution can select the corresponding chip from multiple chips based on the chip selection data and perform data transmission.

[0087] In summary, this embodiment first obtains the data to be parsed from the bus interface, then parses the data to be parsed based on the communication format corresponding to the bus interface to obtain the configuration data, and finally sends the configuration data to the physical interface chip based on the MDIO communication format to realize the corresponding software configuration, without having to connect an interface conversion module, thus improving the transmission efficiency. At the same time, it can also handle data transmitted from different buses, improving adaptability.

[0088] The following describes a method for configuring a physical interface chip provided in this application through another specific embodiment.

[0089] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the frame format of a method for configuring a physical interface chip provided in an embodiment of this application.

[0090] In this embodiment, the FPGA mainly parses the data from each interface and then configures the PHY chip through the MDIO interface based on the parsed data. Referring to the MDIO communication frame format, a single MDIO communication mainly transmits OP (operation code), PRTAD (PortAddress), DEVAD (device address), and ADDRESS / DATA data. Therefore, as long as the FPGA can correctly parse these data and then simulate the MDIO communication format to send the data to the PHY chip, the purpose of configuring the PHY chip can be achieved.

[0091] Please refer to Figure 3 , Figure 3 This is a schematic diagram of a method for configuring a physical interface chip provided in an embodiment of this application.

[0092] Therefore, in actual operation, the system of this embodiment can be divided into two parts: a data parsing module and a data processing module. The data parsing module is mainly used to parse the uplink transmitted data and pass it to the data processing module, or to receive data returned by the data processing module and convert it into corresponding communication frames to return to the uplink control terminal. The data processing module is mainly used to convert the data parsed by the data parsing module into MDIO frames and send them to the PHY chip, or to parse the data returned by the PHY chip and pass it to the data parsing module. The data processing module can identify the PHY chip that the current uplink control terminal needs to configure based on the parsed data, realizing the function of configuring multiple PHY chips on one control interface.

[0093] Based on the modules described above, this embodiment can implement the following steps, including:

[0094] Step 1: Obtain the data to be parsed from the bus interface;

[0095] Step 2: Parse the data to be parsed based on the communication format corresponding to the bus interface to obtain the configuration data;

[0096] Step 3: Send the configuration data to the physical interface chip based on the MDIO communication format so that the physical interface chip can perform software configuration based on the configuration data.

[0097] Step 4: In response to the read operation command, obtain the data to be read from the physical interface chip based on the MDIO communication format;

[0098] Step 5: Convert the data to be read into the corresponding communication frame based on the communication format of the bus corresponding to the read operation instruction;

[0099] Step 6: Send a communication frame through the bus corresponding to the read operation command.

[0100] As can be seen, the data to be parsed is first obtained from the bus interface, then the data is parsed according to the communication format corresponding to the bus interface to obtain the configuration data, and finally the configuration data is sent to the physical interface chip according to the MDIO communication format to realize the corresponding software configuration, without the need to connect the interface conversion module, which improves the transmission efficiency. At the same time, it can also handle data transmitted by different buses and improve adaptability.

[0101] The following section uses SPI as an example to explain in detail the working principle of the PHY chip configuration process:

[0102] Step 1: Redefine the SPI communication frame format according to the characteristics of MDIO communication. It can be divided into 28 bits of data: OP, PRTAD, DEVAD, and ADDRESS / DATA, which correspond to the operand, PHY address, device address, and communication data in MDIO communication, respectively.

[0103] Step 2: The FPGA parses the above data through the SPI parsing module and then passes it to the data selection module.

[0104] Step 3: The data selection module selects the corresponding data and passes it to the MDIO module based on the currently selected uplink interface (currently the SPI interface).

[0105] Step 4: The MDIO module sends the obtained data to the PHY chip according to the MDIO communication format to realize the PHY chip configuration function.

[0106] Step 5: If the current operation is a read operation, the MDIO module will return the obtained data to the corresponding parsing module via the data selection module.

[0107] Step 6: When defining the SPI communication frame format, an additional 4-bit data SEL can be defined to represent the PHY chip that needs to be configured. This allows different PHY chips to share the same PHY address and device address.

[0108] As can be seen, this embodiment solves the limitation of the original solution that can only configure the PHY chip through I2C, freeing up the I2C interface of a system device so that the PHY chip can be configured through other idle interfaces; at the same time, by redefining the frame format content, the function of multiple PHY chips sharing the same address can be realized.

[0109] As can be seen, this embodiment first obtains the data to be parsed from the bus interface, then parses the data to be parsed based on the communication format corresponding to the bus interface to obtain the configuration data, and finally sends the configuration data to the physical interface chip based on the MDIO communication format to realize the corresponding software configuration, without having to connect an interface conversion module, thus improving the transmission efficiency. At the same time, it can also handle data transmitted from different buses, improving adaptability.

[0110] The apparatus for configuring a physical layer chip provided in the embodiments of this application will be described below. The apparatus for configuring a physical layer chip described below and the method for configuring a physical layer chip described above can be referred to in correspondence with each other.

[0111] Please refer to Figure 4 , Figure 4 This is a schematic diagram of a device for configuring a physical layer chip, provided in an embodiment of this application.

[0112] In this embodiment, the device may include:

[0113] Data acquisition module 100 is used to acquire data to be parsed from the bus interface;

[0114] The data parsing module 200 is used to parse the data to be parsed based on the communication format corresponding to the bus interface to obtain the configuration data;

[0115] The configuration data sending module 300 is used to send configuration data to the physical interface chip based on the MDIO communication format, so that the physical interface chip can perform software configuration based on the configuration data.

[0116] Optionally, the data acquisition module 100, specifically an FPGA, is used to acquire the data to be parsed from the bus interface.

[0117] Optionally, the data parsing module 200 is specifically used to match the interface information of the bus interface with the corresponding communication format; and to parse the data to be parsed based on the communication format to obtain the configuration data.

[0118] Optionally, the configuration data sending module 3000 is specifically used to convert the configuration data based on the MDIO communication format to obtain MDIO frames; and send the MDIO frames to the physical interface chip.

[0119] Optionally, the configuration data sending module 3000 is specifically used to send configuration data to the MDIO interface of the physical interface chip based on the MDIO communication format, so that the physical interface chip can receive the configuration data from the MDIO interface.

[0120] Optionally, the device may also include:

[0121] The data read module is used to respond to read operation commands, obtain the data to be read from the physical interface chip based on the MDIO communication format, convert the data to be read into the corresponding communication frame based on the communication format of the bus corresponding to the read operation command, and send the communication frame through the bus corresponding to the read operation command.

[0122] Optionally, the device may also include:

[0123] The chip selection module is used to obtain chip selection data from the data to be parsed; and to determine the configuration physical interface chip to be configured based on the chip selection data.

[0124] Correspondingly, the configuration data sending module 3000 is specifically used to send configuration data to the configuration physical interface chip to be configured based on the MDIO communication format.

[0125] As can be seen, this embodiment first obtains the data to be parsed from the bus interface, then parses the data to be parsed based on the communication format corresponding to the bus interface to obtain the configuration data, and finally sends the configuration data to the physical interface chip based on the MDIO communication format to realize the corresponding software configuration, without having to connect an interface conversion module, thus improving the transmission efficiency. At the same time, it can also handle data transmitted from different buses, improving adaptability.

[0126] This application also provides a computing device, please refer to... Figure 5 , Figure 5 This application provides a schematic diagram of the structure of a computing device, which may include:

[0127] Memory, used to store computer programs;

[0128] A processor, used to execute computer programs, can implement the steps of any of the methods described above for configuring a physical interface chip.

[0129] like Figure 5 The diagram shows the structural composition of a computing device, which may include a processor 10, a memory 11, a communication interface 12, and a communication bus 13. The processor 10, memory 11, and communication interface 12 all communicate with each other through the communication bus 13.

[0130] In this embodiment, the processor 10 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic devices.

[0131] The processor 10 can call the program stored in the memory 11. Specifically, the processor 10 can execute the operations in the embodiment of the abnormal IP identification method.

[0132] The memory 11 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment, the memory 11 stores at least a program for implementing the following functions:

[0133] Obtain the data to be parsed from the bus interface;

[0134] The data to be parsed is parsed based on the communication format corresponding to the bus interface to obtain the configuration data;

[0135] The configuration data is sent to the physical interface chip using the MDIO communication format, so that the physical interface chip can perform software configuration based on the configuration data.

[0136] In one possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.

[0137] In addition, memory 11 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0138] Communication interface 12 can be an interface for the communication module, used to connect with other devices or systems.

[0139] Of course, it should be noted that, Figure 5 The structure shown does not constitute a limitation on the computing device in the embodiments of this application. In practical applications, the computing device may include more than Figure 5 More or fewer components as shown, or combinations of certain components.

[0140] As can be seen, this embodiment first obtains the data to be parsed from the bus interface, then parses the data to be parsed based on the communication format corresponding to the bus interface to obtain the configuration data, and finally sends the configuration data to the physical interface chip based on the MDIO communication format to realize the corresponding software configuration, without having to connect an interface conversion module, thus improving the transmission efficiency. At the same time, it can also handle data transmitted from different buses, improving adaptability.

[0141] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps of any of the above-described methods for configuring a physical interface chip.

[0142] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0143] For a description of the computer-readable storage medium provided in this application, please refer to the above method embodiments; further details will not be repeated here.

[0144] As can be seen, this embodiment first obtains the data to be parsed from the bus interface, then parses the data to be parsed based on the communication format corresponding to the bus interface to obtain the configuration data, and finally sends the configuration data to the physical interface chip based on the MDIO communication format to realize the corresponding software configuration, without having to connect an interface conversion module, thus improving the transmission efficiency. At the same time, it can also handle data transmitted from different buses, improving adaptability.

[0145] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0146] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0147] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0148] The foregoing has provided a detailed description of a method, apparatus, computing device, and computer-readable storage medium for configuring a physical interface chip, as provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method of configuring a physical interface chip, the method comprising: The application relates to a method for realizing software configuration of a physical interface chip based on a bus interface. The SPI communication frame format is redefined according to the characteristics of MDIO communication: 28-bit data are divided into OP, PRTAD, DEVAD and ADDRESS / DATA, which respectively correspond to the operation number, the PHY address, the device address and the communication data in MDIO communication; the SPI communication frame format further comprises SEL representing the physical interface chip currently needing to be configured; The FPGA obtains, from the bus interface, to-be-analyzed data which cannot be directly sent to the physical interface chip through the bus interface; the to-be-analyzed data are data encapsulated through a communication format corresponding to the bus and contain configuration data for software configuration; the configuration data comprise the operation number, the physical interface chip address, the device address and the communication data in MDIO communication; The to-be-analyzed data are analyzed based on the interface information of the bus interface and the corresponding communication format: the same parts in the to-be-analyzed data and the MDIO format are matched, so that the operation number, the physical interface chip address, the device address and the communication data in MDIO communication are obtained; The operation number, the physical interface chip address, the device address and the communication data in MDIO communication are sent to the physical interface chip based on the format of MDIO communication, so that the physical interface chip realizes software configuration based on the operation number, the physical interface chip address, the device address and the communication data in MDIO communication; The physical interface chip only has an MDIO interface for communication with the outside, the configuration data are converted based on the format of MDIO communication, the MDIO frame is obtained, and the MDIO frame is sent to the physical interface chip; or the operation number, the physical interface chip address, the device address and the communication data in MDIO communication are sent to the MDIO interface of the physical interface chip based on the format of MDIO communication, so that the physical interface chip receives the configuration data from the MDIO interface; when there are a plurality of physical interface chips, chip selection data are obtained from the to-be-analyzed data, the configuration physical interface chip to be configured is determined based on the chip selection data, and the operation number, the physical interface chip address, the device address and the communication data in MDIO communication are sent to the configuration physical interface chip to be configured based on the format of MDIO communication; When an external device needs to read data from the physical interface chip, to-be-read data are obtained from the physical interface chip based on the format of MDIO communication in response to a read operation instruction, the to-be-read data are converted into a corresponding communication frame based on the communication format of the bus corresponding to the read operation instruction, and the communication frame is sent through the bus corresponding to the read operation instruction; the communication frame is the to-be-read data.

2. An apparatus for configuring a physical layer chip, the apparatus comprising: The application relates to a method for realizing software configuration of a physical interface chip based on a bus interface. The data acquisition module is used to redefine the SPI communication frame format according to the characteristics of MDIO communication: it consists of 28 bits of data: OP, PRTAD, DEVAD, and ADDRESS / DATA, corresponding to the operands, PHY address, device address, and communication data in MDIO communication, respectively. The SPI communication frame format also includes the SEL representing the physical interface chip that needs to be configured. The FPGA acquires data to be parsed from the bus interface that cannot be directly sent to the physical interface chip through the bus interface. The data to be parsed is data encapsulated in the communication format corresponding to the bus and includes configuration data for software configuration. The configuration data includes the operands, physical interface chip address, device address, and communication data in MDIO communication. The data parsing module is used to match the corresponding communication format based on the interface information of the bus interface, and to parse the data to be parsed based on the communication format: the parts of the data to be parsed that are the same as the MDIO format are matched to obtain the operands, physical interface chip address, device address and communication data in MDIO communication; A configuration data sending module is used to send the operands, physical interface chip address, device address, and communication data from the MDIO communication to the physical interface chip based on the MDIO communication format, so that the physical interface chip can perform software configuration based on the operands, physical interface chip address, device address, and communication data from the MDIO communication; it is also used to: convert the configuration data into an MDIO frame based on the MDIO communication format, and send the MDIO frame to the physical interface chip, since the physical interface chip only has an MDIO interface for external communication; or, send the operands, physical interface chip address, device address, and communication data from the MDIO communication to the MDIO interface of the physical interface chip based on the MDIO communication format, so that the physical interface chip can receive the configuration data from the MDIO interface; when there are multiple physical interface chips, chip selection data is selected from the data to be parsed, the configuration physical interface chip to be configured is determined based on the chip selection data, and the operands, physical interface chip address, device address, and communication data from the MDIO communication are sent to the configuration physical interface chip to be configured based on the MDIO communication format; The data read module is used to respond to read operation commands when external devices need to read data from the physical interface chip. It obtains the data to be read from the physical interface chip based on the MDIO communication format and converts the data to be read into the corresponding communication frame based on the communication format of the bus corresponding to the read operation command. A communication frame is sent via the bus corresponding to the read operation command; the communication frame contains the data to be read.

3. A computing device, comprising: include: Memory, used to store computer programs; A processor, used to implement the steps of the method for configuring a physical interface chip as described in claim 1 when executing the computer program.

4. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the method for configuring the physical interface chip according to claim 1.

Citation Information

Patent Citations

  • System for transition of buses with different timing sequences and communication method thereof

    CN103729322A