Multi-card cascaded simulation unit model and communication method thereof

By using multi-card cascade simulation unit model and Ethernet interconnection technology in chip multi-card cascade simulation, the problem of reduced test layer complexity and simulation speed in the existing technology is solved, and a more efficient simulation process is achieved.

CN119179664APending Publication Date: 2024-12-24SHANGHAI BIREN TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411296201.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

In the existing multi-card cascade simulation of chips, the architecture of the test layer corresponding to multiple hardware models increases the complexity and code scale, resulting in a decrease in simulation speed and unable to meet user needs.

Method used

Using a multi-card cascade simulation unit model, including at least two simulation units, each simulation unit includes a test layer and a hardware layer, and Ethernet interconnection is realized through the hardware transaction conversion processing module, reducing the scale and complexity of the test layer and improving the Simulation speed and efficiency.

Benefits of technology

Through Ethernet communication between independent simulation units, the complexity and scale of the test layer are reduced, the simulation speed and efficiency are significantly improved, and the needs of multi-card cascaded scenarios are adapted.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179664A_ABST
    Figure CN119179664A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software and hardware co-simulation, and provides a multi-card cascaded simulation unit model and a communication method thereof, the model comprises at least two simulation units; each simulation unit comprises a test layer and a hardware layer; the test layer comprises a scheduler, a first bus function model, a first hardware interface and a hardware transaction conversion processing module; the first bus function model is respectively connected with the scheduler and the first hardware interface, and is used for simulating hardware behaviors of the hardware layer and processing hardware transactions of the hardware layer according to a first preset protocol; the hardware layer comprises a second hardware interface and at least one first P2P interface; the second hardware interface is connected with the first hardware interface, and the first P2P interface is connected with the hardware transaction conversion processing module; and different simulation units are in Ethernet interconnection through the hardware transaction conversion processing module. The simulation units are mutually independent and can communicate through the Ethernet, so that the scale and the complexity of a test layer are reduced, and the simulation speed and the simulation efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software and hardware collaborative simulation, and in particular to a multi-card cascade simulation unit model and a communication method thereof. Background Art

[0002] In the existing chip multi-card cascade simulation, multiple hardware models can be instantiated in one test layer, and the stimulus is driven to the multiple hardware models through the test layer.

[0003] However, this architecture in which one test layer corresponds to multiple hardware models increases the complexity of the test layer and the size of the code. In addition, as the number of cascades increases, the simulation speed decreases proportionally, which limits the application scenarios and cannot meet user needs. Summary of the invention

[0004] The present invention provides a multi-card cascade simulation unit model and a communication method thereof, so as to reduce the scale and complexity of a test layer in a simulation unit in a multi-card cascade scenario, thereby improving simulation speed and efficiency.

[0005] The present invention provides a multi-card cascade simulation unit model, comprising at least two simulation units; each simulation unit comprises a test layer and a hardware layer; the test layer comprises a scheduler, a first bus function model, a first hardware interface and a hardware transaction conversion processing module; the first bus function model is respectively connected to the scheduler and the first hardware interface, and is used to simulate the hardware behavior of the hardware layer and process the hardware transactions of the hardware layer according to a first preset protocol; the hardware layer comprises a second hardware interface and at least one first P2P interface; the second hardware interface is connected to the first hardware interface, and the first P2P interface is connected to the hardware transaction conversion processing module; wherein different simulation units are interconnected through Ethernet via the hardware transaction conversion processing module.

[0006] According to a multi-card cascade simulation unit model provided by the present invention, the hardware transaction conversion processing module includes a second bus function model, a second P2P interface and at least one group of Ethernet interfaces; the number of first P2P interfaces is the same as the number of groups of Ethernet interfaces; the first P2P interface is connected to the second P2P interface of the hardware transaction conversion processing module; the Ethernet interface is used to connect the Ethernet interfaces of other simulation units; the second bus function model is respectively connected to the second P2P interface and the Ethernet interface, and is used to process the transmission data between the second P2P interface and the Ethernet interface according to a second preset protocol.

[0007] According to a multi-card cascading simulation unit model provided by the present invention, each first P2P interface corresponds to a group of Ethernet interfaces, and each group of Ethernet interfaces includes a sending module and a receiving module; the second bus function model is used to process data received from the second P2P interface according to a second preset protocol, and pass it to the sending module of the Ethernet interface corresponding to the first P2P interface, and is also used to process data received from the receiving module of the Ethernet interface according to the second preset protocol, and pass it to the corresponding first P2P interface.

