Waveform dump method based on TCL script

By adopting the waveform dump method based on TCL script in the chip simulation environment, analyzing the parameters of the simulation command line and generating parsing code, the flexible control of the dump level and hierarchy in the chip simulation environment is realized, and the problem of recompilation of dump level modification in the existing technology is solved, and the simulation efficiency is improved.

CN119538810APending Publication Date: 2025-02-28SHANDONG SINOCHIP SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411708684.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art is difficult to flexibly control the dump level and module level of different modules in a chip simulation environment, resulting in the need to recompile when modifying the dump level, and the system built-in function $fsdbSuppress cannot be effectively used when processing subsystems with multiple modules.

Method used

The waveform dump method based on TCL script is used to define the chip's verification requirements through the simulation command line or makefile. The parameters of the simulation command line are parsed using the TCL script, and parsed code is generated, and the code is called in the UCLI command line mode for waveform dump.

Benefits of technology

It realizes flexible selection of dump waveforms, avoids the recompilation steps when modifying dump levels, and can flexibly match parameter combinations for different verification needs, saves compilation time, and avoids the pain point that dump.list does not support $fsdbSuppress.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119538810A_ABST
    Figure CN119538810A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of chip simulation, in particular to a TCL script-based waveform dump method, which comprises the following steps of: defining a system, a subsystem / submodule of the system, a dump level of the subsystem module and a dump level of the dump level according to a verification requirement of a chip in a simulation command line and / or makefile, and representing the dump level by using parameters; compiling an execution script based on a tool command language, the execution script being used for identifying the parameter representation of the simulation command line to analyze the verification demand of the chip, the execution script converting the verification demand into an analysis code; and adding a parameter for starting a UCLI command line mode in the simulation command line, and calling the analysis code in the UCLI command line mode to perform waveform dump. According to the application, after the verification demand of the chip is given through the simulation command line or the makefile, flexible selection of the dump waveform is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of chip simulation technology, and specifically relates to a waveform dump method based on TCL script. Background Art

[0002] During the development of enterprise-level SSD master control chips, it is necessary to build a chip-level simulation environment to verify chip performance. In order to speed up compilation and simulation, it is necessary to replace the normal code of some modules of the chip with empty boxes to perform path verification between other module levels.

[0003] The user determines the dump level of the system by customizing parameters in the test platform. In the prior art, there are two dump waveform solutions for different test cases. One is to parse the modules one by one in the test platform to confirm whether to dump the module, and the other is to parse the dump waveform in the dump.list file input by the test platform. When modifying the dump level, the first solution needs to recompile the dump level in the test platform, that is, each modification requires recompilation; when dealing with a subsystem with more modules, the second solution cannot use the system built-in function $fsdbSuppress to shield modules that do not need to be dumped, and using dump.list to expand all sub-modules of the subsystem is time-consuming and labor-intensive. Both of the above solutions cannot flexibly control the dump level and module hierarchy of different modules. Summary of the invention

[0004] The present application provides a waveform dump method based on TCL script, which realizes flexible selection of dump waveform after giving the verification requirements of the chip through simulation command line or makefile.

[0005] The technical solution of this application is as follows: A waveform dump method based on TCL script, including the following steps: In the simulation command line and / or makefile, the system, the subsystem / submodule of the system, the dump level of the subsystem module and the dump level of the dump level are defined according to the verification requirements of the chip and expressed with parameters; Compiling an execution script based on a tool command language, wherein the execution script is used to identify parameter representations of a simulation command line to parse verification requirements of a chip, and the execution script converts the verification requirements into parsing codes; A parameter for starting the UCLI command line mode is added to the simulation command line, and the parsing code is called in the UCLI command line mode to perform waveform dump.

[0006] Further, the dump level of the system includes a subsystem / submodule of the system as an empty box and a subsystem / submodule as RTL; The dump level of the subsystem includes dumping each subsystem module; The dump level of the submodule includes the layers of the dump submodule; The dump level of the subsystem module includes dumping each layer of the subsystem module.

[0007] Furthermore, executing the script to parse the chip's verification requirements includes the following steps: Extract the subsystem / submodule that needs to be dumped according to the dump level parameter of the system in the simulation command line; For the subsystem that needs to be dumped, determine whether it is necessary to dump all subsystem modules of the subsystem according to the parameter representation of the dump level of the subsystem in the simulation command line. If so, dump all subsystem modules of the subsystem; if not, traverse all subsystem modules of the subsystem and select the dump level of the module according to the dump level of the subsystem module in the simulation command line. For the submodules that need to be dumped, determine whether the submodule needs to be dumped according to the parameter representation of the dump level of the submodule in the simulation command line. If so, dump the submodule; if not, dump the submodule according to the parameter representation of the dump level of the submodule.

[0008] Furthermore, when executing the script to parse the verification requirements of the chip, when the subsystem is RTL and the ratio of the total waveform file capacity of its subsystem modules when the waveform is dumped and when the waveform is not dumped is greater than 10, use $fsdbSuppress to filter the module in the subsystem that does not need to be dumped.

