Processing device, method and system for printing information in chip EDA simulation
By using information acquisition, parsing, and printing control modules in SoC chip EDA simulation, and utilizing regular expressions to match simulation files and IP modules, the problem of redundant printing information is solved, enabling flexible printing information control and accurate output, thus improving simulation efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MOLCHIP TECH (SHANGHAI) CO LTD
- Filing Date
- 2022-11-17
- Publication Date
- 2026-04-28
AI Technical Summary
In the EDA simulation process of SoC chips, in a verification environment maintained by multiple people, the redundancy of printed information from IP modules slows down the simulation process, affects the simulation progress, and makes it difficult to accurately obtain the required information. Existing technologies are cumbersome to operate and are not suitable for scenarios maintained by multiple people.
This invention provides a device for processing print information in chip EDA simulation. Through an information acquisition module, a command parsing module, and a print control module, it uses regular expressions to match the simulation file and the IP module to control the output and annotation of print information, thereby achieving flexible print information control.
It simplifies the control of printing information, improves the accuracy of printing information, and saves time and computing resources for modifying and compiling code files.
Smart Images

Figure CN115758963B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chip simulation technology, and in particular to a device, method and system for processing printed information in chip EDA simulation. Background Technology
[0002] In the field of IC design, mainstream chip design increasingly favors System-on-Chip (SoC) design, which utilizes reusable IP cores (Intellectual Property cores, also known as IP modules). SoC chips are highly centralized embedded systems that can improve chip design efficiency and shorten design cycles. During the development and design of SoC chips, EDA (Electronic Design Automation) simulation verification of the chip's system functions is required. Simulation verification of the chip's IP modules is a crucial step in the chip simulation process. Common IP modules include CPU modules, DDR modules, USB modules, AXI modules, AHB modules, and PCIe modules. Different IP modules may be verified and debugged by different verification engineers. During the verification and debugging of IP modules, the verification engineer responsible for that module typically adds relevant print commands to the simulation file to obtain simulation-related information (including various simulation process information and simulation result information) more intuitively, in order to debug and track simulation information. Based on the print commands in the simulation file, the printed information is output to the monitor for display, and adding print functions (or print functions) to the simulation file is the most common method. For example, in EDA simulation tools, print commands usually come from functions such as $display() and `uvm_info() in files like Verilog and SystemVerilog. The $display statement is used to display system information (such as strings, simulation time, etc.) and automatically adds a newline after each $display execution. The `uvm_info statement has a similar function to the $display statement, but it is more powerful and can set a redundancy threshold for print information to control the output of print information.
[0003] Currently, SoC chip verification environments are typically maintained collaboratively by multiple people. During simulation, each person can add print information to the corresponding simulation files within the verification environment according to their own simulation needs, and all added print information is output. For example, the verification engineer responsible for verifying the DDR module can add print information related to DDR module verification and debugging in the verification environment to understand the real-time simulation progress, and the verification engineer responsible for verifying the USB module can also add print information related to USB module verification and debugging in the verification environment to understand the real-time simulation progress. In the EDA simulation verification process of a large SoC chip, which involves the verification and debugging of multiple IP modules, there are also numerous Verilog and SystemVerilog simulation files. The print information in numerous simulation files not only leads to information redundancy but also affects the simulation progress. For example, suppose a verification engineer responsible for verifying the DDR module adds relevant print information X to the verification environment, and a verification engineer responsible for verifying the USB module adds relevant print information Y during USB module simulation verification. Since the USB module simulation calls the DDR module, the USB module verification engineer will receive print information Y from both the USB module and the DDR module during simulation. When the USB module simulation calls other modules, the USB module verification engineer will also receive print information from those other modules. However, the USB module verification engineer often only needs to use the USB module's print information and not the print information from other modules. This phenomenon is very common in actual simulations, not only increasing the hardware simulation load and slowing down the simulation process, affecting the simulation progress, but also preventing verification engineers from accurately obtaining the desired print information, wasting a significant amount of their time and resources.
[0004] On the other hand, to address the issues of redundant printing information and cumbersome printing output control operations during software development and debugging, existing technologies have disclosed some output control schemes for printing information. For example, Chinese patent application CN202010090890.5 discloses a data printing method: using a target thread to detect serial port input printing commands, the printing commands including instruction strings and keywords; determining the printing function corresponding to the instruction string, and executing the printing parameters using the keyword as the input parameter of the printing function. This scheme controls output by inputting printing commands through the serial port, combined with predefined printing functions. Without requiring additional printf statements, it can flexibly control the printing output of variables of interest, reducing the complexity of code modification. However, the above technical solutions require debuggers to first define printing functions—such as precise read functions, matching read functions, detection read functions, precise write functions, etc.—and pre-set and store the correspondence between instruction strings and printing functions. This operation is relatively cumbersome. Furthermore, considering that different debuggers may define various printing functions based on their own needs and styles, this leads to various styles of debugging printing for different modules and different personnel, making later maintenance and diagnosis difficult, especially unsuitable for SoC chip simulation scenarios requiring multiple maintenance personnel.
[0005] In summary, as the design scale of SoC chips increases and the number of IP modules increases, how to control the printing information of IP modules in chip EDA simulation is a technical problem that urgently needs to be solved. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a device, method, and system for processing print information in chip EDA simulation. The device provided by this invention can collect user print control commands and parse them to determine whether to comment out function statements in the simulation file of the IP module, thereby controlling the output of print information. In this way, verification engineers can flexibly control the output of relevant print information and prevent the output of irrelevant print information based on the IP module they are responsible for. The operation is simple and flexible, the print information is accurate, and it saves time and computational resources that would otherwise be required to modify and compile code files to control the output of print information.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] A device for processing printed information in chip EDA simulation, comprising:
[0009] The information acquisition module is used to acquire the print control commands input by the user in the command line. The print control commands are used to configure the print information in the EDA simulation tool to control whether the print information is displayed and output.
[0010] The command parsing module is used to parse the aforementioned print control commands to obtain the simulation file and IP module information to which the print information to be displayed belongs, as well as the simulation file and IP module information to which the print information not to be displayed belongs; the simulation file and IP module are set to correspond, and different IP modules correspond to different simulation files;
[0011] The print control module is used to match the simulation files of each IP module in the EDA simulation tool based on the parsing results of the command parsing module and regular expressions. After obtaining the simulation file information to which the print information to be displayed belongs, the module executes the print operation of the simulation file on the user's display terminal. After obtaining the simulation file information to which the print information not to be displayed belongs, the module comments out the print function in the simulation file so that the corresponding simulation file is not printed on the user's display terminal. The print statements corresponding to the commented-out print functions are retained in the simulation file as comment information and are no longer executed.
[0012] Furthermore, the print control command includes control command options and file keywords, the control command options include at least the log_on option and the Log_off option, and the file keywords include a first file keyword and a second file keyword;
[0013] The first file keyword is used as an input parameter for the log_on option to configure the simulation file name information corresponding to the output print information to be displayed;
[0014] The second file keyword is used as an input parameter after the Log_off option to configure the simulation file name information corresponding to the output print information that should not be displayed;
[0015] The simulation file name information includes the IP module information to which the simulation file belongs, so as to distinguish the IP module to which each simulation file belongs.
[0016] Furthermore, the printing control module includes an annotation unit and a printing unit;
[0017] The annotation unit is configured to: obtain the second file keyword after the command log_off option, match the simulation file names of each IP module in the EDA simulation tool based on regular expressions, obtain all simulation files whose names contain the aforementioned second file keyword, and then comment out all the printing functions corresponding to the printing information contained in the aforementioned simulation files on the aforementioned user's display terminal, thereby controlling the printing statements of the aforementioned simulation files not to be displayed.
[0018] The printing unit is configured to: obtain the first file keyword after the command log_on option, match the simulation file names of each IP module in the EDA simulation tool based on regular expressions, obtain all simulation files whose names contain the aforementioned first file keyword, and perform a printing operation on the aforementioned simulation files on the aforementioned user's display terminal, thereby controlling the display output of the printing statements of the aforementioned simulation files.
[0019] Furthermore, the simulation file name of each IP module includes the name and / or number information of that IP module, and the name and / or number information of the IP module is added to the corresponding simulation file name as a prefix.
[0020] Furthermore, the print control command also includes a content keyword, and the control command options also include a log_on_word option and a Log_off_word option, wherein the content keyword includes a first content keyword and a second content keyword;
[0021] The first content keyword is used as the input parameter of the log_on_word option to configure the content information to be included in the output print information. At this time, the content of the print information includes the execution of the print operation of the first content keyword.
[0022] The second content keyword is used as an input parameter after the Log_off_word option to configure the content information that should not be displayed in the output print information. In this case, the print information containing the second content keyword will not be printed.
[0023] Furthermore, the command parsing module parses the input parameters following the command log_on_word and Log_off_word options, and sends the parsing results to the print control module;
[0024] The printing control module is configured as follows:
[0025] Based on the first content keyword following the `log_on_word` option, the system uses regular expressions to match the print statements corresponding to each print message in the EDA simulation tool, obtaining all print statements containing the first content keyword. These print statements are then executed on the user's display terminal, thereby controlling the display output of the aforementioned print statements; and...
[0026] Based on the second content keyword after the command log_off_word option, the printing statements corresponding to each print information in the EDA simulation tool are matched using regular expressions to obtain all printing statements containing the second content keyword. The aforementioned printing statements are then commented out on the user's display terminal, thereby controlling the printing statements not to be displayed.
[0027] Furthermore, the simulation file is a simulation file based on Verilog or SystemVerilog language, and the printing function is the $display function or the `uvm_info function.
[0028] Furthermore, the IP module includes two or more of the following: CPU module, DDR module, USB module, AXI module, AHB module, and PCIE module.
[0029] This invention also provides a method for processing printed information in chip EDA simulation, comprising the following steps:
[0030] The system collects print control commands input by the user in the command line. These commands are used to configure the print information in the EDA simulation tool to control whether the print information is displayed. The system also collects the user's display terminal information.
[0031] The aforementioned print control commands are parsed to obtain the simulation file and IP module information to which the print information to be displayed belongs, as well as the simulation file and IP module information to which the print information not to be displayed belongs; the simulation file and IP module are set to correspond, and different IP modules correspond to different simulation files;
[0032] Based on the parsing results of the command parsing module, the simulation files of each IP module in the EDA simulation tool are matched using regular expressions. After obtaining the simulation file information to which the print information to be displayed belongs, the printing operation of the simulation file is executed on the user's display terminal. After obtaining the simulation file information to which the print information not to be displayed belongs, the printing function in the simulation file is commented out so that the corresponding simulation file is not printed on the user's display terminal. The printing statements corresponding to the commented-out printing functions are retained in the simulation file as comment information and are no longer executed.
[0033] The present invention also provides a chip EDA simulation system, including a printer connected to an EDA simulation platform, the printer including any of the devices described above.
[0034] Compared with the prior art, this invention, by adopting the above technical solution, has the following advantages and positive effects: The device provided by this invention can collect the user's printing control commands and parse the printing control commands to determine whether to comment out the function statements in the simulation file of the IP module, thereby controlling the output of printing information. In this way, verification engineers can flexibly control the output of relevant printing information and the non-output of irrelevant printing information based on the IP module they are responsible for. The operation is simple and flexible, the printing information is accurate, and it saves the time and computing resources of modifying and compiling code files to control the output of printing information. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the module structure of the device for processing printed information in chip EDA simulation provided in an embodiment of the present invention.
[0036] Figure 2 This is a typical example diagram of print control commands provided in an embodiment of the present invention.
[0037] Figure 3 An example diagram showing the parsing results of the command parsing module provided in this embodiment of the invention.
[0038] Figure 4 A flowchart illustrating the method for processing printed information in chip EDA simulation provided in this embodiment of the invention.
[0039] Explanation of reference numerals in the attached figures
[0040] Device 100, information acquisition module 110, command parsing module 120, and print control module 130. Detailed Implementation
[0041] The following detailed description, in conjunction with the accompanying drawings and specific embodiments, provides a more comprehensive overview of the processing apparatus, method, and system for printing information in chip EDA simulation disclosed in this invention. It should be noted that the technical features or combinations of technical features described in the following embodiments should not be considered isolated; they can be combined to achieve better technical effects. In the accompanying drawings of the following embodiments, the same reference numerals in each drawing represent the same features or components, which can be applied to different embodiments. Therefore, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0042] It should be noted that the structures, proportions, sizes, etc., illustrated in the accompanying drawings are merely for illustrative purposes and to aid those skilled in the art in understanding and reading the invention. They are not intended to limit the conditions under which the invention can be implemented. Any modifications to the structure, changes in proportions, or adjustments to size, provided they do not affect the effectiveness or purpose of the invention, should fall within the scope of the technical content disclosed in the invention. The scope of the preferred embodiments of the present invention includes other implementations, wherein functions may be performed not in the order stated or discussed, including substantially simultaneously or in reverse order, depending on the functions involved. This should be understood by those skilled in the art to which the embodiments of the present invention pertain.
[0043] Techniques, methods, and apparatus known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and apparatus should be considered part of the specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0044] The control of printing information in this invention refers to the control of the display output of printing information. Example
[0045] See Figure 1 The diagram shows a device for processing print information in chip EDA simulation provided by the present invention. The device 100 includes an information acquisition module 110, a command parsing module 120, and a print control module 130.
[0046] The information acquisition module 110 is used to acquire the print control commands input by the user in the command line. The print control commands are used to configure the print information in the EDA simulation tool to control whether the print information is displayed and output.
[0047] The command parsing module 120 is used to parse the aforementioned print control commands to obtain the simulation file and IP module information to which the print information to be displayed belongs, as well as the simulation file and IP module information to which the print information not to be displayed belongs; the simulation file and IP module are set to correspond, and different IP modules correspond to different simulation files.
[0048] The print control module 130 is used to match the simulation files of each IP module in the EDA simulation tool based on the parsing results of the command parsing module and regular expressions. After obtaining the simulation file information to which the print information to be displayed belongs, it executes the print operation of the simulation file on the user's display terminal. Conversely, after obtaining the simulation file information to which the print information not to be displayed belongs, it comments out the print functions in the corresponding simulation file so that the corresponding simulation file is not printed on the user's display terminal. The print statements corresponding to the commented-out print functions are retained as comment information in the simulation file and are no longer executed.
[0049] The simulation file is preferably a simulation file based on Verilog or SystemVerilog language, and the printing function is the $display function or the `uvm_info function.
[0050] The IP module may specifically be a CPU module, DDR module, USB module, AXI module, AHB module, and PCIE module.
[0051] In this embodiment, the print control command may specifically include control command options and file keywords. The control command options include at least the log_on option and the log_off option. The file keywords include a first file keyword and a second file keyword.
[0052] The first file keyword serves as the input parameter for the `log_on` option, configuring the name of the simulation file corresponding to the output print information to be displayed. The second file keyword serves as the input parameter following the `Log_off` option, configuring the name of the simulation file corresponding to the output print information not to be displayed. The simulation file name information includes the IP module information to which the simulation file belongs, enabling differentiation between the IP modules to which each simulation file belongs.
[0053] As an example, and not a limitation, consider the following command entered by a user in the command line:
[0054] -log_on <file1>
[0055] -log_off <file2>
[0056] After acquiring the command information from the aforementioned user, the information acquisition module 110 sends it to the command parsing module 120. The command parsing module 120 parses the control command options and file keywords in the aforementioned command, and the parsing result is: the simulation file name contains the `log_on` input parameter. <file1>The print information in the simulation file is printed normally. The simulation file name should contain the input parameter `log_off`. <file2>The print information in the simulation file is not printed. Then, the print control module 130 controls whether to print the print information based on the parsing result of the command parsing module 120.
[0057] In specific settings, the simulation file name information can be configured as keywords in the simulation file name. In this case, simulation files whose names contain the aforementioned first file keyword will be printed, while simulation files whose names contain the aforementioned second file keyword will not be printed. That is, simulation files whose names contain the aforementioned first file keyword will be printed normally, while simulation files whose names contain the aforementioned second file keyword will not be printed.
[0058] Alternatively, the simulation file name information can be configured to the full name of the simulation file. In this case, the simulation file named with the aforementioned first file keyword will be printed, while the simulation file named with the aforementioned second file keyword will not be printed. That is, the simulation file named with the aforementioned first file keyword will be printed normally, while the simulation file named with the aforementioned second file keyword will not be printed.
[0059] In this embodiment, the printing control module may specifically include an annotation unit and a printing unit.
[0060] The annotation unit can be specifically configured to: obtain the second file keyword after the command log_off option, match the simulation file names of each IP module in the EDA simulation tool based on regular expressions, obtain all simulation files whose names contain the aforementioned second file keyword, and then comment out all the printing functions corresponding to the printing information contained in the aforementioned simulation files on the aforementioned user's display terminal, thereby controlling the printing statements of the aforementioned simulation files not to be displayed.
[0061] The printing unit can be specifically configured to: obtain the first file keyword after the command log_on option, match the simulation file names of each IP module in the EDA simulation tool based on regular expressions, obtain all simulation files whose names contain the aforementioned first file keyword, and perform a printing operation on the aforementioned simulation files on the aforementioned user's display terminal, thereby controlling the display output of the printing statements of the aforementioned simulation files.
[0062] In a preferred embodiment, the simulation file name of each IP module may include the name and / or number information of that IP module, and the name and / or number information of the IP module is added to the corresponding simulation file name as a prefix. As a typical example, the simulation file name of a USB module is usually prefixed with usb, the file name of a DDR module is usually prefixed with ddr, and the file name of a CPU module is usually prefixed with cpu.
[0063] In another embodiment of this example, the print control command may further include content keywords, and the control command options may further include the log_on_word option and the Log_off_word option, wherein the content keywords include a first content keyword and a second content keyword.
[0064] The first content keyword is used as an input parameter for the `log_on_word` option, configuring the content information to be included in the printed output. In this case, the printed output containing the first content keyword will execute the print operation. The second content keyword is used as an input parameter for the `log_off_word` option, configuring the content information to be excluded from the printed output. In this case, the printed output containing the second content keyword will not execute the print operation.
[0065] The command parsing module parses the input parameters following the command's log_on_word and Log_off_word options and sends the parsing results to the print control module.
[0066] At this time, the print control module is configured to: match the print statements corresponding to each print information in the EDA simulation tool based on a regular expression according to the first content keyword after the command log_on_word option, obtain all print statements containing the first content keyword in the print information, and perform a print operation on the aforementioned print statements on the aforementioned user's display terminal, thereby controlling the display output of the aforementioned print statements; and, match the print statements corresponding to each print information in the EDA simulation tool based on a regular expression according to the second content keyword after the command log_off_word option, obtain all print statements containing the second content keyword in the print information, and perform a comment-out operation on the aforementioned print statements on the aforementioned user's display terminal, thereby controlling the aforementioned print statements not to be displayed.
[0067] As an example, and not a limitation, consider the following command entered by a user in the command line:
[0068] -log_on_word <word1>
[0069] -log_off_word <word2>
[0070] After collecting the command information from the aforementioned user, the information acquisition module 110 sends it to the command parsing module 120. The command parsing module 120 parses the control command options and content keywords in the aforementioned command, and the parsing result is: the content to be printed contains the Log_on_word parameter. <word1>The print information is printed normally, but the print content will contain the Log_off_word parameter. <word2>The print information is not printed. Then, the print control module 130 controls whether to print the information based on the parsing result of the command parsing module 120.
[0071] The following is combined Figure 2 and Figure 3 The printing control process of this embodiment is described in detail.
[0072] When a USB verification engineer (i.e., the user) emulates a USB module and invokes the DDR module, they may want to receive printouts from the USB module's simulation file but not from the DDR module's simulation file, and they may also want to receive printouts from successful simulation files but not from failed simulation files. This can be achieved by entering the following print control command via the command line:
[0073] -log_on usb*
[0074] -log_off ddr*
[0075] -log_on_word success
[0076] -log_off_word fail
[0077] The command parsing module parses the four control command options "log_on", "log_off", "log_on_word", and "log_off_word" and their corresponding file keywords or content keywords, respectively. See [link to documentation]. Figure 2 As shown.
[0078] See the parsing results obtained from the command parsing module. Figure 3 As shown: Control all simulation files under the USB module (the simulation file name of the USB module contains the prefix usb) to print normally, and control all simulation files under the DDR module (the simulation file name of the DDR module contains the prefix ddr) to not print; control the printing of information containing the keyword success to print normally, and control the printing of information containing the keyword failure to not print.
[0079] The print control module 130 controls whether to print information based on the parsing result of the command parsing module 120. Specifically, after obtaining the input parameter "usb*" of the log_on command, the print unit of the print control module 130 matches the simulation files of each IP module in the EDA simulation tool based on regular expressions. After obtaining all simulation files whose file names begin with "usb", it controls the print information of these simulation files to perform the printing operation, such as... Figure 3 As shown in the table, the print information from simulation files whose names begin with "usb" (including usb_1.v, usb_2.v, ..., usb_n.v, where n is an integer greater than 1) will be printed normally on the display terminal of the aforementioned USB verification engineer. After obtaining the input parameter "ddr*" from the log_off command, the comment unit of the print control module 130 matches the simulation files of each IP module in the EDA simulation tool based on regular expressions. After obtaining all simulation files whose file names begin with "ddr", it comments out the print functions such as $display(_) and `uvm_info()` in these simulation files—that is, it comments out the print functions using comment symbols. After the print functions are commented out, their corresponding print statements will not be executed but will remain as comment information in the simulation file. Thus, it is possible to control the print information of these simulation files from being printed out on the display terminal of the aforementioned USB verification engineer, such as... Figure 3 As shown, the print information from simulation files whose names begin with ddr (including ddr_1.v, ddr_2.v, ..., ddr_m.v, where m is an integer greater than 1) in the table will not be printed or displayed on the aforementioned USB verification engineer's display terminal.
[0080] Meanwhile, the printing unit of the print control module 130, after obtaining the input parameter "success" from the log_word_on command, matches the printing information in the simulation files of each IP module in the EDA simulation tool using regular expressions. After obtaining the printing statements containing "success" in the printing information, it controls the printing output of these statements, such as... Figure 3 As shown in the table, the print information "Test success" in the file1.v simulation file contains "success". This print information from the simulation file is printed correctly on the display terminal of the aforementioned USB verification engineer. The comment unit of the print control module 130, after obtaining the input parameter "fail" of the log_off_on command, matches the print information in the simulation files of each IP module in the EDA simulation tool using regular expressions. After obtaining the print statements containing "fail", it comments out the print functions in those simulation files. Once the print functions are commented out, their corresponding print statements will not be executed but will remain as comment information in the simulation file, such as... Figure 3 As shown in the table, the print information "Test fail" in the file2.v simulation file contains "fail", and the print information in this simulation file is no longer printed in the aforementioned USB verification engineer's display terminal.
[0081] In this way, verification engineers can flexibly configure the print information in the simulation files as needed during simulation, so that some simulation files do not output print information while others output print information normally. In particular, verification engineers can flexibly control the output of relevant print information and the non-output of irrelevant print information based on the IP modules they are responsible for. The operation is simple and flexible, the print information is accurate, and it saves the time and computing resources of modifying and compiling code files to control the output of print information.
[0082] Another embodiment of the present invention also provides a method for processing printed information in chip EDA simulation.
[0083] See Figure 4 As shown, the method includes the following steps.
[0084] S100: Collect the print control command input by the user in the command line. The print control command is used to configure the print information in the EDA simulation tool to control whether the print information is displayed and output; and collect the aforementioned display terminal information of the user.
[0085] S200, the aforementioned print control command is parsed to obtain the simulation file and IP module information to which the print information to be displayed belongs, as well as the simulation file and IP module information to which the print information not to be displayed belongs; the simulation file and IP module are set to correspond, and different IP modules correspond to different simulation files.
[0086] S300: Based on the parsing results of the command parsing module, the simulation files of each IP module in the EDA simulation tool are matched using regular expressions. After obtaining the simulation file information to which the print information to be displayed belongs, the printing operation of the simulation file is executed on the user's display terminal. Additionally, after obtaining the simulation file information to which the print information not to be displayed belongs, the printing function in the simulation file is commented out so that the corresponding simulation file is not printed on the user's display terminal. The printing statements corresponding to the commented-out printing functions are retained in the simulation file as comment information and are no longer executed.
[0087] Specifically, the print control command may include control command options and file keywords. The control command options include at least the `log_on` option and the `log_off` option. The file keywords include a first file keyword and a second file keyword. The first file keyword serves as an input parameter for the `log_on` option and is used to configure the simulation file name information corresponding to the print output to be displayed. The second file keyword serves as an input parameter following the `log_off` option and is used to configure the simulation file name information corresponding to the print output not to be displayed. The simulation file name information includes the IP module information to which the simulation file belongs, so as to distinguish the IP module to which each simulation file belongs.
[0088] Specifically, a comment unit and a printing unit can be configured. The comment unit is configured to: retrieve the second file keyword after the `log_off` command option; match the simulation file names of each IP module in the EDA simulation tool using a regular expression; obtain all simulation files whose names contain the aforementioned second file keyword; and then comment out all the printing functions corresponding to the printing information contained in the aforementioned simulation files on the user's display terminal, thereby controlling the printing statements of the aforementioned simulation files to not be displayed. The printing unit is configured to: retrieve the first file keyword after the `log_on` command option; match the simulation file names of each IP module in the EDA simulation tool using a regular expression; obtain all simulation files whose names contain the aforementioned first file keyword; and then perform a printing operation on the aforementioned simulation files on the user's display terminal, thereby controlling the display output of the printing statements of the aforementioned simulation files.
[0089] In this embodiment, the print control command may further include content keywords, and the control command options may further include the log_on_word option and the Log_off_word option. The content keywords include a first content keyword and a second content keyword.
[0090] The first content keyword is used as an input parameter for the `log_on_word` option, configuring the content information to be included in the printed output. In this case, the printed output containing the first content keyword will execute the print operation. The second content keyword is used as an input parameter for the `log_off_word` option, configuring the content information to be excluded from the printed output. In this case, the printed output containing the second content keyword will not execute the print operation.
[0091] The command parsing module parses the input parameters following the command's log_on_word and Log_off_word options and sends the parsing results to the print control module.
[0092] At this time, the print control module can be configured to: match the print statements corresponding to each print information in the EDA simulation tool based on a regular expression according to the first content keyword after the command log_on_word option, obtain all print statements containing the first content keyword in the print information, and perform a print operation on the aforementioned print statements on the aforementioned user's display terminal, thereby controlling the display output of the aforementioned print statements; and, match the print statements corresponding to each print information in the EDA simulation tool based on a regular expression according to the second content keyword after the command log_off_word option, obtain all print statements containing the second content keyword in the print information, and perform a comment-out operation on the aforementioned print statements on the aforementioned user's display terminal, thereby controlling the aforementioned print statements not to be displayed.
[0093] Other technical features are described in the preceding embodiments and will not be repeated here.
[0094] Another embodiment of the present invention provides a chip EDA simulation system. The chip EDA simulation system includes a printer connected to an EDA simulation platform, the printer including the apparatus described in any of the preceding claims.
[0095] Other technical features are described in the preceding embodiments and will not be repeated here.
[0096] In the above description, the disclosure of this invention is not intended to limit itself to these aspects. Rather, within the scope of the objectives of this disclosure, components can be selectively and operationally combined in any number. Furthermore, terms such as "comprising," "encompassing," and "having" should be interpreted by default as inclusive or open-ended, rather than exclusive or closed, unless explicitly defined as such. All technical, scientific, or other terms are to be understood by those skilled in the art, unless defined as such. Public terms found in dictionaries should not be interpreted in a too idealistic or impractical manner in the context of the relevant technical documents, unless explicitly defined as such in this disclosure. Any modifications or alterations made by those skilled in the art based on the foregoing disclosure are within the scope of the claims.
Claims
1. A device for processing printed information in chip EDA simulation, characterized in that... include: The information acquisition module is used to acquire the print control commands input by the user in the command line. The print control commands are used to configure the print information in the EDA simulation tool to control whether the print information is displayed and output. The command parsing module is used to parse the aforementioned print control commands to obtain the simulation file and IP module information to which the print information to be displayed belongs, as well as the simulation file and IP module information to which the print information not to be displayed belongs; the simulation file and IP module are set to correspond, and different IP modules correspond to different simulation files; The printing control module is used to match the simulation files of each IP module in the EDA simulation tool based on the parsing results of the command parsing module and regular expressions. After obtaining the simulation file information to which the print information to be displayed belongs, the module executes the printing operation of the simulation file on the user's display terminal. After obtaining the simulation file information to which the print information not to be displayed belongs, the module comments out the printing function in the simulation file so that the corresponding simulation file is not printed on the user's display terminal. The print statements corresponding to the commented-out print functions are retained in the simulation file as comment information and will no longer be executed. The print control command includes control command options and file keywords. The control command options include at least the log_on option and the Log_off option. The file keywords include a first file keyword and a second file keyword. The first file keyword is used as an input parameter for the log_on option to configure the simulation file name information corresponding to the output print information to be displayed; The second file keyword is used as an input parameter after the Log_off option to configure the simulation file name information corresponding to the output print information that should not be displayed; The simulation file name information includes the IP module information to which the simulation file belongs, so as to distinguish the IP module to which each simulation file belongs.
2. The apparatus according to claim 1, characterized in that: The printing control module includes an annotation unit and a printing unit; The annotation unit is configured to: obtain the second file keyword after the command log_off option, match the simulation file names of each IP module in the EDA simulation tool based on regular expressions, obtain all simulation files whose names contain the aforementioned second file keyword, and then comment out all the printing functions corresponding to the printing information contained in the aforementioned simulation files on the aforementioned user's display terminal, thereby controlling the printing statements of the aforementioned simulation files not to be displayed. The printing unit is configured to: obtain the first file keyword after the command log_on option, match the simulation file names of each IP module in the EDA simulation tool based on regular expressions, obtain all simulation files whose names contain the aforementioned first file keyword, and perform a printing operation on the aforementioned simulation files on the aforementioned user's display terminal, thereby controlling the display output of the printing statements of the aforementioned simulation files.
3. The apparatus according to claim 2, characterized in that: The simulation file name of each IP module contains the name and / or number information of that IP module. The name and / or number information of the IP module are added to the corresponding simulation file name as a prefix.
4. The apparatus according to claim 1, characterized in that: The print control commands also include content keywords, and the control command options also include log_on. _ The word option and the Log_off_word option, wherein the content keywords include a first content keyword and a second content keyword; The first content keyword is used as log_on _ The input parameters for the word option are used to configure the content information to be included in the output print information. At this time, the print operation is executed when the content of the print information contains the first content keyword. The second content keyword is used as an input parameter after the Log_off_word option to configure the content information that should not be displayed in the output print information. In this case, the print information containing the second content keyword will not be printed.
5. The apparatus according to claim 4, characterized in that: The command parsing module parses the input parameters following the command log_on_word and Log_off_word options, and sends the parsing results to the print control module. The printing control module is configured as follows: Based on the first content keyword after the command log_on_word option, the printing statements corresponding to each printing information in the EDA simulation tool are matched based on regular expressions to obtain all printing statements containing the first content keyword in the printing information. The printing operation is then performed on the aforementioned printing statements on the aforementioned user's display terminal, thereby controlling the display output of the aforementioned printing statements. as well as, Based on the second content keyword after the command log_off_word option, the printing statements corresponding to each print information in the EDA simulation tool are matched using regular expressions to obtain all printing statements containing the second content keyword. The aforementioned printing statements are then commented out on the user's display terminal, thereby controlling the printing statements not to be displayed.
6. The apparatus according to claim 1, characterized in that: The simulation file is a simulation file based on Verilog or SystemVerilog language, and the printing function is the $display function or the `uvm_info function.
7. The apparatus according to claim 1, characterized in that: The IP module includes two or more of the following: CPU module, DDR module, USB module, AXI module, AHB module, and PCIE module.
8. A method for processing printed information in chip EDA simulation, characterized in that... Includes the following steps: The system collects print control commands input by the user in the command line. These print control commands are used to configure the print information in the EDA simulation tool to control whether the print information is displayed or not. And collect the display terminal information of the aforementioned users; The aforementioned print control commands are parsed to obtain the simulation file and IP module information to which the print information to be displayed belongs, as well as the simulation file and IP module information to which the print information not to be displayed belongs; the simulation file and IP module are set to correspond, and different IP modules correspond to different simulation files; Based on the parsing results, the simulation files of each IP module in the EDA simulation tool are matched using regular expressions. After obtaining the simulation file information to which the print information to be displayed belongs, the printing operation of the simulation file is executed on the user's display terminal. In addition, after obtaining the simulation file information to which the aforementioned print information that should not be displayed belongs, the print function in the simulation file is commented out so that the corresponding simulation file is not printed on the aforementioned user's display terminal. The print statements corresponding to the commented-out print functions are retained in the simulation file as comment information and will no longer be executed. The print control command includes control command options and file keywords. The control command options include at least the log_on option and the Log_off option. The file keywords include a first file keyword and a second file keyword. The first file keyword is used as an input parameter for the log_on option to configure the simulation file name information corresponding to the output print information to be displayed; The second file keyword is used as an input parameter after the Log_off option to configure the simulation file name information corresponding to the output print information that should not be displayed; The simulation file name information includes the IP module information to which the simulation file belongs, so as to distinguish the IP module to which each simulation file belongs.
9. A chip EDA simulation system, comprising a printer connected to an EDA simulation platform, characterized in that: The printer includes the apparatus of any one of claims 1-7.
Citation Information
Patent Citations
Data printing method and device, electronic equipment and storage medium
CN111240996A
Network simulation method and device
CN101867505A
SOC-chip simulation accelerating method
CN105760638A