[0008] The present invention also provides a communication method for a multi-card cascaded simulation unit model, which is applied to the above-mentioned multi-card cascaded simulation unit model. The communication method for the multi-card cascaded simulation unit model includes: determining a configuration file of the simulation unit model; wherein the configuration file includes the serial number and topological location information of the simulation unit; when communication is required between the simulation units, the data generated by the hardware layer is transmitted to the hardware transaction conversion processing module of the test layer through the first P2P interface, and the hardware transaction conversion processing module determines the target simulation unit for receiving the data according to the configuration file; the hardware transaction conversion processing module sends the processed data to the hardware transaction conversion processing module of the target simulation unit through Ethernet to realize communication between different simulation units.

[0009] According to a communication method for a multi-card cascaded simulation unit model provided by the present invention, data generated by the hardware layer is transmitted to a hardware transaction conversion processing module of the test layer through a first P2P interface, and the hardware transaction conversion processing module determines a target simulation unit for receiving the data according to a configuration file, including: after the data generated by the hardware layer is transmitted to a second P2P interface of the hardware transaction conversion processing module through the first P2P interface, a second bus function model of the hardware transaction conversion processing module determines a target simulation unit for receiving the data according to the configuration file; the hardware transaction conversion processing module sends the processed data to the hardware transaction conversion processing module of the target simulation unit through Ethernet, including: the Ethernet interface of the hardware transaction conversion processing module sends the processed data to the Ethernet interface of the hardware transaction conversion processing module in the target simulation unit.

[0010] According to a communication method for a multi-card cascaded simulation unit model provided by the present invention, a configuration file of the simulation unit model is determined, including: obtaining topological location information based on the connection method and data transmission path between multiple simulation units in the simulation unit model; determining the serial number of each simulation unit in the simulation unit model; wherein the serial number is used to locate the topological position of each simulation unit; and determining the configuration file based on the topological location information and the serial number.

[0011] According to a communication method for a multi-card cascaded simulation unit model provided by the present invention, after determining the configuration file of the simulation unit model, for at least one simulation unit, it also includes: initializing the hardware model in the hardware layer, the scheduler in the test layer and the first bus function model; initializing the hardware transaction conversion processing module, and connecting the first P2P interface of the hardware layer and the second P2P interface of the hardware transaction conversion processing module.

[0012] According to a communication method for a multi-card cascaded simulation unit model provided by the present invention, after the hardware transaction conversion processing module sends the processed data to the hardware transaction conversion processing module of the target simulation unit via Ethernet, it also includes: after the test layer of the target simulation unit receives the data via the Ethernet interface, the second bus function model simulates the hardware behavior of the data according to the second preset protocol, and drives the hardware layer of the target simulation unit through the second P2P interface.

[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the communication method of any of the multi-card cascade simulation unit models described above is implemented.

[0014] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements a communication method of a simulation unit model of a multi-card cascade as described above. The simulation unit model of a multi-card cascade provided by the present invention and its communication method, the simulation unit model of a multi-card cascade includes at least two simulation units; each simulation unit includes a test layer and a hardware layer; the test layer includes a scheduler, a first bus function model, a first hardware interface and a hardware transaction conversion processing module; the first bus function model is respectively connected to the scheduler and the first hardware interface, and is used to simulate the hardware behavior of the hardware layer and process the hardware transaction of the hardware layer according to the first preset protocol; the hardware layer includes a second hardware interface and at least one first P2P interface; the second hardware interface is connected to the first hardware interface, and the first P2P interface is connected to the hardware transaction conversion processing module; different simulation units are interconnected by Ethernet through the hardware transaction conversion processing module. In the above manner, the simulation units of the present invention are independent of each other, one test layer corresponds to one hardware layer, and the simulation units can realize Ethernet communication through the hardware transaction conversion processing module; the scale and complexity of the test layer are reduced, and the simulation speed and efficiency are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 It is a structural schematic diagram of a multi-card cascading simulation unit model provided by an embodiment of the present invention.

[0017] Figure 2 This is the second structural schematic diagram of the multi-card cascade simulation unit model provided by an embodiment of the present invention.

[0018] Figure 3 It is a connection diagram of a simulation unit model of multi-card cascading provided by an embodiment of the present invention.

[0019] Figure 4 It is a flowchart of a communication method of a multi-card cascade simulation unit model provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] In the description of the embodiments of the present invention, it should be noted that the terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. In addition, unless otherwise clearly specified and limited, the terms "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present invention can be understood according to specific circumstances.

