Command conversion method and device between EDA tools

By creating a two-dimensional dictionary file to map the commands of the EDA tool, the problem of command differences between different EDA comprehensive tools is solved, automated script conversion is realized, the testing process is simplified and development efficiency is improved, and the problem of developers writing multiple scripts is solved. Pain point.

CN118643774BActive Publication Date: 2024-10-15SHANDONG QIXIN SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411110610.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-10-15
Estimated Expiration
2044-08-14

Smart Images

  • Figure CN118643774B_ABST
    Figure CN118643774B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of computer technology, and more specifically, relates to a method and device for command conversion between EDA tools. The method comprises: reading a file to be converted, wherein the file to be converted records content to be executed; creating a two-dimensional dictionary file, and using the command of the original EDA synthesis tool as the key of the two-dimensional dictionary, and using the command of the target EDA synthesis tool as the value of the two-dimensional dictionary, and adding them one by one to the two-dimensional dictionary file; performing command conversion on the file to be converted based on the two-dimensional dictionary file to generate a target file. The present invention can simplify the complicated test process of EDA tools, optimize the test method, reduce the number of scripts to be written, simplify the test work, and improve work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and more specifically, relates to a command conversion method and device between EDA tools. Background Art

[0002] With the continuous advancement of integrated circuit design and manufacturing technology, electronic design automation (EDA) tools play an increasingly important role in the chip development process. These tools are widely used in circuit design, verification, synthesis, and layout and routing, significantly improving the efficiency and quality of chip development.

[0003] Among EDA tools, synthesis tools are a key class of software that converts high-level design descriptions (such as hardware description languages ​​​​HDL) into netlists at the logic gate level. However, different EDA synthesis tools have significant differences in command formats, function implementations, and optimization strategies, which brings additional workloads to developers.

[0004] In the actual chip development process, it is usually necessary to use multiple EDA synthesis tools to compare the optimization effects, performance, and power consumption of different tools. This requires developers to write scripts for different tools and compare the synthesis results. Since the commands and parameter settings of different tools are different, this process is not only time-consuming and labor-intensive, but also prone to errors due to human factors. Therefore, studying a method that can automatically convert scripts of different EDA synthesis tools is of great significance for improving development efficiency and reducing the probability of errors. The command names and parameter formats of different EDA synthesis tools are often inconsistent. How to accurately map the commands of one tool to the same functional commands of another tool is a key problem in technical implementation.

[0005] Chinese patent document CN112560401A discloses a Verilog file conversion method, device, storage medium and equipment, the method comprising: obtaining an original Verilog file and a configuration file, wherein the configuration file includes information on a target expression method corresponding to a target electronic design automation (EDA) tool; obtaining a target code describing a logic function from the original Verilog file; converting the target code into a file represented in the target expression method to obtain a converted file; generating a first test stimulus file according to the target code; performing simulation tests on the original Verilog file and the converted file according to the first test stimulus file to obtain a first test result; judging whether the functions of the converted file are consistent with those of the original Verilog file according to the first test result, the method can improve the versatility of Verilog files.

[0006] Chinese patent document CN117648086A discloses a script file conversion method and device, which relates to the database field; the method comprises: obtaining a script file to be converted; parsing the script file to be converted to obtain a first syntax tree; converting the first syntax tree to a second syntax tree according to a preset syntax statement mapping relationship between the first script file type (corresponding to the script file to be converted) and the second script file type (corresponding to the target script file); converting the second syntax tree to the target script file. The problem that the existing script file conversion method cannot realize the conversion between the script file of batch processing calculation and the script file of stream processing calculation is solved.

[0007] The above prior art provides a way to convert script files to each other. In actual development, multiple EDA tools are often needed to work together. The automated script conversion method can easily switch between different tools and enhance the interoperability between tools. That is, an automated script conversion method can significantly reduce the time developers spend on writing and debugging scripts, allowing them to focus on higher-level design and optimization work.

[0008] In summary, studying a script conversion method for different EDA synthesis tools not only has important theoretical significance, but also helps to solve the pain points in actual development and promote the further development of EDA technology and chip design process. Summary of the invention

