Message printing method, device, electronic device, storage medium and computer program product based on SoC system

By using program message output functions in the SoC system to convert debug information into operational information of the simulation thread, and processed and sent by the simulation thread, the problem of resource occupancy of debug information transmission is solved and the simulation efficiency of the SoC system is improved.

CN119377138BActive Publication Date: 2025-05-13CHANGSHA HAIGE BEIDOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411992209.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-13
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

In the SoC system simulation environment, the transmission of debugging information takes up physical simulation time, consumes resources from CPU, bus and peripherals, and reduces simulation efficiency.

Method used

The debugging information is converted into processed debugging information that can be operated by the simulation thread through the program message output function, and is processed and sent to the console by the simulation thread to avoid converting it into bus operation instructions through the CPU.

Benefits of technology

Reduces the resource usage of debug information printing on CPU, bus and peripherals, and improves the simulation efficiency of SoC systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377138B_ABST
    Figure CN119377138B_ABST
Patent Text Reader

Abstract

The present application discloses a message printing method, device, electronic device, storage medium and computer program product based on a SoC system. The method includes: obtaining a simulation task and target printing information, wherein the target printing information includes information indicating a target printing mode, and the printing mode includes at least a first printing mode; obtaining debugging information generated by the simulation thread of the SoC system in the process of executing the simulation task; determining that the target printing mode is the first printing mode, transmitting the debugging information to the program message output function of the SoC system for processing, and obtaining the processed debugging information; sending the processed debugging information to the simulation thread; processing the processed debugging information by the simulation thread, and sending the processed debugging information to the console. The method of the present application can improve the simulation efficiency of the SoC system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of SoC (System on Chip), and in particular to a message printing method, device, electronic device, storage medium and computer program product based on a SoC system. Background Art

[0002] In the SoC system, the IP core (Intellectual Property core) used in the simulation environment includes the CPU (Central Processing Unit) / DSP (Digital Signal Processor), bus and peripherals. The C program use case has been pre-written in the SoC system. During simulation, the C program use case is called to drive the CPU / DSP to simulate the bus and peripherals. In order to obtain the latest status of the simulation use case, the C program use case usually outputs a lot of debugging information to the console. Generally, the function of outputting debugging information to the console can be adjusted by debugging the print output function in the C program use case. Specifically, the print output function transmits the debugging information from the CPU / DSP to the bus, and then outputs it to the peripheral address of the AXI (Advanced eXtensible Interface) interface or the APB (Advanced Peripheral Bus) bus through the bus. A monitor is pre-installed on the AXI or APB bus. When the debugging information reaches the peripheral, the debugging information is encoded through the ASIC (Application Specific Integrated Circuit), and then the encoded debugging information is output to the console for display.

[0003] In the related art, the CPU / DSP reads the debugging information in the C program use case and converts the debugging information in the C program use case into the CPU bus operation instructions in the form of a string. After that, the debugging information is transmitted from the CPU / DSP to the bus, and then from the bus to the peripherals. The operations experienced in the whole process are all real bus operation behaviors.

[0004] This means that in the SoC system simulation environment, the transmission of debug information, like data transmission in the actual system, will take up physical simulation time and consume CPU physical cycles, bus transmission cycles, and cycles for interacting with peripherals. Summary of the invention

[0005] In view of this, an embodiment of the present application provides a message printing method, device, electronic device, storage medium and computer program product based on a SoC system, aiming to improve the simulation efficiency of the SoC system.

[0006] The technical solution of the embodiment of the present application is implemented as follows:

[0007] In a first aspect, the present application proposes a message printing method based on a SoC system, the method comprising:

[0008] Acquire a simulation task and target printing information, wherein the target printing information includes information indicating a target printing mode, and the printing mode includes at least a first printing mode;

[0009] Acquire debugging information generated by the simulation thread of the SoC system during the execution of the simulation task;

[0010] Determining that the target printing mode is the first printing mode, transmitting the debugging information to the program message output function of the SoC system for processing to obtain the processed debugging information;

[0011] Sending the processed debugging information to the simulation thread;

[0012] The processed debugging information is processed by the simulation thread, and the processed debugging information is sent to the console.

[0013] In one embodiment, the debugging information includes a character string and a variable value, and the variable value is used to indicate the position of the character string; the transmitting the debugging information to the program message output function of the SoC system for processing to obtain the processed debugging information includes:

[0014] Transmitting the debugging information to a program message output function of the SoC system;

[0015] Converting the CPU address of the string into the ROM address of the string based on the variable value through the program message output function;

[0016] Converting the CPU address of the variable value into the RAM address of the variable value through the program message output function;

[0017] The processed debugging information is obtained based on the ROM address of the character string and the RAM address of the variable value.

[0018] In one embodiment, the method further comprises:

[0019] The simulation task is simulated by the UVM verification framework and the Verilog verification language of the simulation thread;

[0020] Alternatively, the simulation task is simulated through the UVM verification framework and the system verilog verification language.

[0021] In one embodiment, the processing the processed debugging information by the simulation thread and sending the processed debugging information to the console includes:

[0022] Acquire the string of the debugging information based on the ROM address of the string through the simulation thread;

[0023] Obtaining the variable value based on the RAM address of the variable value through the simulation thread;

[0024] Based on the character string of the debugging information and the variable value, obtaining the debugging information;

[0025] The debugging information is sent to the console.

[0026] In one embodiment, obtaining the string of the debugging information based on the ROM address of the string through the simulation thread includes:

[0027] Calling the backdoor access control program of the ROM through the program message output function, and sending the ROM address of the string to the backdoor access control program of the ROM;

[0028] Obtain the character string of the debugging information returned by the backdoor access control program of the ROM.

[0029] In one embodiment, obtaining the variable value based on the RAM address of the variable value through the simulation thread includes:

[0030] Calling the backdoor access control program of the RAM through the program message output function, and sending the RAM address of the variable value to the backdoor access control program of the RAM;

[0031] Obtain the variable value returned by the backdoor access control program of the RAM.

[0032] In a second aspect, an embodiment of the present application provides a message printing device based on a SoC system, comprising:

[0033] A data acquisition module, used for acquiring simulation tasks and target printing information, wherein the target printing information includes information indicating a target printing mode, and the printing mode includes at least a first printing mode;

[0034] A data transmission module, used for acquiring debugging information generated by the simulation thread of the SoC system during the execution of the simulation task;

[0035] A data processing module, configured to determine that the target printing mode is the first printing mode, and then transmit the debugging information to a program message output function of the SoC system for processing to obtain the processed debugging information;

[0036] A first data sending module, used for sending the processed debugging information to the simulation thread;

[0037] The second data sending module is used to process the processed debugging information through the simulation thread and send the processed debugging information to the console.

[0038] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when running the computer program, executes the steps of the method described in the first aspect of the embodiment of the present application.

[0039] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect of the embodiment of the present application are implemented.

[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect of the present application.

[0041] The technical solution provided by the embodiment of the present application is to obtain the simulation task and the target printing information, wherein the target printing information includes information indicating the target printing mode, and the printing mode includes at least the first printing mode; obtain the debugging information generated by the simulation thread of the SoC system in the process of executing the simulation task; determine that the target printing mode is the first printing mode, then transmit the debugging information to the program message output function of the SoC system for processing, and obtain the processed debugging information; send the processed debugging information to the simulation thread; process the processed debugging information through the simulation thread, and send the processed debugging information to the console. The present application uses the program message output function to convert the debugging information into the processed debugging information that can be operated by the simulation thread, and processes the processed debugging information through the simulation thread. Since the simulation thread runs on the SoC simulation server, this processing method does not need to occupy the CPU, nor does it pass through the bus and peripherals. In this way, the debugging information can avoid these real operations and no longer occupy the physical cycle of the CPU, the bus transmission cycle, and the interaction cycle with the peripherals. In addition, since the CPU in the simulation thread in the present application is in the process of executing the simulation task, the printing of the debugging information does not need to convert the debugging information into bus operation instructions through the CPU inside the SoC system chip. Therefore, compared with the related art, the printing of debugging information in this application can reduce the time occupied by physical simulation. When there is a lot of debugging information printed, this method of this application can also improve the simulation efficiency of the SoC system to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is a flow chart of a message printing method based on a SoC system according to an embodiment of the present application;

[0043] Figure 2 This is a flow chart of a message printing method based on a SoC system according to another embodiment of the present application;

[0044] Figure 3 This is a flow chart of a message printing method based on a SoC system according to another embodiment of the present application;

[0045] Figure 4 This is a structural schematic diagram of a message printing device based on a SoC system according to an embodiment of the present application;

[0046] Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0047] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0049] In the related art, the CPU / DSP reads the debugging information in the C program use case and converts the debugging information in the C program use case into the CPU bus operation instructions in the form of a string. After that, the debugging information is transmitted from the CPU / DSP to the bus, and then from the bus to the peripherals. The operations experienced in the whole process are all real bus operation behaviors.