[0022] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0023] The present invention provides a multi-card cascade simulation unit model, please refer to Figure 1 , Figure 1 It is a structural schematic diagram of a multi-card cascading simulation unit model provided by an embodiment of the present invention.

[0024] In this embodiment, the simulation unit model of multi-card cascade may include at least two simulation units; each simulation unit includes a test layer 100 and a hardware layer 200 .

[0025] The test layer 100 may include a scheduler 110 , a first bus function model 120 , a first hardware interface 130 , and a hardware transaction conversion processing module 140 .

[0026] The first bus function model 120 is connected to the scheduler 110 and the first hardware interface 130 respectively, and the first bus function model 120 is used to simulate the hardware behavior of the hardware layer 200 and process the hardware affairs of the hardware layer 200 according to the first preset protocol.

[0027] The hardware layer 200 includes a second hardware interface 210 and at least one first P2P interface 220 ; the second hardware interface 210 is connected to the first hardware interface 130 , and the first P2P interface 220 is connected to the hardware transaction conversion processing module 140 .

[0028] In the multi-card cascade simulation unit model of this embodiment, different simulation units are interconnected via Ethernet via the hardware transaction conversion processing module 140 .

[0029] In some embodiments, the hardware transaction conversion processing module 140 may include a second bus function model 141 , a second P2P interface 142 , and at least one set of Ethernet interfaces 143 .

[0030] The number of the first P2P interfaces 220 is the same as the number of the Ethernet interfaces 143; for example, Figure 1 In the embodiment, four first P2P interfaces 220 are provided, and four Ethernet interfaces 143 are also provided.

[0031] The first P2P interface 220 is connected to the second P2P interface 142 of the hardware transaction conversion processing module 140 ; ​​the Ethernet interface 143 is used to connect to the Ethernet interfaces of other simulation units.

[0032] The second bus function model 141 is connected to the second P2P interface 142 and the Ethernet interface 143 respectively, and the second bus function model 141 is used to process the transmission data between the second P2P interface 142 and the Ethernet interface 143 according to the second preset protocol.

[0033] In this embodiment, each simulation unit in the simulation unit model is independent of each other, one test layer corresponds to one hardware layer, and Ethernet communication can be achieved between the simulation units through the hardware transaction conversion processing module; through such an architecture, the scale and complexity of the test layer are reduced, and the simulation speed and efficiency are effectively improved.

[0034] In some embodiments, each first P2P interface corresponds to a group of Ethernet interfaces, and each group of Ethernet interfaces includes a sending module and a receiving module.

[0035] The second bus function model is used to process the data received from the second P2P interface according to the second preset protocol, and transmit the data to the sending module of the Ethernet interface corresponding to the first P2P interface.

[0036] The second bus function model is also used to process data received from the receiving module of the Ethernet interface according to the second preset protocol, and transmit the data to the corresponding first P2P interface.

[0037] In a multi-card system, P2P (port-to-port) refers to the communication mechanism between two independently packaged chips.

[0038] Optionally, the card in the embodiment of the present invention can be any one of a GPU (Graphics Processing Unit), a TPU (Tensor Processing Unit), a NPU (Neural network Processing Unit), a DPU (Deep learning Processing Unit), an APU (Accelerated Processing Unit), and a GPGPU (General-Purpose computing on Graphics Processing Unit).

[0039] See also Figure 2 , Figure 2This is the second structural schematic diagram of the multi-card cascade simulation unit model provided by an embodiment of the present invention.

[0040] In this embodiment, multiple GPU simulation units are cascaded as an example. GPU (Graphics Processing Unit) is a microprocessor that performs image calculations on personal computers, workstations, game consoles and some mobile devices, which can improve the speed of graphics rendering.

[0041] Configure and start N test layers (Test Bench, TB) according to requirements. Each test layer corresponds to a hardware layer (Hardware, HW).

[0042] The test layer is an environment used to verify and test the design functions during hardware design and verification.