[0009] The present invention aims to overcome at least one defect of the above-mentioned prior art and provide a command conversion method between EDA tools to solve the shortcomings of the prior art in converting scripts of multiple logic synthesis tools.

[0010] The invention also discloses a command conversion device between EDA tools.

[0011] Technical term explanation:

[0012] The file to be converted refers to the script file of the original EDA synthesis tool to be converted;

[0013] The target file refers to the script file of the target EDA synthesis tool after the conversion is completed.

[0014] The detailed technical scheme of the present invention is as follows:

[0015] A command conversion method between EDA tools, the method comprising:

[0016] S1, reading a file to be converted, wherein the file to be converted records content to be executed;

[0017] S2, creating a two-dimensional dictionary file, and using the commands of the original EDA synthesis tool as the keys of the two-dimensional dictionary, and using the commands of the target EDA synthesis tool as the values ​​of the two-dimensional dictionary, and adding them one by one to the two-dimensional dictionary file;

[0018] S3, performing command conversion on the file to be converted based on the two-dimensional dictionary file to generate a target file;

[0019] The command conversion of the file to be converted based on the two-dimensional dictionary file specifically includes:

[0020] S31, determining whether the current command line in the file to be converted is a blank line, if so, skipping the current command line and continuing to determine the next command line, if not, executing S32;

[0021] S32, using the space in the current command line as a delimiter to split it into several character strings, and marking all the split character strings with index numbers in order from the beginning to the end of the line, and determining whether the character string corresponding to the first index number is a command name, if so, converting the current command line according to the two-dimensional dictionary file and executing S33, if not, directly executing S33;

[0022] S33, judging whether there is a nested command in the current command line, if yes, performing command conversion on the current command line by using a nested command conversion method, if no, skipping the current command line, continuing to judge the next command line and repeating S31-S33.

[0023] Preferably, according to the present invention, S2 specifically includes:

[0024] Determine command differences between the source EDA synthesis tool and the target EDA synthesis tool, the command differences including:

[0025] The command names corresponding to the same functional commands are different;

[0026] The name differences of the same function command items of the same function command;

[0027] The function of one command in the original EDA synthesis tool covers the difference between the functions of multiple commands in the target EDA synthesis tool;

[0028] There are differences in commands that exist in the original EDA synthesis tool and do not have corresponding functions in the target EDA synthesis tool;

[0029] When there is a difference that a function of a command in the original EDA synthesis tool covers functions of multiple commands in the target EDA synthesis tool, the command in the original EDA synthesis tool is marked.

[0030] Preferably, according to the present invention, S2 specifically further includes:

[0031] According to the command correspondence between the original EDA synthesis tool and the target EDA synthesis tool, the correspondence between commands and command items is generated to generate a two-dimensional dictionary.

[0032] Preferably, according to the present invention, in S32, the current command line is converted according to the two-dimensional dictionary file, including conversion of commands and command items, wherein the conversion of the command specifically includes:

[0033] According to the original command name to be converted, searching the corresponding target command name in the two-dimensional dictionary file;

[0034] If a matching target command name is found, the original command name is replaced with the target command name;

[0035] If no matching target command name is found, the original command name is retained;

[0036] Converting the command item specifically includes:

[0037] According to the original command item name to be converted, searching the corresponding target command item name in the two-dimensional dictionary file;

[0038] If a matching target command item name is found, the original command item name is replaced with the target command item name;

[0039] If no matching target command item name is found, the original command item name is retained;

[0040] The converted commands and command items are concatenated to generate a converted command line.

[0041] Preferably, according to the present invention, in S32, converting the current command line according to the two-dimensional dictionary file specifically includes:

[0042] When there is a difference that the function of one command in the original EDA synthesis tool covers the functions of multiple commands in the target EDA synthesis tool, a one-to-many or many-to-one conversion process is performed on the corresponding commands according to the tags.

[0043] Preferably, according to the present invention, in S33, if the current command line contains a format of "[command name]", it is determined that there is a nested command.