[0050] This means that in the SoC system simulation environment, the transmission of debug information, like the data transmission in the actual system, will take up the physical simulation time of the SoC system and consume the physical cycles of the CPU, the transmission cycles of the bus, and the cycles of interaction with peripherals.

[0051] In addition, the more complex the function implementation is, the more CPU time it consumes; the more frequently the debug information is sent, the longer the bus transmission cycle and the bus and peripheral interaction cycle will be. This part of the debug information is of little significance to the simulation work, so the time taken by printing these messages reduces the simulation efficiency of the SoC system to a certain extent.

[0052] The embodiment of the present application provides a message printing method based on a SoC system. The SoC system runs in an electronic device, that is, the execution subject is an electronic device, and the electronic device can be any device that can execute the message printing method based on the SoC system, for example, it can be a terminal device or a server, etc., and the present application does not make specific restrictions on this. Figure 1 As shown, the method includes:

[0053] Step 101, obtaining simulation tasks and target printing information.

[0054] Among them, the target printing information includes information indicating the target printing method, and the electronic device can determine the target printing method based on the information indicating the target printing method in the target printing information. The printing method includes at least a first printing method. That is, in addition to the first printing method, the printing method can also include other printing methods, such as a second printing method, and the second printing method is the printing method in the aforementioned related technology. It should be noted that there can be multiple printing methods, but each time the message printing method process is executed, the message can only be printed according to one printing method. Each time the message printing method is executed, the selected printing method is the target printing method of this application when executing the message printing method this time.

[0055] The target printing information may be generated by the background of the electronic device acquiring the operation information of the user on the front-end interface and generating corresponding target printing information based on the operation information of the user.

[0056] The simulation task is the task of SoC system simulation. Simulation is one of the main tasks of SoC system.

[0057] Step 102, obtaining debugging information generated by the simulation thread of the SoC system during the execution of the simulation task.

[0058] Debug information is generated by an electronic device in the process of obtaining the latest status of a simulation use case. The debug information is information used to indicate a character string generated during the simulation process. The character string can represent the latest status of the simulation use case. Therefore, the latest status of the simulation use case can be determined based on the character string.

[0059] The simulation thread is a thread that can be used to execute simulation tasks. The simulation thread runs in the electronic device where the SoC system is located, such as the SoC simulation server, to simulate the simulation task. That is, the execution of the simulation thread of this embodiment only consumes the CPU of the electronic device, and does not occupy the CPU inside the SoC system.

[0060] Step 103: if it is determined that the target printing mode is the first printing mode, the debugging information is transmitted to the program message output function of the SoC system for processing to obtain the processed debugging information.

[0061] Among them, based on the information indicating the target printing mode in the target printing information, it can be determined whether the target printing mode is the first printing mode or the second printing mode. When it is determined that the target printing mode is the first printing mode, the debugging information can be transmitted to the program message output function of the SoC system. The program message output function can be pre-configured in the SoC system. It should be noted that in order to ensure that the SoC system can print messages in the second printing mode, the print output function is also pre-configured in the SoC system. In other words, in the related art, the print output function has been configured in the SoC system, and on this basis, the present application also pre-configures the program message output function in the SoC system.

[0062] After the debugging information is input into the program message output function, the program message output function may process based on the debugging information to obtain the processed debugging information.

[0063] The feature of the program message output function is that it can convert debug information into processed debug information. Different from bus operation instructions, processed debug information is information that can be operated by simulation threads, or in other words, processed debug information can be operated by simulation threads.

[0064] Step 104, sending the processed debugging information to the simulation thread.

[0065] Specifically, the processed debugging information is sent to the simulation thread through the program message output function.

[0066] Step 105: Process the processed debugging information through the simulation thread, and send the processed debugging information to the console.

[0067] Specifically, after obtaining the processed debugging information, the simulation thread can process the processed debugging information to obtain the debugging information. The debugging information here is the debugging information generated in the simulation process. This processing can be understood as the simulation thread restoring the debugging information based on the processed debugging information.