[0043] The test layer consists of four parts: scheduler, first bus function model (HW BFM), first hardware interface (HW Intf) and hardware transaction conversion processing module (Converter).

[0044] The first bus functional model (HW BFM) is used to control the hardware layer and can simulate the hardware behavior of the hardware layer and process the hardware affairs of the hardware layer according to the corresponding protocol.

[0045] BFM stands for "Bus Functional Model", which is a model used to design and verify electronic systems, especially in system-level chip design. BFM mainly simulates the bus behavior in the system, including data transmission, signal control, etc.

[0046] The first hardware interface (HW Intf) is a set of data structures in the test layer, which is used to connect the HW interface of the hardware model (HWmodel).

[0047] The hardware transaction conversion processing module (Converter) includes three modules: Ethernet interface (Ethr TX / RX), second bus function model (P2P BFM) and second P2P interface (P2P interface, P2P Intf).

[0048] The Ethernet interface (Ethr TX / RX) is used to connect the TX / RX modules of other test layers according to the topology information. TX is responsible for forwarding the data from BFM, and RX is responsible for receiving the data from other test layers and passing it to the second bus function model (P2P BFM). Ethr is the abbreviation of Ethernet.

[0049] The second bus function model (P2P BFM) is responsible for processing the data from the second P2P interface (P2PIntf) according to the corresponding protocol and passing it to the TX module. It is also responsible for receiving the data from the RX module and passing it to the second P2P interface (P2P Intf).

[0050] The second P2P interface (P2P Intf) is a set of data structures in the test layer that can be connected to the P2P interface in the hardware model (HWmodel).

[0051] A hardware model (HW model) is provided in the hardware layer to simulate hardware behavior.

[0052] Optionally, the hardware model (HW model) may be a C model of RTL, for example, a Verilog file is translated into a CPP model by a verilator compilation tool.

[0053] The full name of RTL is “Register Transfer Level”, which is a hardware design abstraction level used to describe the digital logic operations of circuits and the data flow between registers.

[0054] Verilog is a hardware description language (HDL) used to describe and design digital circuits.

[0055] Verilator is an open source hardware description language (HDL) simulator for verifying and simulating hardware designs. It supports Verilog and SystemVerilog languages, and can convert hardware description code into C++ code, then compile and run it, thus achieving high-performance hardware simulation.

[0056] Optionally, the HW layer also refers to a hardware circuit implemented by RTL.

[0057] In addition, the hardware layer also provides interfaces connected to the TB layer, such as a first hardware interface (HW Intf) and a first P2P interface (P2P Intf).

[0058] Each pair of TX / RX modules in the hardware transaction conversion processing module (Converter) corresponds one-to-one to the first P2P interface (P2P Intf) in the HW model.

[0059] For example Figure 2In the HW model, the TX / RX modules of the hardware transaction conversion processing module (Converter) include Ethr RX-1, Ethr TX-1, Ethr TX-2, Ethr TX-2, Ethr RX-3, Ethr TX-3, ..., Ethr RX-N and Ethr TX-N. The first P2P interface (P2P Intf) in the HW model includes P2P Intf-1, P2P Intf-2, P2P Intf-3, ..., P2P Intf-N.

[0060] The data in P2P Intf-1 can be received and sent through Ethr RX-1 and Ethr TX-1; the data in P2P Intf-2 can be received and sent through Ethr RX-2 and Ethr TX-2; the data in P2P Intf-3 can be received and sent through EthrRX-3 and Ethr TX-3; the data in P2P Intf-4 can be received and sent through Ethr RX-4 and Ethr TX-4.

[0061] For the GPU multi-card simulation technology in the related art, multiple GPU HW models are instantiated under one TB. This TB structure has high simulation efficiency when simulating a single GPU HW model. However, when multiple GPU HW models are instantiated under a TB, the disadvantages are as follows: 1. Instantiating multiple GPU HW models with a single TB structure will increase the complexity of the TB and the size of the code.

[0062] 2. The scalability of a single TB structure when instantiating multiple GPU HW models is low.

[0063] 3. As the number of GPU cascades increases, the simulation speed under a single TB structure will also decrease in the same proportion.

[0064] 4. When changing the GPU multi-card cascade mode, not only the RTL top-level topology connection needs to be changed, but TB also needs to add and adjust the corresponding modules. The entire TB+HW model needs to be recompiled, which increases time and cost.

