EMU test method and device, electronic equipment and storage medium
By controlling the multiplexer on the EMU platform to switch to the backdoor loading logic mode and storing the file content into a two-dimensional array, the problem of EMU debugging efficiency and accuracy in chip development is solved, enabling convenient software loading and problem location, and reducing cost.
Patent Information
- Application Number
- CN202411054452.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-08-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the chip development process, the debugging efficiency and accuracy of the EMU in the existing technology are limited by the precise setting of the dump waveform and the complexity of the SDL language, which leads to a decrease in problem location efficiency, high difficulty in getting started, and difficulty in realizing convenient software loading. .
By controlling the multiplexer to switch from the normal function logic mode to the backdoor loading logic mode, and in the backdoor loading logic mode, temporarily store the file content that needs to be loaded into the DDR into the built-in two-dimensional array, and use the backdoor loading logic code to improve EMU’s problem location efficiency and software loading efficiency.
It has realized an EMU testing method that is easy to implement and easy to get started, improved problem location and software loading efficiency in product development in the chip field, reduced EMU usage costs, and increased the actual effective usage rate of EMU.
Smart Images

Figure CN118569164A
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of chip development tools, and in particular to an EMU testing method, device, electronic equipment and storage medium. Background Art
[0002] In the field of chip development, the emulator (EMU for short) platform is usually used to verify software business functions and locate problems. Verification through the EMU platform is between verification through Electronic Design Automation (EDA) and verification through Field Programmable Gate Array (FPGA) in terms of hardware authenticity and running speed. FPGA refers to an integrated chip based on digital circuits. The logic object instantiated by EDA technology can be considered as a low-speed equivalent chip. In addition, EMU can be used to perform more complete chip verification, and it can also accelerate chip verification efficiency. At the same time, a key point is that it can cover software and hardware coordination and performance-related test issues at an early stage.
[0003] The main principle of EMU is to directly put the synthesizable code on the application-specific integrated circuit (ASIC) or FPGA interconnection network for synthesis and simulation, so as to quickly verify the software and hardware functions of the real chip. Software simulation can construct its own backdoor loading scheme through the particle model manual provided by the low-speed equivalent chip (Emulator). Usually, the backdoor loading scheme generally involves professional knowledge such as memory interleaving, hierarchical division and other hardware bottom-level design related logic.
[0004] The common method of debugging EMU is to locate the problem through dump waveform after setting the trigger conditions (the term "dump waveform" usually refers to recording the signal waveform of the circuit or system and saving it as a file or data format for subsequent analysis and processing). This method is simple and feasible, but the efficiency of problem location is strictly limited due to the need to accurately set the trigger conditions of the dump waveform, and the restrictions on the dump level and duration cannot be too long.
[0005] Usually, EMU platform providers also provide another advanced debugging method: SDL language (SDL, full name Specification and Description Language, SDL language is a specification and description language). SDL language allows the construction of complex trigger syntax (trigger syntax) for more convenient problem location, but SDL language is difficult to use, and there are few talents in this field, resulting in few applications.
[0006] The inventors found that there are at least the following problems in the related art: the demand for EMU in the product development of the chip field is increasing, but in the actual application process, if the SDL language is used, it is difficult and complicated to get started, and it is not convenient to implement. If the SDL language is not used, the efficiency and accuracy of problem location during debugging will be greatly reduced. The related art urgently needs a method that can be easily implemented to improve the efficiency of problem location and software loading. Summary of the invention
[0007] The purpose of the embodiments of the present invention is to provide an EMU testing method, device, electronic device and storage medium, which are easy to implement and have low difficulty in getting started, while improving problem location and software loading efficiency during product development and debugging in the chip field.
[0008] To solve the above technical problems, an embodiment of the present invention provides an EMU testing method, including: controlling a multiplexer to switch from a normal function logic mode to a backdoor loading logic mode; in the backdoor loading logic mode, temporarily storing the file content to be loaded into the DDR into a built-in two-dimensional array by running the backdoor loading logic code.
[0009] An embodiment of the present invention also provides an EMU testing device, comprising: a multi-way selection module, used to switch from a normal function logic mode to a backdoor loading logic mode by controlling a multi-way selector; a backdoor loading module, used to temporarily store the file content to be loaded into a DDR into a built-in two-dimensional array by running a backdoor loading logic code in the backdoor loading logic mode.
[0010] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned EMU testing method.
[0011] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, and the computer program implements the above-mentioned EMU test method when executed by a processor.
[0012] In the embodiment of the present invention, the multiplexer is controlled to switch from the normal function logic mode to the backdoor loading logic mode; in the backdoor loading logic mode, the file content to be loaded into the DDR is temporarily stored in the built-in two-dimensional array by running the backdoor loading logic code. This can improve the efficiency of EMU problem location, improve the actual effective utilization rate of EMU, save EMU usage costs for users, and thus make it easy to implement and easy to get started, while improving the problem location and software loading efficiency in the process of product development and debugging in the chip field. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0014] Figure 1 is a flow chart of an EMU testing method provided according to an embodiment of the present invention; Figure 2 It is a schematic diagram of the connection relationship of the overall framework of the EMU test provided according to an embodiment of the present invention; Figure 3 is a schematic diagram of the backdoor fast loading principle provided according to an embodiment of the present invention; Figure 4 is a schematic diagram of an embodiment of adding a comprehensive comparator to an EMU provided according to an embodiment of the present invention; Figure 5 is a schematic structural diagram of an EMU testing device according to another embodiment of the present invention; Figure 6 It is a schematic structural diagram of an electronic device according to another embodiment of the present invention. DETAILED DESCRIPTION
[0015] To make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.
[0016] An embodiment of the present invention relates to an EMU test method, which can be applied to an EMU platform, a chip test control device, or an electronic device such as a mobile phone, a computer, etc. that can issue a control command through a code. In this embodiment, the multiplexer is controlled to switch from a normal function logic mode to a backdoor loading logic mode; in the backdoor loading logic mode, the file content to be loaded into the DDR is temporarily stored in a built-in two-dimensional array by running the backdoor loading logic code. This can improve the efficiency of EMU problem locating, improve the actual effective utilization rate of EMU, save the cost of EMU use for users, and thus make it easy to implement and easy to get started, while improving the problem locating and software loading efficiency in the process of product development and debugging in the chip field. The implementation details of the EMU test method of this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for the implementation of this solution.
[0017] like Figure 1 As shown, in step 101, the EMU platform switches from the normal function logic mode to the backdoor loading logic mode by controlling the multiplexer; in the backdoor loading logic mode, the business logic will be executed through the driver module for maintenance or loading data, and in the normal function logic mode, other logics of the real business will be executed. A multiplexer (MUX for short) is a combinational logic circuit with multiple inputs and a single output. An n-input multiplexer is an n-way digital switch that can select one output from n inputs to a common output terminal according to different channel selection control signals. In one example, the multiplexer can dynamically or statically switch the normal function logic mode and the backdoor loading logic mode. By controlling the multiplexer to switch from the normal function logic mode to the backdoor loading logic mode, it can be: by controlling the multiplexer selection logic of the dynamic switch in the multiplexer, the normal function logic mode is switched to the backdoor loading logic mode.
[0018] In step 102, the EMU platform temporarily stores the file content to be loaded into the DDR into a built-in two-dimensional array by running the backdoor loading logic code in the backdoor loading logic mode.
[0019] For ease of understanding, the overall framework of an EMU platform proposed in this application is briefly described here. Figure 2As shown, the EMU platform controls the multiplexer to dynamically or statically select a control signal output by a module from the driver module used for maintenance or data loading and other logic modules of the real business to perform testing or simulation of the component to be tested, and then implements the functions of recording the packet rate, command response delay, data flow, and command correctness check of the module to be tested through the performance monitor (PERF Monitor) and the verification monitor (CHECK Monitor). After completion, an additional memory or storage (Memory) is used to record the data of the simulation process, which can be used by the EDA or EMU platform to query relevant results during or after the simulation, and can record the debugging content or the content of the soft run. The following will give detailed examples and further descriptions of each module involved in this block diagram.
[0020] In one example, the backdoor loading logic code is a synthesizable small-scale backdoor loading logic code, the main function of which is to build a two-dimensional array for temporarily storing file contents that need to be loaded into a double data rate synchronous dynamic random access memory (DDR).
[0021] In one example, after running the backdoor loading logic code, the control logic code can be used to trigger control commands to the AXI interface or the DFI interface, or control commands to other types of interfaces can be triggered according to actual conditions, which is not limited here. The control logic code can be part of the backdoor loading logic code, or it can be separated to form a trigger code. Among them, the AXI interface is an advanced extensible interface and is part of ARM and AMBA. AMBA is an advanced microcontroller bus architecture defined by ARM. The DFI interface, whose full name is DDR PHY Interface, is the interface protocol between the double data rate controller (DDR controller) and PHY; PHY (full name Physical), which can be called the port physical layer in Chinese, is a common abbreviation for the physical layer of the OSI model. For example Figure 3 As shown, by controlling the multiplexer to switch from the normal function logic mode to the backdoor loading logic mode, the control command to the AXI interface or the DFI interface is triggered by the control logic code, and according to the AXI interface or the DFI interface, the test or simulation of the component to be tested is completed in cooperation with the random access memory (RAM, Random Access Memory) model (Model) 0 to the random access memory model X.
[0022] In one example, the backdoor loading logic code uses a syntax supported by both EDA and EMU platforms, which can be: Verilog syntax. Verilog is a hardware description language (HDL) used to describe the structure and behavior of digital systems. This syntax is used to build a driver module for maintenance or loading data. The driver module is used to simulate the upper-level module of the module under test, which is equivalent to the main program of the component under test.
[0023] In one example, after running the backdoor loading logic code, the test performance data is counted by running the performance monitoring code; the performance monitoring code can be mounted on a performance monitor (PERF Monitor) and can also be written using Verilog syntax, where the test performance data, for example: timestamp count data, packet count data, traffic statistics data, arbitration ratio data, command response delay data, etc.
[0024] In one example, after running the backdoor loading logic code, the test data is checked by running the verification monitoring code; the verification monitoring code can be mounted on the verification monitor (CHECK Monitor), and can also be written using Verilog syntax, wherein the data check during the test process can be: test function check, test protocol check, end-to-end data comparison check, command correctness check, etc.
[0025] In one example, the performance monitor (PERF Monitor) and the check monitor (CHECK Monitor) are both written in the common Verilog syntax, and the monitor can be implemented to record the packet rate, command response delay, data flow, and command correctness check of the module under test. And an additional logic module (Additional Logic) can be used to store the check monitoring results, performance statistics, and completion status.
[0026] In one example, after running the backdoor loading logic code, the data generated during the test is recorded through the backup memory, so that relevant results can be queried during or after the test. The backup memory can be an additional memory or storage (Memory) used to record the data of the simulation process, so that the EDA or EMU platform can query relevant results during or after the simulation.
[0027] In an example, first prepare the image or file content to be loaded into DDR, and pay attention to the format defined by the load memory logic. The general format mainly involves the base description (binary or hexadecimal), data size requirements, file content size restrictions, etc. Secondly, switch the MUX logic to the backdoor loading logic mode, and load it into the aforementioned two-dimensional array according to the backdoor loading method of the static random access memory (SRAM, full name Static Random-Access Memory) similar to EDA. The two-dimensional array is generally selected as $readmemb / $readmemh. Among them, $readmemh and $readmemb are both system tasks of Verilog. The two system tasks of $readmemh and $readmemb are used to read data from the specified file into the register array. Finally, wait for the file to be loaded successfully. When the file is loaded successfully, the backdoor loading logic can output a completion status signal for characterization. In this example, a very low-complexity synthesizable code is developed to achieve fast loading of various types of particle models, and at the same time, it is completely consistent with EDA at the interface level, so as to achieve synchronization with EDA verification and fast reproduction of the same scenario. It greatly reduces the complexity of EMU platform applications and the workload of EMU version development, and improves the efficiency of EMU version release and verification iteration.
[0028] In a Figure 4 In the example shown, the EMU platform first starts the simulation business of the component to be tested through the driver module for the real business. Secondly, the performance monitor or the check monitor is turned on according to the needs to record and count. Finally, the data is exported to the additional logic module (Additional Logic) for storage and triggering the completion status. The additional logic module can also be replaced by memory or storage to record the data of the simulation process, which can be used by the EDA or EMU platform to query the relevant results during or after the simulation.
[0029] The present invention develops a low-complexity synthesizable code to limit the debugging (DEBUG) that heavily relies on waveforms on EMU, and at the same time, it is completely consistent with EDA at the interface level, achieving synchronization with EDA verification and rapid reproduction of the same scenario. The complexity of EMU platform applications and the workload of EMU version development are greatly reduced, and the efficiency of EMU version verification iteration is improved.
[0030] In this embodiment, the multiplexer is controlled to switch from the normal function logic mode to the backdoor loading logic mode; in the backdoor loading logic mode, the file content to be loaded into the DDR is temporarily stored in the built-in two-dimensional array by running the backdoor loading logic code. This can improve the efficiency of EMU problem location, improve the actual effective utilization rate of EMU, save EMU usage costs for users, and thus make it easy to implement and easy to get started, while improving the problem location and software loading efficiency in the process of product development and debugging in the chip field.
[0031] The steps of the above method are divided only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this application.
[0032] Another embodiment of the present invention relates to an EMU testing device, such as Figure 5 As shown, it includes: a multi-way selection module 501, which is used to switch from the normal function logic mode to the backdoor loading logic mode by controlling the multi-way selector; a backdoor loading module 502, which is used to temporarily store the file content to be loaded into the DDR into the built-in two-dimensional array by running the backdoor loading logic code in the backdoor loading logic mode.
[0033] In one example, the device also includes: a performance monitor, which is used to implement statistics of test performance data by running performance monitoring code after running the backdoor loading logic code; wherein the test performance data includes one of the following or any combination thereof: timestamp count data, packet count data, traffic statistics data, arbitration ratio data, and command response delay data.
[0034] In one example, the device also includes: a verification monitor, which is used to implement test data checking by running a verification monitoring code after running the backdoor loading logic code; wherein the data check during the test includes one of the following or any combination thereof: test function check, test protocol check, end-to-end data comparison check, and command correctness check.
[0035] In one example, the device further includes: a backup memory, which is used to record data generated during the test process through the backup memory after running the backdoor loading logic code, so as to query relevant results during the test process or after the test is completed.
[0036] In one example, the backdoor loading logic code is generated using Verilog syntax.
[0037] In one example, the device further includes: an interface calling module, which is used to trigger a control command to the AXI interface or the DFI interface by controlling the logic code after running the backdoor loading logic code.
[0038] In one example, controlling the multiplexer to switch from the normal function logic mode to the backdoor loading logic mode includes: controlling the multiplexer selection logic of a dynamic switch in the multiplexer to switch the normal function logic mode to the backdoor loading logic mode.
[0039] In this embodiment, the multiplexer is controlled to switch from the normal function logic mode to the backdoor loading logic mode; in the backdoor loading logic mode, the file content to be loaded into the DDR is temporarily stored in the built-in two-dimensional array by running the backdoor loading logic code. This can improve the efficiency of EMU problem location, improve the actual effective utilization rate of EMU, save EMU usage costs for users, and thus make it easy to implement and easy to get started, while improving the problem location and software loading efficiency in the process of product development and debugging in the chip field.
[0040] It is not difficult to find that this embodiment is a device embodiment corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the above method embodiment. The relevant technical details mentioned in the above method embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above method embodiment.
[0041] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other units in this embodiment.
[0042] Another embodiment of the present invention relates to an electronic device, such as Figure 6 As shown, it includes at least one processor 601; and a memory 602 that is communicatively connected to the at least one processor; wherein the memory 602 stores instructions that can be executed by the at least one processor 601, and the instructions are executed by the at least one processor 601 so that the at least one processor 601 can execute the EMU test method as described above.
[0043] The memory 602 and the processor 601 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 601 and the memory 602 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 601 is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor 601.
[0044] The processor 601 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 602 can be used to store data used by the processor 601 when performing operations.
[0045] Another embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0046] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0047] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.
Claims
1. An EMU testing method, characterized in that: include: Switching from a normal function logic mode to a backdoor loading logic mode by controlling a multiplexer; In the backdoor loading logic mode, by running the backdoor loading logic code, the file content to be loaded into the DDR is temporarily stored in the built-in two-dimensional array.
2. The EMU testing method according to claim 1, characterized in that: The method further comprises: After running the backdoor loading logic code, the test performance data is counted by running the performance monitoring code; The test performance data includes one or any combination of the following: Timestamp count data, packet count data, traffic statistics data, arbitration ratio data, command response delay data.
3. The EMU testing method according to claim 1, characterized in that: The method further comprises: After running the backdoor loading logic code, the test data is checked by running the verification monitoring code; The test data check includes one of the following or any combination thereof: Test function check, test protocol check, end-to-end data comparison check, command correctness check.
4. The EMU testing method according to claim 1, characterized in that: The method further comprises: After running the backdoor loading logic code, the data generated during the test is recorded through the backup memory so that relevant results can be queried during or after the test.
5. The EMU testing method according to claim 1, characterized in that: The backdoor loading logic code is written and generated using Verilog syntax.
6. The EMU testing method according to claim 1, characterized in that: The method further comprises: After running the backdoor to load the logic code, the control logic code is used to trigger control commands to the AXI interface or DFI interface.
7. The EMU testing method according to any one of claims 1 to 6, characterized in that: The method of switching from a normal function logic mode to a backdoor loading logic mode by controlling a multiplexer includes: The normal function logic mode is switched to the backdoor loading logic mode by controlling the multiplexing logic of the dynamic switch in the multiplexing device.
8. An EMU testing device, characterized in that: include: A multiplexer selection module, used for switching from a normal function logic mode to a backdoor loading logic mode by controlling a multiplexer; The backdoor loading module is used to temporarily store the file content to be loaded into the DDR into the built-in two-dimensional array by running the backdoor loading logic code in the backdoor loading logic mode.
9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the EMU testing method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the EMU testing method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
File processing method and device, electronic equipment and computer readable storage medium
CN113468010A
Method for accelerating verification of central processing unit and computing equipment
CN117494407A
Chip verification method, test case multiplexing method and device
CN117556749A
Verification system, verification method, electronic device, and storage medium
CN117667655A
Verification system, verification method, electronic device, and storage medium
WO2024046362A1