[0044] Preferably, according to the present invention, S33 further includes:

[0045] Select the generation location of the target file according to the output file naming method;

[0046] If the output file is named as an absolute path, the target file will be generated under the absolute path;

[0047] If the output file name only contains the file name, the target file will be generated in the path where the original file is located;

[0048] The generating of the target file further includes: deleting blank elements, adjusting the format and generating a script file of the target EDA synthesis tool; the adjusting format includes inserting a line break between multiple commands when converting one command into multiple commands.

[0049] In another aspect of the present invention, a command conversion device between EDA tools is provided, the device comprising:

[0050] A file reading module, used for reading a file to be converted, wherein the file to be converted records the content to be executed;

[0051] A dictionary creation module, used to create a two-dimensional dictionary file, and use the commands of the original EDA synthesis tool as the keys of the two-dimensional dictionary, and use the commands of the target EDA synthesis tool as the values ​​of the two-dimensional dictionary, and add them one by one to the two-dimensional dictionary file;

[0052] A command conversion module, used for performing command conversion on the file to be converted based on the two-dimensional dictionary file to generate a target file;

[0053] The command conversion of the file to be converted based on the two-dimensional dictionary file specifically includes:

[0054] S31, determining whether the current command line in the file to be converted is a blank line, if so, skipping the current command line and continuing to determine the next command line, if not, executing S32;

[0055] S32, using the space in the current command line as a delimiter to split it into several character strings, and marking all the split character strings with index numbers in order from the beginning to the end of the line, and determining whether the character string corresponding to the first index number is a command name, if so, converting the current command line according to the two-dimensional dictionary file and executing S33, if not, directly executing S33;

[0056] S33, judging whether there is a nested command in the current command line, if yes, performing command conversion on the current command line by using a nested command conversion method, if no, skipping the current command line, continuing to judge the next command line and repeating S31-S33.

[0057] In another aspect of the present invention, there is also provided an electronic device, comprising:

[0058] At least one processor; and a memory storing instructions, which, when executed by the at least one processor, enable the at least one processor to execute the command conversion method between EDA tools as described above.

[0059] In another aspect of the present invention, a machine-readable storage medium is provided, which stores executable instructions, and when the instructions are executed, the machine executes the command conversion method between EDA tools as described above.

[0060] Compared with the prior art, the present invention has the following beneficial effects:

[0061] The present invention provides a command conversion method between EDA tools, which determines the command with the same function in the corresponding target tool by traversing each command in the file to be converted, and converts it to generate a script file of the target tool with the same function. The present invention can simplify the complicated test process of EDA tools, optimize the test method, reduce the number of scripts to be written, simplify the test work, and improve work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 It is a flow chart of the command conversion method between EDA tools described in the present invention.

[0063] Figure 2 This is a schematic diagram of command conversion between EDA tools in Example 1 of the present invention.

[0064] Figure 3 It is a key-value correspondence diagram of commands between the original EDA synthesis tool and the target EDA synthesis tool in the two-dimensional dictionary file created in Example 1 of the present invention.

[0065] Figure 4 It is a key-value correspondence diagram of command items between the original EDA synthesis tool and the target EDA synthesis tool in the two-dimensional dictionary file created in Example 1 of the present invention. DETAILED DESCRIPTION

[0066] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0067] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0068] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0069] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0070] In view of the deficiencies in the prior art, the present invention provides a method for command conversion between EDA tools. The method traverses each command in the file to be converted to determine the command with the same function in the corresponding target tool, and converts it to generate a script file of the target tool with the same function.

[0071] The command conversion method and device between EDA tools of the present invention are further described below in conjunction with specific embodiments.

[0072] Embodiment 1,

[0073] Ginseng Figure 1 This embodiment provides a command conversion method between EDA tools. For ease of understanding and description, this embodiment uses the Chipsyn tool (a self-developed synthesis tool) as the original EDA synthesis tool and the DC (Design Compile) tool as the target EDA synthesis tool to further illustrate the method.