[0065] 5. When there are many cascaded versions of GPUs, the management of TB and HW versions becomes complicated and difficult, which is not conducive to version maintenance.

[0066] Based on this, in the multi-card cascade simulation unit model provided in this embodiment, the structure of instantiating multiple GPU HW models under one TB is upgraded to a standard universal TB+HW model simulation unit, and only one GPU HW model is instantiated under one TB. In this way, the GPU multi-card cascade architecture is changed from a single TB+multi-GPU HW model mode to the interconnection between multiple standard simulation units, thereby solving the problems that may arise in the related technology.

[0067] Different simulation units can communicate with each other through different TX / RX modules of the hardware transaction conversion processing module.

[0068] See also Figure 3 , Figure 3 It is a connection diagram of a simulation unit model of multi-card cascading provided by an embodiment of the present invention.

[0069] In this embodiment, the simulation units of the multi-card cascade include simulation unit 1, simulation unit 2, simulation unit 3 and simulation unit 4.

[0070] In simulation unit 1, the first P2P interface ① needs to communicate and interact with simulation unit 3, the first P2P interface ② needs to communicate and interact with simulation unit 3, the first P2P interface ③ needs to communicate and interact with simulation unit 2, and the first P2P interface ④ needs to communicate and interact with simulation unit 4.

[0071] Therefore, the RX-1 module of simulation unit 1 is connected to the TX-1 module of simulation unit 3 to receive data, and the TX-1 module of simulation unit 1 is connected to the RX-1 module of simulation unit 3 to send data; the RX-2 module of simulation unit 1 is connected to the TX-2 module of simulation unit 3 to receive data, and the TX-2 module of simulation unit 1 is connected to the RX-2 module of simulation unit 3 to send data; the RX-3 module of simulation unit 1 is connected to the TX-1 module of simulation unit 2 to receive data, and the TX-3 module of simulation unit 1 is connected to the RX-1 module of simulation unit 2 to send data; the RX-4 module of simulation unit 1 is connected to the TX-1 module of simulation unit 4 to receive data, and the TX-4 module of simulation unit 1 is connected to the RX-1 module of simulation unit 4 to send data.

[0072] In simulation unit 2 , first P2P interface ① needs to communicate and interact with simulation unit 1 , first P2P interface ② needs to communicate and interact with simulation unit 4 , and first P2P interface ④ needs to communicate and interact with simulation unit 4 .

[0073] Therefore, the TX-1 module of simulation unit 2 is connected to the RX-3 module of simulation unit 1 to send data, and the RX-1 module of simulation unit 2 is connected to the TX-3 module of simulation unit 1 to receive data; the TX-2 module of simulation unit 2 is connected to the RX-3 module of simulation unit 4 to send data, and the RX-2 module of simulation unit 2 is connected to the TX-3 module of simulation unit 4 to receive data; the RX-4 module of simulation unit 2 is connected to the TX-4 module of simulation unit 4 to receive data, and the TX-4 module of simulation unit 2 is connected to the RX-4 module of simulation unit 4 to send data.

[0074] In simulation unit 3 , first P2P interface ① needs to communicate and interact with simulation unit 1 , first P2P interface ② needs to communicate and interact with simulation unit 1 , and first P2P interface ③ needs to communicate and interact with simulation unit 4 .

[0075] Therefore, the TX-1 module of simulation unit 3 is connected to the RX-1 module of simulation unit 1 to send data, and the RX-1 module of simulation unit 3 is connected to the TX-1 module of simulation unit 1 to receive data; the TX-2 module of simulation unit 3 is connected to the RX-2 module of simulation unit 1 to send data, and the RX-2 module of simulation unit 3 is connected to the TX-2 module of simulation unit 1 to receive data; the TX-3 module of simulation unit 3 is connected to the RX-2 module of simulation unit 4 to send data, and the RX-3 module of simulation unit 3 is connected to the TX-2 module of simulation unit 4 to receive data.

[0076] In simulation unit 4, the first P2P interface ① needs to communicate and interact with simulation unit 1, the first P2P interface ② needs to communicate and interact with simulation unit 3, the first P2P interface ③ needs to communicate and interact with simulation unit 2, and the first P2P interface ④ needs to communicate and interact with simulation unit 2.

