Method of Ethernet PHY chip proxy based on FPGA
By modifying the module and writing Verilog programs in FPGA, combined with multi-band matching resistors, the problem of pin incompatibility when replacing Ethernet PHY chips was solved, compatibility and performance were improved, and efficient adaptation between chips was achieved.
Patent Information
- Application Number
- CN202410933126.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-07-12
AI Technical Summary
During the Ethernet PHY chip replacement process, due to differences in pin functions, performance, and compatibility between different types of chips, the new chip cannot directly replace the old chip position, and additional adaptation work is required to ensure compatibility.
Using an FPGA-based method, we modified the FPGA internal modules and used IO ports to replace new pins, and wrote modular Verilog programs for signal transmission, combined with multi-band matching resistors to achieve inter-chip compatibility and performance improvement.
It effectively solves the problem of pin incompatibility when replacing chips, improves overall compatibility and performance, and facilitates reuse and expansion through modular design.
Smart Images

Figure CN118474566B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method for Ethernet PHY chip proxy based on FPGA. Background Art
[0002] In modern communications, Ethernet PHY chip is an Ethernet physical layer interface chip, which is a key component in Ethernet communication and is used to convert data from the physical layer into digital signals to achieve high-speed data transmission and communication. Ethernet PHY chip is widely used in the field of computer networks, covering cloud computing, wireless communications, industrial automation, Internet of Vehicles, Internet of Things and many other fields.
[0003] In the process of using Ethernet PHY chips, especially when used for a long time, the Ethernet PHY chip will inevitably be worn out, resulting in performance problems or even stopping operation. At this time, the original Ethernet PHY chip needs to be replaced, but it is not necessarily possible to find the same chip of the original model, and the original chip may even have been discontinued. At this time, it is necessary to use other Ethernet PHY chips with similar functions but different models for replacement.
[0004] However, due to the many differences between different models of Ethernet PHY chips, such as functional differences, performance differences, compatibility differences, and operational differences, the new chip in charge of the agent cannot directly replace the old chip. These differences cover many aspects, including the differences in external circuits required by Ethernet PHY chips, different pin functions, differences in special functions, different software configuration methods, and different register operations. This means that if you want to replace an Ethernet PHY chip, you need to do additional adaptation work to ensure that the new Ethernet PHY chip is compatible with the original equipment and network. Summary of the invention
[0005] In view of the problems existing in the above-mentioned chip replacement, the present invention aims to propose a method of Ethernet PHY chip proxy based on FPGA, which modifies the module inside the FPGA and uses the IO port of the FPGA to proxy the newly added pins when replacing the chip, effectively solving the problem of pin incompatibility when replacing the chip; at the same time, a modular Verilog program is written to be responsible for the corresponding signal transmission, combined with multi-band matching resistors, to effectively improve the overall compatibility and performance.
[0006] This is achieved through the following technical solutions:
[0007] A method for Ethernet PHY chip proxy based on FPGA, for sequentially connected ARM, FPGA, Ethernet PHY chip B and external interface, using Ethernet PHY chip A to replace Ethernet PHY chip B, the method comprising the following steps:
[0008] S1. Determine differences and configure FPGA: Determine the pin function differences, external circuit requirements, and built-in register operation differences between Ethernet PHY chip A and Ethernet PHY chip B; set up an ARM MDIO communication module, a register table, a PHY MDIO communication module, and multiple IO ports in the FPGA. The ARM MDIO communication module is used for data exchange between FPGA and ARM, and the PHY MDIO communication module is used for data exchange between FPGA and Ethernet PHY chip A. The register table is used for the ARM MDIO communication module to send register addresses and write data to the PHY MDIO communication module.
[0009] S2, pin replacement and adaptation: use one or more IO ports in the FPGA to replace the pins that need to be added; according to the difference in external circuit requirements in step S1, add matching resistors and bias circuits between the Ethernet PHY chip A and the external interface, adjust the matching resistors and bias circuits and the built-in clock signal in the FPGA, and adapt the Ethernet PHY chip A and the external interface;
[0010] S3, write a program for data transmission: in the ARM MDIO communication module of step S1, write a Verilog1 program; in the register table of step S1, write a Verilog2 program according to the difference in built-in register operation; in the PHYMDIO communication module of step S1, write a Verilog3 program; wherein the Verilog1 program, the Verilog2 program and the Verilog3 program all adopt the MDIO data frame format;
[0011] Use the Verilog1 program to parse the data sent by ARM to FPGA to obtain parsed data; use the Verilog2 program to map the parsed data to obtain mapped data; use the Verilog3 program to obtain the data to be transmitted from the mapped data and transmit it to Ethernet PHY chip A;
[0012] S4, test adjustment: connect the external interface to the external test equipment for testing. The external interface receives the data to be transmitted in step S3 and transmits it to the test equipment. The test equipment is used to compare the data to be transmitted with the expected data. The matching resistor, bias circuit and the built-in clock signal in the FPGA are readjusted according to the comparison result. Return to the process of writing the program for data transmission in step S3, and loop until the data to be transmitted meets the expected data, then stop the operation.
[0013] By modifying the internal modules of the FPGA and using the FPGA's IO port to replace the new pins when replacing the chip, the problems of pin incompatibility and insufficient functions when replacing the chip are effectively solved; at the same time, a Verilog program in the MDIO data frame format is written to be responsible for the corresponding signal transmission, which is more convenient for modular design, reuse and expansion, and effectively improves the overall compatibility.
[0014] Preferably, inside the FPGA, differential routing is used when the ARM MDIO communication module sends data to the register table and when the register table sends data to the PHYMDIO communication module. Using differential routing can improve the anti-interference ability and signal transmission ability.
[0015] Preferably, in step S1, the Ethernet PHY chip A uses paging technology to expand the address space, and uses the expanded address space to define 32 internal registers. The paging technology can effectively increase the address space inside the Ethernet PHY chip A, so that more internal registers can be customized to facilitate adaptation of multiple functions.
[0016] Preferably, in step S1, after setting the ARM MDIO communication module, register table, PHY MDIO communication module and multiple IO ports in the FPGA, continue to set the clock circuit, special function pin configuration module and function pin configuration module; use the clock circuit to send the same clock signal to the FPGA and Ethernet PHY chip A respectively, and use the special function pin configuration module and function pin configuration module to support data interaction between the FPGA and the Ethernet PHY chip A. Use the clock circuit to effectively control the synchronous transmission of data.
[0017] Preferably, in step S2, the matching resistor uses a multi-band matching resistor, which has multiple resistance values, and the multi-band matching resistor selects the resistance value according to the frequency band corresponding to the Ethernet PHY chip A during data interaction. The use of a multi-band matching resistor can be compatible with signal transmission in multiple frequency bands.
[0018] Preferably, the Verilog1 program, Verilog2 program and Verilog3 program written in step S3 all adopt a parallel processing mechanism, and each program adopts a modular design. The parallel processing mechanism can speed up the processing efficiency, and the modular design is easy to change, so that it is convenient to make corresponding modifications when replacing chips and debugging and adjusting.
[0019] Preferably, in step S4, the external interface adopts an RJ-45 interface, and a TSL encryption mechanism is set when the RJ-45 interface receives the data to be transmitted sent by the Ethernet PHY chip A and transmits it to the external test equipment. The RJ-45 interface has high compatibility, and combined with the TSL encryption mechanism, it can transmit signals more safely and effectively.
[0020] Compared with the prior art, the present invention has the following beneficial effects:
[0021] The technical solution of the present invention modifies the module inside the FPGA and uses the IO port of the FPGA to replace the new pins when the chip is replaced, effectively solving the problem of pin incompatibility when the chip is replaced; at the same time, a modular Verilog program is written to be responsible for the corresponding signal transmission, combined with multi-band matching resistors, to effectively improve the overall compatibility and performance; in addition, multi-band matching resistors and functional pin configuration modules are added to further improve compatibility and performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flowchart of a method for Ethernet PHY chip proxy based on FPGA;
[0023] Figure 2 A schematic diagram of the structure of a method for Ethernet PHY chip proxy based on FPGA after replacing the chip;
[0024] Figure 3 This is a structural diagram of the FPGA interacting with the Ethernet PHY chip A and ARM respectively. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0026] Example
[0027] like Figure 1 The figure shows a flowchart of a method for Ethernet PHY chip proxy based on FPGA, which uses the IO port of FPGA to proxy the newly added pins, and at the same time modifies each module in FPGA and writes Verilog program to be responsible for signal transmission, thereby solving the compatibility problem when replacing the chip and improving the transmission efficiency.
[0028] A method for Ethernet PHY chip proxy based on FPGA, for sequentially connected ARM, FPGA, Ethernet PHY chip B and external interface, using Ethernet PHY chip A to replace Ethernet PHY chip B, the method comprising the following steps:
[0029] S1. Determine differences and configure FPGA:
[0030] Firstly, the functions and specifications of Ethernet PHY chip A and Ethernet PHY chip B are analyzed and compared, and the pin function differences, external circuit requirements and built-in register operation differences between Ethernet PHY chip A and Ethernet PHY chip B are determined. These three differences are the main factors for incompatibility when replacing chips. The pin function differences include different pin numbers and different pin functions, the external circuit requirements include different requirements for external circuit voltage and current, and the built-in register operation differences include different operating environments and different operating logics required when the built-in registers are running. Then, the FPGA is configured and modified, and the ARM MDIO communication module, register table, PHY MDIO communication module and multiple IO ports are set in the FPGA. The ARM MDIO communication module is used for data interaction between FPGA and ARM, and the PHY MDIO communication module is used for data interaction between FPGA and Ethernet PHY chip A. The register table is the register module, which is responsible for signal mapping, and maps the register address signal and write data of the ARMMDIO communication module to the PHY MDIO communication module to achieve efficient signal transmission.
[0031] In this embodiment, in step S1, after the ARM MDIO communication module, the register table, the PHY MDIO communication module and the multiple IO ports are set in the FPGA, a clock circuit, a special function pin configuration module and a function pin configuration module are further set; the clock circuit is used to send clock signals to the FPGA and the Ethernet PHY chip A respectively, so as to control the operation synchronization and data synchronization of signal transmission; the special function pin configuration module and the function pin configuration module are used to connect the FPGA and the Ethernet PHY chip A, so as to make up for the problem of pin function differences and support data interaction between the FPGA and the Ethernet PHY chip A.
[0032] In this embodiment, in step S1, the address space of the register inside the Ethernet PHY chip A is 5 bits, and the address space can be expanded by using paging technology, and 32 internal registers that comply with the Ethernet specification are defined by using the expanded address space. These 32 internal registers can be used as special function registers to cooperate with the smooth operation of the clock circuit, the special function pin configuration module and the function pin configuration module, so as to adapt to multiple functions. The Ethernet specification here can adopt the IEEE802.3 specification, which defines the functions of the 16 registers at addresses 0-15 in the internal registers, and the registers at addresses 16-31 can be freely set by the staff, which is convenient for modification and improvement.
[0033] S2, alternative pins and adaptations:
[0034] In view of the different number of pins when replacing the chip, one or more IO ports in the FPGA can be used to replace the pins that need to be added. The number of IO ports used is the same as the number of pins that need to be added. FPGA is programmable, and the staff can customize the function of each IO port on the FPGA through programming. At the same time, these IO ports can also be configured to support multiple interface standards and protocols, so as to achieve the function of replacing pins with higher compatibility.
[0035] Then, in response to the difference in external circuit requirements in step S1, a multi-band matching resistor and a bias circuit are added between the Ethernet PHY chip A and the external interface, and the multi-band matching resistor and the bias circuit as well as the built-in clock signal in the FPGA are adjusted to adapt the Ethernet PHY chip A and the external interface. The bias circuit is responsible for setting the bias voltage or bias current to meet the requirements of the Ethernet chip A for the external circuit. The multi-band matching resistor will perform pull-up or pull-down operations, and it has multiple resistance values, which change according to the frequency of the transmission signal. The multi-band matching resistor selects the resistance value according to the corresponding frequency band when the Ethernet PHY chip A performs data interaction, so that it can be compatible with signal transmission in different frequency bands, thereby improving the universality and compatibility when replacing the chip.
[0036] In addition, if after replacing the chip, the frequency of the signal to be transmitted remains stable or does not change much during the overall operation, for cost considerations, multi-band resistors can be used instead of ordinary fixed resistors for pull-up or pull-down operations, effectively reducing cost pressure.
[0037] S3. Write a program for data transmission:
[0038] In the ARM MDIO communication module of step S1, a Verilog1 program is written, and the data sent by ARM to FPGA is parsed by the Verilog1 program to obtain parsed data, which may include an operation code, a PHY cache address, a register address 1, and write operation input data; in the register table of step S1, a Verilog2 program is written according to the difference in built-in register operation, and the parsed data is mapped by the Verilog2 program to obtain the mapped data; in the PHY MDIO communication module of step S1, a Verilog3 program is written, and the Verilog3 program is used to obtain the data to be transmitted from the mapped data and transmit it to the Ethernet PHY chip A; wherein the Verilog1 program, the Verilog2 program, and the Verilog3 program all adopt the MDIO data frame format, the parallel processing mechanism, and the modular design. The parallel processing mechanism can speed up the processing efficiency, and the modular design is easy to change, which is convenient for corresponding modifications when replacing chips and debugging and adjusting. The MDIO data frame format is defined at the hardware level, so that the Ethernet PHY chip A can quickly and efficiently transmit signals with other modules or interfaces. The MDIO data frame format can be: preamble + start signal + operation code + PHY buffer address + register address + conversion code + data to be transmitted; the preamble is the starting part of the data frame format to ensure that the Ethernet PHY chip A can recognize it; the start signal is used to identify the starting part of the data frame; the conversion code is used to support bidirectional transmission.
[0039] It should be noted that the Verilog program is a hardware description language that mainly describes the structure and behavior of logic circuits and systems. Parallel statements can be used in Verilog programs to implement parallel processing mechanisms. Many statements in Verilog are executed in parallel, such as multiple assign statements or continuous assignment statements can be executed simultaneously. In addition, Verilog programs also support modularization and instantiation: Verilog programs support modules, which can divide complex circuits into multiple modules. These modules can be logically parallel because they represent different hardware units, which can work simultaneously physically.
[0040] like Figure 3As shown, it is a structural diagram of FPGA interacting with Ethernet PHY chip A and ARM respectively. ARM is a commonly used microprocessor. When ARM needs to read specific data in Ethernet PHY chip A: ARM sends a first MDC signal and a first MDIO signal to the ARMMDIO communication module. The first MDC signal is a clock signal, which provides clock synchronization for the first MDIO signal; the first MDIO signal is a signal that allows bidirectional transmission. A bidirectional transmission line is required for transmission. The first MDIO signal can instruct the ARM MDIO communication module to operate the PHY MDIO communication module in cooperation with the first MDC signal. The operation may include sending an operation code, sending a PHY cache address, sending a register address 1, and sending write operation input data.
[0041] When the ARM MDIO communication module sends register address 1 and write operation input data, a register table is also set between the ARM MDIO communication module and the PHY MDIO communication module. The register table maps register address 1 to register address 2 and sends it to the PHY MDIO communication module, and maps the write operation input data to write operation output data and sends it to the PHYMDIO communication module. The mapping is performed here because after the chip is replaced, the Ethernet PHY chip A may not have register address 1 or there is no vacancy at the position corresponding to register address 1, so the register address 1 is mapped and converted into the existing register address 2 of the Ethernet PHY chip A, and the write data input signal is changed accordingly and converted into a data form that is compatible with the Ethernet PHY chip A. The ARM MDIO communication module determines the operation code and the PHY cache address according to the first MDIO signal and sends them to the PHY MDIO communication module. The operation code indicates a write operation or a read operation, and the PHY cache address is used to configure and manage the Ethernet PHY chip A in conjunction with the operation code, such as setting the working speed, working mode and various parameters.
[0042] Based on the operation code, PHY cache address, register address 2 and possible write operation output data, the PHYMDIO communication module generates a second MDC signal and a second MDIO signal and sends them to the Ethernet PHY chip A. The second MDIO signal also uses a bidirectional transmission line. The second MDC signal is a clock signal, which can be generated by a built-in clock circuit in the FPGA and is used to provide clock synchronization for the second MDIO signal. The second MDIO signal is first driven and controlled by the FPGA to instruct the Ethernet PHY chip A to complete the write operation or the read operation, thereby writing the data to be written in the first MDIO signal into the Ethernet PHY chip A, or obtaining the read data from the corresponding internal register in the Ethernet PHY chip A; when the second MDIO signal is transmitted to the Ethernet PHY chip A, it will be driven and controlled by the Ethernet PHY chip A instead, so as to read the read data corresponding to the PHY cache address and then transmit it to the PHY MDIO communication module; the PHY MDIO communication module sends the read data to the ARMMDIO communication module, and then transmits it to the ARM, and finally completes the reading.
[0043] It should be noted that the two clock signals can be generated by the clock circuit and then sent to the ARM and FPGA respectively, or the first MDC signal can be directly generated by the ARM and the second MDC signal can be generated by the FPGA. The first MDC signal is used between the ARM and the AMR MDIO communication module, and the second MDC signal is used between the PHY MDIO communication module and the Ethernet PHY chip A. The two clock signals can be the same for data synchronization, or different for orderly operation. The specific selection can be made according to the requirements for delay in the actual design. In addition, when a write operation is required, the PHY MDIO communication module will receive the operation code, PHY cache address, register address 2 and write operation output data; when a read operation is required, the PHY MDIO communication module will receive the operation code, PHY cache address and register address 2.
[0044] S4, test adjustment: connect the external interface to the external test equipment for testing. The external interface receives the data to be transmitted in step S3 and transmits it to the test equipment. The test equipment is used to compare the data to be transmitted with the expected data. The matching resistor, bias circuit and the built-in clock signal in the FPGA are readjusted according to the comparison result. Return to the process of writing the program for data transmission in step S3, and loop until the data to be transmitted meets the expected data, then stop the operation.
[0045] In this embodiment, in step S4, the external interface uses an RJ-45 interface. When the RJ-45 interface receives the data to be transmitted from the Ethernet PHY chip A and transmits it to the external test equipment, a TSL encryption mechanism is set. TSL encryption is a security protocol for ensuring secure communication, avoiding the impact of security risks in the external test equipment on the Ethernet PHY chip A, FPGA and ARM. The RJ-45 interface has high compatibility, and combined with the TSL encryption mechanism, it can transmit signals more safely and effectively.
[0046] In this embodiment, inside the FPGA, differential routing is used when the ARM MDIO communication module sends data to the register table and when the register table sends data to the PHY MDIO communication module. That is, when any signal is sent, one signal is converted into two signals, and two physically closely adjacent and mutually coupled signal lines are used. The two signal lines respectively transmit two signals with the same content and equal amplitude but opposite phases, thereby improving the anti-interference capability and signal transmission capability.
[0047] like Figure 2 As shown, it is a schematic diagram of the structure of a method for Ethernet PHY chip proxy based on FPGA after replacing the chip, combined with Figure 2 As shown, here is a specific application example:
[0048] The Ethernet PHY chip A used is JL1111, and the Ethernet PHY chip B replaced is DP83848. The operations are performed in the following order.
[0049] 1) Identify pinout and function differences:
[0050] Table 1: Pin and function differences between DP83848 and JL1111:
[0051] name DP83848 JL1111 LEDs 4 2 PHY address bits 6 2 JTAG have none Internal LDO have have SNI have none 3.3V 3 4 GND 5 9
[0052] As shown in Table 1, 3.3V is the power pin, GND is the ground pin, and JTAG is the abbreviation of Joint Test Action Group, which is a debugging interface. It originally refers to the development team that developed the IEEE 1149.1 standard. Later, JTAG was used to refer to the standard and the architecture, bus and interface using the standard. LEDs refers to the number of LEDs. When replacing DP83848, JL1111 lacks two LEDs, that is, it lacks two LED pins. It also lacks 4 bits in the PHY address bit number, which requires the use of register tables for mapping conversion during signal transmission. SNI is a 10 Mb / s serial network interface, and JL1111 also lacks this part. The internal LDO is an internal linear regulator. The LDO inside the DP83848 is a linear regulator that implements the LDO function through an external capacitor, but the output of PFBOUT can only supply the DP83848 itself and cannot be connected to the power supply of the external circuit; the internal LDO of the JL1111 is also implemented by external capacitors, but the internal LDO of the JL1111 has an enable pin that needs to be set to a high level to eliminate the impact caused by the difference in the internal LDO.
[0053] 2) Different external circuits according to requirements:
[0054] Table 2: Differences in external circuit requirements between DP83848 and JL1111
[0055] ;
[0056] As shown in Table 2, ±1% means that the error range is within 1%, and the pin number is the pin position or number where the bias resistor is connected to chip A.
[0057] In addition, DP83848 requires a pair of 49.9Ω matching resistors biased to 3.3V power supply. Because both DP83848 and JL1111 support Auto-MDIX function, for both PHY chips, the matching resistors of both the receiving link and the transmitting link need to be biased to 3.3V power supply, and the matching resistor of JL1111 is 50Ω.
[0058] 3) For the clock circuit:
[0059] DP83848 requires a 25MHz±50 ppm crystal oscillator, and JL1111 requires a 25 / 50MHz±50 ppm crystal oscillator. The clock signal sent by the clock circuit is modified according to the change of the crystal oscillator.
[0060] 4) For LED pins:
[0061] The LED pin of DP83848 can be defined by the combinational logic of LED_CFG[1:0] through external pin PIN 40, or it can be directly implemented by writing the register REG18; the difference between LED_CFG or register REG18 defines the opening and flashing of the LED pin in different modes.
[0062] The external pins of JL1111 define the LED mode by reusing the AD pins of PHY or by registers REG18 and REG19. At the same time, there are only two LED lights, and the logic combination of the two LEDs can replace the functions of the two LEDs in the source chip. As for the two missing LED pins, they are replaced by the two IO ports of the FPGA.
[0063] 5) Address configuration for the chip:
[0064] For DP83848, RXD[3:0] and COL pins are used to set the PHY address at power-on or reset. Pin COL has a weak pull-up resistor, while RXD[3:0] has a weak pull-down resistor. Therefore, the default PHY address of DP83848 is 01h. To change the default PHY address, you need to add a 2.2KΩ pull-up or pull-down resistor to the corresponding pin circuit.
[0065] For JL1111, the PHY address and LED pin are multiplexed because there are only two LED pins. Therefore, the PHY cache address of JL1111 is only 00, 01, 10 and 11. At the same time, these two pins cannot be directly connected to the power supply or ground, so it is also necessary to add resistors to pull up or down to the corresponding power supply or ground. The resistance value is 4.7KΩ.
[0066] 6) For register operations:
[0067] The 0x00~0x06 registers inside DP83848 and JL1111 are exactly the same, and the definitions and functions of the other registers are different. When the register position required by the signal does not correspond to the internal register position in JL111, the register table is used for mapping conversion to convert the register position required by the signal to the corresponding internal register position in JL111.
[0068] 7) For FPGA:
[0069] In the ARM MDIO communication module, write a Verilog1 program to parse the data and signals sent by ARM to FPGA and obtain the parsed data; in the register table, write a Verilog2 program to perform mapping based on the differences in built-in register operations before and after chip replacement; in the PHY MDIO communication module, write a Verilog3 program to obtain the data to be transmitted from the mapped data and transmit it to JL1111.
[0070] After completing the above operations, connect the device under test to JL1111 through the RJ-45 interface to test whether ARM can write specific data into JL1111. ARM sends the first MDC signal and the first MDIO signal to the ARM MDIO communication module of the FPGA; the ARM MDIO communication module uses the Verilog1 program to parse, determine the operation code op_code[1:0] and the PHY cache address phy_addr[4:0] that needs to be configured and send them to the PHY MDIO communication module. At the same time, the ARM MDIO communication module also transmits the register address reg_addr1[4:0] to which the specific data is to be written and the write data op_wr_data-in[15:0] corresponding to the specific data to the register table. The register table uses the Verilog2 program to map the register address and the write data, converting them into the register address reg_addr2[4:0] existing in JL1111 and the compatible write data op_wr_data-out[15:0], and then transmits them to the PHY MDIO communication module; the PHY The MDIO communication module uses the Verilog3 program to parse the received content, generates a second clock signal and a second MDIO signal and sends them to JL1111. JL1111 stores the write data to the corresponding position of the internal register according to the content of the two signals.
[0071] Finally, use external test equipment to read the data in JL1111, compare the read data with the specific data, and if it is found to meet the requirements, the test is completed and all operations are stopped.
[0072] In summary, the present invention modifies the modules inside the FPGA and uses the IO port of the FPGA to replace the new pins when the chip is replaced, which effectively solves the problem of pin incompatibility when the chip is replaced; at the same time, a modular Verilog program is written to be responsible for the corresponding signal transmission, combined with multi-band matching resistors, to effectively improve the overall compatibility and performance; in addition, multi-band matching resistors and functional pin configuration modules are added to further improve compatibility and performance, which is significantly progressive.
[0073] The above embodiments are only for illustrating the technical idea of the present invention, and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the present invention.
Claims
1. A method for Ethernet PHY chip proxy based on FPGA, wherein Ethernet PHY chip A is used to replace Ethernet PHY chip B for ARM, FPGA, Ethernet PHY chip B and external interface connected in sequence, characterized in that: The steps include: S1. Determine the difference and configure FPGA: Determine the pin function difference, external circuit requirement difference and built-in register operation difference between Ethernet PHY chip A and Ethernet PHY chip B; set up ARM MDIO communication module, register table, PHY MDIO communication module and multiple IO ports in FPGA, the ARM MDIO communication module is used for data exchange between FPGA and ARM, the PHYMDIO communication module is used for data exchange between FPGA and Ethernet PHY chip A, and the register table is used for the ARM MDIO communication module to send register addresses and write data to the PHY MDIO communication module; wherein, differential routing is used when the ARM MDIO communication module sends data to the register table and when the register table sends data to the PHY MDIO communication module; S2, pin replacement and adaptation: use one or more IO ports in the FPGA to replace the pins that need to be added; according to the difference in external circuit requirements in step S1, add matching resistors and bias circuits between the Ethernet PHY chip A and the external interface, adjust the matching resistors and bias circuits and the built-in clock signal in the FPGA, and adapt the Ethernet PHY chip A and the external interface; S3, write a program for data transmission: in the ARM MDIO communication module of step S1, write a Verilog1 program; in the register table of step S1, write a Verilog2 program according to the difference in built-in register operation; in the PHY MDIO communication module of step S1, write a Verilog3 program; wherein the Verilog1 program, the Verilog2 program and the Verilog3 program all adopt the MDIO data frame format; Use the Verilog1 program to parse the data sent by ARM to FPGA to obtain parsed data; use the Verilog2 program to map the parsed data to obtain mapped data; use the Verilog3 program to obtain the data to be transmitted from the mapped data and transmit it to Ethernet PHY chip A; S4, test adjustment: connect the external interface to the external test equipment for testing. The external interface receives the data to be transmitted in step S3 and transmits it to the external test equipment. The test equipment is used to compare the data to be transmitted with the expected data. The matching resistor, bias circuit and the built-in clock signal in the FPGA are readjusted according to the comparison result. Return to the process of writing the program for data transmission in step S3, and loop until the data to be transmitted meets the expected data, then stop the operation.
2. The method of an Ethernet PHY chip proxy based on FPGA according to claim 1, characterized in that: In step S1, the Ethernet PHY chip A uses paging technology to expand the address space, and uses the expanded address space to define 32 internal registers.
3. The method of an Ethernet PHY chip proxy based on FPGA according to claim 1, characterized in that: In step S1, after setting the ARM MDIO communication module, the register table, the PHY MDIO communication module and the multiple IO ports in the FPGA, continue to set the clock circuit, the special function pin configuration module and the function pin configuration module; The clock circuit is used to send the same clock signal to the FPGA and the Ethernet PHY chip A respectively, and the special function pin configuration module and the function pin configuration module are used to support data interaction between the FPGA and the Ethernet PHY chip A.
4. The method of an Ethernet PHY chip proxy based on FPGA according to claim 1, characterized in that: In step S2, the matching resistor uses a multi-band matching resistor, and the multi-band matching resistor has multiple resistance values. The multi-band matching resistor selects a resistance value according to the frequency band corresponding to the Ethernet PHY chip A when performing data interaction.
5. The method of an Ethernet PHY chip proxy based on FPGA according to claim 1, characterized in that: The Verilog1 program, Verilog2 program and Verilog3 program written in step S3 all adopt a parallel processing mechanism, and each program adopts a modular design.
6. The method of an Ethernet PHY chip proxy based on FPGA according to claim 1, characterized in that: In step S4, the external interface adopts an RJ-45 interface. When the RJ-45 interface receives the data to be transmitted sent by the Ethernet PHY chip A and transmits it to the external test equipment, a TSL encryption mechanism is set.
Citation Information
Patent Citations
Ethernet disk PCB (Printed Circuit Board) compatible with Ethernet TX and FX interfaces and manufacture method thereof
CN101800653A
Ethernet exchange function implementation system and Ethernet exchange function implementation method based on domestic FPGA (field programmable gate array)
CN107689931A
FPGA-based 10-gigabit Ethernet interface expansion device and method
CN117395215A
A universal chip positioning fixture
CN221008250U
Interface signal remapping method based on FPGA
EP3249543A1
