Batch modification method for unit port direction attributes in integrated circuit design
By obtaining the cell target list in the integrated circuit design and using script files to read and modify the cell port direction attributes one by one, the problem of cumbersome modification of the cell port direction attributes in the integrated circuit design is solved, and efficient and reliable batch modification is achieved.
Patent Information
- Application Number
- CN202411325127.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-12-27
AI Technical Summary
In integrated circuit design, the modification of unit port direction attributes needs to be clicked one by one, which makes the process cumbersome and time-consuming, especially when thousands of unit ports need to be modified, and different units are distributed in different circuit libraries, modified one by one It will cause immutability problems.
A batch modification method is provided. By obtaining the unit target list of target integrated circuit design projects, using script files in integrated circuit design software to read and modify the direction properties of unit ports one by one, so as to achieve simultaneous modification of multiple unit ports.
It improves the efficiency and reliability of unit port orientation attribute modification, reduces the time and human errors of the modification process, and ensures the accuracy and consistency of batch modifications.
Smart Images

Figure CN119203865A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a batch modification method, in particular to a batch modification method for unit port direction attributes in integrated circuit design. Background Art
[0002] In integrated circuit design, there are usually tens of thousands of cells in a design project, and the required circuit design can be obtained by configuring the connections between the cells. It is well known to those skilled in the art that for each cell, including a number of cell ports (pins), the direction attribute of the cell port generally needs to be configured according to the functional requirements of each cell. The direction attribute of the cell port can generally be an inout attribute, an in attribute, or an out attribute. It can be understood that when the direction of the cell port is an inout attribute, the cell port can have input / output capabilities; when the direction of the cell port is an in attribute, the cell port only has the ability to input; when the direction of the cell port is an out attribute, the cell port only has the ability to output.
[0003] From the above description, it can be seen that since the direction attribute of the unit port can be selected according to the functional requirements, that is, during the circuit design process, the direction attribute of the unit port can be modified. At present, for the direction attribute of a unit port, the corresponding direction attribute can be modified by clicking. However, if there are thousands of unit ports whose direction attributes need to be modified, the modification by clicking is bound to be cumbersome and time-consuming.
[0004] In addition, different units are generally distributed in different circuit libraries. Even if the modification method is adopted one by one, it will bring great instability to the modification of unit ports. Summary of the invention
[0005] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a method for batch modification of unit port direction attributes in integrated circuit design, which can effectively realize batch modification of unit port direction attributes and improve the efficiency and reliability of unit port direction attribute modification.
[0006] According to the technical solution provided by the present invention, a method for batch modification of unit port direction attributes in integrated circuit design includes:
[0007] Providing a target integrated circuit design project, and obtaining a first-category unit target list corresponding to the target integrated circuit design project, wherein the first-category unit target list includes a plurality of first-category unit information arranged in sequence, and for any first-category unit information, includes a unit name and a port name of at least one unit port, the unit port is a port included in the first-category unit, and the direction attribute of the unit port is a first-category direction;
[0008] Performing a directional attribute modification process on the first-category unit target list obtained above, wherein when performing the directional attribute modification process, reading the first-category unit information in the first-category unit target list one by one until all the first-category unit information in the first-category unit target list is read;
[0009] For each read first-type unit information, at least direction attribute adjustment processing is performed to modify the direction attribute of the unit port in the current first-type unit information from the first-type direction to the preset second-type direction after the direction attribute adjustment processing.
[0010] When getting the first type unit target list, include:
[0011] Importing the target integrated circuit design project into the matching integrated circuit design software, and configuring a list acquisition program script file adapted to the integrated circuit design software;
[0012] The list acquisition program script file is run in the working environment of the integrated circuit design software to obtain the first type unit target list, wherein:
[0013] In the first-category unit target list, for each first-category unit information, the unit name and the port name are stored in adjacent list rows, respectively, and the unit name is located above the port name.
[0014] Based on the list acquisition program script file, when obtaining the first type of unit target list, it includes:
[0015] In a list acquisition program script file, a unit list acquisition function adapted to the integrated circuit software is configured, and a target circuit library is selected in a target integrated circuit design project;
[0016] When the unit list acquisition function is run, the unit names of all units in the target circuit library are acquired, and the acquired unit names are stored in a unit name text file;
[0017] For the unit name text file obtained above, the unit names in the unit name text are read one by one, and the direction attribute of the unit port corresponding to the unit name is determined, wherein if the direction attribute of the current unit port is the first type of direction, the unit name of the current unit and the port name of the unit port are added to the first type of unit pre-list;
[0018] When all unit names are read and the direction attributes of the corresponding unit ports are determined, the corresponding generated first-type unit pre-list is configured as the first-type unit target list.
[0019] When judging the direction attribute of a unit port, it includes:
[0020] For the unit corresponding to the current unit name, if the schematic diagram of the unit exists, the schematic diagram unit view of the current unit is opened in read-only mode, and the address of the unit is written into the unit name text file, and the address of the unit is stored in association with the unit name of the unit;
[0021] Based on the address of the current unit in the unit name text file, determine the port name of the corresponding unit port of the current unit and the direction attribute of the unit port, wherein,
[0022] When the direction attribute of the unit port is a first-type direction, the unit name and the port name of the current unit are added to the first-type unit pre-list.
[0023] When performing direction attribute modification processing, it includes:
[0024] Configuring a port direction modification program script file adapted to the integrated circuit design software;
[0025] Running the port direction modification program script file in the working environment of the integrated circuit design software to read the first-category unit information in the first-category unit target list one by one;
[0026] For each first-type unit information, the unit name and port name in the first-type unit information are read in sequence, wherein:
[0027] After reading the unit name, performing a direction attribute pre-allocation process based on the unit name, and reading the port name after the direction attribute pre-allocation process;
[0028] Direction attribute adjustment processing is performed based on the read port name to modify the direction attribute of the unit port from the first type of direction to the second type of direction, wherein when the direction attribute adjustment processing is performed, for the unit port of the current unit, at least the direction attribute of the schematic class unit view of the unit port is modified to the second type of direction.
[0029] When performing directional attribute pre-allocation processing on the read unit name, it includes:
[0030] The read unit name is subjected to pattern matching processing to generate a pattern matching unit name after the pattern matching processing, wherein:
[0031] When pattern matching is performed on the unit name, it at least includes unnecessary format removal and unit name mark addition, where:
[0032] When performing unnecessary format removal processing, unnecessary formats in the unit name are removed;
[0033] After executing the unit name mark adding process, at least a unit name start mark and a unit name end mark are added to the pattern matching unit name;
[0034] For the pattern matching unit name generated above, when it is recognized that there is a unit name start flag, a direction attribute pre-allocation first preparation process is performed to generate a unit first preparation process information after the direction attribute pre-allocation first preparation process is performed, wherein the unit first preparation process information includes a unit name variable generated based on the pattern matching unit name, a unit port variable whose value is empty, and a pre-allocation operation flag set to a first flag state;
[0035] When the unit first preparation processing information matches the unit first preparation target information, the target circuit library is opened, and the direction attribute pre-deployment second preparation processing is performed, wherein,
[0036] When executing the second preparation process of directional attribute pre-allocation, the corresponding unit is searched in the target circuit library based on the unit name variable, the schematic class unit view of the searched unit is opened, and the symbol class unit view of a second type of directional attribute unit port is opened, and the address information of the symbol class unit view of the opened unit port is assigned to the unit master attribute variable.
[0037] When performing unnecessary format removal processing, the unnecessary formats removed from the unit name include brackets and / or spaces;
[0038] When the unit name mark adding process is executed, the added unit name start mark and unit name end mark include slashes, wherein the unit name start mark is located at the beginning of the pattern matching unit name, and the unit name end mark is located at the end of the pattern matching unit name.
[0039] For the port name read, direction attribute allocation processing is performed only when and only when the port start flag in the port name read is recognized, wherein,
[0040] When executing the direction attribute allocation process, it at least includes the first direction attribute allocation process and the second direction attribute allocation process, wherein:
[0041] When executing the first processing of the directional attribute allocation, at least the read port name is used as the value of the unit port variable, and the above unit name variable is used as the value of the variable oldcell. Thereafter, variable preprocessing is performed on the variable oldcell and the unit port variable to generate corresponding target variables oldcell and target unit port variables respectively after the variable preprocessing;
[0042] When performing the second allocation process of the direction attribute, based on the unit view state of the current unit, the direction attribute of the current unit port is modified to at least configure the direction attribute of the schematic unit view of the unit port to the second type of direction, wherein the direction attribute of the unit port is configured to the second type of direction based on the schematic unit view of the second type of direction;
[0043] The cell view status of the current cell, including only schematic cell view, or both schematic cell view and symbol cell view.
[0044] If the unit view status of the current unit is that it only has a schematic unit view, the direction attribute of the current unit port is configured as the second type of direction, including:
[0045] All unit port information of the current unit is obtained. When a unit port is a unit port whose direction attribute is to be modified, the direction attribute of the unit port is configured as the second type of direction, and the environment variable information of the unit port is configured as a unit master attribute variable.
[0046] If the cell view state of the current cell has a schematic cell view and a symbol cell view, the direction attribute of the current cell port is configured as the second type of direction, including:
[0047] The direction attributes contained in the schematic unit view and the direction attributes contained in the symbol unit view corresponding to the current unit port are modified to the second type of direction, where:
[0048] When modifying the direction attribute contained in the schematic class unit view of the current unit port to the second type of direction, it includes configuring the direction attribute of the unit port to the second type of direction, and configuring the environment variable information of the unit port to the unit master attribute variable;
[0049] When the direction attribute contained in the symbol class unit view of the current unit port is modified to the second type of direction, it includes configuring the environment variable information of the unit port as a unit master attribute variable.
[0050] The advantages of the present invention are as follows: for a target integrated circuit design project, a first-category unit target list corresponding to the target integrated circuit design project is obtained, and a direction attribute modification process is performed on the first-category unit target list obtained above. When the direction attribute modification process is performed, the first-category unit information in the first-category unit target list is read one by one until all the first-category unit information in the first-category unit target list is read; for each read first-category unit information, at least a direction attribute allocation process is performed, so that after the direction attribute allocation process, the direction attribute of the unit port in the current first-category unit information is modified from the first-category direction to the preset second-category direction, thereby effectively realizing batch modification of the unit port direction attribute, and improving the efficiency and reliability of the unit port direction attribute modification. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 The figure is a flow chart of an embodiment of the present invention.
[0052] Figure 2 It is a schematic diagram of an embodiment of the first type target unit list of the present invention. DETAILED DESCRIPTION
[0053] The present invention will be further described below in conjunction with specific drawings and embodiments.
[0054] In order to effectively implement batch modification of unit port direction attributes and improve the efficiency and reliability of unit port direction attribute modification, the present invention provides a batch modification method for unit port direction attributes in integrated circuit design. Specifically, the batch modification method includes:
[0055] Providing a target integrated circuit design project, and obtaining a first-category unit target list corresponding to the target integrated circuit design project, wherein the first-category unit target list includes a plurality of first-category unit information arranged in sequence, and for any first-category unit information, includes a unit name and a port name of at least one unit port, the unit port is a port included in the first-category unit, and the direction attribute of the unit port is a first-category direction;
[0056] Performing a directional attribute modification process on the first-category unit target list obtained above, wherein when performing the directional attribute modification process, reading the first-category unit information in the first-category unit target list one by one until all the first-category unit information in the first-category unit target list is read;
[0057] For each read first-type unit information, at least direction attribute adjustment processing is performed to modify the direction attribute of the unit port in the current first-type unit information from the first-type direction to the preset second-type direction after the direction attribute adjustment processing.
[0058] Figure 1 A flow chart of an embodiment of batch modification of unit port direction attributes is shown in FIG. Figure 1 It can be seen that when performing batch modification, it is necessary to provide a target integrated circuit design project, that is, the object of batch modification of the unit port direction attribute of the present invention is the provided target integrated circuit design project. It can be understood that the integrated circuit design project is the project (program) for designing integrated circuits in the prior art, and the method of implementing integrated circuit design using the integrated circuit design project is consistent with the prior art. After determining the target integrated circuit design project, the first-category unit target list can be obtained based on the target integrated circuit design project, that is, the first-category unit target list should be generated or obtained based on the target integrated circuit design project. The method and process of obtaining the first-category unit target list can refer to the following corresponding explanations.
[0059] It should be noted that the first-category unit target list includes a number of first-category unit information arranged in sequence, wherein each first-category unit information includes a unit name and a port name of at least one unit port, wherein the unit name is the name of a unit (cell) in the target integrated circuit design project, and the unit port is the port of the unit. Generally, a unit may include multiple unit ports, and the number of port names in the first-category unit information can be selected as needed. For example, when only one unit port in a unit has a direction attribute of the first-category direction, the first-category unit information only includes a unit name and a corresponding port name of a unit port; similarly, when there are two unit ports in a unit and both have a direction attribute of the first-category direction, the first-category unit information should include the corresponding port names of the two unit ports. At this time, the first-category unit information should include a unit name and two port names. The number of port names in the first-category unit information can be referred to the description here and will not be given one by one. Examples.
[0060] Specifically, for any unit in the target integrated design project, when the direction attribute of the unit port in the unit is a first-class direction, the unit can be called a first-class unit. It can be seen from the above description that the direction attribute of the unit port can be an in attribute, an out attribute, or an inout attribute. In one embodiment of the present invention, when the direction attribute of the unit port is a first-class direction, the first-class attribute is one of the in attribute, the out attribute, or the inout attribute. It can be understood that the second-class attribute should be a direction attribute different from the first-class attribute. For example, when the first-class direction attribute is an inout attribute, the second-class direction attribute can be an in attribute or an out attribute. The type of the second-class direction attribute can be set according to the actual needs of batch modification.
[0061] In order to modify the first direction attribute of the unit port to the second direction attribute, after obtaining the first type unit target list, the direction attribute modification process should be performed on the first type unit target list, wherein, when performing the direction attribute modification process, the first type unit information in the first type unit target list can generally be read one by one, and for each read first type unit information, at least the direction attribute allocation process is performed. At this time, after the direction attribute allocation process, the direction attribute of the unit port in the current first type unit information can be modified from the first type direction to the preset second type direction, wherein the current first type unit information is the first type unit information currently read and subjected to the direction attribute modification process. The method and process of performing the direction attribute modification process can refer to the following process.
[0062] In one embodiment of the present invention, obtaining the first type unit target list includes:
[0063] Importing the target integrated circuit design project into the matching integrated circuit design software, and configuring a list acquisition program script file adapted to the integrated circuit design software;
[0064] The list acquisition program script file is run in the working environment of the integrated circuit design software to obtain the first type unit target list, wherein:
[0065] In the first-category unit target list, for each first-category unit information, the unit name and the port name are stored in adjacent list rows, respectively, and the unit name is located above the port name.
[0066] It should be noted that the target integrated circuit design project is generally produced and generated in the integrated circuit design software. Therefore, when the unit port direction attributes are modified in batches, the target integrated circuit design project needs to be imported into the matching integrated circuit design software, wherein the matching integrated circuit design software is generally software that can read / parse the target integrated circuit design project, or directly produce and generate the target integrated circuit design project. Preferably, the software that directly produces and generates the target integrated circuit design project is preferably the software that directly produces and generates the target integrated circuit design project, such as the integrated circuit design software that can be the existing commonly used integrated circuit design software Virtuoso. After determining the target integrated circuit design project and the matching integrated circuit design software, the target integrated circuit design project can be designed and generated in the integrated circuit design software, or the target integrated circuit design project can be imported into the integrated circuit design software, and the specific design or import method is consistent with the prior art.
[0067] During specific implementation, the existing method can be used to produce a list acquisition program script file. Thereafter, the produced list acquisition program script file is embedded in the integrated circuit design software so that the list acquisition program script file can be run in the working environment of the integrated circuit design software. Therefore, the produced list acquisition program script file should be able to run in the working environment of the integrated circuit design software, and after running the list acquisition program script file in the working environment of the integrated circuit design software, the first type of unit target program can be obtained.
[0068] In a specific implementation, the first-class unit target list includes several rows, wherein the unit name and the port name are respectively located in different rows. For a first-class unit information, the unit name should be above the port name. When there are multiple port names in a first-class unit information, the multiple port names are arranged in sequence, and different port names are distributed in different rows. It should be noted that the above specifically refers to the arrangement direction of the first-class unit information in the first-class unit target list. For example, for two adjacent first-class unit information, when performing the direction attribute modification process, the first-class unit information read first should be located above the other first-class unit information.
[0069] In one embodiment of the present invention, when obtaining the first type unit target list based on the list acquisition program script file, it includes:
[0070] In a list acquisition program script file, a unit list acquisition function adapted to the integrated circuit software is configured, and a target circuit library is selected in a target integrated circuit design project;
[0071] When the unit list acquisition function is run, the unit names of all units in the target circuit library are acquired, and the acquired unit names are stored in a unit name text file;
[0072] For the unit name text file obtained above, the unit names in the unit name text are read one by one, and the direction attribute of the unit port corresponding to the unit name is determined, wherein if the direction attribute of the current unit port is the first type of direction, the unit name of the current unit and the port name of the unit port are added to the first type of unit pre-list;
[0073] When all unit names are read and the direction attributes of the corresponding unit ports are determined, the corresponding generated first-type unit pre-list is configured as the first-type unit target list.
[0074] In order to obtain the first-category unit target list, a unit list acquisition function should be set in the list acquisition program script file, and at the same time, a target circuit library should be selected in the target integrated circuit design project. As can be seen from the above description, there are generally multiple circuit libraries in the target integrated circuit design project, but when batch modifying the unit port, the unit port of the first-category direction of the unit in a circuit library can be modified, that is, the batch modification of the present invention is to modify the direction attributes of multiple unit ports in a circuit library. Specifically, the selected circuit library is used as the target circuit library, so the unit corresponding to the first-category unit target list should be the unit in the target circuit library.
[0075] When the unit list acquisition function is set in the list acquisition program script file, the list acquisition program script file is adapted to the integrated circuit design software, specifically, the unit list acquisition function should be adapted to the integrated circuit design software. The following takes the integrated circuit design software using Virtuoso design software as an example to illustrate the situation of the unit list acquisition function and the process of generating the first type of unit target list.
[0076] Specifically, when the integrated circuit design software adopts Virtuoso design software, the unit list acquisition function can be the ddGetObj function adapted to the Virtuoso design software. When the ddGetObj function is run in the working environment of the Virtuoso design software, the unit names of all units in the target circuit library can be obtained. After obtaining the unit names of all units, all unit names are stored in a unit name text file, wherein the unit name text file can be an existing commonly used txt type file; the ddGetObj function is a function name that can be directly called in the Virtuoso design software. The situation of the ddGetObj function is consistent with the existing one. For details, please refer to the relevant work instructions of Virtuoso.
[0077] In order to generate the first type of unit target list based on the unit name text file, it is necessary to read the unit names in the unit name text file one by one. Generally, one unit name corresponds to one unit, but a unit can generally have multiple unit ports. Therefore, it is necessary to judge the direction attribute of each unit port. The same method can be used to judge the direction attribute of each unit port. For the specific judgment method, please refer to the following instructions.
[0078] In one embodiment of the present invention, determining the direction attribute of a unit port includes:
[0079] For the unit corresponding to the current unit name, if the schematic diagram of the unit exists, the schematic diagram unit view of the current unit is opened in read-only mode, and the address of the unit is written into the unit name text file, and the address of the unit is stored in association with the unit name of the unit;
[0080] Based on the address of the current unit in the unit name text file, determine the port name of the corresponding unit port of the current unit and the direction attribute of the unit port, wherein,
[0081] When the direction attribute of the unit port is a first-type direction, the unit name and the port name of the current unit are added to the first-type unit pre-list.
[0082] Specifically, since the cell name corresponds to a cell in the target circuit library, the ddGetObj function can be used to determine whether the schematic of the current cell exists for the read current cell name. When the ddGetObj function is used to determine whether the schematic of the current cell exists, the dbOpenCellViewByType function can be used to open the schematic cell view of the current cell in a read-only manner, and according to the schematic cell view of the current cell, the address of the current cell can be obtained, and the address of the current cell can be associated and stored in the cell name text file. In addition, for each cell, the direction attribute of the cell port of the current cell can also be marked through the identifier variable getCellFlag. It should be noted that the dbOpenCellViewByType function is a function that can be directly called and used in the Virtuoso design software. For the situation of the dbOpenCellViewByType function, please refer to the instructions for use of the Virtuoso design software.
[0083] In specific implementation, the above processing is performed on each unit name in the unit name text file, and the unit address corresponding to each unit in the unit name text file can be obtained. Thereafter, according to the unit address of each unit in the unit name text file, the unit port name of the current unit and the direction attribute of the corresponding unit port can be obtained. If the direction attribute of the unit port is the first-class direction, the identifier variable getCellFlag of the current unit port direction attribute is assigned to "True", and the port name of the current unit port is written into the first-class unit pre-list. Of course, when writing the port name, the unit name of the current unit also needs to be written into the first-class unit pre-list. In addition, the identifier variable getCellFlag should be associated with the unit name and port name of the current unit in the first-class unit pre-list and stored.
[0084] After the above processing is performed on each unit in the unit name text file, the direction attribute of the corresponding unit port of each unit and the value of the identifier variable getCellFlag can be obtained, and the first-class unit pre-list can be obtained. After that, the values of all identifier variables getCellFlag in the first-class unit pre-list are judged. When the values of all identifier variables getCellFlag are "True", the first-class unit target list can be generated based on the first-class unit pre-list. It should be noted that when generating the first-class unit target list based on the first-class unit pre-list, all values of the identifier variable getCellFlag should be deleted.
[0085] In addition, when determining the direction attribute of a cell port, the identifier variable getCellFlag can also be assigned a value of "False" and written into the first-class cell pre-list. When the first-class cell pre-list is configured as the first-class cell target list, all cell ports corresponding to the identifier variable getCellFlag assigned a value of "False" can be deleted. Of course, the identifier variable getCellFlag also needs to be deleted. In specific implementation, the first-class cell pre-list can be a cell name text file, or a text file different from the cell name text file, which can be selected according to needs.
[0086] Figure 2 An embodiment of the first-class unit target list is shown in FIG. In the figure, "SC_FN01" is the unit name, and ZN is the port name of a unit port corresponding to the unit name "SC_FN01". It can be understood that the direction attribute of the unit port corresponding to the port name ZN is the first-class direction, and the unit with the unit name "SC_FN01" has only one unit port with the first-class direction. Similarly, "I_TRIGATE_58_58" is the unit name of another unit in the same circuit library, and A and Z are two corresponding port names. Figure 2 For other situations, please refer to the description here, and no examples will be given here one by one.
[0087] In one embodiment of the present invention, when executing the direction attribute modification process, it includes:
[0088] Configuring a port direction modification program script file adapted to the integrated circuit design software;
[0089] Running the port direction modification program script file in the working environment of the integrated circuit design software to read the first-category unit information in the first-category unit target list one by one;
[0090] For each first-type unit information, the unit name and port name in the first-type unit information are read in sequence, wherein:
[0091] After reading the unit name, performing a direction attribute pre-allocation process based on the unit name, and reading the port name after the direction attribute pre-allocation process;
[0092] Direction attribute adjustment processing is performed based on the read port name to modify the direction attribute of the unit port from the first type of direction to the second type of direction, wherein when the direction attribute adjustment processing is performed, for the unit port of the current unit, at least the direction attribute of the schematic class unit view of the unit port is modified to the second type of direction.
[0093] Specifically, when executing the direction attribute modification processing, the port direction modification program script file should be edited or created. Similar to the above-mentioned list acquisition program script file, the port direction modification program script file should also be adapted to the integrated circuit design software. The meaning of adaptation to the integrated circuit design software can be referred to the above-mentioned list acquisition program script file and the adaptation description of the integrated circuit design software, which will not be repeated here.
[0094] When the port direction modification program script file is run, the first-class unit information in the first-class unit target list is read one by one, and then the direction attribute pre-allocation processing and the direction attribute allocation processing are performed on the read first-class unit information in sequence. Since the first-class unit information includes a unit name and at least one port name, the unit name and the port name will be read in sequence. For example, when the first-class unit information includes a unit name and two port names, the unit name, the first port name and the second port name will be read in sequence. For other sequential reading situations, please refer to the description here. Specifically, when the unit name is read, the direction attribute pre-allocation processing is performed; when the port name is read, the direction attribute allocation processing is performed to modify the direction attribute of the port corresponding to the current port name to the second-class direction.
[0095] It should be understood that for the target circuit library in the Virtuoso design software, the cell port of the cell in the target circuit library generally includes at least a schematic-type cell view, and the cell port of the cell is included in the schematic-type cell view. Therefore, after executing the direction attribute allocation processing, for the cell port, at least the direction attribute corresponding to the schematic-type cell view should be modified to the second-type direction. When the cell port also includes a symbol-type cell view, it is also necessary to modify the direction attribute corresponding to the symbol-type cell view to the second-type direction, that is, when modifying in batches, the modification of the direction attribute of a cell port should be related to the cell view status of the current port. The following specifically describes the corresponding methods and processes for executing the direction attribute pre-allocation processing and the row direction attribute allocation processing.
[0096] In one embodiment of the present invention, when performing directional attribute pre-allocation processing on the read unit name, it includes:
[0097] The read unit name is subjected to pattern matching processing to generate a pattern matching unit name after the pattern matching processing, wherein:
[0098] When pattern matching is performed on the unit name, it at least includes unnecessary format removal and unit name mark addition, where:
[0099] When performing unnecessary format removal processing, unnecessary formats in the unit name are removed;
[0100] After executing the unit name mark adding process, at least a unit name start mark and a unit name end mark are added to the pattern matching unit name;
[0101] For the pattern matching unit name generated above, when it is recognized that there is a unit name start flag, a direction attribute pre-allocation first preparation process is performed to generate a unit first preparation process information after the direction attribute pre-allocation first preparation process is performed, wherein the unit first preparation process information includes a unit name variable generated based on the pattern matching unit name, a unit port variable whose value is empty, and a pre-allocation operation flag set to a first flag state;
[0102] When the unit first preparation processing information matches the unit first preparation target information, the target circuit library is opened, and the direction attribute pre-deployment second preparation processing is performed, wherein,
[0103] When executing the second preparation process of directional attribute pre-allocation, the corresponding unit is searched in the target circuit library based on the unit name variable, the schematic class unit view of the searched unit is opened, and the symbol class unit view of a second type of directional attribute unit port is opened, and the address information of the symbol class unit view of the opened unit port is assigned to the unit master attribute variable.
[0104] From the above description, we can see that Figure 2 An embodiment of each first-category unit information in the first-category unit target list of the present invention is shown in FIG. The first-category unit information read needs to be subjected to pattern matching processing, and a pattern matching unit name can be generated after the pattern matching processing. In specific implementation, the pattern matching processing performed can generally include unnecessary format removal processing and unit name mark addition processing, wherein the unnecessary format in the unit name can be removed by the unnecessary format removal processing. In an embodiment of the present invention, the unnecessary format in the unit name removed includes brackets and / or spaces.
[0105] After the unit name mark addition process, a unit name start mark and a unit name end mark can be added to at least the pattern matching unit name; in one embodiment of the present invention, the added unit name start mark and unit name end mark include a slash (i.e., "\"), wherein the unit name start mark is located at the beginning of the pattern matching unit name, and the unit name end mark is located at the end of the pattern matching unit name. It can be understood that by adding the unit name start mark and the unit name end mark, the accuracy of subsequent reading and recognition of the unit name can be improved.
[0106] After the pattern matching process is performed on the unit name, the generated pattern matching unit name needs to be subsequently pre-allocated. When the generated pattern matching unit name is pre-allocated, the pattern matching unit name should be parsed first. If the unit name start mark is parsed, it can be determined that the unit name is currently read. At this time, the first preparation process of the direction attribute pre-allocation should be performed, and the first preparation process information of the unit is generated after the first preparation process of the direction attribute pre-allocation is performed. In one embodiment of the present invention, the generated first preparation process information of the unit should at least include a unit name variable, a unit port variable, and a pre-allocation operation flag, wherein the pattern matching unit name can be assigned as the value of the unit name variable. Since the port name has not been read, the value of the unit port variable is configured to be empty, and the first flag state of the pre-allocation operation flag can be "1".
[0107] It should be noted that, based on the unit name variable and the pre-allocation operation flag in the first preparation processing information of the unit, preparation can be made for the subsequent opening of the schematic unit view corresponding to the unit name variable. By using the unit port variable with an empty value, preparation can be made for the subsequent reading of the unit and the modification of the direction attribute of the unit port, wherein the read unit is the unit corresponding to the unit name variable.
[0108] Specifically, the unit first preparation processing information matches the unit first preparation target information, which specifically means that the unit name variable in the unit first preparation processing information is in a non-empty state, the unit port variable is empty, and the pre-allocation operation flag is in the first flag state. After that, the target circuit library can be opened. For example, when the integrated circuit design software uses Virtuoso design software, the dbOpenCellViewByType function can be used to open the target circuit library. After that, the direction attribute pre-allocation second preparation processing can be executed. It can be seen that the unit first preparation target information should specifically be that the unit name variable is in a non-empty state, the unit port variable is empty, and the pre-allocation operation flag is in the first flag state.
[0109] In specific implementation, after opening the target circuit library, the cell corresponding to the cell name variable can be searched in the target circuit library, such as by comparing the cell name, and then the schematic cell view of the current cell can be opened by the dbOpenCellViewByType function; in addition, the symbol cell view of a cell port needs to be opened, where the direction attribute of the opened cell port should be the second type of direction. After opening the symbol cell view, the address information of the symbol cell view is assigned to the cell master attribute variable to prepare for the subsequent modification of the direction attribute of the cell port, where the cell master attribute variable is the symbol cell view of the calling cell port.
[0110] In one embodiment of the present invention, for a read port name, direction attribute allocation processing is performed when and only when a port start flag in the read port name is identified, wherein:
[0111] When executing the direction attribute allocation process, it at least includes the first direction attribute allocation process and the second direction attribute allocation process, wherein:
[0112] When executing the first processing of the directional attribute allocation, at least the read port name is used as the value of the unit port variable, and the above unit name variable is used as the value of the variable oldcell. Thereafter, variable preprocessing is performed on the variable oldcell and the unit port variable to generate corresponding target variables oldcell and target unit port variables respectively after the variable preprocessing;
[0113] When performing the second allocation process of the direction attribute, based on the unit view state of the current unit, the direction attribute of the current unit port is modified to at least configure the direction attribute of the schematic unit view of the unit port to the second type of direction, wherein the direction attribute of the unit port is configured to the second type of direction based on the schematic unit view of the second type of direction;
[0114] The cell view status of the current cell, including only schematic cell view, or both schematic cell view and symbol cell view.
[0115] Generally, each unit port name has a port start mark at the beginning. Figure 2 An embodiment of the port name in the first type unit target list is shown in Figure 2 It can be seen that the port start mark is "-". When the port start mark "-" is read, it can be determined that the port name is started to be read, and the direction attribute allocation process will be executed at this time. It should be noted that the direction attribute allocation process generally includes the first direction attribute allocation process and the second direction allocation process.
[0116] Specifically, when executing the first processing of directional attribute allocation, the read port name is used as the value of the unit port variable, that is, the read port name is assigned to the unit port variable, and the above unit name variable is assigned to the variable oldcell. Therefore, when executing the first processing of directional attribute allocation, it is necessary to define a unit port variable and a variable oldcell. Generally, the defined unit port variable can be the variable mypin.
[0117] When the cell name variable is assigned to the variable oldcell, the variable oldcell is preprocessed, specifically including the cell name start mark and the cell name end mark in the variable oldcell. If the cell name start mark and the cell name end mark are both slash marks, the slash marks corresponding to the cell name start mark and the cell name end mark in the variable oldcell are removed. At this time, the target variable oldcell can be generated. After the port name is assigned to the cell port variable, the cell port variable is preprocessed. In one embodiment of the present invention, the "-" in the port name is deleted. At this time, the target cell port variable can be generated. In specific implementation, when executing the first processing of the direction attribute allocation, the variable type can also be defined, and the defined variable type is initialized to 0.
[0118] After executing the first processing of directional attribute allocation, it is generally necessary to determine whether the variable oldcell and the cell port variable are empty. When the variable oldcell and the cell port variable are not empty, the second processing of directional attribute allocation is executed. Otherwise, it indicates that there is an error in the current first-class cell information, and the current first-class cell information should be skipped, the next first-class cell information should be read, and the above-mentioned corresponding processing should be performed.
[0119] When executing the second adjustment process of the direction attribute, it is necessary to be based on the unit view state of the current unit. From the above description, it can be seen that when executing the adjustment process of the direction attribute, it is necessary to open the unit view of the current unit and modify the direction attribute of the current unit port according to the state of the unit view. The following specifically describes the method and process of modifying the direction attribute of the current unit port based on the unit view state of the current unit.
[0120] In one embodiment of the present invention, if the unit view state of the current unit is that it only has a schematic unit view, configuring the direction attribute of the current unit port to the second type of direction includes:
[0121] All unit port information of the current unit is obtained. When a unit port is a unit port whose direction attribute is to be modified, the direction attribute of the unit port is configured as the second type of direction, and the environment variable information of the unit port is configured as a unit master attribute variable.
[0122] It should be noted that if the cell view status of the current cell is that it only has a schematic type cell view, it means that the cell view of the current cell has no symbol type cell view. The cell view status of the current cell can be determined by opening the target circuit library as mentioned above. The specific method of determining the cell view status of the current cell can be consistent with the existing one.
[0123] In specific implementation, when the integrated circuit design software adopts the Virtuoso design software, the foreach function can be used to iterate all the terminals (unit ports) of the current unit, and the variables bound in the environment can be read and written by using the operator "~>" on the environment, wherein the variables bound in the environment are all the data of the unit view. In the working environment of the Virtuoso design software, the address of the terminal includes the environment variables corresponding to all unit ports, and the values of the environment variables are mainly obtained through the operator ~>, wherein the environment variables corresponding to the unit port should generally include the port name corresponding to the unit port. It should be noted that the foreach function is a function that can be directly called in the Virtuoso design software, and the method of using the operator "~>" to read and write the variables bound in the environment can be consistent with the existing ones, and the specific reference can be made to the working instructions of the Virtuoso design software.
[0124] It can be seen from the above description that after the port name corresponding to each unit port is obtained by the above method, the port name of each unit port is assigned to the variable pinNameSc. If the variable pinNameSc is consistent with the content of the above unit port variable myPin, it can be determined that the current unit port is a unit port that needs to modify the direction attribute, and the direction attribute of the current unit port should be modified to the second type of direction. In addition, the master attribute of this unit port is modified to the ID of the variable master. The address of the variable master is the address of the symbol class schematic view of the unit port. To modify the direction attribute of the unit port in the schematic class unit view, not only the direction attribute corresponding to the environment variable of this unit port is modified, but also the environment variable master of the unit port is modified.
[0125] From the above description, we can know that the direction attributes of the unit port are three types: input direction, output direction, and output direction, and there will be corresponding master attributes corresponding to the input direction, output direction, and inout direction. Therefore, for different direction attributes, the master called by the unit port will also be different. The unit port with input attribute has the calling master attribute of the input direction, the unit port with output attribute has the calling master attribute of the output direction, and the unit port with inout attribute has the calling master attribute of the inout direction. From the above description, we can know that the calling master attribute is the address of the symbol class schematic.
[0126] In one embodiment of the present invention, if the unit view state of the current unit has a schematic unit view and a symbol unit view, configuring the direction attribute of the current unit port to the second type of direction includes:
[0127] The direction attributes contained in the schematic unit view and the direction attributes contained in the symbol unit view corresponding to the current unit port are modified to the second type of direction, where:
[0128] When modifying the direction attribute contained in the schematic class unit view of the current unit port to the second type of direction, it includes configuring the direction attribute of the unit port to the second type of direction, and configuring the environment variable information of the unit port to the unit master attribute variable;
[0129] When the direction attribute contained in the symbol class unit view of the current unit port is modified to the second type of direction, it includes configuring the environment variable information of the unit port as a unit master attribute variable.
[0130] Generally speaking, if the unit view state of the current unit has both the schematic unit view and the symbol unit view, then to modify the direction attribute of the corresponding unit port, both the schematic unit view and the symbol unit view of the current unit should be modified to keep the direction attribute of the unit port consistent, that is, to successfully modify the direction attribute of the unit port. If it needs to be explained, when the direction attribute contained in the schematic unit view of the current unit port is modified to the second type of direction, the specific method of modifying the direction attribute can refer to the above description.
[0131] When modifying the direction attribute contained in the schematic unit view of the current unit port to the second type of direction, in the specific implementation, you should first open the symbol schematic view of the current unit, and then modify the direction attribute corresponding to the variable myPin. Specifically, you can use the operator ~> to obtain the port name and direction attribute corresponding to the variable myPin bound to the teriminal, so as to change the direction attribute. It should be noted that in the symbol schematic view, you only need to modify the value of the environment variable (direction) bound to the address of the unit port. At the same time, the variable type can be assigned a value of 1.
[0132] When the variable type is assigned a value of 1, it indicates that the direction attributes contained in the schematic unit view and the symbol unit view corresponding to the current unit port are modified to the second type of direction. In subsequent operations, the corresponding schematic unit view and symbol unit view need to be saved. In addition, if the variable type is assigned a value of 1 or 2, it indicates that there is no symbol unit view for the current unit. In subsequent operations, the symbol unit view of the current unit will not be saved.
[0133] Specifically, the meaning of the pre-allocation operation flag is that it will be assigned a value of 1 only when the unit name of the unit is read, and it will be assigned a value of 0 when the port name is read. During the period when the pre-allocation operation flag is assigned a value of 1, the above operation is completed, that is, the unit view of the last unit that has been modified is saved and closed, and then the schematic unit view of the currently read unit is opened. If there is a symbol unit view, it must also be opened, and the direction attribute is modified in the above manner. The method and process of modifying the direction attribute can be referred to the above description, and will not be repeated here.
Claims
1. A method for batch modification of unit port direction attributes in integrated circuit design, characterized in that: The batch modification method comprises: Providing a target integrated circuit design project, and obtaining a first-category unit target list corresponding to the target integrated circuit design project, wherein the first-category unit target list includes a plurality of first-category unit information arranged in sequence, and for any first-category unit information, includes a unit name and a port name of at least one unit port, the unit port is a port included in the first-category unit, and the direction attribute of the unit port is a first-category direction; Performing a directional attribute modification process on the first-category unit target list obtained above, wherein when performing the directional attribute modification process, reading the first-category unit information in the first-category unit target list one by one until all the first-category unit information in the first-category unit target list is read; For each read first-type unit information, at least direction attribute adjustment processing is performed to modify the direction attribute of the unit port in the current first-type unit information from the first-type direction to the preset second-type direction after the direction attribute adjustment processing.
2. The method for batch modifying the unit port direction attribute in the integrated circuit design according to claim 1 is characterized in that: When getting the first type unit target list, include: Importing the target integrated circuit design project into the matching integrated circuit design software, and configuring a list acquisition program script file adapted to the integrated circuit design software; The list acquisition program script file is run in the working environment of the integrated circuit design software to obtain the first type unit target list, wherein: In the first-category unit target list, for each first-category unit information, the unit name and the port name are stored in adjacent list rows, respectively, and the unit name is located above the port name.
3. The method for batch modifying the unit port direction attribute in the integrated circuit design according to claim 2, characterized in that: Based on the list acquisition program script file, when obtaining the first type of unit target list, it includes: In a list acquisition program script file, a unit list acquisition function adapted to the integrated circuit software is configured, and a target circuit library is selected in a target integrated circuit design project; When the unit list acquisition function is run, the unit names of all units in the target circuit library are acquired, and the acquired unit names are stored in a unit name text file; For the unit name text file obtained above, the unit names in the unit name text are read one by one, and the direction attribute of the unit port corresponding to the unit name is determined, wherein if the direction attribute of the current unit port is the first type of direction, the unit name of the current unit and the port name of the unit port are added to the first type of unit pre-list; When all unit names are read and the direction attributes of the corresponding unit ports are determined, the corresponding generated first-type unit pre-list is configured as the first-type unit target list.
4. The method for batch modifying the unit port direction attribute in the integrated circuit design according to claim 3 is characterized in that: When judging the direction attribute of a unit port, it includes: For the unit corresponding to the current unit name, if the schematic diagram of the unit exists, the schematic diagram unit view of the current unit is opened in read-only mode, and the address of the unit is written into the unit name text file, and the address of the unit is stored in association with the unit name of the unit; Based on the address of the current unit in the unit name text file, determine the port name of the corresponding unit port of the current unit and the direction attribute of the unit port, wherein, When the direction attribute of the unit port is a first-type direction, the unit name and the port name of the current unit are added to the first-type unit pre-list.
5. The method for batch modifying the unit port direction attribute in integrated circuit design according to any one of claims 2 to 4, characterized in that: When performing direction attribute modification processing, it includes: Configuring a port direction modification program script file adapted to the integrated circuit design software; Running the port direction modification program script file in the working environment of the integrated circuit design software to read the first-category unit information in the first-category unit target list one by one; For each first-type unit information, the unit name and port name in the first-type unit information are read in sequence, wherein: After reading the unit name, performing a direction attribute pre-allocation process based on the unit name, and reading the port name after the direction attribute pre-allocation process; Direction attribute adjustment processing is performed based on the read port name to modify the direction attribute of the unit port from the first type of direction to the second type of direction, wherein when the direction attribute adjustment processing is performed, for the unit port of the current unit, at least the direction attribute of the schematic class unit view of the unit port is modified to the second type of direction.
6. The method for batch modifying the unit port direction attribute in the integrated circuit design according to claim 5 is characterized in that: When performing directional attribute pre-allocation processing on the read unit name, it includes: The read unit name is subjected to pattern matching processing to generate a pattern matching unit name after the pattern matching processing, wherein: When pattern matching is performed on the unit name, it at least includes unnecessary format removal and unit name mark addition, where: When performing unnecessary format removal processing, unnecessary formats in the unit name are removed; After executing the unit name mark adding process, at least a unit name start mark and a unit name end mark are added to the pattern matching unit name; For the pattern matching unit name generated above, when it is recognized that there is a unit name start flag, a direction attribute pre-allocation first preparation process is performed to generate a unit first preparation process information after the direction attribute pre-allocation first preparation process is performed, wherein the unit first preparation process information includes a unit name variable generated based on the pattern matching unit name, a unit port variable whose value is empty, and a pre-allocation operation flag set to a first flag state; When the unit first preparation processing information matches the unit first preparation target information, the target circuit library is opened, and the direction attribute pre-deployment second preparation processing is performed, wherein, When executing the second preparation process of directional attribute pre-allocation, the corresponding unit is searched in the target circuit library based on the unit name variable, the schematic class unit view of the searched unit is opened, and the symbol class unit view of a second type of directional attribute unit port is opened, and the address information of the symbol class unit view of the opened unit port is assigned to the unit master attribute variable.
7. The method for batch modifying the unit port direction attribute in the integrated circuit design according to claim 6 is characterized in that: When performing unnecessary format removal processing, the unnecessary formats removed from the unit name include brackets and / or spaces; When the unit name mark adding process is executed, the added unit name start mark and unit name end mark include slashes, wherein the unit name start mark is located at the beginning of the pattern matching unit name, and the unit name end mark is located at the end of the pattern matching unit name.
8. The method for batch modifying the unit port direction attribute in integrated circuit design according to claim 6, characterized in that: For the port name read, direction attribute allocation processing is performed only when and only when the port start flag in the port name read is recognized, wherein, When executing the direction attribute allocation process, it at least includes the first direction attribute allocation process and the second direction attribute allocation process, wherein: When executing the first processing of the directional attribute allocation, at least the read port name is used as the value of the unit port variable, and the above unit name variable is used as the value of the variable oldcell. Thereafter, variable preprocessing is performed on the variable oldcell and the unit port variable to generate corresponding target variables oldcell and target unit port variables respectively after the variable preprocessing; When performing the second allocation process of the direction attribute, based on the unit view state of the current unit, the direction attribute of the current unit port is modified to at least configure the direction attribute of the schematic unit view of the unit port to the second type of direction, wherein the direction attribute of the unit port is configured to the second type of direction based on the schematic unit view of the second type of direction; The cell view status of the current cell, including only schematic cell view, or both schematic cell view and symbol cell view.
9. The method for batch modifying the unit port direction attribute in the integrated circuit design according to claim 8, characterized in that: If the unit view status of the current unit is that it only has a schematic unit view, the direction attribute of the current unit port is configured as the second type of direction, including: All unit port information of the current unit is obtained. When a unit port is a unit port whose direction attribute is to be modified, the direction attribute of the unit port is configured as the second type of direction, and the environment variable information of the unit port is configured as a unit master attribute variable.
10. The method for batch modifying the unit port direction attribute in the integrated circuit design according to claim 8, characterized in that: If the cell view state of the current cell has a schematic cell view and a symbol cell view, the direction attribute of the current cell port is configured as the second type of direction, including: The direction attributes contained in the schematic unit view and the direction attributes contained in the symbol unit view corresponding to the current unit port are modified to the second type of direction, where: When modifying the direction attribute contained in the schematic class unit view of the current unit port to the second type of direction, it includes configuring the direction attribute of the unit port to the second type of direction, and configuring the environment variable information of the unit port to the unit master attribute variable; When the direction attribute contained in the symbol class unit view of the current unit port is modified to the second type of direction, it includes configuring the environment variable information of the unit port as a unit master attribute variable.
