A functional test system for Ethernet card chips

Through the test system combining FPGA and upper computer, using soft processor cores and network debugging assistant software, multiple working modes of testing network card chips on the same circuit board are realized, solving the problems of resource waste and testing complexity, and improving the problem of Test efficiency and flexibility.

CN116192717BActive Publication Date: 2024-11-26THE 54TH RESEARCH INSTITUTE OF CHINA ELECTRONICS TECHNOLOGY GROUP CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310202514.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-06
Publication Date
2024-11-26
Estimated Expiration
2043-03-06

AI Technical Summary

Technical Problem

The prior art is difficult to test multiple working modes of network card chips on the same circuit board, resulting in waste of resources and increased testing complexity.

Method used

Design a functional test system for Ethernet card chips, using FPGA, host computer and Ethernet card chip to be tested are connected through the RJ-45 interface, using soft processor core MicroBlaze and asynchronous transceiver module to realize data transmission and testing, and through a network debugging assistant The software performs TCP, UDP, ICMP, and ARP protocol functional tests.

Benefits of technology

It realizes a variety of working modes of quickly testing network card chips on the same circuit board, improves testing flexibility and efficiency, simplifies the development and testing process, and reduces resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116192717B_ABST
    Figure CN116192717B_ABST
Patent Text Reader

Abstract

The present invention is a functional test system for an Ethernet card chip, and belongs to the field of chip functional testing. The system includes an FPGA, an Ethernet card chip to be tested, and a host computer; the Ethernet card chip to be tested and the host computer are both connected to the FPGA, and the Ethernet card chip to be tested is connected to the host computer through an RJ‑45 interface; the host computer sends data to the Ethernet card chip to be tested; the FPGA reads data from the Ethernet card chip to be tested, and transmits the data back to the host computer; the host computer determines whether the received data is consistent with the sent data, and then determines whether the function of the Ethernet card chip to be tested is normal. The overall hardware structure of the system is simple and easy to implement. The test can be operated using a general host computer PC, and the functional test of the Ethernet card chip can be quickly implemented on the same circuit board.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of chip function testing, in particular to a function testing system for an Ethernet card chip. Background Art

[0002] Network card chip, also known as network interface controller (NIC) chip, is a kind of special integrated circuit that integrates TCP / IP protocol stack, TCP offload engine, Ethernet MAC and PHY. It is widely used in home network equipment, serial port to Ethernet, parallel port to Ethernet, USB to Ethernet, GPIO to Ethernet, security equipment, embedded servers and other scenarios.

[0003] Functional testing of network card chips is an important part of the development life cycle of network card chips. It is used to test the protocol functions implemented by network card chips, such as TCP, UDP, ICMP, ARP, etc. Since the test cases cannot cover the actual application scenarios of network card chips during the ATE testing phase, it is necessary to design typical application scenarios of network card chips and perform functional testing of network card chips on circuit boards. Since the typical application scenario of network card chips is the combination of MCU and network card, once this combination is fixed, it is difficult to change the circuit board, so it is difficult to complete the testing of multiple working modes of the network card on the same circuit board. If different styles of circuit boards are added to test the multiple working modes of the network card, it will cause a waste of resources. Summary of the invention

[0004] The object of the present invention is to provide a function test system for an Ethernet card chip, which can quickly implement the function test of the Ethernet card chip on the same circuit board.

[0005] To achieve the above object, the present invention is implemented by the following technical solutions:

[0006] A functional test system for an Ethernet card chip, comprising an FPGA, an Ethernet card chip to be tested, and a host computer;

[0007] The Ethernet card chip to be tested and the host computer are both connected to the FPGA. The Ethernet card chip to be tested is connected to the host computer through an RJ-45 interface.

[0008] The host computer sends data to the Ethernet card chip under test; the FPGA reads data from the Ethernet card chip under test and transmits the data back to the host computer through the Ethernet card chip under test; the host computer determines whether the received data is consistent with the sent data, and then determines whether the function of the Ethernet card chip under test is normal.