[0077] Therefore, the TX-1 module of simulation unit 4 is connected to the RX-4 module of simulation unit 1 to send data, and the RX-1 module of simulation unit 4 is connected to the TX-4 module of simulation unit 1 to receive data; the TX-2 module of simulation unit 4 is connected to the RX-3 module of simulation unit 3 to send data, and the RX-2 module of simulation unit 4 is connected to the TX-3 module of simulation unit 3 to receive data; the RX-3 module of simulation unit 4 is connected to the TX-2 module of simulation unit 2 to receive data, and the TX-3 module of simulation unit 4 is connected to the RX-2 module of simulation unit 2 to send data; the TX-4 module of simulation unit 4 is connected to the RX-4 module of simulation unit 2 to send data, and the RX-4 module of simulation unit 4 is connected to the TX-4 module of simulation unit 2 to receive data.

[0078] Based on the above connection mode, simulation unit 1, simulation unit 2, simulation unit 3 and simulation unit 4 can realize cascade communication interaction.

[0079] It should be noted that, in other embodiments, according to different requirements, there may be other cascade communication modes between different simulation units of the simulation unit model, which are not listed here one by one.

[0080] On the other hand, the present invention further provides a communication method of a multi-card cascade simulation unit model, which is applied to the multi-card cascade simulation unit model mentioned above.

[0081] See also Figure 4 , Figure 4 4 is a flow chart of a communication method of a multi-card cascade simulation unit model provided by an embodiment of the present invention. In this embodiment, the communication method of a multi-card cascade simulation unit model may include steps S410 to S440, and each step is specifically as follows: S410: Determine a configuration file of a simulation unit model; wherein the configuration file includes a serial number and topological location information of the simulation unit.

[0082] S420: When communication is required between simulation units, data generated by the hardware layer is transmitted to the hardware transaction conversion processing module of the test layer through the first P2P interface, and the hardware transaction conversion processing module determines the target simulation unit to receive the data according to the configuration file.

[0083] S430: The hardware transaction conversion processing module sends the processed data to the hardware transaction conversion processing module of the target simulation unit via Ethernet to achieve communication between different simulation units.

[0084] In some embodiments, the data generated by the hardware layer is transmitted to the hardware transaction conversion processing module of the test layer through the first P2P interface, and the step of the hardware transaction conversion processing module determining the target simulation unit for receiving the data according to the configuration file may specifically include: After the data generated by the hardware layer is transmitted to the second P2P interface of the hardware transaction conversion processing module through the first P2P interface, the second bus function model of the hardware transaction conversion processing module determines the target simulation unit to receive the data according to the configuration file.

[0085] The step of sending the processed data by the hardware transaction conversion processing module to the hardware transaction conversion processing module of the target simulation unit via Ethernet may specifically include: The Ethernet interface of the hardware transaction conversion processing module sends the processed data to the Ethernet interface of the hardware transaction conversion processing module in the target simulation unit.

[0086] In some embodiments, the step of determining a configuration file of the simulation unit model may specifically include: According to the connection mode and data transmission path between multiple simulation units in the simulation unit model, the topological location information is obtained; the serial number of each simulation unit in the simulation unit model is determined; wherein the serial number is used to locate the topological position of each simulation unit; according to the topological location information and the serial number, the configuration file is determined.

[0087] In some embodiments, after determining the configuration file of the simulation unit model, the steps performed on at least one simulation unit may further include: Initialize the hardware model in the hardware layer, the scheduler in the test layer and the first bus function model; initialize the hardware transaction conversion processing module, and connect the first P2P interface of the hardware layer and the second P2P interface of the hardware transaction conversion processing module.

[0088] In some embodiments, the step after the hardware transaction conversion processing module sends the processed data to the hardware transaction conversion processing module of the target simulation unit via Ethernet may further include: After the test layer of the target simulation unit receives the data through the Ethernet interface, the second bus function model simulates the hardware behavior of the data according to the second preset protocol and drives the hardware layer of the target simulation unit through the second P2P interface.

[0089] Taking the GPU simulation unit as an example, the method provided in this embodiment may specifically include two stages: a configuration and pre-startup stage and a startup operation stage.

[0090] In the configuration and pre-startup phase, TB requires a configuration file when it starts. The file contents are: 1. IP and port topology information of P2P interconnection: The topology information of multiple GPU cards refers to the connection mode and data transmission path between multiple GPU cards in the system; 2. Current TB serial number: used to locate the topological position of the current simulation unit and ensure that the P2P ports between multiple simulation units can be correctly interconnected.