[0068] Afterwards, the simulation thread sends the debug information obtained after processing to the console. In this process, the simulation thread can also format the debug information according to the set format, and then send the formatted debug information to the console. Before sending the debug information to the console, the present embodiment also formats the debug information, so that the user of the console can conveniently view the data.

[0069] The console is connected to the electronic device for communication. For example, if the electronic device is a SoC simulation server, the console is connected to the SoC simulation server for communication.

[0070] The technical solution provided by the embodiment of the present application utilizes the program message output function to convert the debug information into the processed debug information that can be operated by the simulation thread, and the processed debug information is processed by the simulation thread. Since the simulation thread runs on the SoC simulation server, this processing method does not need to occupy the CPU, nor does it pass through the bus and peripherals. In this way, the debug information can avoid these real operations and no longer occupy the physical cycle of the CPU, the bus transmission cycle, and the interaction cycle with the peripherals. In addition, since the CPU in the simulation thread in the present application is in the process of executing the simulation task, the printing of the debug information does not need to convert the debug information into bus operation instructions through the CPU. Therefore, the printing of the debug information in the present application can reduce the occupation of the physical simulation time compared with the related art. When the debug information is printed more, this method of the present application can also improve the simulation efficiency of the SoC system to a certain extent. In addition, with respect to the implementation of the print message, the program message output function of the present application is simpler than the print output function, and consumes less CPU time.

[0071] In one embodiment, Figure 2As shown, the debugging information includes a string and a variable value, and the variable value is used to indicate the position of the string; the debugging information is transmitted to the program message output function of the SoC system for processing, and the processed debugging information is obtained, including:

[0072] Step 201: Transmit debugging information to a program message output function of the SoC system.

[0073] Among them, the debugging information is expressed by the CPU address in the C program use case. That is, before the program message output function processes the debugging information, the storage location of the string is usually expressed by the CPU address, and the storage location of the variable value is also expressed by the CPU address.

[0074] Step 202: Convert the CPU address of the string into the ROM address of the string based on the variable value through the program message output function.

[0075] The cpu address of a string refers to the address of the string in the CPU as seen by the CPU. The cpu address of a variable value refers to the address of the variable value in the CPU as seen by the CPU.

[0076] The storage location of the string is fixed, and based on the indication of the variable value, the ROM address of the string corresponding to the CPU address of the string can be determined. The ROM address of the string is the address of the string in the ROM as seen by the ROM.

[0077] The string stored in the ROM is cleared after the electronics transmit it to the console.

[0078] Step 203, converting the CPU address of the variable value into the RAM address of the variable value through the program message output function.

[0079] The address of the variable value is a heap address or a stack address, which is stored in the RAM. The RAM address of the variable value is the address of the variable value in the RAM as seen by the RAM. The variable value stored in the RAM can still be stored in the RAM after the operation ends.

[0080] Step 204, obtaining processed debugging information based on the ROM address of the character string and the RAM address of the variable value.

[0081] The processed debugging information includes the ROM address of the string and the RAM address of the variable value. The processed debugging information can be understood as the variable name. The program message output function processes the debugging information to obtain the processed debugging information, which can be understood as the program message output function processes the debugging information to obtain the variable name.

[0082] In this embodiment, the CPU address of the string of the debugging information is converted into the ROM address of the string, and the CPU address of the variable value of the debugging information is converted into the RAM address of the variable value, thereby obtaining the processed debugging information. The ROM address of the string and the RAM address of the variable value obtained by processing the debugging information through the program message output function can be recognized by the simulation thread, so that they can be processed and operated by the simulation thread.

[0083] In one embodiment, the message printing method based on the SoC system further includes:

[0084] The simulation task is simulated through the UVM verification framework and the Verilog verification language of the simulation thread; or, the simulation task is simulated through the UVM verification framework and the system Verilog verification language.

[0085] Among them, the simulation thread can use UVM (Universal Verification Methodology) as the verification framework. On this basis, the Verilog verification language or the System Verilog verification language (SV language) can be used to simulate the simulation task.

[0086] The System Verilog verification language is an extension and extension of the Verilog verification language. Verilog is suitable for system-level, algorithm-level, register-level, logic-level, gate-level, and circuit-switch-level design, while System Verilog is more suitable for reusable synthesizable IP and reusable verification IP design, as well as ultra-large IP-based system-level design and verification.