[0074] The method comprises:

[0075] S1. Read a file to be converted, wherein the file to be converted records content to be executed.

[0076] In this embodiment, the to-be-executed content may refer to the content that the designer needs the synthesis tool to execute.

[0077] Exemplarily, the contents of the file to be converted include:

[0078] clean

[0079] read_ldb -link library_path1

[0080] read_ldb -target library_path2

[0081] read_design -format verilog design.v

[0082] current_design top

[0083] check_design -design -instance -present

[0084] create_clock -period 1 -name CLK clk -generated GCLK

[0085] set_input_delay 0.1 [all_inputs] [get_clks CLK]

[0086] mapping

[0087] write_design -hierarchy -output mapping.v

[0088] The meanings of the command lines in the above files to be converted are as follows:

[0089] Line 1: clean refers to the initialization before the script runs;

[0090] Line 2: read_ldb means reading the standard library, -link means using the read standard library as a link library;

[0091] Line 3: read_ldb means reading the standard library, -target means using the read standard library as the target library;

[0092] Line 4: read_design refers to reading the design file, -format specifies that the syntax of the design file is Verilog syntax, and design.v is the name of the design file;

[0093] Line 5: current_design refers to the top level of the design to be synthesized, and top refers to the top level module name of the design;

[0094] Line 6: check_design means checking whether there are some errors in the read design, -design means checking module errors in the design, -instance means checking instance errors in the design, and -present means performing corresponding checks only under the current design;

[0095] Line 7: create_clock means to create a clock, -period means to specify the period of the created clock, -name means to specify the name of the created clock, CLK means the name of the created clock, clk means the port name of the created clock, -generated means to generate a derived clock based on the created clock, and GCLK means the name of the derived clock;

[0096] Line 8: set_input_delay means setting the delay for the input port, all_input means getting all input ports, get_clks means getting the clock, and CLK means the name of the clock to be obtained;

[0097] Line 9: mapping refers to the synthesis mapping of the design according to the target library;

[0098] Line 10: write_design refers to writing out the synthesized design, -hierarchy refers to writing out the hierarchical structure of the design, -output refers to specifying the path and name of the written design, and mapping.v refers to the name of the written design.

[0099] S2. Create a two-dimensional dictionary file, and use the commands of the original EDA synthesis tool as the keys of the two-dimensional dictionary and the commands of the target EDA synthesis tool as the values ​​of the two-dimensional dictionary, and add them one by one to the two-dimensional dictionary file.

[0100] Specifically, first determine the command differences between the original EDA synthesis tool and the target EDA synthesis tool, including the following differences:

[0101] 1) Differences in command names corresponding to commands with the same function;

[0102] 2) The names of the same function command items are different;

[0103] 3) The function of one command in the original EDA synthesis tool covers the difference between the functions of multiple commands in the target EDA synthesis tool;

[0104] 4) There are differences in the commands that exist in the original EDA synthesis tool and the corresponding commands that do not exist in the target EDA synthesis tool.

[0105] In this embodiment, the original EDA synthesis tool is the Chipsyn tool, and the target EDA synthesis tool is the DC tool. In actual applications, the Chipsyn tool and the DC tool have many commands. In this embodiment, the command line in the file to be converted contains most of the commands and differences between command items as much as possible. Only the corresponding relationship between some commands used in this embodiment is listed here, and the remaining situations can refer to the method of this embodiment.

[0106] That is, the command differences between the Chipsyn tool and the DC tool are as follows:

[0107] 1) The command names corresponding to the same function commands are different: read_ldb in line 1, read_design in line 4, get_clks in line 8;

[0108] 2) The names of the same function command items with different functions are: -design, -instance, and -present in line 6;

[0109] 3) The function of one command in the Chipsyn tool covers the functions of multiple commands in the DC tool. The differences are: created_clock in line 7;

[0110] 4) The differences in commands that exist in the Chipsyn tool but not in the DC tool are: clean in line 1.

[0111] Then, create an empty two-dimensional dictionary file as shown in Table 1:

[0112] Table 1 Empty two-dimensional dictionary structure

[0113]

[0114] Then, the commands of the original EDA synthesis tool are used as the keys of the two-dimensional dictionary, and the commands of the target EDA synthesis tool are used as the values ​​of the two-dimensional dictionary, and are added one by one to the created two-dimensional dictionary file.

[0115] That is, use the Chipsyn tool commands as the keys of the two-dimensional dictionary, and use the DC tool commands as the values ​​of the two-dimensional dictionary, and add them one by one to the two-dimensional dictionary file. Figure 3 and Figure 4 shown.

[0116] according to Figure 2 The command correspondence between the Chipsyn tool and the DC tool shown generates the correspondence between commands (cmd) and their command items (options), and generates a two-dimensional dictionary.

[0117] The corresponding relationship between the command items of some commands used in this embodiment is as shown in Table 2:

[0118] Table 2 Correspondence between some commands

[0119]

[0120] Furthermore, this step also includes: for situation 3) in the command difference between the original EDA synthesis tool and the target EDA synthesis tool, that is, the function of one command in the original EDA synthesis tool covers the difference in the functions of multiple commands in the target EDA synthesis tool, special marking is performed, such as marking with *, so as to perform special processing in the subsequent S3.

[0121] For example, in Table 2, row 3, column 1 is a special mark (i.e., *) for situation 3) in the command difference so that it can be specially processed in the subsequent S3.

[0122] S3. Perform command conversion on the file to be converted based on the two-dimensional dictionary file to generate a target file.

[0123] The command conversion of the file to be converted based on the two-dimensional dictionary file specifically includes:

[0124] S31, determining whether the current command line in the file to be converted is a blank line, if so, skipping the current command line and continuing to determine the next command line; if not, executing S32.

[0125] S32, using the space in the current command line as a delimiter to split it into several character strings, and marking all the split character strings with index numbers in order from the beginning to the end of the line, and determining whether the character string corresponding to the first index number is a command name, if so, converting the current command line according to the two-dimensional dictionary file and executing S33; if not, directly executing S33.

[0126] In this embodiment, the index number may be a digital number starting from 1. If the string corresponding to the first index number (i.e., number 1) is a command name, the current command line is converted according to the constructed two-dimensional dictionary file, that is, the command and its command items of the current command line are converted, and the conversion process is as follows:

[0127] First, according to the command name to be converted, the corresponding target command name is searched in the two-dimensional dictionary file. If a matching target command name is found, it is replaced with the target command name; if no matching target command name is found, the original command name is retained.

[0128] Then, for the conversion of command items, the corresponding target command item name is searched in the two-dimensional dictionary file according to the command item name to be converted. If a matching target command item name is found, it is replaced with the target command item name; if no matching target command item name is found, the original command item name is retained.

[0129] When there is a situation 3) in command difference, the corresponding commands are processed one-to-many or many-to-one according to the special mark.

[0130] Finally, the converted commands and command items are concatenated to generate the converted command line.

[0131] S33, judging whether there is a nested command in the current command line, if so, performing command conversion on the current command line using a nested command conversion method; if not, skipping the current command line, continuing to judge the next command line and repeating S31-S33.

[0132] The determination of whether there is a nested command in the current command line is specifically performed by using a regular expression matching method. If the current command line contains a format of "[command name]", it is determined that there is a nested command.

[0133] The command conversion using the nested command conversion method means: for the nested commands and command items existing in the current command line, according to the rules defined in the two-dimensional dictionary file, the method in S32 is used to perform key-value conversion on the nested commands and command items appearing in the current command line.

[0134] Combined with the script file in the example of S1, it will be transformed into the final form after multiple conversions in S3.

[0135] First, convert the one-to-one and one-to-many commands: clean is a command that does not exist in the target EDA synthesis tool, and is converted to #clean, that is, the conversion is performed by adding comment symbols; read_ldb is converted to set_app_var; -link is converted to link_library; -target is converted to target_library; read_design is converted to read_file; -design is converted to -designs; -instance is converted to -instances; -generated is converted to created_generated_clock -masted_clock CLK -divide_by 2 -source clk CLK1; mapping is converted to compile_ultra; write_design is converted to write_file -format verilog.

