Chip debugging method and system, electronic equipment and computer storage medium
By using link modules and decoding modules in the chip debugging system to obtain and decode the SRAM information of the chip, the simulation platform and processor execution code are realized, and the problem of low chip debugging efficiency in the existing technology is solved and the debugging efficiency is improved .
Patent Information
- Application Number
- CN202411124480.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-08
AI Technical Summary
The existing chip debugging methods cannot connect the verification logic part of the simulation platform with the execution code in the RTL modeled processor when simulating the processor, resulting in low chip debugging efficiency.
By introducing link modules and decoding modules into the chip debugging system, the SRAM timing interface information of the chip to be debugged is obtained, and the breakpoint information is obtained through the decoding module decoding, and transmitted to the simulation platform, so that the simulation platform can combine the breakpoint information and the simulation behavior. In association, it realizes the joint commissioning of the verification logic part of the simulation platform and the execution code in the processor.
It improves the efficiency of chip debugging, enhances the verification ability of the simulation platform to treat debugging chips, and reduces debugging time.
Smart Images

Figure CN118917261A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip design technology, and more specifically, to a chip debugging method, system, electronic device and computer storage medium. Background Art
[0002] UVM (Universal Verification Methodology) has the advantages of fast speed, high efficiency, flexibility, stability, and high integration, so it is very necessary in chip hardware logic verification and design. DPl (Direct Programming Interface) is a mechanism used in SystemVerilog (hardware description language) programming language to interact with external C / C++ and other codes. It allows SystemVerilog simulators to communicate with external C / C++ and other codes, achieving seamless integration from hardware description language to software programming language.
[0003] However, the model part of the simulation platform can only establish the connection between the verification logic part of the simulation platform and the algorithm part of the high-level language through DPI. When simulating the processor, the verification logic part of the simulation platform and the execution code in the processor modeled by RTL (Register-Transfer Level) cannot be jointly debugged, resulting in low chip debugging efficiency.
[0004] In summary, how to improve the efficiency of chip debugging is a problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] The purpose of this application is to provide a chip debugging system, which can solve the technical problem of how to improve the efficiency of chip debugging to a certain extent. This application also provides a chip debugging method, an electronic device and a computer-readable storage medium.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] A chip debugging system, comprising:
[0008] A link module connected to the SRAM timing interface of the chip to be debugged, used to obtain the joint debugging information inside the chip to be debugged, wherein the joint debugging information includes the address of the SRAM inside the chip to be debugged and the data corresponding to the SRAM;
[0009] A decoding module connected to the link module and the simulation platform respectively, for decoding the joint debugging information, obtaining the breakpoint information of the chip to be debugged, and transmitting the breakpoint information to the simulation platform, so that the simulation platform associates the breakpoint information with the simulation behavior;
[0010] Wherein, the simulation platform is built based on a hardware description language, and the simulation platform is used to verify the chip to be debugged.
[0011] In an exemplary embodiment, it further includes:
[0012] An encoding module, used for obtaining a test program for debugging the chip to be debugged, encoding the test program, and obtaining a target encoding result;
[0013] A compiling tool connected to the encoding module and the chip to be debugged is used to compile the target encoding result into binary processor instructions and transmit the binary processor instructions to the chip to be debugged.
[0014] In an exemplary embodiment, the encoding module encodes the test program to obtain a target encoding result, including:
[0015] Parsing the test program to obtain SRAM address information of the chip to be debugged operated by the test program;
[0016] Encoding the SRAM address information to obtain a first encoding result;
[0017] Determine the SRAM address format of the chip to be debugged;
[0018] Encapsulating the first encoding result according to the SRAM address format to obtain an SRAM offset address;
[0019] Parsing the test program to obtain breakpoint information corresponding to the SRAM address information in the test program, wherein the breakpoint information includes one or more of jumping into a breakpoint, skipping a breakpoint, jumping out of a breakpoint, and crossing to a next breakpoint;
[0020] Encoding the breakpoint information to obtain a second encoding result;
[0021] Determine the SRAM data format of the chip to be debugged;
[0022] Encapsulating the second encoding result according to the SRAM data format to obtain an SRAM write data code;
[0023] The target encoding result is determined according to the SRAM offset address and the SRAM write data encoding.
[0024] In an exemplary embodiment, the high bits of the target encoding result are uncommon characters to distinguish SRAM write data from other data; the low bits of the target encoding result are one-hot codes to represent classification labels.
[0025] In an exemplary embodiment, it further includes:
[0026] A format conversion module connected to the decoding module and the language module, used for performing format conversion on the breakpoint information to obtain a conversion result, and sending the conversion result to the language module so as to associate the conversion result with the code algorithm in the language module;
[0027] The language module is used to store the code algorithm representing the reference model data result of the chip to be debugged.
[0028] In an exemplary embodiment, the decoding module transmits the breakpoint information to the simulation platform through a cross-module debugging function of the hardware description language.
[0029] In an exemplary embodiment, the high bits of the joint debugging information are data, and the low bits of the joint debugging information are addresses.
[0030] A chip debugging method, comprising:
[0031] Acquire the joint debugging information inside the chip to be debugged, wherein the joint debugging information includes the address of the SRAM inside the chip to be debugged and the data corresponding to the SRAM;
[0032] Decoding the joint debugging information to obtain breakpoint information of the chip to be debugged, and transmitting the breakpoint information to the simulation platform so that the simulation platform associates the breakpoint information with the simulation behavior;
[0033] Wherein, the simulation platform is built based on a hardware description language, and the simulation platform is used to verify the chip to be debugged.
[0034] An electronic device, comprising:
[0035] Memory for storing computer programs;
[0036] The processor is used to implement the steps of the chip debugging method described above when executing the computer program.
[0037] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the chip debugging method described above are implemented.
[0038] A chip debugging system provided by the present application includes a link module connected to the SRAM timing interface of the chip to be debugged, which is used to obtain the joint debugging information inside the chip to be debugged, and the joint debugging information includes the address of the SRAM inside the chip to be debugged and the data corresponding to the SRAM; a decoding module connected to the link module and the simulation platform respectively, which is used to decode the joint debugging information, obtain the breakpoint information of the chip to be debugged, and transmit the breakpoint information to the simulation platform, so that the simulation platform associates the breakpoint information with the simulation behavior; wherein the simulation platform is built based on the hardware description language, and the simulation platform is used to verify the chip to be debugged. The present application can obtain the joint debugging information from the SRAM timing interface of the chip to be debugged through the link module, and decode the joint debugging information through the decoding module to obtain the breakpoint information of the chip to be debugged, and can transmit the breakpoint information to the simulation platform through the decoding module, so that the simulation platform associates the breakpoint information with the simulation behavior. Since the breakpoint information reflects the execution code of the processor inside the chip to be debugged, and the simulation platform is built based on the hardware description language, the present application can perform joint debugging on the verification logic part of the simulation platform and the execution code in the processor, which is convenient for the simulation platform to verify the chip to be debugged, and improves the chip debugging efficiency. A chip debugging method, electronic device and computer-readable storage medium provided in this application also solve corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0040] Figure 1 A schematic diagram of the structure of a chip debugging system provided in an embodiment of the present application;
[0041] Figure 2 It is a structural diagram of an existing chip debugging system;
[0042] Figure 3 A schematic diagram of using the chip debugging system of the present application to perform chip debugging;
[0043] Figure 4 A flowchart of a chip debugging method provided in an embodiment of the present application;
[0044] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0045] Figure 6 Another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0047] See also Figure 1 , Figure 1 A schematic diagram of the structure of a chip debugging system provided in an embodiment of the present application.
[0048] A chip debugging system provided in an embodiment of the present application may include:
[0049] A link module connected to the SRAM timing interface of the chip to be debugged, used to obtain the joint debugging information inside the chip to be debugged, the joint debugging information including the address of the SRAM inside the chip to be debugged and the data corresponding to the SRAM;
[0050] The decoding module connected to the link module and the simulation platform respectively is used to decode the joint debugging information, obtain the breakpoint information of the chip to be debugged, and transmit the breakpoint information to the simulation platform so that the simulation platform associates the breakpoint information with the simulation behavior;
[0051] Among them, the simulation platform is built based on the hardware description language, and the simulation platform is used to verify the chip to be debugged.
[0052] In practical applications, the chip debugging system of the present application can be built based on UVM, wherein the chip to be debugged is also called DUT (Design Under Test), and its type can be flexibly determined according to the application scenario. For example, it can be a SOC (System on Chip) chip model, and the chip to be debugged is driven by processor instructions; the simulation platform is built by the verification personnel through Verilog or Sverilog to verify whether the behavior timing of the DUT meets the requirements. The simulation platform can interact with the language modules of algorithms or complex functions through DPI, such as interacting with high-level language modules, to obtain reference model data results for SOC chip modeling.
[0053] On this basis, there are chip debugging systems such as Figure 2As shown, the simulation platform can exchange data with the SOC chip modeling through the simulation interface to verify whether the behavior timing of the DUT meets the requirements. The simulation interface can be a conventional external interface of the SOC chip such as UART, JTAG, GPIO, etc. However, the time accuracy of the simulator and the reference model results in extremely low efficiency. The simulation time for each debug data transmission of the debug interface is 1ms, and the corresponding actual time is 2h, which makes the chip simulation debugging extremely inconvenient. The present application adds a link module and a decoding module, so that the simulation platform can directly associate the breakpoint information with the simulation behavior, so as to jointly debug the verification logic part of the simulation platform and the execution code in the processor, which is convenient for the simulation platform to verify the chip to be debugged, and improves the chip debugging efficiency. And the joint debugging information uses a fixed SRAM space to improve the simulation efficiency. Correspondingly, the operation of the CPU in the chip to be debugged directly accessing the SRAM is not easy to be optimized by the compiler, and the reading and writing SRAM rate is fast, and does not need to pass through the bridge conversion of the SOC internal bus, which can further ensure a higher debugging efficiency.
[0054] In practical applications, the chip debugging system provided by the present application may also include: an encoding module for obtaining a test program for debugging the chip to be debugged, such as a C language test program, etc., encoding the test program to obtain a target encoding result; a compilation tool connected to the encoding module and the chip to be debugged, for compiling the target encoding result into binary processor instructions, and transmitting the binary processor instructions to the chip to be debugged. The test program can be better converted into binary processor instructions by encoding.
[0055] In a specific application scenario, the encoding module encodes the test program. In the process of obtaining the target encoding result, the test program can be parsed to obtain the SRAM address information of the chip to be debugged operated by the test program; the SRAM address information is encoded to obtain a first encoding result, such as the actual use space of the SOC, that is, the first address is 0x00010000~0x0002FFFF, then the first encoding result can be set to a value such as 3 or 4 that is within the SRAM space but does not belong to the commonly used range of the OS; the SRAM address format of the chip to be debugged is determined; the first encoding result is packaged according to the SRAM address format to obtain the SRAM offset address; the test program is parsed to obtain the test The breakpoint information corresponding to the SRAM address information in the program, the breakpoint information includes one or more of jumping into the breakpoint, skipping the breakpoint, jumping out of the breakpoint, and crossing to the next breakpoint; encoding the breakpoint information to obtain a second encoding result, for example, the second encoding result can be represented by (4'b0001) to jump into the breakpoint, (4'b0010) to skip the breakpoint, (4'b0100) to jump out of the breakpoint, (4'b1000) to cross to the next breakpoint, etc.; determining the SRAM data format of the chip to be debugged; encapsulating the second encoding result according to the SRAM data format to obtain the SRAM write data encoding; determining the target encoding result according to the SRAM offset address and the SRAM write data encoding.
[0056] From this implementation process, it can be seen that, in the process of encoding the test program and obtaining the target encoding result, the encoding module of the present application can first parse the test program to obtain the SRAM address information of the chip to be debugged operated by the test program, encode the SRAM address information to obtain a first encoding result, and accurately record the SRAM address information required for the test program to operate through this first encoding result, so that the processor in the chip to be debugged can accurately process data in units of SRAM; determine the SRAM address format of the chip to be debugged, package the first encoding result according to the SRAM address format, and obtain the SRAM offset address to complete the encoding of the SRAM address information; parse the test program to obtain the SRAM address information in the test program that corresponds to the SRAM address format. The breakpoint information corresponding to the SRAM address information includes one or more of jumping into the breakpoint, skipping the breakpoint, jumping out of the breakpoint, and crossing to the next breakpoint. The breakpoint information is encoded to obtain a second encoding result, so as to accurately record the breakpoint information carried by the test program with the help of the second encoding result; determine the SRAM data format of the chip to be debugged; encapsulate the second encoding result according to the SRAM data format to obtain the SRAM write data encoding to complete the encoding of the disconnection information; finally, determine the target encoding result according to the SRAM offset address and the SRAM write data encoding, and the breakpoint information corresponding to each SRAM address can be accurately recorded with the help of the target encoding result, so as to facilitate the subsequent accurate tracing of the breakpoint information corresponding to each SRAM address.
[0057] In specific application scenarios, the high bits of the target encoding result can be uncommon characters to distinguish SRAM write data from other data when the CPU writes data to the SRAM; the low bits of the target encoding result can be one-hot codes to represent classification labels. For example, a unique binary vector can be used to represent discrete classification labels. When the CPU writes data to the SRAM, the misjudgment of the intermediate data state caused by the large fan-in logic gap can be reduced. The encoding and decoding table can be shown in Table 1. The decoding part of the table can be sorted cumulatively so that the upper-layer simulation platform can recognize the breakpoint sequence number.
[0058] Table 1 Codec table
[0059]
[0060] In a specific application scenario, the SRAM address format may include a first fixed character, a coding result, and a second fixed character. Accordingly, in the process of encapsulating the first coding result according to the SRAM address format, the first fixed character, the first coding result, and the second fixed character may be encapsulated in the order of the first fixed character, the first coding result, and the second fixed character to obtain the SRAM offset address, wherein the types of the first fixed character and the second fixed character may be flexibly determined according to actual needs. For example, in Table 1, the first fixed character of the SRAM address format is 0x000, and the second fixed character is beef. The SRAM data format may be composed of a third fixed character, a second coding result, and a variable character. Accordingly, in the process of encapsulating the second coding result according to the SRAM data format, the second fixed character, the second coding result, and the variable character may be encapsulated in the order of the second fixed character, the second coding result, and the variable character to obtain the SRAM write data encoding, wherein the types of the third fixed character and the variable character may be flexibly determined according to actual needs. For example, in Table 1, the third fixed character may be 0xdead, and the variable character may be 001, 002, etc. The length of the variable character may be fixed, and the specific value may be determined according to the SRAM address.
[0061] From this implementation process, it can be seen that the present application can set the SRAM address format to include a first fixed character, a coding result, and a second fixed character, and in the process of encapsulating the first coding result according to the SRAM address format, it can be encapsulated in the order of the first fixed character, the first coding result, and the second fixed character to obtain the SRAM offset address. In this way, since the first fixed character and the second fixed character are fixed characters, they can be accurately and quickly identified from the SRAM offset address, and then the first coding result can be accurately and quickly identified from the SRAM offset address, which is convenient for accurately and quickly decoding the SRAM offset address. The SRAM data format can be composed of a third fixed character, a second encoding result and a changing character, and in the process of encapsulating the second encoding result according to the SRAM data format, the second fixed character, the second encoding result and the changing character can be encapsulated in this order to obtain the SRAM write data code. In this way, since the length and position of the first fixed character and the changing character are fixed, they can be accurately and quickly identified from the SRAM write data code, and then the second encoding result can be accurately and quickly identified from the SRAM write data code, and the SRAM address corresponding to the second encoding result can be accurately and quickly identified through the changing character, thereby improving the encoding and decoding efficiency.
[0062] In practical applications, in order to jointly debug the high-level programming language in the UVM platform with the binary machine code executed by the processor in the RTL, the chip debugging system of the present application may also include:
[0063] The format conversion module connected to the decoding module and the language module is used to convert the breakpoint information into a format, obtain the conversion result, and send the conversion result to the language module so as to associate the conversion result with the code algorithm in the language module; wherein the language module is used to store the code algorithm representing the reference model data result of the chip to be debugged. In this way, the present application can combine the C program built-in coding module executed by the RTL model CPU, the CPU fixed SRAM space to define the decoding space, the cross-module debugging function in Verilog, the decoding module in the simulation platform, and the DPI interface format conversion to realize the high-level programming language and the binary machine code executed by the processor in the RTL for joint debugging, filling the gap between the internal execution instructions of the modeling and the platform interaction. It should be noted that the format conversion method of the conversion module can be flexibly determined according to actual needs, such as the format before and after the conversion can be as shown in Table 2.
[0064] Table 2 Format conversion table
[0065]
[0066] In practical applications, the decoding module can transmit breakpoint information to the simulation platform through the cross-module debugging function of the hardware description language. In addition, the high bit of the joint debugging information can be data, and the low bit of the joint debugging information can be an address. Assuming that the joint debugging information is 32 bits, the low 16 bits of the address and the high 16 bits of the data can be combined into 0xdeadbeef, which is called the joint debugging information.
[0067] A chip debugging system provided by the present application includes a link module connected to the SRAM timing interface of the chip to be debugged, which is used to obtain the joint debugging information inside the chip to be debugged, and the joint debugging information includes the address of the SRAM inside the chip to be debugged and the data corresponding to the SRAM; a decoding module connected to the link module and the simulation platform respectively, which is used to decode the joint debugging information, obtain the breakpoint information of the chip to be debugged, and transmit the breakpoint information to the simulation platform, so that the simulation platform associates the breakpoint information with the simulation behavior; wherein the simulation platform is built based on the hardware description language, and the simulation platform is used to verify the chip to be debugged. The present application can obtain the joint debugging information from the SRAM timing interface of the chip to be debugged through the link module, and decode the joint debugging information through the decoding module to obtain the breakpoint information of the chip to be debugged, and can transmit the breakpoint information to the simulation platform through the decoding module, so that the simulation platform associates the breakpoint information with the simulation behavior. Since the breakpoint information reflects the execution code of the processor inside the chip to be debugged, and the simulation platform is built based on the hardware description language, the present application can perform joint debugging on the verification logic part of the simulation platform and the execution code in the processor, which is convenient for the simulation platform to verify the chip to be debugged, and improves the chip debugging efficiency.
[0068] It should be noted that the specific process of using the chip debugging system of the present application to debug the chip can be as follows: Figure 3 As shown, the following steps are included:
[0069] During the creation process, the breakpoint process is created through the C driver, that is, C program encapsulation, determination of debugging nodes, breakpoint behavior definition, and C driver call;
[0070] During the execution process, the driver is converted into binary instructions and starts to execute in the DUT, and the external components start to sample the SRAM address data through the cross-module method; that is, SRAM cross-module linking, SRAM read and write sampling, joint debugging information filtering, and joint debugging information decoding are performed;
[0071] During debugging, the simulation platform adjusts the driving behavior and timing of the verification components of the platform according to the decoding, that is, it performs breakpoint analysis, verifies the DUT interface behavior through joint simulation behavior of the verification platform, converts the format, outputs to the advanced model, and feeds back the reference model results.
[0072] See also Figure 4 , Figure 4 A flowchart of a chip debugging method provided in an embodiment of the present application.
[0073] A chip debugging method provided in an embodiment of the present application may include the following steps:
[0074] Step S101: Acquire the joint debugging information inside the chip to be debugged, where the joint debugging information includes the address of the SRAM inside the chip to be debugged and the data corresponding to the SRAM.
[0075] Step S102: Decode the joint debugging information to obtain the breakpoint information of the chip to be debugged, and transmit the breakpoint information to the simulation platform so that the simulation platform associates the breakpoint information with the simulation behavior; wherein the simulation platform is built based on the hardware description language, and the simulation platform is used to verify the chip to be debugged.
[0076] The chip debugging method provided in the embodiment of the present application can also: obtain a test program for debugging the chip to be debugged, encode the test program to obtain a target encoding result; compile the target encoding result into binary processor instructions, and transmit the binary processor instructions to the chip to be debugged.
[0077] In the chip debugging method provided in the embodiment of the present application, during the process of encoding the test program to obtain the target encoding result, the test program can be parsed to obtain the SRAM address information of the chip to be debugged operated by the test program; the SRAM address information is encoded to obtain a first encoding result; the SRAM address format of the chip to be debugged is determined; the first encoding result is packaged according to the SRAM address format to obtain the SRAM offset address; the test program is parsed to obtain the breakpoint information corresponding to the SRAM address information in the test program, and the breakpoint information includes one or more of jumping into the breakpoint, skipping the breakpoint, jumping out of the breakpoint, and crossing to the next breakpoint; the breakpoint information is encoded to obtain a second encoding result; the SRAM data format of the chip to be debugged is determined; the second encoding result is packaged according to the SRAM data format to obtain the SRAM write data encoding; the target encoding result is determined according to the SRAM offset address and the SRAM write data encoding.
[0078] In the chip debugging method provided in the embodiment of the present application, the high bits of the target encoding result are uncommon characters to distinguish SRAM write data from other data; the low bits of the target encoding result are one-hot codes to represent classification labels.
[0079] The chip debugging method provided in the embodiment of the present application can also: perform format conversion on the breakpoint information to obtain the conversion result, and send the conversion result to the language module so as to associate the conversion result with the code algorithm in the language module; wherein the language module is used to store the code algorithm representing the reference model data result of the chip to be debugged.
[0080] In the chip debugging method provided in the embodiment of the present application, the cross-module debugging function of the hardware description language can be used to transmit breakpoint information to the simulation platform.
[0081] In the chip debugging method provided in the embodiment of the present application, the high bits of the joint debugging information are data, and the low bits of the joint debugging information are addresses.
[0082] The present application provides a chip debugging method, which obtains the joint debugging information inside the chip to be debugged, and the joint debugging information includes the address of the SRAM inside the chip to be debugged and the data corresponding to the SRAM; decodes the joint debugging information to obtain the breakpoint information of the chip to be debugged, and transmits the breakpoint information to the simulation platform, so that the simulation platform associates the breakpoint information with the simulation behavior; wherein the simulation platform is built based on the hardware description language, and the simulation platform is used to verify the chip to be debugged. The present application can obtain the joint debugging information from the SRAM timing interface of the chip to be debugged, and decode the joint debugging information to obtain the breakpoint information of the chip to be debugged, and can transmit the breakpoint information to the simulation platform, so that the simulation platform associates the breakpoint information with the simulation behavior. Since the breakpoint information reflects the execution code of the processor inside the chip to be debugged, and the simulation platform is built based on the hardware description language, the present application can perform joint debugging on the verification logic part of the simulation platform and the execution code in the processor, which is convenient for the simulation platform to verify the chip to be debugged, and improves the chip debugging efficiency.
[0083] The present application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the chip debugging method provided in the embodiment of the present application. Figure 5 , Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0084] An electronic device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the steps of the chip debugging method described in any of the above embodiments are implemented.
[0085] See also Figure 6 , another electronic device provided in the embodiment of the present application may also include: an input port 203 connected to the processor 202, for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing results of the processor 202 to the outside; a communication module 205 connected to the processor 202, for realizing communication between the electronic device and the outside. The display unit 204 can be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (Mobile High-Definition Link, MHL), Universal Serial Bus (Universal Serial Bus, USB), High-Definition Multimedia Interface (High-DefinitionMultimedia Interface, HDMI), wireless connection: wireless fidelity technology (WIreless Fidelity, WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.
[0086] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the chip debugging method described in any of the above embodiments are implemented.
[0087] The computer-readable storage medium involved in this application includes random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (Compact Disc Read-Only Memory), or any other form of storage medium known in the technical field.
[0088] A computer program product provided in an embodiment of the present application includes a computer program / instruction. When the computer program / instruction is executed by a processor, the following steps are implemented:
[0089] Obtaining the joint debugging information inside the chip to be debugged, the joint debugging information including the address of the SRAM inside the chip to be debugged and the data corresponding to the SRAM;
[0090] The joint debugging information is decoded to obtain the breakpoint information of the chip to be debugged, and the breakpoint information is transmitted to the simulation platform so that the simulation platform can associate the breakpoint information with the simulation behavior; wherein the simulation platform is built based on the hardware description language, and the simulation platform is used to verify the chip to be debugged.
[0091] A computer program product provided in an embodiment of the present application includes a computer program / instruction, which implements the following steps when executed by a processor: obtaining a test program for debugging a chip to be debugged, encoding the test program to obtain a target encoding result; compiling the target encoding result into binary processor instructions, and transmitting the binary processor instructions to the chip to be debugged.
[0092] A computer program product provided by an embodiment of the present application includes a computer program / instruction, which implements the following steps when executed by a processor: parsing a test program to obtain SRAM address information for operating a chip to be debugged by the test program; encoding the SRAM address information to obtain a first encoding result; determining the SRAM address format of the chip to be debugged; packaging the first encoding result according to the SRAM address format to obtain an SRAM offset address; parsing the test program to obtain breakpoint information corresponding to the SRAM address information in the test program, the breakpoint information including one or more of jumping into a breakpoint, skipping a breakpoint, jumping out of a breakpoint, and crossing to a next breakpoint; encoding the breakpoint information to obtain a second encoding result; determining the SRAM data format of the chip to be debugged; packaging the second encoding result according to the SRAM data format to obtain an SRAM write data encoding; and determining a target encoding result according to the SRAM offset address and the SRAM write data encoding.
[0093] A computer program product provided by an embodiment of the present application includes a computer program / instruction, which implements the following steps when executed by a processor: the high bit of the target encoding result is an uncommon character to distinguish SRAM write data from other data; the low bit of the target encoding result is a one-hot code to represent a classification label.
[0094] A computer program product provided in an embodiment of the present application includes a computer program / instruction, which implements the following steps when executed by a processor: formatting breakpoint information to obtain a conversion result, and sending the conversion result to a language module so as to associate the conversion result with a code algorithm in the language module; wherein the language module is used to store a code algorithm representing a reference model data result of a chip to be debugged.
[0095] A computer program product provided in an embodiment of the present application includes a computer program / instruction, which implements the following steps when executed by a processor: using the cross-module debugging function of a hardware description language and transmitting breakpoint information to a simulation platform.
[0096] For the description of the relevant parts of a chip debugging method, electronic device, computer-readable storage medium, and computer program product provided in the embodiments of the present application, please refer to the detailed description of the corresponding parts in the chip debugging method provided in the embodiments of the present application, which will not be repeated here. In addition, the parts of the above technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.
[0097] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0098] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A chip debugging system, It is characterized in that include: A link module connected to the SRAM timing interface of the chip to be debugged, used to obtain the joint debugging information inside the chip to be debugged, wherein the joint debugging information includes the address of the SRAM inside the chip to be debugged and the data corresponding to the SRAM; A decoding module connected to the link module and the simulation platform respectively, for decoding the joint debugging information, obtaining the breakpoint information of the chip to be debugged, and transmitting the breakpoint information to the simulation platform, so that the simulation platform associates the breakpoint information with the simulation behavior; Wherein, the simulation platform is built based on a hardware description language, and the simulation platform is used to verify the chip to be debugged.
2. The chip debugging system according to claim 1, It is characterized in that Also includes: An encoding module, used for obtaining a test program for debugging the chip to be debugged, encoding the test program, and obtaining a target encoding result; A compiling tool connected to the encoding module and the chip to be debugged is used to compile the target encoding result into binary processor instructions and transmit the binary processor instructions to the chip to be debugged.
3. The chip debugging system according to claim 2, It is characterized in that The encoding module encodes the test program to obtain a target encoding result, including: Parsing the test program to obtain SRAM address information of the chip to be debugged operated by the test program; Encoding the SRAM address information to obtain a first encoding result; Determine the SRAM address format of the chip to be debugged; Encapsulating the first encoding result according to the SRAM address format to obtain an SRAM offset address; Parsing the test program to obtain breakpoint information corresponding to the SRAM address information in the test program, wherein the breakpoint information includes one or more of a breakpoint entry, a breakpoint skip, a breakpoint exit, and a next breakpoint; Encoding the breakpoint information to obtain a second encoding result; Determine the SRAM data format of the chip to be debugged; Encapsulating the second encoding result according to the SRAM data format to obtain an SRAM write data code; The target encoding result is determined according to the SRAM offset address and the SRAM write data encoding.
4. The chip debugging system according to claim 3, It is characterized in that The high bits of the target encoding result are uncommon characters to distinguish SRAM write data from other data; the low bits of the target encoding result are one-hot codes to represent classification labels.
5. The chip debugging system according to claim 1, It is characterized in that Also includes: A format conversion module connected to the decoding module and the language module, used for performing format conversion on the breakpoint information to obtain a conversion result, and sending the conversion result to the language module so as to associate the conversion result with the code algorithm in the language module; The language module is used to store the code algorithm representing the reference model data result of the chip to be debugged.
6. The chip debugging system according to claim 1, It is characterized in that The decoding module transmits the breakpoint information to the simulation platform through the cross-module debugging function of the hardware description language.
7. The chip debugging system according to claim 1, It is characterized in that The high bits of the joint debugging information are data, and the low bits of the joint debugging information are addresses.
8. A chip debugging method, It is characterized in that include: Acquire the joint debugging information inside the chip to be debugged, wherein the joint debugging information includes the address of the SRAM inside the chip to be debugged and the data corresponding to the SRAM; Decoding the joint debugging information to obtain breakpoint information of the chip to be debugged, and transmitting the breakpoint information to the simulation platform so that the simulation platform associates the breakpoint information with the simulation behavior; Wherein, the simulation platform is built based on a hardware description language, and the simulation platform is used to verify the chip to be debugged.
9. An electronic device, It is characterized in that include: Memory for storing computer programs; A processor is used to implement the steps of the chip debugging method as claimed in claim 8 when executing the computer program.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the chip debugging method according to claim 8 are implemented.
Citation Information
Cited By
Joint debugging method and device of JTAG and OpenOCD based on UVM platform
CN120012675A
Verification method and device for design to be tested, equipment and medium
CN121189274A
Simulation debugging method and system based on encryption chip
CN121880119A