[0087] In the present embodiment, adopt UVM verification framework and Verilog verification language, or adopt UVM verification framework and system Verilog verification language, simulate the simulation task, can improve the effect of simulation.But this application is not limited to adopt other verification frameworks and other verification languages ​​except UVM, simulate the simulation task.

[0088] In one embodiment, Figure 3 As shown, the processed debugging information is processed by the simulation thread, and the processed debugging information is sent to the console, including:

[0089] Step 301, obtaining the string of debugging information based on the ROM address of the string through the simulation thread.

[0090] The simulation thread can obtain the string of debugging information from the ROM based on the ROM address of the string.

[0091] Step 302, obtaining the variable value based on the RAM address of the variable value through the simulation thread.

[0092] Among them, the simulation thread can obtain the variable value from the RAM based on the RAM address of the variable value.

[0093] Step 303: Obtain debugging information based on the character string and variable value of the debugging information.

[0094] That is, debug information includes string and variable values.

[0095] Step 304: Send the debugging information to the console.

[0096] Here, the debugging information is sent to the console, and then the content of the debugging information can be displayed on the front-end interface of the console.

[0097] In one embodiment, obtaining the string of debugging information based on the ROM address of the string through the simulation thread includes:

[0098] The backdoor access control program of the ROM is called through the program message output function, and the ROM address of the string is sent to the backdoor access control program of the ROM;

[0099] Get the debug information string returned by the ROM backdoor access control program.

[0100] The program message output function calls the ROM backdoor access control program and sends the ROM address of the string to the ROM backdoor access control program. That is, the program message output function calls the ROM backdoor read-write method to read the string stored in the ROM based on the ROM address of the string. In this way, the program message output function can obtain the string of debugging information from the ROM.

[0101] In this embodiment, the backdoor read and write mode reads and writes ROM, and does not consume simulation time. Therefore, the program message output function is based on the ROM address of the string, and the process of obtaining the string of debugging information does not consume simulation time.

[0102] In one embodiment, obtaining the variable value based on the RAM address of the variable value by the simulation thread includes:

[0103] Calling the RAM backdoor access control program through the program message output function, and sending the RAM address of the variable value to the RAM backdoor access control program;

[0104] Get the variable value returned by the RAM backdoor access control program.

[0105] Among them, the program message output function calls the backdoor access control program of the RAM and sends the RAM address of the variable value to the backdoor access control program of the RAM. That is, based on the RAM address of the variable value, the program message output function calls the backdoor read-write method of the RAM to read the variable value stored in the RAM. In this way, the program message output function can obtain the variable value from the RAM.

[0106] In this embodiment, the backdoor read and write method reads and writes RAM, and does not consume simulation time. Therefore, the program message output function is based on the RAM address of the variable value, and the process of obtaining the variable value does not consume simulation time.

[0107] The present application is further described in detail below in conjunction with an application example.

[0108] In an application example, the message printing method based on the SoC system of the present application includes the following steps:

[0109] (1) Acquiring a simulation task and target printing information, where the target printing information includes information indicating a target printing mode, where the printing mode includes at least a first printing mode;

[0110] (2) Obtain the debugging information generated by the simulation thread of the SoC system during the execution of the simulation task, including strings and variable values;

[0111] (3) When the target printing mode is determined to be the first printing mode, the debugging information is transmitted to the program message output function of the SoC system;

[0112] (4) The program message output function converts the CPU address of the string into the ROM address of the string, and converts the CPU address of the variable value into the RAM address of the variable value to obtain the processed debugging information;

[0113] (5) The program message output function sends the processed debugging information to the simulation thread;

[0114] (6) The simulation thread calls the ROM backdoor read / write method based on the ROM address of the string to read the string stored in the ROM; and, based on the RAM address of the variable value, calls the RAM backdoor read / write method to read the variable value stored in the RAM;

[0115] (7) The simulation thread formats the string and variable value according to the set format to obtain formatted debugging information;

[0116] (8) The simulation thread sends the formatted debugging information to the console for display.

[0117] In this embodiment, the entire printing process does not occupy the CPU simulation time, bus transmission cycle, and bus and peripheral interaction cycle.

[0118] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a message printing device based on a SoC system. The message printing device based on a SoC system corresponds to the above-mentioned message printing method based on a SoC system, and each step in the above-mentioned message printing method embodiment based on a SoC system is also fully applicable to the embodiment of the message printing device based on a SoC system.

