Search

CN-120874706-B - Chip verification method, device, system, apparatus, medium and program

CN120874706BCN 120874706 BCN120874706 BCN 120874706BCN-120874706-B

Abstract

The embodiment of the application provides a chip verification method, a device, a system, equipment, a medium and a program, wherein the chip verification method comprises the steps of simulating the chip, wherein the chip comprises a program running module and a memory storage module, the program running module is used for running a software program, a program file of the software program is stored in the memory storage module, a simulation use case is executed to enable the program running module to call the program file for processing, a read-write event of the memory storage module is monitored to track the variable change condition of the software program in the process of calling the program file by the program running module, the memory storage module is provided with a memory area distributed for the variable of the software program, and the variable change condition is synchronized and displayed to reflect the running state of the software program, wherein the running state is used for judging whether the processing of the program running module for the software program reaches design expectations. The verification method provided by the embodiment of the application realizes the software and hardware joint simulation verification of the chip.

Inventors

  • SUN YULEI

Assignees

  • 海光集成电路设计(北京)有限公司

Dates

Publication Date
20260505
Application Date
20250708

Claims (13)

  1. 1. A chip authentication method, comprising: simulating a chip, wherein the chip comprises a program running module and a memory storage module, the program running module is used for running a software program, and a program file of the software program is stored in the memory storage module; executing a simulation use case to enable the program running module to call the program file for processing; Monitoring a read-write event of the memory storage module in the process that the program running module calls the program file so as to track the variable change condition of the software program, wherein the memory storage module is provided with a memory area distributed for the variable of the software program; synchronizing and displaying the variable change condition to reflect the running state of the software program, wherein the running state is used for judging whether the processing of the software program by the program running module reaches the design expectation; the monitor component or the test platform component defines a mirror image register of a variable, and the mirror image register of the variable has a mapping relation with a memory area of the variable; the monitoring the read-write event of the memory storage module to track the variable change condition of the software program comprises: monitoring whether a read-write event signal exists on the read-write port by using a monitor component based on the association relation; If the read-write event signal is monitored, based on the read-write address of the read-write event, synchronizing the variable change value of the memory area of the variable into a mirror register with a mapping relation with the memory area of the variable, wherein the read-write address corresponds to the address of the memory area of the variable with the variable change value.
  2. 2. The chip authentication method according to claim 1, further comprising: establishing an association relationship between a monitor component and a read-write port of a memory storage module, so as to monitor a read-write event of the memory storage module by using the monitor component; defining a mirror image register corresponding to the variable at the monitor component or the test platform component, wherein the mirror image register corresponding to the variable has a mapping relation with a memory area of the variable, so that when the value of the variable changes in the memory area of the variable, the value of the variable change is synchronously recorded to the mirror image register corresponding to the variable.
  3. 3. The chip verification method according to claim 1, wherein the step of defining the mirror registers corresponding to the variables by the monitor component or the test platform component to synchronously record the values of the variable changes to the mirror registers corresponding to the variables when the values of the variables change in the memory area of the variables comprises: And defining mirror registers corresponding to the variables in the monitor component or the test platform component based on address rules of the variables of the software program, and adding the variables of the software program to the corresponding mirror registers.
  4. 4. The method of claim 3, wherein the variables include multiple types of variables, different memory regions correspond to address partitions of the various types of variables; the mirror image register is in a form of a group, and one variable corresponds to the address mirror image register and the data mirror image register; defining a mirror register corresponding to the variable at the monitor component or the test platform component based on the address rule of the variable of the software program, wherein the method for adding the variable of the software program to the corresponding mirror register comprises the following steps: Defining mirror register arrays of multiple types of variables in a monitor component or a test platform component based on the address partitions of the multiple types of variables, wherein the mirror register array of one type of variables comprises address mirror registers and data mirror registers corresponding to the variables in one type of variables; The address mirror register corresponding to the variable is used for associating the address of the variable, and the data mirror register corresponding to the variable is used for synchronizing the variable value of the variable.
  5. 5. The chip authentication method of claim 4, further comprising: the index ID for the mirrored register array within the monitor component or test platform component is represented by a string associated with the variable name using a macro definition.
  6. 6. The chip verification method according to claim 2, wherein the step of defining the mirror registers corresponding to the variables by the monitor component or the test platform component to synchronously record the values of the variable changes to the mirror registers corresponding to the variables when the values of the variables change in the memory area of the variables comprises: defining a mirror register corresponding to the variable in the monitor component based on the corresponding relation between the specific parameter value and the variable; when the data value of the read-write event is a specific parameter value, synchronizing the variable value in the mirror register corresponding to the variable corresponding to the specific parameter value.
  7. 7. The chip authentication method of claim 4, wherein the plurality of types of variables include a static variable, a global variable, and a temporary variable.
  8. 8. The chip authentication method according to claim 1, wherein the displaying the variable change condition includes: forming and displaying a variable variation waveform of the variable, wherein the variation waveform represents the variation condition of the variable with time; and/or recording the change of the variable into an execution log of the simulation use case and displaying the change.
  9. 9. A chip authentication apparatus, comprising: The preprocessing module is used for simulating a chip, the chip comprises a program running module and a memory storage module, the program running module is used for running a software program, and a program file of the software program is stored in the memory storage module; The simulation case execution module is used for executing the simulation case so that the program running module calls the program file to process; the read-write event tracking module is used for monitoring the read-write event of the memory storage module in the process of calling the program file by the program running module so as to track the variable change condition of the software program, wherein the memory storage module is provided with a memory area distributed for the variable of the software program; The variable change synchronization and display module is used for synchronizing and displaying the variable change condition so as to reflect the running state of the software program, and the running state is used for judging whether the processing of the software program by the program running module reaches the design expectation; the monitor component or the test platform component defines a mirror image register of a variable, and the mirror image register of the variable has a mapping relation with a memory area of the variable; the monitoring the read-write event of the memory storage module to track the variable change condition of the software program comprises: monitoring whether a read-write event signal exists on the read-write port by using a monitor component based on the association relation; If the read-write event signal is monitored, based on the read-write address of the read-write event, synchronizing the variable change value of the memory area of the variable into a mirror register with a mapping relation with the memory area of the variable, wherein the read-write address corresponds to the address of the memory area of the variable with the variable change value.
  10. 10. The chip verification system is characterized by comprising a test platform, a test module and a test module, wherein the test platform runs through an emulator; The test platform comprises a simulated chip and a verification environment module, wherein the chip comprises a program running module and a memory storage module, the program running module is used for running a software program, and a program file of the software program is stored in the memory storage module; the verification environment module at least comprises a monitor component, a program running module and a memory storage module, wherein the monitor component is used for monitoring read-write events of the memory storage module in the process of calling the program file by the program running module so as to track the variable change condition of the software program; the monitor component or the test platform component defines a mirror image register of a variable, and the mirror image register of the variable has a mapping relation with a memory area of the variable; the monitoring the read-write event of the memory storage module to track the variable change condition of the software program comprises: monitoring whether a read-write event signal exists on the read-write port by using a monitor component based on the association relation; If the read-write event signal is monitored, based on the read-write address of the read-write event, synchronizing the variable change value of the memory area of the variable into a mirror register with a mapping relation with the memory area of the variable, wherein the read-write address corresponds to the address of the memory area of the variable with the variable change value.
  11. 11. An emulation device comprising at least one memory storing one or more computer-executable instructions and at least one processor invoking the one or more computer-executable instructions to perform the chip verification method of any of claims 1-8.
  12. 12. A storage medium storing one or more computer-executable instructions which, when executed, implement the chip authentication method of any one of claims 1-8.
  13. 13. A computer program product comprising one or more computer-executable instructions which, when executed, implement the chip authentication method of any of claims 1-8.

