Waveform signal file generation method and device, computer equipment and storage medium
Through the automated waveform signal file generation method, the modules and signal names in the chip design code are identified and sorted, which solves the problem of low manual search efficiency and improves the efficiency of chip design and verification.
Patent Information
- Application Number
- CN202411358188.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-31
AI Technical Summary
During the chip design and verification process, the efficiency of artificial search and adding signal names is low, resulting in inefficient chip design and verification.
By automatically obtaining chip design code, identifying module names and sorting them hierarchically according to the instantiated and instantiated relationships, obtaining the waveform signal name of each module in each hierarchy, grouping and sorting, and modifying the text format to adapt to the waveform viewing tool Requirements, fill in the waveform signal file.
It improves the generation efficiency of waveform signal files, reduces manual repetition, improves the efficiency of chip design and verification, and simplifies the signal search and addition process.
Smart Images

Figure CN119227599A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chip design and verification technology, and in particular to a waveform signal file generation method, device, computer equipment and storage medium. Background Art
[0002] In the field of chip design and verification technology, waveform viewing tools play a vital role. Using waveform viewing tools to view the chip signal waveforms obtained by running the chip design code can timely discover and locate problems in chip design and speed up problem solving.
[0003] In the related art, when using waveform viewing tools for chip design and verification, it may be necessary to search for signal names in the chip design code or add new signal names. Since the chip design code involves a large number of signals and instances, and the hierarchical relationship of the signals is relatively complex, the efficiency of searching and adding signal names is low.
[0004] To improve the efficiency of searching and adding, engineers search for the signal names involved in the chip design code and save the signal names in waveform signal files so that they can add and search for signals later through the waveform signal files.
[0005] However, the method of manually searching for signal names in chip design codes and saving the signal names in waveform signal files is inefficient, which in turn leads to low efficiency in chip design and verification. Summary of the invention
[0006] In view of this, the present invention provides a waveform signal file generation method, device, computer equipment and storage medium to solve the problem that the method of manually searching for signal names in chip design codes and saving the signal names in waveform signal files in the related technology is inefficient, which leads to low efficiency in chip design and verification.
[0007] In a first aspect, the present invention provides a method for generating a waveform signal file, the method comprising:
[0008] Get chip design code;
[0009] Identify module names in the chip design code, and hierarchically sort the module names according to the relationship between instantiation and instantiation;
[0010] According to the hierarchical order of the module names, the waveform signal name included in each module in each level is obtained from the chip design code;
[0011] Grouping and sorting the waveform signal names to obtain waveform signal texts;
[0012] Modify the text format of the waveform signal text into the text format of the corresponding waveform viewing tool to obtain the target waveform signal text;
[0013] Fill the target waveform signal text into the waveform signal file.
[0014] The waveform signal file generation method provided in this embodiment automatically obtains the chip design code, identifies the module name in the chip design code, and hierarchically sorts the module names according to the relationship between instantiation and being instantiated, obtains the waveform signal name included in each module in each level from the chip design code according to the hierarchical order of the module name, groups and sorts the waveform signal names, obtains the waveform signal text, modifies the text format of the waveform signal text to the text format of the corresponding waveform viewing tool, obtains the target waveform signal text, and fills the target waveform signal text into the waveform signal file. It avoids manual repetitive work, that is, avoids manually searching for signal names in the chip design code, saves the signal names to the waveform signal file, improves the efficiency of waveform signal file generation, and thus improves the efficiency of chip design and verification.
[0015] In an optional implementation, the identifying module names in the chip design code and hierarchically sorting the module names according to the relationship between instantiation and being instantiated includes:
[0016] In response to the layer depth setting of the waveform signal name to be obtained, obtaining the layer depth information of the waveform signal name to be obtained;
[0017] Based on the hierarchical depth information of the waveform signal name to be obtained, filtering out a target chip design code from the chip design code;
[0018] Identify module names in the target chip design code, and hierarchically sort the module names according to the relationship between instantiation and instantiation;
[0019] The step of obtaining the waveform signal name included in each module in each level from the chip design code according to the hierarchical order of the module names includes:
[0020] According to the hierarchical order of the module names, the waveform signal name included in each module in each level is obtained from the target chip design code.
[0021] The waveform signal file generation method provided in this embodiment obtains the corresponding target chip design code according to the set hierarchical depth of the waveform signal name, so as to reduce the time of obtaining the waveform signal name in the target chip design code, reduce the time of analyzing the target chip design code, and improve the rate of waveform signal file generation.
[0022] In an optional implementation, obtaining the waveform signal name included in each module in each level from the chip design code according to the hierarchical order of the module names includes:
[0023] For any module in any level, using a regular expression, match a code line starting with an input word or an output word from a module code corresponding to the module in the chip design code;
[0024] Get the matched code line starting with the input word or output word;
[0025] Extract the waveform signal name from the matched code line that starts with the input word or the output word.
[0026] The waveform signal file generation method provided in this embodiment uses regular expressions to match code lines starting with input words or output words from the module code corresponding to the module in the chip design code, and then obtains the waveform signal name, thereby ensuring the accuracy of waveform signal name extraction.
[0027] In an optional implementation manner, grouping and sorting the waveform signal names to obtain waveform signal texts includes:
[0028] For any module in any level, obtain the first preset number of characters in the waveform signal name included in the module, and use the first preset number of characters as the prefix of the waveform signal name;
[0029] Obtaining the last preset number of characters in the waveform signal name included in the module, and using the last preset number of characters as a suffix of the waveform signal name;
[0030] For any waveform signal name in the module, determine whether there is a waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module;
[0031] If there is a waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module, the waveform signal name is grouped into the corresponding preset signal dictionary;
[0032] If there is no waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module, then determining whether there is a waveform signal name with the same suffix as the suffix of the waveform signal name in the preset signal dictionary corresponding to the module;
[0033] If there is a waveform signal name with the same suffix as the waveform signal name in the preset signal dictionary corresponding to the module, the waveform signal name is grouped into the corresponding preset signal dictionary;
[0034] If there is no waveform signal name with the same suffix as the waveform signal name in the preset signal dictionary corresponding to the module, a new preset signal dictionary is created, and the waveform signal name is grouped into the new preset signal dictionary;
[0035] After all the waveform signal names included in the module are grouped into corresponding preset signal dictionaries, the waveform signal names in any preset signal dictionary are sorted to obtain waveform signal texts.
[0036] The waveform signal file generation method provided in this embodiment realizes automatic grouping of waveform signal names through prefix and suffix matching rules, thereby improving the generation efficiency of waveform signal texts and further improving the efficiency of chip design and verification.
[0037] In an optional implementation manner, the step of sorting the waveform signal names in any preset signal dictionary to obtain the waveform signal text includes:
[0038] For any preset signal dictionary, obtaining a sorting rule of the preset signal dictionary;
[0039] According to the keyword sorting in the sorting rule, the sorting of the waveform signal names containing the corresponding keywords is set to be consistent with the keyword sorting, so as to complete the sorting of the waveform signal names and obtain the waveform signal text.
[0040] The waveform signal file generation method provided in this embodiment greatly enhances the readability and analysis efficiency of the waveform signal file by sorting the waveform signal names in each group according to the keywords in the sorting rules, thereby improving the efficiency of chip design and verification.
[0041] In an optional embodiment, the method further includes:
[0042] In response to the waveform signal name grouping rule adding operation, acquiring the added waveform signal name grouping rule;
[0043] Based on the added waveform signal name grouping rule, the waveform signal names are regrouped and sorted to obtain waveform signal texts.
[0044] The waveform signal file generation method provided in the present embodiment obtains an added waveform signal name grouping rule in response to a user's waveform signal name grouping rule addition operation when the waveform signal file generated according to the waveform signal name grouping rule does not conform to the user's usage habits, and re-groups and sorts the waveform signal names according to the added waveform signal name grouping rule, thereby improving interactivity and making the waveform signal file more in line with the user's usage habits.
[0045] In an optional embodiment, the method further includes:
[0046] In response to the waveform signal name sorting rule adding operation, acquiring the added waveform signal name sorting rule;
[0047] Based on the added waveform signal name sorting rule, the waveform signal names are re-sorted to obtain waveform signal texts.
[0048] The waveform signal file generation method provided in the present embodiment improves interactivity by obtaining an added waveform signal name sorting rule in response to a waveform signal name sorting rule adding operation when the waveform signal file generated according to the waveform signal name sorting rule does not conform to the user's usage habits, and re-sorting the waveform signal names according to the added waveform signal name sorting rule, thereby making the waveform signal file more in line with the user's usage habits.
[0049] In a second aspect, the present invention provides a waveform signal file generating device, the device comprising:
[0050] A first acquisition module is used to acquire chip design code;
[0051] An identification module, used for identifying module names in the chip design code, and hierarchically sorting the module names according to the relationship between instantiation and instantiation;
[0052] A second acquisition module, used for acquiring the waveform signal name included in each module in each level from the chip design code according to the hierarchical order of the module names;
[0053] A third acquisition module is used to group and sort the waveform signal names to obtain waveform signal texts;
[0054] A fourth acquisition module, used for modifying the text format of the waveform signal text into a text format corresponding to a waveform viewing tool, to obtain a target waveform signal text;
[0055] A filling module is used to fill the target waveform signal text into the waveform signal file.
[0056] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the waveform signal file generation method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0057] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the waveform signal file generation method of the first aspect or any corresponding embodiment thereof.
[0058] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the waveform signal file generation method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0060] Figure 1 is a flow chart of a method for generating a waveform signal file according to an embodiment of the present invention;
[0061] Figure 2 is a flow chart of another method for generating a waveform signal file according to an embodiment of the present invention;
[0062] Figure 3 is a schematic diagram of a preset signal dictionary after completing the grouping and sorting of waveform signal names according to an embodiment of the present invention;
[0063] Figure 4 is a schematic diagram of a waveform signal file according to an embodiment of the present invention;
[0064] Figure 5 is a flow chart of another method for generating a waveform signal file according to an embodiment of the present invention;
[0065] Figure 6 is a structural block diagram of a waveform signal file generating device according to an embodiment of the present invention;
[0066] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0068] In the field of chip design and verification technology, waveform viewing tools play a vital role. It is necessary to use waveform viewing tools to debug chip design codes. Engineers can observe the chip signal waveforms obtained by running chip design codes in real time through waveform viewing tools, which can better understand the behavior and performance of the chip, and then timely discover and locate problems in chip design, such as signal interference, timing violations, etc., analyze the causes of the problems, and speed up the progress of problem solving.
[0069] The waveform viewing tool provides a wide range of functions, such as waveform zooming, waveform searching, waveform marking, etc., which facilitate engineers to conduct detailed analysis and manipulation of chip signal waveforms, and then analyze problems in chip design from different angles and find solutions.
[0070] It should be noted that the waveform viewing tool can also work in conjunction with other electronic design automation (EDA) tools (such as simulators, synthesizers, etc.) to achieve high efficiency in chip design and verification.
[0071] Different waveform viewing tools have their corresponding characteristics. Engineers can choose appropriate waveform viewing tools for chip design and verification according to their own needs and design environment.
[0072] In the related art, when using waveform viewing tools for chip design and verification, it may be necessary to find signal names in the chip design code or add new signal names, which is a very cumbersome and time-consuming process.
[0073] Specifically, finding signal names or adding new signal names becomes tedious and time-consuming due to the following reasons:
[0074] Complex hierarchical structure: In large chip designs, signals may be distributed across multiple hierarchies and modules, and it may take a lot of time to find a specific signal or instance layer by layer.
[0075] Numerous signals: As chip design scale increases, the number of signals involved also increases significantly, making it more difficult to locate specific signals.
[0076] Unclear instance names: Without knowing the specific instance name, finding a specific module instance becomes very time-consuming, especially when the chip design has many levels.
[0077] Lack of automatic optimization: In some cases, waveform viewing tools may not provide sufficient automatic optimization capabilities to simplify the process of finding and adding signals.
[0078] Complex user interface: For new users, the user interface of the waveform viewing tool may take some time to adapt. Different waveform viewing tools have different user interfaces, which may increase the learning cost of finding and adding signals.
[0079] Waveform Data Management: When processing large amounts of waveform data, managing waveform windows and signal selection can become complex, especially when there are dependencies between signals.
[0080] In order to improve the efficiency of searching and adding, engineers search for the signal names involved in the chip design code and save the signal names in the waveform signal file, so that the signals can be added and searched through the waveform signal file later to ensure the smooth progress of chip design and verification. Among them, the waveform signal file is an unencrypted file that can be opened and edited. Except for the syntax that is mandatory for the waveform viewing tool, the rest of the signal names are included in the chip design code.
[0081] However, the method of manually searching for signal names in chip design codes and saving the signal names in waveform signal files is inefficient, which in turn leads to low efficiency in chip design and verification.
[0082] An embodiment of the present invention provides a waveform signal file generation method, which processes the chip design code by utilizing a script, identifies the module names in the chip design code, and hierarchically sorts the module names according to the relationship between instantiation and being instantiated, obtains the waveform signal names included in each module in each hierarchy from the chip design code according to the hierarchical order of the module names, groups and sorts the waveform signal names to obtain waveform signal text, modifies the text format of the waveform signal text to the text format of the corresponding waveform viewing tool, obtains the target waveform signal text, and fills the target waveform signal text into the waveform signal file to automatically generate the waveform signal file, thereby improving the generation efficiency of the waveform signal file, and further improving the efficiency of chip design and verification.
[0083] According to an embodiment of the present invention, an embodiment of a waveform signal file generation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0084] In this embodiment, a waveform signal file generation method is provided, which can be used in a mobile terminal, such as a server, etc. Figure 1 is a flow chart of a method for generating a waveform signal file according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0085] Step S101, obtaining chip design code.
[0086] When the chip needs to be designed and verified, or when the waveform signal name needs to be found and added, obtain the chip design code.
[0087] Step S102 , identifying module names in the chip design code, and hierarchically sorting the module names according to the relationship between instantiation and being instantiated.
[0088] After the chip design code is obtained, a script is used to identify the module names in the chip design code, and the module names are hierarchically sorted according to the relationship between instantiation and being instantiated.
[0089] It can be understood that the level of the instantiated module name is higher than the level of the module name obtained by its instantiation.
[0090] Step S103 , obtaining the waveform signal name included in each module in each level from the chip design code according to the level order of the module names.
[0091] Among them, after the module names are hierarchically sorted, the script is used to obtain the waveform signal name included in each module in each level from the chip design code starting from the top level according to the hierarchical order of the module names.
[0092] The waveform signal name may be an input port signal name or an output port signal name.
[0093] That is, the waveform signal names are grouped according to the hierarchy and the instantiation name of the module, that is, the module name.
[0094] Step S104, grouping and sorting the waveform signal names to obtain waveform signal texts.
[0095] After the waveform signal name included in each module in each level is obtained, the waveform signal name included in each module is grouped and sorted to obtain the waveform signal text.
[0096] Step S105, modifying the text format of the waveform signal text into the text format corresponding to the waveform viewing tool, and obtaining the target waveform signal text.
[0097] After obtaining the waveform signal text, the text format of the waveform signal text is modified to the text format corresponding to the waveform viewing tool to obtain the target waveform signal text, so that the target waveform signal text is compatible with the file format required by the waveform viewing tool.
[0098] Specifically, based on the waveform viewing tool currently in use, the text format of the waveform signal file of the waveform viewing tool currently in use is determined, that is, the file syntax of the waveform signal file of the waveform viewing tool currently in use is determined.
[0099] Based on the file format of the waveform signal file of the waveform viewing tool currently in use, the text format of the waveform signal text is modified to be the same as the file format of the waveform signal file of the waveform viewing tool currently in use, so as to obtain the target waveform signal text.
[0100] Step S106, filling the target waveform signal text into the waveform signal file.
[0101] After obtaining the target waveform signal text, the target waveform signal text is filled into the corresponding position in the waveform signal file in a forward-backward order to generate the waveform signal file.
[0102] After the waveform signal file is generated, the chip signal waveform and waveform signal file obtained by running the chip design code can be opened with a waveform viewing tool for inspection and use.
[0103] The waveform signal file generation method provided in this embodiment automatically obtains the chip design code, identifies the module name in the chip design code, and hierarchically sorts the module names according to the relationship between instantiation and being instantiated, obtains the waveform signal name included in each module in each level from the chip design code according to the hierarchical order of the module name, groups and sorts the waveform signal names, obtains the waveform signal text, modifies the text format of the waveform signal text to the text format of the corresponding waveform viewing tool, obtains the target waveform signal text, and fills the target waveform signal text into the waveform signal file. It avoids manual repetitive work, that is, avoids manually searching for signal names in the chip design code, saves the signal names to the waveform signal file, improves the efficiency of waveform signal file generation, and thus improves the efficiency of chip design and verification.
[0104] In this embodiment, a waveform signal file generation method is provided, which can be used in a mobile terminal, such as a server, etc. Figure 2 is a flow chart of a method for generating a waveform signal file according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0105] Step S201, obtain chip design code. For details, see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0106] Step S202 , identifying module names in the chip design code, and hierarchically sorting the module names according to the relationship between instantiation and being instantiated.
[0107] Specifically, the above step S202 includes:
[0108] Step S2021, in response to the layer depth setting of the waveform signal name to be obtained, obtaining the layer depth information of the waveform signal name to be obtained.
[0109] The module name in the corresponding chip design code can be extracted according to user needs. Specifically, the user specifies the hierarchical depth of the waveform signal name to be obtained and the main code file design_file.list of the chip design, i.e., the chip design code, in the script to obtain the hierarchical structure of the chip design code and the waveform signal name.
[0110] It should be noted that the hierarchical depth of the input waveform signal name is specified as 0 for all levels, 1 for only the top level of chip design, 2 for the top level of design and the level below the top level, and so on.
[0111] Furthermore, in order for the script to extract the waveform signal name quickly enough, the top-level module name can be specified, that is, the level depth of the waveform signal name to be obtained is 1. When the chip design code is large, the provided chip design code should not contain deeper module files, but only the top-level module files, which can reduce the time required for the script to analyze the chip design code.
[0112] Step S2022 , based on the hierarchical depth information of the waveform signal name to be obtained, filter out the target chip design code from the chip design code.
[0113] After the layer depth information of the waveform signal name to be obtained is obtained, the target chip design code that meets the layer depth information of the waveform signal name to be obtained is screened out from the chip design code.
[0114] Step S2023, identifying the module names in the target chip design code, and hierarchically sorting the module names according to the relationship between instantiation and being instantiated.
[0115] After the target chip design code is screened out, the module names in the target chip design code are identified, and the module names in the target chip design code are hierarchically sorted according to the relationship between instantiation and being instantiated.
[0116] Step S203 , obtaining the waveform signal name included in each module in each level from the chip design code according to the level order of the module names.
[0117] Specifically, the above step S203 includes:
[0118] Step S2031 , obtaining the waveform signal name included in each module in each level from the target chip design code according to the level order of the module names.
[0119] After completing the hierarchical sorting of the module names in the target chip design code, the waveform signal name included in each module in each level is obtained from the target chip design code starting from the top level according to the hierarchical order of the module names.
[0120] Step S204: group and sort the waveform signal names to obtain waveform signal text. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0121] Step S205, modify the text format of the waveform signal text to the text format of the corresponding waveform viewing tool to obtain the target waveform signal text. Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.
[0122] Step S206: Fill the target waveform signal text into the waveform signal file. Figure 1 Step S106 of the illustrated embodiment will not be described in detail here.
[0123] The waveform signal file generation method provided in this embodiment obtains the corresponding target chip design code according to the set hierarchical depth of the waveform signal name, so as to reduce the time of obtaining the waveform signal name in the target chip design code, reduce the time of analyzing the target chip design code, and improve the rate of waveform signal file generation.
[0124] In some optional implementations, the above step S203 includes:
[0125] Step a1, for any module in any level, use regular expressions to match the code lines starting with input words or output words from the module code corresponding to the module in the chip design code.
[0126] Among them, the input word is input and the output word is output.
[0127] Step a2, obtaining the matched code line starting with the input word or the output word.
[0128] After matching the code line starting with the input word or the output word, use the search function re.findall function to obtain the matched code line starting with the input word or the output word.
[0129] Taking the module named module_top.sv as an example, the module code corresponding to the module can be as follows:
[0130] #Sample text
[0131] module_top.sv="""
[0132] input data;
[0133] some random words
[0134] output result;
[0135] input value;
[0136] more random text
[0137] output outcome;
[0138] input input_value;
[0139] output output_result;
[0140] """
[0141] The code to obtain the code line starting with the input word or output word in the module code can be as follows:
[0142]
[0143]
[0144] Step a3, extracting the waveform signal name from the matched code line starting with the input word or the output word.
[0145] After the matched code line with the input word or the output word as the first line is obtained, the waveform signal name is extracted from the matched code line with the input word or the output word as the first line.
[0146] The specific implementation code is as follows:
[0147] #Extract words between keywords, where the keywords are input and output
[0148] keywords=extract_words_between_keywords(module_top.sv,"input","output")
[0149] #Print results
[0150] for word in keywords:
[0151] print(word.strip())#Remove the leading and trailing blank characters
[0152] Running this code will produce the following output:
[0153] data
[0154] value
[0155] input_value
[0156] Result
[0157] outcome
[0158] output_result
[0159] The waveform signal file generation method provided in this embodiment uses regular expressions to match code lines starting with input words or output words from the module code corresponding to the module in the chip design code, and then obtains the waveform signal name, thereby ensuring the accuracy of waveform signal name extraction.
[0160] In some optional implementations, the above step S204 includes:
[0161] Step b1, for any module in any level, obtain the first preset number of characters in the waveform signal name included in the module, and use the first preset number of characters as the prefix of the waveform signal name.
[0162] Among them, the waveform signal names included in each module in each level are grouped and sorted according to the hierarchical order. The default grouping rule and default sorting rule of the waveform signal names included in each module in each level are set by the technician. This embodiment is described by taking one of the grouping rules and sorting rules as an example.
[0163] In general, the waveform signal names corresponding to the waveform signals of the same bus protocol type are divided into a group, for example, the waveform signal names corresponding to the waveform signals of the apb bus are one group, and the waveform signal names corresponding to the waveform signals of the axi bus are one group. The waveform signal names corresponding to the waveform signals of different channels of the same bus are divided into different groups. For example, the waveform signal names corresponding to the waveform signals of the write channel and the read channel of the axi bus are divided into different groups, and other custom interface types are sorted by default according to text recognition to obtain waveform signal text.
[0164] It is understandable that, generally, the prefixes or suffixes of the waveform signal names corresponding to the waveform signals of the same channel of the same bus are generally the same. Therefore, the default grouping rule of this embodiment is to group the waveform signal names according to the prefixes or suffixes of the waveform signal names.
[0165] The first preset number of characters is determined by the technicians according to the naming method of the waveform signal name in the chip design code, and no specific limitation is made here.
[0166] Step b2, obtaining the last preset number of characters in the waveform signal name included in the module, and using the last preset number of characters as the suffix of the waveform signal name.
[0167] The last preset number of characters is determined by the technicians according to the naming method of the waveform signal name in the chip design code, and no specific limitation is made here.
[0168] Step b3: for any waveform signal name in the module, determine whether there is a waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module.
[0169] Wherein, for any module, a preset signal dictionary corresponding to the module is set, and initially, the preset signal dictionary is empty.
[0170] Step b4: if there is a waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module, the waveform signal name is grouped into the corresponding preset signal dictionary.
[0171] Among them, there is a waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module, indicating that the waveform signal name belongs to the group of the preset signal dictionary.
[0172] Step b5: If there is no waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module, determine whether there is a waveform signal name with the same suffix as the suffix of the waveform signal name in the preset signal dictionary corresponding to the module.
[0173] Among them, there is no waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module, which means that the corresponding group cannot be matched according to the prefix, and the corresponding group needs to be matched according to the suffix.
[0174] Step b6: If there is a waveform signal name with the same suffix as the suffix of the waveform signal name in the preset signal dictionary corresponding to the module, the waveform signal name is grouped into the corresponding preset signal dictionary.
[0175] Among them, there is no waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module, and there is a waveform signal name with the same suffix as the suffix of the waveform signal name in the preset signal dictionary corresponding to the module, indicating that the corresponding group is matched according to the suffix of the waveform signal name, that is, the corresponding preset signal dictionary is matched, and the waveform signal name is grouped into the preset signal dictionary with the same suffix as the suffix of the waveform signal name.
[0176] Step b7: if there is no waveform signal name with the same suffix as the waveform signal name in the preset signal dictionary corresponding to the module, a new preset signal dictionary is created, and the waveform signal name is grouped into the new preset signal dictionary.
[0177] Among them, there is no waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module, and there is no waveform signal name with the same suffix as the suffix of the waveform signal name in the preset signal dictionary corresponding to the module, which means that the preset signal dictionary corresponding to the module currently does not have a group corresponding to the waveform signal name, so a new preset signal dictionary is created, that is, a new group is created, and the waveform signal name is grouped into the new preset signal dictionary, that is, grouped into the newly created group.
[0178] Step b8, after all the waveform signal names included in the module are grouped into corresponding preset signal dictionaries, the waveform signal names in any preset signal dictionary are sorted to obtain waveform signal texts.
[0179] Among them, all the waveform signal names included in this module are grouped into the corresponding preset signal dictionary, indicating that the waveform signal name grouping of this module is completed. At this time, the waveform signal names in any preset signal dictionary are sorted to obtain the waveform signal text.
[0180] Taking the waveform signal names included in the module as an example, which are separated by spaces and each waveform signal name includes at least three characters, the code for grouping the waveform signal names included in the module is as follows:
[0181]
[0182]
[0183] First, the text is split into a list of waveform signal names, and then for each waveform signal name, its corresponding prefix and suffix are extracted, and an attempt is made to find whether the same prefix or suffix exists in the dictionary, that is, the preset signal dictionary corresponding to the module. If so, the waveform signal name is added to the group with the same prefix or suffix, and finally, all the groups are printed out.
[0184] It should be noted that the regular expression used to match the code lines starting with input words or output words in the module code corresponding to the module in the chip design code and the code logic for grouping the waveform signal names included in any module can be changed according to the naming rules of the signal names or the actual needs of the user. The above code is only for illustrative purposes.
[0185] The waveform signal file generation method provided in this embodiment realizes automatic grouping of waveform signal names through prefix and suffix matching rules, thereby improving the generation efficiency of waveform signal texts and further improving the efficiency of chip design and verification.
[0186] In some optional implementations, the above step b8 includes:
[0187] b81, for any preset signal dictionary, obtain a sorting rule of the preset signal dictionary.
[0188] It is understandable that a preset signal dictionary is a grouping of waveform signal names, and the sorting rules of the preset signal dictionary are formulated by technical personnel and are not specifically limited here.
[0189] b82, according to the keyword sorting in the sorting rule, the sorting of the waveform signal names containing the corresponding keywords is set to be consistent with the keyword sorting, so as to complete the sorting of the waveform signal names and obtain the waveform signal text.
[0190] Among them, the sorting rules include multiple keywords sorted in sequence, and the sorting of the waveform signal names containing the corresponding keywords is set to be consistent with the sorting of the keywords in the sorting rules to complete the sorting of the waveform signal names and obtain the waveform signal text.
[0191] It should be noted that, if there are multiple waveform signal names containing the same keyword, the waveform signal names containing the same keyword are sorted according to the order in which the waveform signal names are obtained.
[0192] Exemplarily, the code for sorting the waveform signal names according to the sorting rule may be as follows:
[0193]
[0194]
[0195] The waveform signal file generation method provided in this embodiment greatly enhances the readability and analysis efficiency of the waveform signal file by sorting the waveform signal names in each group according to the keywords in the sorting rules, thereby improving the efficiency of chip design and verification.
[0196] In some optional implementations, the waveform signal file generation method further includes:
[0197] Step c1, in response to the waveform signal name grouping rule adding operation, obtaining the added waveform signal name grouping rule.
[0198] Among them, if the waveform signal file generated by the grouping rules of the above steps b1-step b7 does not meet the user's expected usage habits, the user can add new waveform signal name grouping rules and serial numbers corresponding to the waveform signal name grouping rules to the script, and regroup multiple unsatisfactory waveform signal name groupings at a certain level.
[0199] It is understandable that the user can also modify the original grouping rule to obtain a grouping rule that meets the user's usage habits.
[0200] That is to say, in response to the waveform signal name grouping rule modification operation, the modified waveform signal name grouping rule can be obtained, and the waveform signal names can be regrouped and sorted based on the modified waveform signal name grouping rule to obtain the waveform signal text.
[0201] For common bus protocol signals, engineers' signal grouping habits are relatively similar. For some non-common bus names, i.e. bus protocol signals, engineers need to propose their own signal grouping habits and modify the original grouping rules, i.e. the grouping rules of the above steps b1-b7.
[0202] Step c2: based on the added waveform signal name grouping rule, regroup and sort the waveform signal names to obtain waveform signal texts.
[0203] After adding or modifying the waveform signal name grouping rule to the script, the script is re-enabled, and the waveform signal names are re-grouped and sorted using the script to obtain the waveform signal text.
[0204] It should be noted that the added waveform signal name grouping rule may be to specify one or more unsatisfactory modules in the waveform signal text, and regroup and sort the waveform signal names contained in the one or more unsatisfactory modules.
[0205] For example, Figure 3 FIG. 1 is a schematic diagram of a preset signal dictionary after completing the grouping and sorting of waveform signal names according to an embodiment of the present invention. Figure 3 The preset signal dictionary on the left shows a preset signal dictionary, i.e., a group, obtained by grouping and sorting the waveform signal names included in a module using the grouping rules and sorting rules of the above steps b1-b8. Among them, the instantiation module name, i.e., the module name corresponding to the preset signal dictionary, is instance_module1, and the group name of the group is Group "s0".
[0206] In accordance with Figure 3 If the waveform signal file generated by the preset signal dictionary on the left does not conform to the user's usage habits, the user can modify the waveform signal name grouping rules in the script, and regroup, name and sort the waveform signal names included in the module according to the modified waveform signal name grouping rules, that is, Figure 3 The preset signal dictionary on the left is modified as follows Figure 3 Dictionary of preset signals in the middle section.
[0207] The waveform signal file generation method provided in the present embodiment obtains an added waveform signal name grouping rule in response to a user's waveform signal name grouping rule addition operation when the waveform signal file generated according to the waveform signal name grouping rule does not conform to the user's usage habits, and re-groups and sorts the waveform signal names according to the added waveform signal name grouping rule, thereby improving interactivity and making the waveform signal file more in line with the user's usage habits.
[0208] In some optional implementations, the waveform signal file generation method further includes:
[0209] Step d1, in response to the waveform signal name sorting rule adding operation, obtaining the added waveform signal name sorting rule.
[0210] Among them, if the waveform signal file generated using the sorting rules of the above steps b81-b82 does not meet the user's expected usage habits, the user can add new waveform signal name sorting rules and serial numbers corresponding to the waveform signal name sorting rules to the script, and reorder multiple unsatisfactory waveform signal name groups at a certain level.
[0211] It is understandable that the user can also modify the original sorting rule to obtain a sorting rule that meets the user's usage habits.
[0212] That is to say, in response to the waveform signal name sorting rule modification operation, the modified waveform signal name sorting rule can be obtained, and the waveform signal names can be re-sorted based on the modified waveform signal name sorting rule to obtain the waveform signal text.
[0213] Step d2, based on the added waveform signal name sorting rule, re-sort the waveform signal names to obtain waveform signal texts.
[0214] Among them, after adding or modifying the waveform signal name sorting rules to the script, re-enable the script. In the script, specify the re-ordered module name, waveform signal name group name and the serial number corresponding to the waveform signal name sorting rules. Then, use the script to re-sort the waveform signal names to obtain the waveform signal text.
[0215] It should be noted that the added waveform signal name sorting rule may be to specify one or more unsatisfactory modules in the waveform signal text, and re-sort the waveform signal names contained in the one or more unsatisfactory modules.
[0216] Further, after obtaining the waveform signal text, in response to the user's waveform signal name input operation, the waveform signal name to be added is obtained, and the waveform signal name to be added is added to each preset signal dictionary to obtain the updated waveform signal text. The waveform signal name to be added is ranked first in each preset signal dictionary.
[0217] Among them, the waveform signal names to be added can be clock signal names and reset signal names. Since the clock signal name and reset signal name are the names corresponding to key signals in chip design and verification, the clock signal name and reset signal name need to be added to each preset signal dictionary.
[0218] In accordance with Figure 3 If the waveform signal file generated by the preset signal dictionary in the middle part does not conform to the user's usage habits, the user can modify the waveform signal name sorting rule in the script, group and sort the waveform signal names according to the modified waveform signal name sorting rule, and add clock signals and reset signals to each group to obtain the following: Figure 3 Dictionary of preset signals on the right.
[0219] like Figure 3 As shown in the preset signal dictionary on the right, Figure 3 The preset signal dictionary in the middle part adds clock and reset signals and sorts the signals, which is essentially implemented based on the waveform signal name sorting rules and the user's waveform signal name input operation.
[0220] Figure 4 is a schematic diagram of a waveform signal file according to an embodiment of the present invention. Figure 3 After you click the preset signal dictionary on the right, you can modify the text format of the waveform signal text corresponding to the preset signal dictionary to the text format of the corresponding waveform viewing tool, obtain the target waveform signal text, and fill the target waveform signal text into the waveform signal file to obtain the following: Figure 4 The waveform signal file shown.
[0221] The waveform signal file generation method provided in the present embodiment improves interactivity by obtaining an added waveform signal name sorting rule in response to a waveform signal name sorting rule adding operation when the waveform signal file generated according to the waveform signal name sorting rule does not conform to the user's usage habits, and re-sorting the waveform signal names according to the added waveform signal name sorting rule, thereby making the waveform signal file more in line with the user's usage habits.
[0222] In some optional implementations, after all waveform signal names included in the module are grouped into corresponding preset signal dictionaries, the waveform signal names in any preset signal dictionary are sorted to obtain waveform signal texts, including:
[0223] After all the waveform signal names included in the module are grouped into corresponding preset signal dictionaries, for any preset signal dictionary, the waveform signal names in the preset signal dictionary are sorted based on the order in which the waveform signal names are obtained.
[0224] Among them, the earlier the waveform signal name is obtained, the higher it is ranked.
[0225] After finishing sorting the waveform signal names in any preset signal dictionary, the preset signal dictionary corresponding to the module is obtained, and the preset signal dictionary corresponding to the module is sorted in the order of creation to obtain the waveform signal text. The earlier the preset signal dictionary is created, the higher the sorting.
[0226] The waveform signal file generation method provided in this embodiment obtains waveform signal text by sorting the waveform signal names in any preset signal dictionary according to the acquisition order, and sorting the preset signal dictionary corresponding to any module according to the creation order, and then generates a waveform signal file according to the waveform signal text, thereby improving the readability of the waveform signal file and thus improving the efficiency of chip design and verification.
[0227] In this embodiment, a method for generating a waveform signal file is also provided. Figure 5 is a flow chart of a method for generating a waveform signal file according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:
[0228] The first step is to obtain the chip hierarchy and name. The relevant descriptions of the above steps S201 and S202 are not repeated here.
[0229] The second step is to obtain the text of the signal name at the corresponding level. The relevant description of the above step S203 is omitted here.
[0230] The third step is to group the signals and sort the signals in order. The relevant description of the above step S204 will not be repeated here.
[0231] The fourth step is to determine whether the signal grouping result meets the requirements. If the signal grouping result meets the requirements, then determine whether the signal sorting result meets the requirements.
[0232] If the signal grouping result does not meet the requirements, add signal grouping rules to the script and regroup multiple signal groups that do not meet the requirements at a certain level.
[0233] The relevant descriptions corresponding to the above steps c1 and c2 are not repeated here.
[0234] In the fifth step, if the signal sorting result meets the requirements, the waveform signal text is made compatible with the syntax and file format supported by the waveform viewing tool signal file, and a waveform signal file is generated.
[0235] The relevant description corresponding to the aforementioned step S206 is not repeated here.
[0236] Step 6. If the signal sorting result does not meet the requirements, add signal sorting rules to the script and re-sort the signals in a certain group that do not meet the requirements.
[0237] The relevant descriptions corresponding to the above steps d1 and d2 are not repeated here.
[0238] The waveform signal file generation method provided in this embodiment can use a script to process the chip design code, obtain the waveform signal name therein, layer, classify and sort the waveform signal name according to the rules, obtain the waveform signal file, and use the waveform viewing tool to directly load the waveform signal file. The efficiency of waveform signal file generation is improved, manual repetitive work is avoided, and users can focus on more complex and creative tasks instead of wasting time on repetitive and mechanical work. And the script can be easily modified to adapt to changing needs, with rapid response and high flexibility.
[0239] In the present embodiment, a waveform signal file generating device is also provided, and the device is used to implement the above-mentioned embodiment and preferred implementation mode, and the description has been made no further. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0240] This embodiment provides a waveform signal file generating device, such as Figure 6 As shown, including:
[0241] The first acquisition module 601 is used to acquire chip design code.
[0242] The identification module 602 is used to identify module names in the chip design code and hierarchically sort the module names according to the relationship between instantiation and being instantiated.
[0243] The second acquisition module 603 is used to acquire the waveform signal name included in each module in each level from the chip design code according to the level order of the module names.
[0244] The third acquisition module 604 is used to group and sort the waveform signal names to obtain waveform signal texts.
[0245] The fourth acquisition module 605 is used to modify the text format of the waveform signal text into the text format corresponding to the waveform viewing tool to obtain the target waveform signal text.
[0246] The filling module 606 is used to fill the target waveform signal text into the waveform signal file.
[0247] In some optional implementations, the identification module 602 includes:
[0248] The first acquisition unit is used to obtain the layer depth information of the waveform signal name to be acquired in response to the layer depth setting of the waveform signal name to be acquired.
[0249] The first screening unit is used to screen out a target chip design code from the chip design code based on the hierarchical depth information of the waveform signal name to be obtained.
[0250] The first identification unit is used to identify the module names in the target chip design code and hierarchically sort the module names according to the relationship between instantiation and being instantiated.
[0251] The second acquisition module 603 includes:
[0252] The second acquisition unit is used to acquire the waveform signal name included in each module in each level from the target chip design code according to the level order of the module names.
[0253] In some optional implementations, the second acquisition module 603 includes:
[0254] The first matching unit is used to match a code line starting with an input word or an output word from a module code corresponding to the module in the chip design code, for any module in any level, using a regular expression.
[0255] The third acquisition unit is used to acquire the matched code line starting with the input word or the output word.
[0256] The first extraction unit is used to extract the waveform signal name from the matched code line with the input word or the output word as the first line.
[0257] In some optional implementations, the third acquisition module 604 includes:
[0258] The fourth acquisition unit is used to acquire, for any module in any level, the first preset number of characters in the waveform signal name included in the module, and use the first preset number of characters as the prefix of the waveform signal name.
[0259] The fifth acquisition unit is used to acquire the last preset number of characters in the waveform signal name included in the module, and use the last preset number of characters as the suffix of the waveform signal name.
[0260] The first judgment unit is used to judge, for any waveform signal name in the module, whether there is a waveform signal name with a prefix identical to the prefix of the waveform signal name in the preset signal dictionary corresponding to the module.
[0261] The first grouping unit is configured to group the waveform signal name into the corresponding preset signal dictionary if a waveform signal name having a prefix identical to the prefix of the waveform signal name exists in the preset signal dictionary corresponding to the module.
[0262] The second judgment unit is used to judge whether there is a waveform signal name with the same suffix as the suffix of the waveform signal name in the preset signal dictionary corresponding to the module if there is no waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module.
[0263] The second grouping unit is used to group the waveform signal name into the corresponding preset signal dictionary if there is a waveform signal name with the same suffix as the suffix of the waveform signal name in the preset signal dictionary corresponding to the module.
[0264] The third grouping unit is used to create a new preset signal dictionary and group the waveform signal name into the new preset signal dictionary if there is no waveform signal name with the same suffix as the waveform signal name in the preset signal dictionary corresponding to the module.
[0265] The sixth acquisition unit is used to sort the waveform signal names in any preset signal dictionary to obtain the waveform signal text after all the waveform signal names included in the module are grouped into corresponding preset signal dictionaries.
[0266] In some optional implementations, the sixth acquisition unit includes:
[0267] The seventh acquisition unit is used to acquire a sorting rule of any preset signal dictionary.
[0268] The first setting unit is used to sort the waveform signal names containing the corresponding keywords according to the keyword sorting rules, so as to set the sorting of the waveform signal names to be consistent with the keyword sorting, so as to complete the sorting of the waveform signal names and obtain the waveform signal text.
[0269] In some optional implementations, the waveform signal file generating device includes:
[0270] The eighth acquisition unit is used to acquire the added waveform signal name grouping rule in response to the waveform signal name grouping rule adding operation.
[0271] The ninth acquisition unit is used to regroup and sort the waveform signal names based on the added waveform signal name grouping rule to obtain the waveform signal text.
[0272] In some optional implementations, the waveform signal file generating device includes:
[0273] The tenth obtaining unit is used to obtain the added waveform signal name sorting rule in response to the waveform signal name sorting rule adding operation.
[0274] The eleventh obtaining unit is used to re-sort the waveform signal names based on the added waveform signal name sorting rule to obtain the waveform signal texts.
[0275] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0276] The waveform signal file generating device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0277] The embodiment of the present invention also provides a computer device having the above Figure 6 The waveform signal file generating device shown.
[0278] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7As shown, the computer device includes: one or more processors 701, memory 702, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component utilizes different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as required. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 701 is taken as an example.
[0279] The processor 701 may be a central processing unit, a network processor or a combination thereof. The processor 701 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.
[0280] The memory 702 stores instructions executable by at least one processor 701, so that the at least one processor 701 executes the method shown in the above embodiment.
[0281] The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 702 may optionally include a memory remotely arranged relative to the processor 701, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0282] The memory 702 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 702 may also include a combination of the above types of memory.
[0283] The computer device also includes a communication interface 703, which is used for the computer device to communicate with other devices or a communication network.
[0284] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0285] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0286] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for generating a waveform signal file, characterized in that: The method comprises: Get chip design code; Identify module names in the chip design code, and hierarchically sort the module names according to the relationship between instantiation and instantiation; According to the hierarchical order of the module names, the waveform signal name included in each module in each level is obtained from the chip design code; Grouping and sorting the waveform signal names to obtain waveform signal texts; Modify the text format of the waveform signal text into the text format of the corresponding waveform viewing tool to obtain the target waveform signal text; Fill the target waveform signal text into the waveform signal file.
2. The method according to claim 1, characterized in that The identifying module names in the chip design code and hierarchically sorting the module names according to the relationship between instantiation and being instantiated includes: In response to the layer depth setting of the waveform signal name to be obtained, obtaining the layer depth information of the waveform signal name to be obtained; Based on the hierarchical depth information of the waveform signal name to be obtained, filtering out a target chip design code from the chip design code; Identify module names in the target chip design code, and hierarchically sort the module names according to the relationship between instantiation and instantiation; The step of obtaining the waveform signal name included in each module in each level from the chip design code according to the hierarchical order of the module names includes: According to the hierarchical order of the module names, the waveform signal name included in each module in each level is obtained from the target chip design code.
3. The method according to claim 1, characterized in that The step of obtaining the waveform signal name included in each module in each level from the chip design code according to the hierarchical order of the module names includes: For any module in any level, using a regular expression, match a code line starting with an input word or an output word from a module code corresponding to the module in the chip design code; Get the matched code line starting with the input word or output word; Extract the waveform signal name from the matched code line that starts with the input word or the output word.
4. The method according to claim 1, characterized in that The grouping and sorting of the waveform signal names to obtain waveform signal texts includes: For any module in any level, obtain the first preset number of characters in the waveform signal name included in the module, and use the first preset number of characters as the prefix of the waveform signal name; Obtaining the last preset number of characters in the waveform signal name included in the module, and using the last preset number of characters as a suffix of the waveform signal name; For any waveform signal name in the module, determine whether there is a waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module; If there is a waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module, the waveform signal name is grouped into the corresponding preset signal dictionary; If there is no waveform signal name with the same prefix as the prefix of the waveform signal name in the preset signal dictionary corresponding to the module, then determining whether there is a waveform signal name with the same suffix as the suffix of the waveform signal name in the preset signal dictionary corresponding to the module; If there is a waveform signal name with the same suffix as the waveform signal name in the preset signal dictionary corresponding to the module, the waveform signal name is grouped into the corresponding preset signal dictionary; If there is no waveform signal name with the same suffix as the waveform signal name in the preset signal dictionary corresponding to the module, a new preset signal dictionary is created, and the waveform signal name is grouped into the new preset signal dictionary; After all the waveform signal names included in the module are grouped into corresponding preset signal dictionaries, the waveform signal names in any preset signal dictionary are sorted to obtain waveform signal texts.
5. The method according to claim 4, characterized in that The step of sorting the waveform signal names in any preset signal dictionary to obtain the waveform signal text includes: For any preset signal dictionary, obtaining a sorting rule of the preset signal dictionary; According to the keyword sorting in the sorting rule, the sorting of the waveform signal names containing the corresponding keywords is set to be consistent with the keyword sorting, so as to complete the sorting of the waveform signal names and obtain the waveform signal text.
6. The method according to claim 1, characterized in that The method further comprises: In response to the waveform signal name grouping rule adding operation, acquiring the added waveform signal name grouping rule; Based on the added waveform signal name grouping rule, the waveform signal names are regrouped and sorted to obtain waveform signal texts.
7. The method according to claim 1, characterized in that The method further comprises: In response to the waveform signal name sorting rule adding operation, acquiring the added waveform signal name sorting rule; Based on the added waveform signal name sorting rule, the waveform signal names are re-sorted to obtain waveform signal texts.
8. A waveform signal file generating device, characterized in that: The device comprises: A first acquisition module is used to acquire chip design code; An identification module, used for identifying module names in the chip design code, and hierarchically sorting the module names according to the relationship between instantiation and instantiation; A second acquisition module, used for acquiring the waveform signal name included in each module in each level from the chip design code according to the hierarchical order of the module names; A third acquisition module is used to group and sort the waveform signal names to obtain waveform signal texts; A fourth acquisition module, used for modifying the text format of the waveform signal text into a text format corresponding to a waveform viewing tool, to obtain a target waveform signal text; A filling module is used to fill the target waveform signal text into the waveform signal file.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the waveform signal file generation method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the waveform signal file generation method according to any one of claims 1 to 7.
Citation Information
Cited By
Positioning method and device for signal in circuit design file, equipment and medium
CN119720879A
Signal positioning method, device and equipment in circuit design file and medium
CN119720879B
Waveform comparison method, electronic equipment and storage medium
CN121508502A