[0119] like Figure 4 As shown, the message printing device 400 based on the SoC system includes: a data acquisition module 401, a data transmission module 402, a data processing module 403, a first data sending module 404 and a second data sending module 405; the data acquisition module 401 is used to obtain simulation tasks and target printing information, the target printing information includes information indicating a target printing method, and the printing method includes at least a first printing method; the data transmission module 402 is used to obtain debugging information generated by the simulation thread of the SoC system during the execution of the simulation task; the data processing module 403 is used to determine that the target printing method is the first printing method, and then transmit the debugging information to the program message output function of the SoC system for processing to obtain the processed debugging information; the first data sending module 404 is used to send the processed debugging information to the simulation thread; the second data sending module 405 is used to process the processed debugging information through the simulation thread, and send the processed debugging information to the console.

[0120] In one embodiment, the debugging information includes a string and a variable value, and the variable value is used to indicate the location of the string; the data processing module 403 transmits the debugging information to the program message output function of the SoC system for processing to obtain the processed debugging information, including: transmitting the debugging information to the program message output function of the SoC system; converting the CPU address of the string into the ROM address of the string based on the variable value through the program message output function; converting the CPU address of the variable value into the RAM address of the variable value through the program message output function; obtaining the processed debugging information based on the ROM address of the string and the RAM address of the variable value.

[0121] In one embodiment, the message printing device 400 based on the SoC system further includes a simulation module 406, which simulates the simulation task through the UVM verification framework and the Verilog verification language of the simulation thread; or, simulates the simulation task through the UVM verification framework and the system Verilog verification language.

[0122] In one embodiment, the second data sending module 405 processes the processed debugging information through the simulation thread, and sends the processed debugging information to the console, including: obtaining the string of debugging information based on the ROM address of the string through the simulation thread; obtaining the variable value based on the RAM address of the variable value through the simulation thread; obtaining debugging information based on the string and variable value of the debugging information; and sending the debugging information to the console.

[0123] In one embodiment, the second data sending module 405 obtains the string of debugging information based on the ROM address of the string through the simulation thread, including: calling the backdoor access control program of the ROM through the program message output function, and sending the ROM address of the string to the backdoor access control program of the ROM; obtaining the string of debugging information returned by the backdoor access control program of the ROM.

[0124] In one embodiment, the second data sending module 405 obtains the variable value based on the RAM address of the variable value through the simulation thread, including: calling the backdoor access control program of the RAM through the program message output function, and sending the RAM address of the variable value to the backdoor access control program of the RAM; obtaining the variable value returned by the backdoor access control program of the RAM.

[0125] It should be noted that: the message printing device based on the SoC system provided in the above embodiment only uses the division of the above program modules as an example when performing message printing based on the SoC system. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the message printing device based on the SoC system provided in the above embodiment and the message printing method embodiment based on the SoC system belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0126] Based on the hardware implementation of the above program modules and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides an electronic device. Figure 5 Only an exemplary structure of the electronic device is shown, not all structures, and it can be implemented as needed. Figure 5 Partial or complete structure shown.

[0127] like Figure 5As shown, the electronic device 500 provided in the embodiment of the present application includes: at least one processor 501, a memory 502, a user interface 503 and at least one network interface 504. The various components in the electronic device 500 are coupled together through a bus system 505. It can be understood that the bus system 505 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 5 In the figure, various buses are labeled as bus system 505. Among them, the user interface 503 may include a display, keyboard, mouse, trackball, click wheel, key, button, touch pad or touch screen. The memory 502 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of these data include: any computer program used to operate on the electronic device.

[0128] The message printing method based on the SoC system disclosed in the embodiment of the present application can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the message printing method based on the SoC system can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above-mentioned processor 501 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 501 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 502. The processor 501 reads the information in the memory 502 and completes the steps of the message printing method based on the SoC system provided in the embodiment of the present application in combination with its hardware.

[0129] In an exemplary embodiment, the electronic device may be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.

[0130] It can be understood that the memory 502 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.

[0131] In an exemplary embodiment, the present application also provides a computer storage medium, which can be a computer-readable storage medium, for example, a memory 502 storing a computer program, and the computer program can be executed by a processor 501 of an electronic device to complete the steps described in the method of the present application embodiment. The computer-readable storage medium can be a memory such as a ROM, a PROM, an EPROM, an EEPROM, a Flash Memory, a magnetic surface memory, an optical disk, or a CD-ROM.