[0091] During the startup phase, after multiple simulation units are started, they will be initialized according to the following process: 1. Initialization of GPU hardware model (GPU HW model), scheduler (Scheduler), and first bus function model (HWBFM).

[0092] 2. Initialization of the Converter module, the P2P interface is connected to the P2P interface of the hardware layer.

[0093] 3. The Converter module obtains the current TB serial number and topology information in the configuration file.

[0094] 4. The TX / RX modules of the Converter module are interconnected with the TX / RX modules of other TBs through Ethernet according to the topology information. Each pair of TX / RX modules in the Converter module corresponds one-to-one to the P2P interface in the hardware model.

[0095] During operation, when the GPU simulation units need to communicate with each other, the data generated by the HW layer is transmitted to the Converter module of the TB layer through the P2P interface. The first bus function model (P2P BFM) in the Converter module processes the data according to the corresponding protocol, and then transmits it to the corresponding TX / RX module according to the set topology. The TX / RX module sends it to other GPU simulation units connected to it via Ethernet.

[0096] After other GPU simulation units receive the information, their internal TX / RX modules pass the data to HW BFM. HW BFM simulates hardware behavior according to the corresponding protocol and drives the HW layer through P2P Intf.

[0097] In the above process, the original P2P physical interconnection of the GPU multi-card cascade HW layer is upgraded to Ethernet interconnection through conversion and processing by the Converter module. The BFM in the Converter module ensures consistency with the original P2P physical interconnection simulation function.

[0098] Therefore, the simulation function of the GPU multi-card P2P Ethernet interconnection implemented by the present invention maintains consistency with the simulation function of the original GPU multi-card P2P physical interconnection.

[0099] In summary, the communication method of the multi-card cascade simulation unit model provided by the embodiment of the present invention, when starting the simulation unit, by setting the sequence number of the simulation unit and the multi-card cascade topology configuration file, multiple simulation units constitute a complete GPU multi-card cascade simulation model. Each simulation unit runs independently of each other and uses Ethernet for communication, and its beneficial effects are as follows: 1. The generated TB+HW model is the same standard simulation unit model, which is simple and convenient in version maintenance. At the same time, different GPU multi-card cascade models can be generated according to the topology configuration, which has strong scalability.

[0100] 2. When implementing multi-card cascade simulation of different GPUs, there is no need to modify the underlying RTL or recompile the TB + HW model, saving time and cost.

[0101] 3. By only modifying the TB serial number and topology configuration file, the arbitrary expansion of GPU multi-card cascading can be achieved, which greatly improves the integration speed and saves time and maintenance costs.

[0102] 4. GPU simulation units are independent of each other and communicate with each other via Ethernet, which reduces the size and complexity of TB and improves simulation speed and efficiency.

[0103] 5. The original P2P physical interconnection mode of multi-card cascading of GPUs was upgraded to an Ethernet interconnection mode, which improved the flexibility of the simulation platform.

[0104] 6. By setting the TB serial number and topology configuration file, each running GPU simulation unit is independent of each other. The topological position of each simulation unit is different, which also realizes the difference between simulation units, making the simulation model closer to the actual application scenario.

[0105] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the communication method of the multi-card cascade simulation unit model provided by the above methods, and its steps and principles have been introduced in detail in the above methods and will not be repeated here.

[0106] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the communication method of the multi-card cascade simulation unit model provided by the above methods. The steps and principles thereof have been introduced in detail in the above methods and will not be repeated here.

[0107] Non-transitory computer-readable storage media can be any available media or data storage devices that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO)), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drives (SSDs)), etc.

[0108] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0109] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A simulation unit model of multi-card cascade, characterized in that: It includes at least two simulation units; each simulation unit includes a test layer and a hardware layer; The test layer includes a scheduler, a first bus function model, a first hardware interface and a hardware transaction conversion processing module; the first bus function model is respectively connected to the scheduler and the first hardware interface, and is used to simulate the hardware behavior of the hardware layer and process the hardware transactions of the hardware layer according to the first preset protocol; The hardware layer includes a second hardware interface and at least one first P2P interface; the second hardware interface is connected to the first hardware interface, and the first P2P interface is connected to the hardware transaction conversion processing module; Among them, different simulation units are interconnected via Ethernet through the hardware transaction conversion processing module.