[0009] Furthermore, a parameter indicating that submodules are not to be dumped is added to the simulation command line. When the script is executed to parse the verification requirements of the chip, if the parameter is detected, $fsdbSuppress is used to filter the submodules that do not need to be dumped.

[0010] Due to the adoption of the above technical solution, the beneficial effects of this application are as follows: 1. This application combines the simulation command line and TCL (Tool Command Language) script, that is, after the chip verification requirements are given through the simulation command line or makefile, the dump waveform can be flexibly selected. When the dump level needs to be modified, it is only necessary to simply modify the target dump object without modifying the verification platform for recompilation.

[0011] 2. This application aims to address the current situation where the chip-level simulation environment contains too many subsystems and modules and the dump level matching is complex. By editing the simulation command line, different parameter combinations passed in the TCL script can be flexibly matched to meet different verification requirements.

[0012] 3. When there is a problem with the waveform, the commonly used dump levels and dump levels do not meet the debugging requirements, and more modules need to be dumped. The technical solution of the present application does not require modification of the verification platform for recompilation. The corresponding waveform level and level can be selected by modifying the simulation command line, saving the time for compiling to reproduce the problem. At the same time, the present application can avoid the pain point that dump.list does not support $fsdbSuppress. The verification personnel do not need to modify the existing code to determine the dump level and level, which helps to shorten the simulation time, improve the verification speed, and accelerate the R&D process. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.

[0014] Figure 1 A flow chart of a waveform dump method based on TCL script provided in this application; Figure 2 Flowchart for parsing chip verification requirements for execution scripts. DETAILED DESCRIPTION

[0015] Based on the background technology, see the attached Figure 1 , the present application provides a waveform dump method based on TCL script, comprising the following steps: defining the dump level of the system, the subsystem / submodule of the system, the dump level of the subsystem module and the dump level of the dump level according to the verification requirements of the chip in the simulation command line and / or makefile and expressing them with parameters; Compiling an execution script based on a tool command language, wherein the execution script is used to identify parameter representations of a simulation command line to parse verification requirements of a chip, and the execution script converts the verification requirements into parsing codes; A parameter for starting the UCLI command line mode is added to the simulation command line, and the parsing code is called in the UCLI command line mode to perform waveform dump.

[0016] The system includes subsystems and submodules, and the subsystem includes subsystem modules. As a well-known technology, dump level and dump layer are two different concepts. The dump level is the full path of the dump system / subsystem / submodule. As an example, the system is represented by chip, and the subsystem A under the system chip is represented by chip.A. Similarly, the module b of subsystem A under the system chip is represented by chip.Ab. The dump level is the number of layers for the dump level. As an example, for subsystem A under the system chip, when the dump level is 0, it means dumping the current level of the subsystem and all levels of all modules under subsystem A; when the dump level is 1, it means dumping the current level of subsystem A, and the modules under subsystem A are not dumped; when the dump level is 2, the current level of subsystem A and 1 layer of all modules under subsystem A are dumped.

[0017] When the dump level and its dump layer are defined according to the verification requirements of the chip, the dump level and its dump layer are used in combination.

[0018] As a preferred trial method of the present application, the dump level of the system includes the subsystem / submodule of the system as an empty box and the subsystem / submodule as RTL; The dump level of the subsystem includes dumping each subsystem module; The dump level of the submodule includes the layers of the dump submodule; The dump level of the subsystem module includes dumping each layer of the subsystem module.

[0019] It should be noted that the present application does not limit the parameter format, and the parameter format can be defined independently according to the naming habits of the operator. As an example, the parameter format and its meaning of the present application are as follows: Embodiment 1: When subsystem A is a blank box or RTL: A_BLANK=A_BLANK / A_RTL; similarly, when subsystems B and C are blank boxes / RLC: B_BLANK=B_BLANK / B_RTL, C_BLANK=C_BLANK / C_RTL.

[0020] Subsystem A is not dumped / part of the subsystem is dumped / dump 1 layer / dump 2 layers / … / dump all, which can be expressed by the parameter: dump_A= dump_no / dump_part / dump_depth_1 / dump_depth_2 / … / dump_all.

[0021] Module a of subsystem A is not dumped / dumped at level 1 / dumped at level 2 / … / dumped all, which is indicated by the parameter: dump_A_a=dump_no / dump_depth_1 / dump_depth_2 / … / dump_all.

[0022] Submodule mmm needs or does not need to be suppressed, which is indicated by suppress_module_mmm=1 / 0. suppress means suppression. When it needs to be suppressed, the submodule will not be dumped.

[0023] Submodule x is not dumped / dump 1 layer / dump 2 layers / … / dump all, which is indicated by dump_x=dump_no / dump_depth_1 / dump_depth_2 / … / dump_all.