[0132] An embodiment of the present application also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.

[0133] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0134] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0135] The above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.

Claims

1. A message printing method based on SoC system, characterized in that: The method comprises: Acquire a simulation task and target printing information, wherein the target printing information includes information indicating a target printing mode, and the printing mode includes at least a first printing mode; Acquire debugging information generated by the simulation thread of the SoC system during the execution of the simulation task, wherein the debugging information includes a character string and a variable value, and the variable value is used to indicate the position of the character string; Determining that the target printing mode is the first printing mode, transmitting the debugging information to the program message output function of the SoC system for processing to obtain the processed debugging information; Sending the processed debugging information to the simulation thread; Processing the processed debugging information through the simulation thread, and sending the processed debugging information to the console; The transmitting the debugging information to the program message output function of the SoC system for processing to obtain the processed debugging information includes: transmitting the debugging information to the program message output function of the SoC system; converting the CPU address of the string into the ROM address of the string based on the variable value through the program message output function; converting the CPU address of the variable value into the RAM address of the variable value through the program message output function; and obtaining the processed debugging information based on the ROM address of the string and the RAM address of the variable value; The processing of the processed debugging information by the simulation thread and sending the processed debugging information to the console includes: Acquire the string of the debugging information based on the ROM address of the string through the simulation thread; Obtaining the variable value based on the RAM address of the variable value through the simulation thread; Based on the character string of the debugging information and the variable value, obtaining the debugging information; The debugging information is sent to the console.

2. The method according to claim 1, characterized in that The method further comprises: The simulation task is simulated through the UVM verification framework and the Verilog verification language of the simulation thread.

3. The method according to claim 1, characterized in that The method further comprises: The simulation task is simulated through the UVM verification framework and the system verilog verification language.

4. The method according to claim 1, characterized in that: The step of obtaining the string of the debugging information based on the ROM address of the string through the simulation thread includes: Calling the backdoor access control program of the ROM through the program message output function, and sending the ROM address of the string to the backdoor access control program of the ROM; Obtain the character string of the debugging information returned by the backdoor access control program of the ROM.

5. The method according to claim 4, characterized in that The obtaining the variable value based on the RAM address of the variable value through the simulation thread includes: Calling the backdoor access control program of the RAM through the program message output function, and sending the RAM address of the variable value to the backdoor access control program of the RAM; Obtain the variable value returned by the backdoor access control program of the RAM.

6. A message printing device based on a SoC system, characterized in that: The device comprises: A data acquisition module, used for acquiring simulation tasks and target printing information, wherein the target printing information includes information indicating a target printing mode, and the printing mode includes at least a first printing mode; A data transmission module, used for acquiring debugging information generated by the simulation thread of the SoC system during the execution of the simulation task, wherein the debugging information includes a character string and a variable value, and the variable value is used for indicating the position of the character string; A data processing module, for determining that the target printing mode is the first printing mode, transmitting the debugging information to the program message output function of the SoC system for processing to obtain the processed debugging information; the transmitting the debugging information to the program message output function of the SoC system for processing to obtain the processed debugging information includes: transmitting the debugging information to the program message output function of the SoC system; converting the CPU address of the string into the ROM address of the string based on the variable value through the program message output function; converting the CPU address of the variable value into the RAM address of the variable value through the program message output function; obtaining the processed debugging information based on the ROM address of the string and the RAM address of the variable value; A first data sending module, used for sending the processed debugging information to the simulation thread; A second data sending module is used to process the processed debugging information through the simulation thread and send the processed debugging information to the console. The processing of the processed debugging information through the simulation thread and sending the processed debugging information to the console includes: obtaining the string of the debugging information based on the ROM address of the string through the simulation thread; obtaining the variable value based on the RAM address of the variable value through the simulation thread; obtaining the debugging information based on the string of the debugging information and the variable value; and sending the debugging information to the console.

7. An electronic device, characterized in that: The method comprises a processor and a memory for storing a computer program that can be run on the processor, wherein the processor is used to execute the steps of the method according to any one of claims 1 to 5 when running the computer program.

8. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Software and hardware collaborative SoC verification method based on RAM interaction

    CN109857609A

  • Debugging information output method and device in software and hardware collaborative verification

    CN110134561A