2. The multi-card cascade simulation unit model according to claim 1, characterized in that: The hardware transaction conversion processing module includes a second bus function model, a second P2P interface and at least one group of Ethernet interfaces; the number of the first P2P interfaces is the same as the number of groups of the Ethernet interfaces; The first P2P interface is connected to the second P2P interface of the hardware transaction conversion processing module; The Ethernet interface is used to connect to the Ethernet interfaces of other simulation units; The second bus function model is connected to the second P2P interface and the Ethernet interface respectively, and is used to process the transmission data between the second P2P interface and the Ethernet interface according to a second preset protocol.

3. The multi-card cascade simulation unit model according to claim 2, characterized in that: Each first P2P interface corresponds to a group of Ethernet interfaces, and each group of Ethernet interfaces includes a sending module and a receiving module; The second bus function model is used to process data received from the second P2P interface according to the second preset protocol, and pass it to the sending module of the Ethernet interface corresponding to the first P2P interface. It is also used to process data received from the receiving module of the Ethernet interface according to the second preset protocol, and pass it to the corresponding first P2P interface.

4. A communication method for a multi-card cascade simulation unit model, characterized in that: Applied to the multi-card cascade simulation unit model according to any one of claims 1 to 3, the communication method of the multi-card cascade simulation unit model comprises: Determine a configuration file of the simulation unit model; wherein the configuration file includes a serial number and topological location information of the simulation unit; When the simulation units need to communicate with each other, the data generated by the hardware layer is transmitted to the hardware transaction conversion processing module of the test layer through the first P2P interface, and the hardware transaction conversion processing module determines the target simulation unit to receive the data according to the configuration file; The hardware transaction conversion processing module sends the processed data to the hardware transaction conversion processing module of the target simulation unit via Ethernet to achieve communication between different simulation units.

5. The communication method of the multi-card cascade simulation unit model according to claim 4, characterized in that: The data generated by the hardware layer is transmitted to the hardware transaction conversion processing module of the test layer through the first P2P interface, and the hardware transaction conversion processing module determines the target simulation unit for receiving the data according to the configuration file, including: After the data generated by the hardware layer is transmitted to the second P2P interface of the hardware transaction conversion processing module through the first P2P interface, the second bus function model of the hardware transaction conversion processing module determines the target simulation unit for receiving the data according to the configuration file; The hardware transaction conversion processing module sends the processed data to the hardware transaction conversion processing module of the target simulation unit via Ethernet, including: The Ethernet interface of the hardware transaction conversion processing module sends the processed data to the Ethernet interface of the hardware transaction conversion processing module in the target simulation unit.

6. The communication method of the multi-card cascade simulation unit model according to claim 4, characterized in that: The step of determining the configuration file of the simulation unit model comprises: According to the connection mode and data transmission path between the multiple simulation units in the simulation unit model, the topological location information is obtained; Determining the serial number of each simulation unit in the simulation unit model; wherein the serial number is used to locate the topological position of each simulation unit; The configuration file is determined according to the topological location information and the sequence number.

7. The communication method of the multi-card cascade simulation unit model according to claim 4, characterized in that: After determining the configuration file of the simulation unit model, for at least one simulation unit, the method further includes: Initializing the hardware model in the hardware layer, the scheduler in the test layer, and the first bus function model; The hardware transaction conversion processing module is initialized, and the first P2P interface of the hardware layer is connected to the second P2P interface of the hardware transaction conversion processing module.

8. The communication method of the multi-card cascade simulation unit model according to claim 4, characterized in that: After the hardware transaction conversion processing module sends the processed data to the hardware transaction conversion processing module of the target simulation unit via Ethernet, it also includes: After the test layer of the target simulation unit receives data through the Ethernet interface, the second bus function model simulates the hardware behavior of the data according to the second preset protocol and drives the hardware layer of the target simulation unit through the second P2P interface.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the communication method of the multi-card cascade simulation unit model as claimed in any one of claims 4 to 8 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the communication method of the multi-card cascade simulation unit model as claimed in any one of claims 4 to 8 is implemented.

Citation Information

Cited By

  • Methods, systems, and computing devices for emulating multi-card interconnects

    CN121210232A

  • Methods, systems, and computing devices for emulating multi-card interconnect

    CN121210232B