[0136] The converted script file is as follows:

[0137] #clean

[0138] set_app_var link_library library_path1

[0139] set_app_var target_library library_path2

[0140] read_file -format verilog design.v

[0141] current_design top

[0142] check_design -designs -instances -presents

[0143] create_clock -period 1 -name CLK clk create_generated_clock -master_clcock CLK -divide_by 2 -source clk CLK1

[0144] set_input_delay [all_inputs] [get_clks CLK]

[0145] compile_ultra

[0146] write_file -format verilog -hierarchy -output mapping.v

[0147] Normal one-to-one corresponding commands and their command items are converted into the same-function commands and their command items of the target EDA synthesis tool; among them, create_clock is a command with a special tag that may be one-to-many, and will be specially processed, that is, the combination of create_clock -generated is converted into two DC commands (create_clock, create_generated_clock) for correspondence.

[0148] In addition, for the nested commands in the above-mentioned file to be converted, a regular matching method is used to screen and extract the nested commands, and the extracted commands are repeated in the previous step S32 to perform command conversion.

[0149] The processed sample script will be converted into the following form:

[0150] #clean

[0151] set_app_var link_library library_path1

[0152] set_app_var target_library library_path2

[0153] read_file -format verilog design.v

[0154] current_design top

[0155] check_design -designs -instances -presents

[0156] create_clock -period 1 -name CLK clk create_generated_clock -master_clcock CLK -divide_by 2 -source clk clk1

[0157] set_input_delay [all_inputs] [get_clocks CLK]

[0158] compile_ultra

[0159] write_file -format verilog -hierarchy -output mapping.v

[0160] The get_clks command is converted to get_clocks.

[0161] Finally, the target file is generated, and the file generation location is selected according to the output file naming method; if the file is named as an absolute path, the target file is generated under the absolute path; if the file naming method only contains the file name, the target file is generated under the path where the original file is located;

[0162] The generating the target file includes: deleting blank elements (blank lines), adjusting the format and generating a script file of the target tool.

[0163] The format adjustment refers to processing the special case of converting one command into multiple commands, that is, inserting a line break between multiple commands.

[0164] After this step, the script file after adjusting the format is as follows:

[0165] #clean

[0166] set_app_var link_library library_path1

[0167] set_app_var target_library library_path2

[0168] read_file -format verilog design.v

[0169] current_design top

[0170] check_design -designs -instances -presents

[0171] create_clock -period 1 -name CLK clk

[0172] create_generated_clock -master_clcock CLK -divide_by 2 -source clkclk1

[0173] set_input_delay [all_inputs] [get_clocks CLK]

[0174] compile_ultra

[0175] write_file -format verilog -hierarchy -output mapping.v

[0176] The blank lines generated by the conversion of a single command are deleted, and line breaks are inserted to adjust the format after a command corresponds to multiple commands. Then, a new script file is generated in the specified path and the converted content is written into the file.

[0177] In summary, the command conversion method between EDA tools of the present invention is suitable for script generation of comparison tools in EDA software testing, and can be used in scenarios where the synthesis results of different synthesis tools for the same design need to be compared during chip development. In the testing process of EDA synthesis tools, it is often necessary to first write the script of the original tool, then write the script of the target tool, and then execute the comparison results, and the testing process is complicated; the present invention can optimize the testing process.

[0178] The present invention can also be used in the chip development process. Different EDA synthesis tools usually have similar functions, but commands with the same functions may have different names in different tools. When a design requires two different tools to be synthesized, due to the differences in commands between the tools, developers are required to write scripts for the two tools separately and then execute them. The method of the present invention can convert the script of one tool into the script of the same function of another tool, thereby improving development efficiency.

[0179] Embodiment 2,

[0180] This embodiment provides a device for implementing a command conversion method between EDA tools, the device comprising:

[0181] A file reading module, used for reading a file to be converted, wherein the file to be converted records the content to be executed;

[0182] A dictionary creation module, used to create a two-dimensional dictionary file, and use the commands of the original EDA synthesis tool as the keys of the two-dimensional dictionary, and use the commands of the target EDA synthesis tool as the values ​​of the two-dimensional dictionary, and add them one by one to the two-dimensional dictionary file;

[0183] A command conversion module, used for performing command conversion on the file to be converted based on the two-dimensional dictionary file to generate a target file;

[0184] The command conversion of the file to be converted based on the two-dimensional dictionary file specifically includes:

[0185] S31, determining whether the current command line in the file to be converted is a blank line, if so, skipping the current command line and continuing to determine the next command line, if not, executing S32;

[0186] S32, using the space in the current command line as a delimiter to split it into several character strings, and marking all the split character strings with index numbers in order from the beginning to the end of the line, and determining whether the character string corresponding to the first index number is a command name, if so, converting the current command line according to the two-dimensional dictionary file and executing S33, if not, directly executing S33;

[0187] S33, judging whether there is a nested command in the current command line, if yes, performing command conversion on the current command line by using a nested command conversion method, if no, skipping the current command line, continuing to judge the next command line and repeating S31-S33.

[0188] Embodiment 3,

[0189] This embodiment also provides an electronic device, including:

[0190] At least one processor; and a memory storing instructions, which, when executed by the at least one processor, enable the at least one processor to execute the command conversion method between EDA tools as described above.

[0191] In this embodiment, the electronic device may include, but is not limited to: personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile computing devices, smart phones, tablet computers, cellular phones, personal digital assistants (PDAs), handheld devices, messaging devices, wearable computing devices, consumer electronic devices, and the like.

[0192] Embodiment 4,

[0193] This embodiment further provides a machine-readable storage medium storing executable instructions, which, when executed, enable the machine to execute the command conversion method between EDA tools as described above.

[0194] Specifically, a system or device equipped with a readable storage medium can be provided, on which software program codes that implement the functions of any of the above-mentioned embodiments are stored, and a computer or processor of the system or device can read and execute instructions stored in the readable storage medium.

[0195] In this case, the program code itself read from the machine-readable medium can realize the function of any one of the above embodiments, and thus the machine-readable code and the machine-readable storage medium storing the machine-readable code constitute part of this specification.

[0196] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD ROM, CD R, CD RW, DVD ROM, DVD RAM, DVD RW, DVD RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or a cloud via a communication network.

[0197] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD ROM, optical storage, etc.) containing computer-usable program code.

[0198] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0199] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0200] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0201] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solution of the present invention, and are not intended to limit the specific implementation methods of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A command conversion method between EDA tools, characterized in that: The method comprises: S1, reading a file to be converted, wherein the file to be converted records content to be executed; S2, creating a two-dimensional dictionary file, and using the commands of the original EDA synthesis tool as the keys of the two-dimensional dictionary, and using the commands of the target EDA synthesis tool as the values ​​of the two-dimensional dictionary, and adding them one by one to the two-dimensional dictionary file; S3, performing command conversion on the file to be converted based on the two-dimensional dictionary file to generate a target file; The command conversion of the file to be converted based on the two-dimensional dictionary file specifically includes: S31, determining whether the current command line in the file to be converted is a blank line, if so, skipping the current command line and continuing to determine the next command line, if not, executing S32; S32, using the space in the current command line as a delimiter to split it into several character strings, and marking all the split character strings with index numbers in order from the beginning to the end of the line, and determining whether the character string corresponding to the first index number is a command name, if so, converting the current command line according to the two-dimensional dictionary file and executing S33, if not, directly executing S33; S33, judging whether there is a nested command in the current command line, if yes, performing command conversion on the current command line by using a nested command conversion method, if no, skipping the current command line, continuing to judge the next command line and repeating S31-S33.