Description

Chip verification method, device, system, apparatus, medium and program Technical Field The embodiment of the application relates to the technical field of computers, in particular to a chip verification method, a chip verification device, a chip verification system, chip verification equipment, a chip verification medium and a chip verification program. Background With the rapid development of integrated circuit technology, chip designs are increasingly complex, many chip designs include embedded processor cores (or other types of processor cores), and these processor cores operate specific software programs during chip operation and perform expected functions together with other hardware logic in the chip, so that it is necessary for a verifier to verify the hardware implementation of the processor cores and the software programs running thereon together with the other hardware logic in the chip as verification objects. Under the background, how to provide a chip verification method, which can realize the software and hardware joint simulation verification of the chip, becomes a technical problem to be solved by the person skilled in the art. Disclosure of Invention In view of this, the embodiments of the present application provide a method, apparatus, system, device, medium, and program for verifying a chip, which can implement software and hardware joint simulation verification of the chip, so that a verifier can intuitively see an operation state of a software program, thereby more conveniently and accurately judging whether a program operation module achieves an expected function for processing the software program. In order to achieve the above purpose, the embodiment of the present application provides the following technical solutions. In a first aspect, an embodiment of the present application provides a chip verification method, including: simulating a chip, wherein the chip comprises a program running module and a memory storage module, the program running module is used for running a software program, and a program file of the software program is stored in the memory storage module; executing a simulation use case to enable the program running module to call the program file for processing; Monitoring a read-write event of the memory storage module in the process that the program running module calls the program file so as to track the variable change condition of the software program, wherein the memory storage module is provided with a memory area distributed for the variable of the software program; and synchronizing and displaying the variable change condition to reflect the running state of the software program, wherein the running state is used for judging whether the processing of the software program by the program running module reaches the design expectation. Optionally, the method further comprises: establishing an association relationship between a monitor component and a read-write port of a memory storage module, so as to monitor a read-write event of the memory storage module by using the monitor component; defining a mirror image register corresponding to the variable at the monitor component or the test platform component, wherein the mirror image register corresponding to the variable has a mapping relation with a memory area of the variable, so that when the value of the variable changes in the memory area of the variable, the value of the variable change is synchronously recorded to the mirror image register corresponding to the variable. Optionally, the monitoring the read-write event of the memory storage module to track the variable change condition of the software program includes: monitoring whether a read-write event signal exists in the read-write port by using a monitor component based on the association relation between the monitor component and the read-write port; If the read-write event signal is monitored, synchronizing the value of the variable related to the read-write event into the mirror register corresponding to the variable based on the read-write address of the read-write event corresponding to the read-write event signal, wherein the read-write address corresponds to the address of the memory area of the related variable. Optionally, the monitor component or the test platform component defines a mirror register corresponding to the variable, so as to synchronously record the value of the variable change to the mirror register corresponding to the variable when the value of the variable changes in the memory area of the variable, including: And defining mirror registers corresponding to the variables in the monitor component or the test platform component based on address rules of the variables of the software program, and adding the variables of the software program to the corresponding mirror registers. Optionally, the variables comprise multiple types of variables, address partitions of different memory areas corresponding to the various types of var