A system-level verification convergence system, method, and product
By using the cocotb system verification platform based on the Python language, system-level verification of smart network interface cards (NICs) chips is achieved through TLP transport layer interface modeling. This solves the problems of slow simulation speed and complex service testing, and improves simulation speed and verification efficiency.
Patent Information
- Application Number
- CN202411773032.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-12-04
AI Technical Summary
In the system-level verification process of smart network interface card (NIC) chips, the simulation speed is slow, and the simulation speed is extremely slow when integrating multiple PCIe and Ethernet controllers. Furthermore, the service testing and driver simulation are complex and require a lot of manpower and time.
The cocotb system verification platform, based on the Python language, is adopted. It includes application components, cocotbext-pcie TLP transport layer adapter, network packet transceiver components, and inspection components. PCIe and Ethernet simulation is realized by modeling the TLP transport layer interface, and the application in the Python library is reused for simulation verification.
It significantly improved the speed of system simulation verification, reduced redundant development and debugging work, accelerated the verification progress, and shortened the verification convergence time.
Smart Images

Figure CN119814581B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of chip verification, and more specifically, to a system-level verification convergence system, method, and product. Background Technology
[0002] Smart NICs integrate Ethernet controllers and interfaces, PCIe controllers and bus interfaces, multi-core processors (CPUs), and optional field-programmable gate arrays (FPGAs). They are mainly used to assist host servers in achieving functions such as virtual switching acceleration, network offloading acceleration, storage acceleration, and security acceleration, and are applied in cloud computing network virtualization solutions.
[0003] In the EDA (Electronics Design Automation) functional simulation verification of the chip development cycle, including system-level verification, for system-level verification of smart network interface cards (NICs), the verification IPs (Verification Intellectual Property, VIPs) used in PCIe and Ethernet simulation models mostly provide SerDes and PIPE interface modeling and simulation. SerDes is for serial port modeling, and PIPE is for parallel port modeling. Although the simulation speed of the PIPE interface has been greatly improved compared to the SerDes interface, the overall simulation speed in system-level verification is still very slow. The more VIPs integrated, the slower the simulation speed. Since smart NICs generally integrate 2 PCIe controllers and at least 4 Ethernet controllers, even if all verification VIPs are modeled using the PIPE interface, the speed in system-level simulation is still very slow, which means that it affects the chip verification convergence.
[0004] Secondly, for the business testing and driver simulation of smart network interface card (NIC) chip system-level verification, which involves business functions and driver simulation such as network acceleration, storage acceleration, and security acceleration, the traditional UVM verification platform architecture based on the SystemVerilog language cannot integrate application libraries and software drivers developed based on the Python language. Therefore, all application testing and driver simulation must be developed from scratch. Developers need to invest a lot of time in the three processes of familiarizing themselves with the business, driver development, and debugging. In addition, the processes of verification platform construction, integration and debugging, verification test case development, verification implementation, problem localization and resolution, and regression convergence require more manpower and take longer to complete the project, which also greatly affects the verification convergence of the chip. Summary of the Invention
[0005] This application provides a system-level verification convergence system, method, and product, aiming to improve the speed of system-level verification convergence for smart network interface cards (NICs).
[0006] In a first aspect, embodiments of this application provide a system-level verification convergence system, which is a cocotb system verification platform based on the Python language. The system includes:
[0007] The application component, app agent, is used to call a Python library-based application to perform network packet testing on the DUT.
[0008] cocotbext-pcie TLP transport layer adapter, used to send and receive PCIe packets at the TLP transport layer interface;
[0009] The pkt_gen scapy agent is a network packet sending and receiving component used in scapy applications based on the Python library to perform different types of network packet sending, receiving, parsing, and automatic response processes.
[0010] cocotbext-eth TLP transport layer adapter, used to send and receive network packets on the TLP transport layer interface;
[0011] The checker agent component is used to generate comparison results between the expected test results and the actual output of the DUT.
[0012] Optionally, the system further includes:
[0013] The configuration agent component is used to perform tasks including BAR address space allocation, address space definition and allocation for each business module, PCIe enumeration process, maintenance of common tasks and functions, allocation and reclamation of system storage space, queue allocation, and interrupt allocation.
[0014] Optionally, when verifying any DUT, after the verification environment code of the DUT and the system is compiled by the simulator, the application component app agent is used to call the configuration component config agent to initialize the host system and the DUT.
[0015] The initialization configuration includes allocating PCIe BAR address space, creating TX / RX queues and CQ queues, initializing descriptors and PCIe interrupts, and initializing the DUT by calling any smart network card driver through the cocotbext-pcie TLP transport layer adapter. The smart network card driver includes VirtIO driver, OVS driver and RDMA driver.
[0016] Optionally, after initial configuration, the application component app agent is used to call the iperf application based on the Python library to enable the DUT. The iperf application sends the network packets to be sent to the PCIe TLP interface of the DUT through the cocotbext-pcie TLP transport layer adapter.
[0017] The network packet transceiver component pkt_gen scapy agent is used to receive network packets sent by the DUT through the cocotbext-eth TLP transport layer adapter;
[0018] The checking component, checker agent, is used to obtain the network packet to be sent and the network packet currently received by the network packet transceiver component, pkt_gen scapy agent, compare them, and output the comparison result.
[0019] Optionally, after initialization configuration, the network packet transceiver component pkt_gen scapy agent is used to call the scapy application based on the Python library, and send the network packets to be received to the ETH TLP interface of the DUT through the cocotbext-eth TLP transport layer adapter;
[0020] The application component, app agent, is used to obtain network packets in response to the interrupt handler;
[0021] The checking component, checker agent, is used to obtain the network packet to be received and compare it with the network packet currently received by the application component, appagent, and output the comparison result.
[0022] Optionally, the DUT used by the system for verification includes a smart network interface chip, a GPU, and a smart AI chip.
[0023] Secondly, embodiments of this application provide a system-level verification convergence method, the method being applied to the system-level verification convergence system described in the first aspect of the embodiments, the method comprising:
[0024] After initializing the configuration, perform network packet sending and receiving tests on the DUT.
[0025] The network packet transmission test process includes: the application component app agent calls the iperf application based on the Python library to enable the DUT; the iperf application sends the network packets to be sent to the PCIe TLP interface of the DUT through the cocotbext-pcieTLP transport layer adapter; the network packet transceiver component pkt_gen scapy agent receives the network packets sent by the DUT through the cocotbext-eth TLP transport layer adapter; the checker component checker agent obtains the network packets to be sent and the network packets currently received by the network packet transceiver component pkt_gen scapy agent, compares them, and outputs the comparison result.
[0026] The network packet reception test process includes: the network packet sending and receiving component pkt_gen scapy agent calls the scapy application based on the Python library, and sends the network packets to be received to the ETH TLP interface of the DUT through the cocotbext-eth TLP transport layer adapter; the application component app agent responds to the interrupt handler to obtain the network packets; the checking component checker agent obtains the network packets to be received and compares them with the network packets currently received by the application component app agent, and outputs the comparison result.
[0027] Thirdly, embodiments of this application provide a computer device, including: at least one processor and a memory, the memory storing a computer program executable on the processor, wherein when the processor executes the computer program, it performs the system-level verification convergence method described in the second aspect of the embodiments.
[0028] Fourthly, embodiments of this application provide a non-volatile readable storage medium storing a computer program, wherein the computer program, when executed by a processor, performs the system-level verification convergence method described in the second aspect of the embodiments.
[0029] Fifthly, embodiments of this application provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the system-level verification convergence method described in the second aspect of the embodiments.
[0030] Beneficial effects:
[0031] The system-level verification and convergence system in this embodiment is a cocotb system verification platform based on the Python language. The system includes: an application component (app agent) for calling a Python library-based application to perform network packet testing on the DUT; a cocotbext-pcie TLP transport layer adapter for sending and receiving PCIe packets on the TLP transport layer interface; a network packet sending and receiving component (pkt_gen scapy agent) for a Python library-based scapy application to execute different types of network packet sending, receiving, parsing, and automatic response processes; a cocotbext-eth TLP transport layer adapter for sending and receiving network packets on the TLP transport layer interface; and a checking component (checker agent) for generating comparison results between the expected test results and the actual output results of the DUT.
[0032] This system models PCIe and Ethernet from the TLP transport layer interface, which significantly improves the system simulation and verification speed compared to traditional SerDes, PIPE, or MAC layer interface modeling. Furthermore, the cocotb system verification platform based on the Python language can reuse the iperf, fio, and scapy applications in the Python library for DUT simulation and verification, reducing a lot of repetitive development and debugging work, accelerating the verification progress, and shortening the verification convergence time. Attached Figure Description
[0033] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a functional block diagram of a system-level verification convergence system proposed in an embodiment of this application;
[0035] Figure 2 This is a functional block diagram of a system-level verification convergence system proposed in an embodiment of this application;
[0036] Figure 3 This is a schematic diagram of a verification network message sending scenario provided in an embodiment of this application;
[0037] Figure 4 This is a schematic diagram of a scenario for verifying network packet reception according to an embodiment of this application;
[0038] Figure 5 This is a schematic diagram of a computer device according to an embodiment of this application;
[0039] Figure 6 This is a schematic diagram of a non-volatile readable storage medium provided in an embodiment of this application;
[0040] Figure 7 This is a schematic diagram of a computer program product proposed in an embodiment of this application. Detailed Implementation
[0041] 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.
[0042] COCOTB: COroutine based COsimulation TestBench, a verification platform development framework based on Python libraries, which can be used to write VHDL / Verilog functional verification environments using Python;
[0043] UVM: Universal Verification Methodology, a verification platform development framework based on the SystemVerilog class library, which can use its reusable components to build a functional verification environment with a standardized hierarchical structure and interfaces;
[0044] PCIe: Peripheral Component Interconnect express, is a high-speed serial computer expansion bus standard. It belongs to high-speed serial point-to-point dual-channel high-bandwidth transmission. The connected devices are allocated dedicated channel bandwidth and do not share bus bandwidth. It mainly supports active power management, error reporting, end-to-end reliable transmission, hot-plugging, and Quality of Service (QOS) functions.
[0045] MAC: Media Access Control, defines how data frames are transmitted over the medium; in a link sharing the same bandwidth, access to the connection medium is "first-come, first-served"; physical addressing is defined here, as is the logical topology (the path of signals through the physical topology); line control, error notification (without correction), frame delivery order, and optional flow control are also implemented in this sublayer.
[0046] CPU: Central Processing Unit;
[0047] GPU: Graphics Processing Unit;
[0048] FPGA: Field Programmable Gate Array;
[0049] EDA: Electronics Design Automation, functional simulation and verification;
[0050] SoC: System on Chip;
[0051] PIPE: Physical Interface for PCI Express, PCIe physical layer interface;
[0052] DUT: Device Under Test;
[0053] AI: Artificial Intelligence;
[0054] TX / RX queue: Send / receive queue;
[0055] CQ Queue: Response Queue
[0056] TCP: Transmission Control Protocol;
[0057] UDP: User Datagram Protocol.
[0058] Smart NICs integrate Ethernet controllers and interfaces, PCIe controllers and bus interfaces, multi-core processors (CPUs), and optional field-programmable gate arrays (FPGAs). They are mainly used to assist host servers in achieving functions such as virtual switching acceleration, network offloading acceleration, storage acceleration, and security acceleration. They are applied in cloud computing network virtualization solutions. The chip development cycle includes multiple stages such as functional requirement specification, architecture design, code design, EDA functional simulation verification, FPGA prototype verification, software development and testing, and post-silicon product application testing.
[0059] EDA functional simulation verification takes up most of the chip development cycle time. Therefore, accelerating the convergence of chip EDA functional verification means that the chip development cycle can be shortened and the chip product quality can be improved.
[0060] Chip EDA functional verification is divided according to the verification level, generally into module level (unit level), sub-system level, and system level (chip level / system level). Among them, system level verification simulates software transaction behavior, focuses on the interaction between subsystems, and is characterized by slow simulation speed, high difficulty in localization, and long convergence time.
[0061] Specifically, system-level verification of smart network interface cards (NICs) chips faces two main challenges:
[0062] (1) The simulation speed is slow; the smart network card chip integrates at least 2 PCIe controllers (including 1 PCIe controller on the Host side and 1 PCIe controller on the SoC side) and at least 2 Ethernet controllers, usually integrating 4 or more Ethernet controllers; these IPs are all simulated and modeled using the Serdes interface or the PIPE interface. Compared with the Serdes interface, the simulation speed of PIPE has been greatly improved. However, in system-level simulation, when multiple PCIe and Ethernet controllers are integrated, the simulation speed is still extremely slow, which greatly affects the convergence speed of system simulation.
[0063] (2) Business testing and driver simulation are quite difficult. Smart NICs involve business functions such as network acceleration, storage acceleration and security acceleration. Among them, network acceleration mainly includes VirtIO acceleration, OVS (Open vSwitch) acceleration, TCP offloading, Vxlan / GRE tunnel packet offloading, reliable UDP, NAT / PAT and RDMA, etc.; storage acceleration includes NVMe-OF, support for local PCIe SSD disks, support for remote NVMe arrays, etc.; security acceleration includes IPSec encryption and decryption offloading, packet filtering, firewall, DPI and DDoS, etc. The software drivers used by these services include OVS virtual switch, SDN / NFV virtualization standard software, TCP / UDP offloading, SR-IOV (Single Root I / O Virtualization), LinuxNet / DPDK (Intel Data Plane Development Kit), Express Virtio (XVIO) and vPDA, etc. Testing and simulating such complex functional services and software drivers requires a lot of manpower and time.
[0064] Therefore, how to construct PCIe and Ethernet simulation models to improve the simulation speed of system verification; how to build a system simulation platform to reuse various application libraries and software drivers as much as possible, simulate real business testing and software driver behavior, and accelerate the convergence of system-level verification of smart network interface cards (NICs) are the pain points that need to be addressed in verifying smart NIC chip systems.
[0065] Therefore, embodiments of this application provide a system-level verification convergence system that can accelerate the speed of system-level verification convergence.
[0066] Reference Figure 1 The diagram illustrates a functional block diagram of a system-level verification convergence system provided in an embodiment of this application. The system is a COcotb system verification platform based on the Python language. COcotb is a verification platform development framework based on Python libraries, which can be used to write VHDL / Verilog functional verification environments.
[0067] The system includes an application component (app agent), a cocotbext-pcie TLP transport layer adapter, a network packet transceiver component (pkt_gen scapy agent), a cocotbext-eth TLP transport layer adapter, and an inspection component (checkeragent).
[0068] The application component, app agent, is used to call a Python library-based application to perform network packet testing on the DUT.
[0069] The cocotbext-pcie TLP transport layer adapter is used to send and receive PCIe messages on the TLP transport layer interface.
[0070] The pkt_gen scapy agent, a network packet transceiver component, is used in scapy applications based on the Python library to perform different types of network packet sending, receiving, parsing, and automatic response processes.
[0071] The cocotbext-eth TLP transport layer adapter is used to send and receive network packets at the TLP transport layer interface.
[0072] The checker agent component is used to generate a comparison between the expected test results and the actual output of the DUT.
[0073] This system models the PCIe and Ethernet interfaces from the TLP transport layer, which significantly improves the system simulation and verification speed compared to traditional SerDes, PIPE, or MAC layer interface modeling.
[0074] Furthermore, the cocotb system verification platform based on the Python language can reuse applications such as iperf, fio, and scapy from the Python library for DUT simulation verification, reducing a lot of repetitive development and debugging work, accelerating the verification progress, and shortening the verification convergence time.
[0075] Reference Figure 2 This diagram illustrates a functional block diagram of a system-level verification convergence system provided in an embodiment of this application. The system is a cocotb system verification platform based on the Python language. The system includes an application component (app agent), a cocotbext-pcie TLP transport layer adapter, a network packet transceiver component (pkt_gen scapy agent), a cocotbext-eth TLP transport layer adapter, a checker component (checker agent), and a configuration component (config agent).
[0076] The application component, app agent, can call Python-based applications to perform network packet testing on the DUT, and can also perform host and soc application testing and host and soc driver simulation.
[0077] For example, in host and soc application testing, the application component app agent performs network and storage service flow testing based on the iperf application and fio application of the Python library.
[0078] Host and SoC driver simulation includes driver simulation for Virtio-network, Virtio-block, OVS, and RDMA services, thereby simulating the host-side IO generation process and Virtio driver simulation. This includes various host-side behaviors, the generation and distribution of various IO requests, the structure maintenance of queues under various devices, maintenance of tx queue, rx queue, control queue, available ring, used ring, and multi-function multi-queue maintenance, etc.
[0079] The cocotbext-pcie TLP transport layer adapter mainly provides PCIe protocol support and interface driver adaptation, and is used to send and receive PCIe messages on the TLP transport layer interface.
[0080] The network packet sending and receiving component pkt_gen scapy agent can be based on the Python library scapy application to perform different types of network packet sending, receiving, parsing, and automatic response processes.
[0081] The cocotbext-eth TLP transport layer adapter mainly provides network packet protocol support and interface driver adaptation, and is used to send and receive network packets on the TLP transport layer interface.
[0082] The checker agent component is used to generate a comparison result between the expected test result and the actual output result of the DUT. Specifically, the checker agent component can automatically compare whether the test stimulus input and the DUT output are consistent by using a random comparison method, and give the comparison result.
[0083] The configuration component, config agent, is used to perform tasks including BAR address space allocation, address space definition and allocation for each business module, PCIe enumeration process, maintenance of common tasks and functions, allocation and reclamation of system storage space, queue allocation, and interrupt allocation.
[0084] The system-level verification convergence system provided in this embodiment introduces the application component app agent, the cocotbext-pcie TLP transport layer adapter, the network packet transceiver component pkt_gen scapy agent, the cocotbext-eth TLP transport layer adapter, the configuration component config agent, and the checker component checker agent. This allows the PCIe and Ethernet simulation models to be modeled at the TLP transport layer interface, thereby enabling the simulation verification speed.
[0085] The system's cocotb system verification platform, based on the Python language, can reuse Python libraries to build test applications and software drivers, which can then be run directly on the system's verification platform. This allows for the rapid simulation of any intelligent network interface card (NIC) network and storage services. Driver simulations for various intelligent NIC services, including VirtIO / OVS / RDMA driver simulations, can also be reused after some driver adaptation modifications. This will greatly reduce the workload of system verification application testing and driver simulation development, further accelerate system verification convergence, improve chip system verification efficiency, and shorten the verification cycle.
[0086] This system can perform system-level verification convergence on DUTs including smart network interface cards (NICs), GPUs, and smart AI chips. In other words, it can be directly applied to verification projects for smart NICs, as well as for verification projects for different chips, including GPUs and smart AI chips, making it widely applicable.
[0087] In practical implementation, when verifying and converging based on this system, the testing principle can be to proceed from simple to complex. For example, simple business smoke tests can be performed first, such as enumeration, register read / write, single power field (PF) and single queue TX / RX business tests. Then, tests can be performed on multi-PF, multi-queue TX / RX businesses, virtualized VF businesses, hot-pluggable businesses, and reset businesses. Finally, performance business tests, such as various streaming stress tests and anomaly handling tests, can be performed. System problem localization also progresses from simple to complex, improving verification efficiency and thus achieving rapid convergence of system-level verification.
[0088] When verifying any DUT, obtain the system-level simulation mode from the command line or test script, including the number of MACs used, the depth of TX / RX / CQ queues, the number of pf / vfs, and the number of segs, etc. After compiling the DUT code and the verification environment code, start the simulation test.
[0089] In practical applications, the platform first performs operations such as allocating system memory space, including PCIe BAR address space, TX / RX queue, CQ, and initializing interrupts and descriptors; then it begins system enumeration and initialization configuration; after configuration, it starts network packet transmission and reception tests; finally, it compares the correctness of the transmitted and received network packets to end the simulation test.
[0090] In one feasible implementation, when verifying the reception and transmission of network packets of the DUT based on this system, after the verification environment code of the DUT and the system is compiled by the simulator, the application component app agent is used to call the configuration component config agent to initialize the host system and the DUT.
[0091] The initialization configuration includes allocating PCIe BAR address space, creating TX / RX queues and CQ queues, initializing descriptors and PCIe interrupts, and initializing the DUT by calling any smart network card driver through the cocotbext-pcie TLP transport layer adapter. The smart network card driver includes VirtIO driver, OVS driver and RDMA driver.
[0092] After initializing the configuration, a network packet sending test process is executed to verify the network packet sending scenario.
[0093] Specifically, the application component app agent is used to call the iperf application based on the Python library to enable the DUT to send network packets to be sent, including network TCP packets or UDP network packets.
[0094] The iperf application sends the network packets to be sent to the PCIe TLP interface of the DUT through the cocotbext-pcie TLP transport layer adapter.
[0095] The DUT performs corresponding operations based on the driver configuration and application issued by the iperf application, including: reading various initialized descriptors in the host-side memory through the PCIe TLP interface, reading the network packets to be sent according to the descriptors, updating the descriptors, writing back the relevant status to the host side, and reporting interrupts, etc., and finally sending the network packets to be sent to the pkt_gen scapy agent network packet transceiver component through the ETH TLP interface.
[0096] The network packet transceiver component pkt_gen scapy agent is used to receive network packets sent by the DUT through the cocotbext-eth TLP transport layer adapter, and to perform legality checks on the received network packets and perform corresponding processing, including packet reception, discarding and reply processing.
[0097] The checking component, checker agent, is used to obtain the network packet to be sent and the network packet currently received by the network packet transceiver component, pkt_gen scapy agent, compare them, output the comparison result, and finally end the simulation process.
[0098] After initializing the configuration, you can also perform a network packet reception test to verify the network packet reception scenario.
[0099] Specifically, the network packet transceiver component pkt_gen scapy agent is used to call the scapy application based on the Python library, and send the network packets to be received to the ETH TLP interface of the DUT through the cocotbext-eth TLP transport layer adapter. The network packets to be received include network TCP packets or UDP network packets.
[0100] The DUT writes the received network packets to the host-side memory through its own PCIe TLP interface, updates the descriptors, and reports interrupts to notify the host to process the received packets.
[0101] The application component, app agent, is used to respond to interrupt handlers, read received network packets from host memory, and update the RX queue and CQ queue.
[0102] The checking component, checker agent, is used to obtain the network packet to be received and compare it with the network packet currently received by the application component, appagent, and output the comparison result, and finally end the simulation process.
[0103] In both the verification network packet sending and receiving scenarios of any DUT, this system can achieve driver simulation for directly sending and receiving PCIe packets at the TLP transport layer interface through the system's cocotbext-pcie TLP adapter, and achieve driver simulation for directly sending and receiving network packets at the TLP transport layer interface through the system's cocotbext-eth TLP adapter, thereby significantly improving the system simulation speed.
[0104] This application embodiment also provides a system-level verification convergence method, which is applied to the system-level verification convergence system described in this embodiment, and the method includes:
[0105] After initializing the configuration, perform network packet sending and receiving tests on the DUT.
[0106] The network packet transmission test process includes: the application component app agent calls the iperf application based on the Python library to enable the DUT; the iperf application sends the network packets to be sent to the PCIe TLP interface of the DUT through the cocotbext-pcieTLP transport layer adapter; the network packet transceiver component pkt_gen scapy agent receives the network packets sent by the DUT through the cocotbext-eth TLP transport layer adapter; the checker component checker agent obtains the network packets to be sent and the network packets currently received by the network packet transceiver component pkt_gen scapy agent, compares them, and outputs the comparison result.
[0107] The network packet reception test process includes: the network packet sending and receiving component pkt_gen scapy agent calls the scapy application based on the Python library, and sends the network packets to be received to the ETH TLP interface of the DUT through the cocotbext-eth TLP transport layer adapter; the application component app agent responds to the interrupt handler to obtain the network packets; the checking component checker agent obtains the network packets to be received and compares them with the network packets currently received by the application component app agent, and outputs the comparison result.
[0108] Reference Figure 3 This diagram illustrates a scenario for verifying network message transmission as provided in an embodiment of this application. Figure 3 The middle arrow represents the data flow direction during the network packet transmission process. In one feasible implementation, based on the system-level verification convergence system described in this embodiment, the network packet transmission verification for any DUT includes the following process:
[0109] A1: Obtain simulation mode settings from the command line or test script.
[0110] Specifically, the system-level simulation mode is determined, including configurations such as the number of MACs used, the depth of the TX / RX / CQ queues, the number of pf / vfs, and the number of segs.
[0111] A2: The Makefile script starts the emulator according to the simulation mode settings.
[0112] In this embodiment, the VCS simulator is used as an example. The VCS simulator compiles the design code of the DUT and the COcotb verification environment code, and then starts the simulation.
[0113] A3: The application component app agent calls the configuration component config agent to initialize the host system and DUT configuration.
[0114] The app_agent calls the config_agent component to initialize the host system and DUT, including allocating PCIeBAR address space, creating TX / RX queues and CQ queues, and initializing descriptors and PCIe interrupts. Then, it begins system enumeration and initialization configuration by calling any smart network card driver, such as the VirtIO driver, OVS driver, and RDMA driver, to initialize the DUT through the cocotbext-pcie tlp adapter.
[0115] After initializing the configuration, you can perform a network packet sending test.
[0116] A4: The application component app agent calls the iperf application based on the Python library to enable the DUT to send the network packets to be sent.
[0117] The iperf application sends network packets to be sent to the PCIe TLP interface of the DUT through the cocotbext-pcie TLP transport layer adapter. The network packets to be sent include network TCP packets or UDP network packets.
[0118] A5: The DUT performs corresponding operations based on the driver configuration and application issued by the iperf application.
[0119] For example, the DUT performs corresponding operations based on the driver configuration and application issued by the iperf application. These operations include reading various initialized descriptors in the host-side memory through the PCIe TLP interface, reading the network packets to be sent based on the descriptors, updating the descriptors, writing back the relevant status to the host side, and reporting interrupts. Finally, the network packets to be sent are sent to the pkt_gen scapy agent, the network packet transceiver component, through the ETH TLP interface.
[0120] A6: The network packet transceiver component pkt_gen scapy agent receives network packets sent by the DUT through the cocotbext-ethTLP transport layer adapter and processes them.
[0121] For example, the pkt_gen scapy agent, a network packet transceiver component, performs validity checks on received network packets and performs corresponding processing, including packet reception, discarding, and replying.
[0122] A7: The checker agent component obtains the network packets to be sent and the network packets currently received by the pkt_genscapy agent component, compares them, outputs the comparison results, and finally ends the simulation process.
[0123] Reference Figure 4 This diagram illustrates a scenario for verifying network packet reception provided in an embodiment of this application. Figure 4 The dashed arrows represent the data flow direction during the network packet reception process. In one feasible implementation, based on the system-level verification convergence system described in this embodiment, the network packet reception verification for any DUT includes the following process:
[0124] B1: Obtain simulation mode settings from the command line or test script.
[0125] If the system-level simulation mode is selected, the configuration includes the number of MACs used, the depth of the TX / RX / CQ queues, the number of pf / vf queues, and the number of seg queues.
[0126] B2: The Makefile script starts the emulator according to the simulation mode settings.
[0127] Taking the VCS simulator as an example, the VCS simulator compiles the design code of the DUT and the COcotb verification environment code, and then starts running the simulation.
[0128] B3: The application component app agent calls the configuration component config agent to initialize the host system and DUT configuration.
[0129] The app_agent calls the config_agent component to initialize the host system and DUT, which may include: allocating PCIe BAR address space, creating TX / RX queues and CQ queues, initializing descriptors and PCIe interrupts, etc.; then it begins system enumeration and initialization configuration, by calling any smart network card driver, such as VirtIO driver, OVS driver and RDMA driver, to initialize the DUT through the cocotbext-pcie tlp adapter.
[0130] After initializing the configuration, you can perform a network packet reception test.
[0131] B4: The network packet transceiver component pkt_gen scapy agent calls the Python-based scapy application to send the network packets to be received to the ETH TLP interface of the DUT through the cocotbext-eth TLP transport layer adapter.
[0132] The network messages to be received include network TCP messages or UDP network messages.
[0133] B5: The DUT writes the received network packets to the host-side memory through its own PCIe TLP interface, updates the descriptor, and reports the interrupt to notify the host to process the received packets.
[0134] B6: The application agent responds to the interrupt handler, reads the received network packets from the host memory, and updates the RX queue and CQ queue.
[0135] B7: The checker agent component is used to obtain the network packets to be received and compare them with the network packets currently received by the application component appagent, output the comparison results, and finally end the simulation process.
[0136] The system-level verification convergence system and system-level verification convergence method provided in this embodiment have at least the following beneficial effects:
[0137] 1. The system-level verification and convergence system is based on the cocotb verification platform architecture in Python. It can reuse Python application libraries such as iperf, fio, and scapy to quickly implement application simulation of network and storage services for smart NICs. The simulation of various service drivers for smart NICs, including VirtIO / OVS / RDMA driver simulation, can also be reused after some adaptation and modification, reducing a lot of repetitive development and debugging work, accelerating the verification progress, shortening the verification convergence time, and thus accelerating the verification and convergence of the chip.
[0138] 2. By introducing the cocotbext-pcie TLP adapter, the driver simulation of sending and receiving PCIe messages directly on the TLP transport layer interface is realized, which significantly improves the system simulation speed.
[0139] 3. By introducing the cocotbext-eth TLP adapter, the driver simulation of sending and receiving network packets directly at the TLP transport layer interface is realized, which significantly improves the system simulation speed.
[0140] 4. The system-level verification convergence system and system-level verification convergence method provided in this embodiment can be directly applied to smart network card chip verification projects, and can also be used in different chip verification projects, including the verification of GPU and smart AI chips, which can significantly accelerate the convergence of chip system verification.
[0141] Reference Figure 5 The diagram illustrates a computer device provided in an embodiment of this application, including: at least one processor 501 and a memory 502, wherein the memory 502 stores a computer program that can run on the processor 501, wherein the processor 501 executes the computer program to perform the system-level verification convergence method described in the embodiment.
[0142] Specifically, when the processor 501 executes the computer program, it performs the system-level verification convergence method described in the embodiment, including performing: after initialization configuration, performing a network packet sending test process and a network packet receiving test process on the DUT.
[0143] The network packet sending test process includes: the application component (app agent) calls the iperf application based on the Python library to enable the DUT; the iperf application sends the network packets to be sent to the PCIe TLP interface of the DUT through the cocotbext-pcie TLP transport layer adapter; the network packet transceiver component (pkt_gen scapy agent) receives the network packets sent by the DUT through the cocotbext-eth TLP transport layer adapter; the checker component (checker agent) obtains the network packets to be sent and the network packets currently received by the pkt_gen scapy agent, compares them, and outputs the comparison result; the network packet receiving test process includes the pkt_gen scapy agent calling the scapy application based on the Python library, sending the network packets to be received to the ETH TLP interface of the DUT through the cocotbext-eth TLP transport layer adapter; the application component (app agent) responds to the interrupt handler to obtain the network packets; the checker component... The agent obtains the network packet to be received and compares it with the network packet currently received by the application component appagent, and outputs the comparison result.
[0144] Reference Figure 6 The diagram illustrates a non-volatile readable storage medium 600 provided in an embodiment of this application. The non-volatile readable storage medium 600 stores a computer program 601, wherein the computer program 601, when executed by a processor, performs the system-level verification convergence method described in the embodiment.
[0145] Specifically, when the computer program 601 is executed by the processor, it performs the system-level verification convergence method described in the embodiment, including performing: after initialization configuration, performing a network packet sending test process and a network packet receiving test process on the DUT.
[0146] The network packet sending test process includes: the application component (app agent) calls the iperf application based on the Python library to enable the DUT; the iperf application sends the network packets to be sent to the PCIe TLP interface of the DUT through the cocotbext-pcie TLP transport layer adapter; the network packet transceiver component (pkt_gen scapy agent) receives the network packets sent by the DUT through the cocotbext-eth TLP transport layer adapter; the checker component (checker agent) obtains the network packets to be sent and the network packets currently received by the pkt_gen scapy agent, compares them, and outputs the comparison result; the network packet receiving test process includes: the pkt_gen scapy agent calls the scapy application based on the Python library, sends the network packets to be received to the ETH TLP interface of the DUT through the cocotbext-eth TLP transport layer adapter; the application component (app agent) responds to the interrupt handler to obtain the network packets; the checker component (checker agent)... The agent obtains the network packet to be received and compares it with the network packet currently received by the application component appagent, and outputs the comparison result.
[0147] Reference Figure 7 The diagram illustrates a computer program product 700 provided in an embodiment of this application. The computer program product 700 includes a computer program / instruction 701, which, when executed by a processor, implements the system-level verification convergence method described in the embodiment.
[0148] Specifically, when the computer program / instruction 701 is executed by the processor, it implements the system-level verification convergence method described in the embodiment, including performing: after initialization configuration, performing a network packet sending test process and a network packet receiving test process on the DUT.
[0149] The network packet transmission test process includes: the application component (app agent) calling the iperf application based on the Python library to enable the DUT; the iperf application sending the network packets to be sent to the DUT's PCIe TLP interface through the cocotbext-pcie TLP transport layer adapter; the network packet transceiver component (pkt_gen scapy agent) receiving the network packets sent by the DUT through the cocotbext-eth TLP transport layer adapter; and the checker component (checker agent) obtaining the network packets to be sent and the network packets currently received by the pkt_gen scapy agent, comparing them, and outputting the comparison result. The network packet reception test process includes: the pkt_gen scapy agent calling the scapy application based on the Python library to send the network packets to be received to the DUT's ETH TLP interface through the cocotbext-eth TLP transport layer adapter; the application component (app agent) responding to the interrupt handler to obtain the network packets; and the checker component (checker agent)... The agent obtains the network packet to be received and compares it with the network packet currently received by the application component appagent, and outputs the comparison result.
[0150] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0151] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0152] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0153] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0154] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0155] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0156] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0157] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A system-level verification convergence system, characterized in that, The system is a cocotb system verification platform based on the Python language, and the system includes: The application component, app agent, is used to call a Python library-based application to perform network packet testing on the DUT. cocotbext-pcie TLP transport layer adapter, used to send and receive PCIe packets at the TLP transport layer interface; The pkt_gen scapy agent is a network packet sending and receiving component used in scapy applications based on the Python library to perform different types of network packet sending, receiving, parsing, and automatic response processes. cocotbext-eth TLP transport layer adapter, used to send and receive network packets on the TLP transport layer interface; The checker agent component is used to generate comparison results between the expected test results and the actual output of the DUT.
2. The system according to claim 1, characterized in that, The system also includes: The configuration agent component is used to perform tasks including BAR address space allocation, address space definition and allocation for each business module, PCIe enumeration process, maintenance of common tasks and functions, allocation and reclamation of system storage space, queue allocation, and interrupt allocation.
3. The system according to claim 2, characterized in that, When verifying any DUT, after the simulator compiles the verification environment code of the DUT and the system, the application component app agent is used to call the configuration component config agent to initialize the host system and the DUT. The initialization configuration includes allocating PCIe BAR address space, creating TX / RX queues and CQ queues, initializing descriptors and PCIe interrupts, and initializing the DUT by calling any smart network card driver through the cocotbext-pcie TLP transport layer adapter. The smart network card driver includes VirtIO driver, OVS driver and RDMA driver.
4. The system according to claim 3, characterized in that, After initialization configuration, the application component app agent is used to call the iperf application based on the Python library to enable the DUT. The iperf application sends the network packets to be sent to the PCIe TLP interface of the DUT through the cocotbext-pcie TLP transport layer adapter. The network packet transceiver component pkt_gen scapy agent is used to receive network packets sent by the DUT through the cocotbext-eth TLP transport layer adapter; The checking component, checker agent, is used to obtain the network packet to be sent and the network packet currently received by the network packet transceiver component, pkt_gen scapy agent, compare them, and output the comparison result.
5. The system according to claim 3, characterized in that, After initialization, the network packet transceiver component pkt_gen scapy agent is used to call the Python library-based scapy application to send the network packets to be received to the ETH TLP interface of the DUT through the cocotbext-eth TLP transport layer adapter. The application component, app agent, is used to obtain network packets in response to the interrupt handler; The checking component, checker agent, is used to obtain the network packet to be received and compare it with the network packet currently received by the application component, appagent, and output the comparison result.
6. The system according to claim 1, characterized in that, The DUT used by the system for verification includes a smart network interface chip, a GPU, and a smart AI chip.
7. A system-level verification convergence method, characterized in that, The method is applied to the system-level verification convergence system according to any one of claims 1-6, and the method includes: After initializing the configuration, perform network packet sending and receiving tests on the DUT. The network packet transmission test process includes: the application component app agent calls the iperf application based on the Python library to enable the DUT; the iperf application sends the network packets to be sent to the PCIe TLP interface of the DUT through the cocotbext-pcieTLP transport layer adapter; the network packet transceiver component pkt_gen scapy agent receives the network packets sent by the DUT through the cocotbext-eth TLP transport layer adapter; the checker component checker agent obtains the network packets to be sent and the network packets currently received by the network packet transceiver component pkt_gen scapy agent, compares them, and outputs the comparison result. The network packet reception test process includes: the network packet sending and receiving component pkt_gen scapy agent calls the scapy application based on the Python library, and sends the network packets to be received to the ETH TLP interface of the DUT through the cocotbext-eth TLP transport layer adapter; the application component app agent responds to the interrupt handler to obtain the network packets; the checking component checker agent obtains the network packets to be received and compares them with the network packets currently received by the application component app agent, and outputs the comparison result.
8. A computer device, characterized in that, include: At least one processor, and a memory storing a computer program executable on the processor, wherein the processor executes the computer program to perform the system-level verification convergence method of claim 7.
9. A non-volatile readable storage medium, characterized in that, The non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, performs the system-level verification convergence method of claim 7.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the system-level verification convergence method of claim 7.
Citation Information
Patent Citations
PCIe verification IP automatic integration method and system capable of being configured and supporting multiple working modes
CN115544922A
Method and system for system-on-chip design validation
KR102717540B1