2. The command conversion method between EDA tools according to claim 1, characterized in that: The S2 specifically includes: Determine command differences between the source EDA synthesis tool and the target EDA synthesis tool, the command differences including: The command names corresponding to the same functional commands are different; The name differences of the same function command items of the same function command; The function of one command in the original EDA synthesis tool covers the difference between the functions of multiple commands in the target EDA synthesis tool; There are differences in commands that exist in the original EDA synthesis tool and do not have corresponding functions in the target EDA synthesis tool; When there is a difference that a function of a command in the original EDA synthesis tool covers functions of multiple commands in the target EDA synthesis tool, the command in the original EDA synthesis tool is marked.

3. The command conversion method between EDA tools according to claim 2, characterized in that: The S2 specifically includes: According to the command correspondence between the original EDA synthesis tool and the target EDA synthesis tool, the correspondence between commands and command items is generated to generate a two-dimensional dictionary.

4. The command conversion method between EDA tools according to claim 2, characterized in that: In S32, the current command line is converted according to the two-dimensional dictionary file, including conversion of commands and command items, wherein the command conversion specifically includes: According to the original command name to be converted, searching the corresponding target command name in the two-dimensional dictionary file; If a matching target command name is found, the original command name is replaced with the target command name; If no matching target command name is found, the original command name is retained; Converting the command item specifically includes: According to the original command item name to be converted, searching the corresponding target command item name in the two-dimensional dictionary file; If a matching target command item name is found, the original command item name is replaced with the target command item name; If no matching target command item name is found, the original command item name is retained; The converted commands and command items are concatenated to generate a converted command line.

5. The command conversion method between EDA tools according to claim 4, characterized in that: In the S32, converting the current command line according to the two-dimensional dictionary file specifically includes: When there is a difference that the function of one command in the original EDA synthesis tool covers the functions of multiple commands in the target EDA synthesis tool, a one-to-many or many-to-one conversion process is performed on the corresponding commands according to the tags.

6. The command conversion method between EDA tools according to claim 1, characterized in that: In S33, if the current command line contains the format of "[command name]", it is determined that there is a nested command.

7. The command conversion method between EDA tools according to claim 1, characterized in that: The S33 further includes: Select the generation location of the target file according to the output file naming method; If the output file is named as an absolute path, the target file will be generated under the absolute path; If the output file name only contains the file name, the target file will be generated in the path where the original file is located; The generating of the target file further includes: deleting blank elements, adjusting the format and generating a script file of the target EDA synthesis tool; the adjusting format includes inserting a line break between multiple commands when converting one command into multiple commands.

8. A command conversion device between EDA tools, characterized in that: The device comprises: A file reading module, used for reading a file to be converted, wherein the file to be converted records the content to be executed; A dictionary creation module, used to create a two-dimensional dictionary file, and use the commands of the original EDA synthesis tool as the keys of the two-dimensional dictionary, and use the commands of the target EDA synthesis tool as the values ​​of the two-dimensional dictionary, and add them one by one to the two-dimensional dictionary file; A command conversion module, used for performing command conversion on the file to be converted based on the two-dimensional dictionary file to generate a target file; The command conversion of the file to be converted based on the two-dimensional dictionary file specifically includes: S31, determining whether the current command line in the file to be converted is a blank line, if so, skipping the current command line and continuing to determine the next command line, if not, executing S32; S32, using the space in the current command line as a delimiter to split it into several character strings, and marking all the split character strings with index numbers in order from the beginning to the end of the line, and determining whether the character string corresponding to the first index number is a command name, if so, converting the current command line according to the two-dimensional dictionary file and executing S33, if not, directly executing S33; S33, judging whether there is a nested command in the current command line, if yes, performing command conversion on the current command line by using a nested command conversion method, if no, skipping the current command line, continuing to judge the next command line and repeating S31-S33.

9. An electronic device, characterized in that: The electronic device comprises: At least one processor; and a memory storing instructions, which, when executed by the at least one processor, enable the at least one processor to execute the command conversion method between EDA tools as described in any one of claims 1 to 7.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores executable instructions, and when the instructions are executed, the machine executes the command conversion method between EDA tools according to any one of claims 1 to 7.