[0009] Furthermore, the FPGA realizes data connection with the Ethernet card chip to be tested through the internally instantiated advanced peripheral bus interface module, and realizes data connection with the RS232 interface of the host computer through the internally instantiated asynchronous transceiver module;

[0010] The FPGA reads data from the Ethernet card chip to be tested, and transmits the data back to the host computer through the Ethernet card chip to be tested, which is achieved by the soft processor core of the FPGA executing the following program:

[0011] The first step is to initialize the configuration of the Ethernet card chip to be tested;

[0012] The second step is to read the flag register of the Ethernet card chip to be tested to determine whether there is a "receive completion" interrupt;

[0013] In the third step, if there is a "receive completion" interrupt, go to the fourth step, otherwise go to the second step;

[0014] The fourth step is to read the status register of the Ethernet card chip to be tested and obtain the received data length len;

[0015] Step 5: Read len bytes from the receive FIFO register of the Ethernet card chip under test and store them in the buffer buf;

[0016] Step 6: Write the len bytes of data in the buffer buf into the transmit FIFO register of the Ethernet card chip to be tested;

[0017] Step 7: Send the program running log to the RS232 interface of the host computer through the asynchronous transceiver module.

[0018] Furthermore, the host computer completes the network connection and test with the Ethernet card chip to be tested through the network debugging assistant software running thereon; the network debugging assistant software is used to execute the following procedures:

[0019] Send data to the Ethernet card chip under test;

[0020] Receive the returned data through the Ethernet card chip under test;

[0021] Display the program running log information received from FPGA through RS232 interface;

[0022] Determine whether the received data is consistent with the sent data, and then determine whether the function of the Ethernet card chip to be tested is normal.

[0023] Compared with the prior art, the present invention has the following beneficial effects:

[0024] (1) The present invention uses a soft processor core MicroBlaze, which can flexibly cut memory resources including DLMB and ILMB, and peripheral resources including UART and GPIO. The same set of circuit boards can be used to complete functional tests of various working modes of DUT, which has high flexibility.

[0025] (2) The present invention uses VITIS to develop the test program for the DUT. There is no need to pay attention to the underlying operations of the standard peripherals (such as UART) created by the IP integrator. Only the DUT itself needs to be focused, which reduces the workload and speeds up the development and testing process.

[0026] (3) The overall hardware structure of the present invention is simple and easy to implement. It can be operated and tested using a general host computer PC, which is convenient to use. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 The present invention is a schematic diagram of the overall structure of a functional test system for an Ethernet card chip.

[0028] Figure 2 It is a schematic diagram of the connection relationship between the Ethernet card chip to be tested and the FPGA.

[0029] Figure 3 It is a flow chart of the test procedure for the network card chip to be tested. DETAILED DESCRIPTION

[0030] The present invention is further described in detail below in conjunction with examples, but the embodiments of the present invention are not limited thereto.

[0031] A functional test system for Ethernet card chips, such as Figure 1As shown in the figure, it mainly consists of three parts: Field Programmable Gate Arrays (FPGA), Device Under Test (DUT), that is, the Ethernet card chip to be tested, and the host PC. Six sub-modules are created inside the FPGA using VIVODO's IP integrator, namely: the 32-bit RISC architecture soft processor core MicroBlaze as the main CPU, the module MDM dedicated to MicroBlaze debugging, the data and instruction memory block DLMB / ILMB, the advanced scalable bus peripheral connection interface AXIperiph, the advanced peripheral bus interface APB, and the asynchronous receiver and transmitter UART. The Ethernet card chip to be tested is mounted on the APB of the FPGA through the APB bus. The Ethernet card chip to be tested and the host PC are connected to the network cable through the RJ-45 interface. The host PC communicates with the UART of the FPGA through the RS232 interface. The APB module and UART module of the FPGA both communicate with MicroBlaze through the advanced scalable bus peripheral connection interface.