[0024] After determining that the dump level and the parameter representation of its dump level are completed, the tool command language is used to compile and execute the script, that is, the TCL script. The compilation method can be implemented according to the prior art, and the TCL script is used to identify the parameter definition and generate the parsing code according to the identification result. The parsing rules are as follows: The TCL script parses the parameter A_BLANK=* in the simulation command line. The extracted * can determine whether the subsystem A is a blank shell or RTL. The parsing rules of subsystems B / C... are the same as those of subsystem A, that is, B_BLANK=*, C_BLANK=*... are used to determine whether the subsystem is a blank shell or RTL. Parse all dump_*=* parameters in the command line (the first * represents the subsystem or the module or submodule in the subsystem, which may be A, A_a, x, etc.; the second * represents the dump selection of the module, which may be dump_no / dump_depth_1 / dump_depth_2 / ... / dump_all. In addition, when the first * is a subsystem such as A / B / C..., the second * may be dump_part). After parsing, all variable names containing dump and their values ​​are saved for subsequent use.

[0025] Embodiment 2: As attached Figure 2 As shown, executing the script to parse the chip verification requirements includes the following steps: Extract the subsystem / submodule that needs to be dumped according to the dump level parameter of the system in the simulation command line; For the subsystem that needs to be dumped, determine whether it is necessary to dump all subsystem modules of the subsystem according to the parameter representation of the dump level of the subsystem in the simulation command line. If so, dump all subsystem modules of the subsystem; if not, traverse all subsystem modules of the subsystem and select the dump level of the module according to the dump level of the subsystem module in the simulation command line. For the submodules that need to be dumped, determine whether the submodule needs to be dumped according to the parameter representation of the dump level of the submodule in the simulation command line. If so, dump the submodule; if not, dump the submodule according to the parameter representation of the dump level of the submodule.

[0026] Embodiment three: When executing the script to parse the verification requirements of the chip, if the subsystem is RTL and the ratio of the total waveform file capacity of its subsystem modules when the waveform is dumped and when the waveform is not dumped is greater than 10, use $fsdbSuppress to filter the module in the subsystem that does not need to be dumped.

[0027] Embodiment 4: Add a parameter in the simulation command line to indicate that the submodules are not dumped. When executing the script to parse the verification requirements of the chip, if this parameter is detected, use $fsdbSuppress to filter the submodules that do not need to be dumped.

[0028] In this embodiment, the submodule parameters are not dumped, that is, whether suppress_module_*=1 is found in the simulation command line. If so, the submodule that needs to be $fsdbSuppressed is extracted.

[0029] After the TCL script generates the parsing code, add the UCLI (Unified Command-lineInterface) command to the simulation command line to call the TCL script. The specific method is to add -ucli–i dump_fsdb_vcs_auto.tcl after simv, where -ucli means starting the UCLI command line mode, and dump_fsdb_vcs_auto.tcl is the TCL script name, which can be defined independently. After input, the simulation command line can parse the dump level and dump level by executing the executable program to perform waveform dump. simv is the executable file generated after the code is compiled, which can be implemented through existing technologies.

[0030] Anything not described in this application can be achieved by adopting or drawing on existing technologies. The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A waveform dump method based on TCL script, characterized in that: The following steps are included: In the simulation command line and / or makefile, the system, the subsystem / submodule of the system, the dump level of the subsystem module and the dump level of the dump level are defined according to the verification requirements of the chip and expressed with parameters; Compiling an execution script based on a tool command language, wherein the execution script is used to identify parameter representations of a simulation command line to parse verification requirements of a chip, and the execution script converts the verification requirements into parsing codes; A parameter for starting the UCLI command line mode is added to the simulation command line, and the parsing code is called in the UCLI command line mode to perform waveform dump.

2. A waveform dump method based on TCL script according to claim 1, characterized in that: The dump level of the system includes the subsystem / submodule of the system as an empty box and the subsystem / submodule as RTL; The dump level of the subsystem includes dumping each subsystem module; The dump level of the submodule includes the layers of the dump submodule; The dump level of the subsystem module includes dumping each layer of the subsystem module.

3. A waveform dump method based on TCL script according to claim 2, characterized in that: Executing the script to parse the chip's verification requirements includes the following steps: Extract the subsystem / submodule that needs to be dumped according to the dump level parameter of the system in the simulation command line; For the subsystem that needs to be dumped, determine whether it is necessary to dump all subsystem modules of the subsystem according to the parameter representation of the dump level of the subsystem in the simulation command line. If so, dump all subsystem modules of the subsystem; if not, traverse all subsystem modules of the subsystem and select the dump level of the module according to the dump level of the subsystem module in the simulation command line. For the submodules that need to be dumped, determine whether the submodule needs to be dumped according to the parameter representation of the dump level of the submodule in the simulation command line. If so, dump the submodule; if not, dump the submodule according to the parameter representation of the dump level of the submodule.

4. A waveform dump method based on TCL script according to claim 3, characterized in that: When executing the script to parse the verification requirements of the chip, if the subsystem is RTL and the ratio of the total waveform file capacity of its subsystem modules when the waveform is dumped and when the waveform is not dumped is greater than 10, use $fsdbSuppress to filter the module in the subsystem that does not need to be dumped.

5. A waveform dump method based on TCL script according to claim 3, characterized in that: Add a parameter in the simulation command line to indicate that the submodules are not dumped. When executing the script to parse the verification requirements of the chip, if this parameter is detected, use $fsdbSuppress to filter the submodules that do not need to be dumped.