[0032] In the actual operation of this test system, the functional test program of the network card chip is a C program developed in the VITIS environment that matches the FPGA. After the program is compiled and downloaded, it runs in the MicroBlaze in the FPGA. The main behavior of the program is to send the received data back and use the status information of the network card register when the data is received as the running log. The running log is output and displayed to the host PC serial port assistant software through UART. Using the network debugging assistant software on the host PC, the network card chip can be tested for the TCP and UDP protocols. That is, after the TCP or UDP connection is completed, the network debugging assistant is used to send data to the Ethernet card to be tested, and observe whether the data in the receiving window of the network debugging assistant is completely consistent with the sent data, so as to determine whether the TCP or UDP function of the Ethernet card chip to be tested is normal. In addition, executing ping in the command line can perform a functional test of the ICMP protocol on the network card chip, and executing the arp command can perform a functional test of the ARP protocol on the network card chip.

[0033] On the host PC, the network connection with the network card to be tested is completed through the network debugging assistant software; the network assistant sends data to the network card chip to be tested. During the process of the test program of the Ethernet card to be tested running on FPAG, it receives the data sent by the network assistant and sends it back to the host PC. In the network debugging assistant software, it is determined whether the received data is consistent with the sent data, and then it is determined whether the function of the network card to be tested is normal.

[0034] The FPGA device may be XC7K325T, which mainly simulates an MCU with UART peripherals and supports APB interface through the instantiation of the soft processor core MicroBlaze and its associated IP, and is a main control unit for realizing initialization control and data reading and writing of the Ethernet card chip to be tested.

[0035] The driver of the UART peripheral is provided in the development environment VITIS, and is equipped with a sample program for use, which is convenient for users.

[0036] The detailed connection between the Ethernet card chip DUT and FPGA is as follows: Figure 2 As shown, / RESET, / CS, / RD, / WR, the four signal lines are used to reset DUT, chip select DUT, read DUT enable, and write DUT enable, and they are all valid at low level; BIT16EN is the data bit width selection signal, the high level means the data bus width is 16 bits, and the low level means the data bus width is 8 bits; the address bus width of the DUT is 10 bits, and the data bus width is controlled by BIT16EN, which is 16 bits or 8 bits; when using the interrupt receiving data mode, if the DUT is interrupted (TCP connection / disconnection, data reception / transmission, timeout, etc.), / INT outputs a low level, and when the DUT internal interrupt processing is completed, the / INT output returns to a high level; the DUT sends data to RJ-45 through the differential signals of TXOP and TXON, and receives data from RJ-45 through the differential signals of RXOP and RXON.

[0037] The host PC is a general personal computer, the serial port assistant used is PUTTY, the baud rate is 115200bp, there is no check bit, the data bit width is 8, and the number of stop bits is 1; the network debugging assistant used is USR-TCP232-Test, and the protocol type can select UDP, TCPServer, and TCPClient for testing respectively.

[0038] Here is a more specific example:

[0039] A functional test system for Ethernet card chips, such as Figure 1 As shown in the figure, the system structure mainly consists of three parts: FPGA, Ethernet card chip to be tested, and host PC. FPGA is used to control and read and write data of the Ethernet card chip to be tested, and output the program running log to the host PC through the serial port; the serial port debugging software is used on the host PC to view the running log, which is convenient for problem analysis and program debugging; the network debugging software on the host PC can perform functional tests on the ICMP, ARP, UDP, and TCP protocols of the Ethernet card chip.

[0040] In the VIVODO software, use IP integrator to create 6 sub-modules for FPGA: MicroBlaze, a 32-bit RISC soft processor core as the main CPU, MDM, a debugging module dedicated to MicroBlaze, DLMB / ILMB, AXIperiph, and APB, and add pin constraint files according to the actual circuit. After synthesis and implementation, generate bit streams, and export hardware configuration files (with the suffix hdf). Then start VITIS and create a project for Ethernet card chip testing. In the test program, call the xil_printf function to output the system log to the UART, but do not need to pay attention to the details of the specific register operations of the UART. After the UART is connected to the host PC through the RS232 interface, you can see this serial port in the device manager of the PC.

[0041] like Figure 2 As shown, the Ethernet card chip to be tested is mounted on the APB of the FPGA through the APB bus, and the Ethernet card chip to be tested and the host PC are connected via a network cable through an RJ-45 interface. Since the internal integrated PHY of the chip to be tested supports automatic MDI / MDIX (signal line polarity crossover), the network cable can use a straight-through or crossover cable.

[0042] The test procedure of the network card chip to be tested designed in VITIS is as follows Figure 3 As shown, the function is to initialize the configuration of the network card chip line, then send the received data to the other end, and output the log of the process.

[0043] After writing the program of the network card chip to be tested in VITIS, it is compiled and burned into the FPGA. At this time, ensure that "PC-network cable-test circuit board-RS232-PC" forms a complete loop. Based on this hardware environment, start testing on the host computer with the network debugging assistant after power-on: first, complete the TCP or UDP connection in the network debugging assistant; then, use the network debugging assistant to send data to the Ethernet card to be tested, and observe whether the data in the receiving window in the network debugging assistant is exactly the same as the sent data, so as to determine whether the TCP or UDP function of the Ethernet card chip to be tested is normal; thereafter, execute the "ping [IP address of the Ethernet card to be tested]" command in the command line terminal of the host PC to determine whether the ICMP protocol function of the network card chip is normal; execute the "arp-a" command to observe whether there is the IP address of the Ethernet card to be tested in the result list, so as to determine whether the ARP protocol function of the network card chip is normal.

[0044] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment according to the technical essence of the present invention falls within the protection scope of the present invention.

Claims

1. A functional test system for an Ethernet card chip, characterized in that: Including FPGA, Ethernet card chip to be tested, and host computer; The Ethernet card chip to be tested and the host computer are both connected to the FPGA. The Ethernet card chip to be tested is connected to the host computer through an RJ-45 interface. The host computer sends data to the Ethernet card chip under test; the FPGA reads the data from the Ethernet card chip under test and transmits the data back to the host computer through the Ethernet card chip under test; The host computer determines whether the received data is consistent with the sent data, and then determines whether the function of the Ethernet card chip to be tested is normal; The FPGA is connected to the Ethernet card chip to be tested through the internal instantiation of the advanced peripheral bus interface module, and is connected to the RS232 interface of the host computer through the internal instantiation of the asynchronous transceiver module; The FPGA reads data from the Ethernet card chip to be tested, and transmits the data back to the host computer through the Ethernet card chip to be tested, which is achieved by the soft processor core of the FPGA executing the following program: The first step is to initialize the configuration of the Ethernet card chip to be tested; The second step is to read the flag register of the Ethernet card chip to be tested to determine whether there is a "receive completion" interrupt; In the third step, if there is a "receive complete" interrupt, go to the fourth step, otherwise go to the second step; The fourth step is to read the status register of the Ethernet card chip to be tested and obtain the received data length len; Step 5: Read len bytes from the receive FIFO register of the Ethernet card chip under test and store them in the buffer buf; Step 6: Write the len bytes of data in the buffer buf into the transmit FIFO register of the Ethernet card chip to be tested; Step 7: Send the program running log to the RS232 interface of the host computer through the asynchronous receiver and transmitter module; The host computer completes the network connection and test with the Ethernet card chip to be tested through the network debugging assistant software running on it; the network debugging assistant software is used to execute the following procedures: Send data to the Ethernet card chip under test; Receive the returned data through the Ethernet card chip under test; Display the program running log information received from FPGA through RS232 interface; Determine whether the received data is consistent with the sent data, and then determine whether the function of the Ethernet card chip to be tested is normal.