CN114138672A - Method for automatically correcting chip design code and application - Google Patents
Method for automatically correcting chip design code and application Download PDFInfo
- Publication number
- CN114138672A CN114138672A CN202111520066.XA CN202111520066A CN114138672A CN 114138672 A CN114138672 A CN 114138672A CN 202111520066 A CN202111520066 A CN 202111520066A CN 114138672 A CN114138672 A CN 114138672A
- Authority
- CN
- China
- Prior art keywords
- code
- chip design
- error
- design code
- automatic correction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3624—Debugging of software by performing operations on the source code, e.g. via a compiler
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3628—Debugging of software of optimised code
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Machine Translation (AREA)
Abstract
The invention discloses a method for automatically correcting chip design codes and application thereof, wherein the method comprises the following steps: acquiring error codes when syntax errors or warnings of chip design codes are generated, wherein the chip design codes are RTL codes; matching in a database based on the error code; and if the matching is successful, calling a corresponding automatic correction method according to the error code to correct the chip design code. The method can automatically correct the error code when the same error repeatedly occurs by matching the error code of the code; by automatically adding the unrecognized error codes to the database, chip designers are reminded to add a corresponding automatic correction method, so that the database is expanded to deal with more grammar errors which may be encountered in the future, and the chip development efficiency is improved.
Description
Technical Field
The present invention relates to the field of computers, and more particularly, to a method for automatically correcting chip design codes and an application thereof.
Background
With the continuous development and progress of chip performance requirements and production technologies, the scale of chips is larger and larger, and the complexity of chip design is higher and higher. It is therefore necessary to check the chip code with a syntax checking tool before the chip code is delivered for chip verification. The first is that the workload of the verification personnel can be greatly reduced, and the second is that some problems which are difficult to be found in the chip verification stage can be found in advance by using a grammar checking tool.
Using a syntax checking tool, the code designer can be informed which potential problems the code has. However, the syntax checking tool has a disadvantage in that a huge number of warnings and errors are included in the log of the check because the chip code is large in scale. For errors, the designer must correct, and for warnings, the code designer may not be aware. Therefore, designers can spend a lot of time modifying grammar errors and reviewing warnings, and this can only be done manually.
The information disclosed in this background section is only for enhancement of understanding of the general background of the invention and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person skilled in the art.
Disclosure of Invention
The invention aims to provide a method for automatically correcting chip design codes and application thereof, which solve the problem that when a grammar checking tool is used for checking chip design codes, wrong or warning codes cannot be automatically corrected.
In order to achieve the above object, an embodiment of the present invention provides a method for automatically correcting chip design codes.
In one or more embodiments of the invention, the method comprises: acquiring error codes when syntax errors or warnings of chip design codes are generated, wherein the chip design codes are RTL codes; matching in a database based on the error code; and if the matching is successful, calling a corresponding automatic correction method according to the error code to correct the chip design code.
In one or more embodiments of the present invention, if the error code fails to match in the database, the method further includes: adding the error code to the database, and recording the error code and the chip design code into an inspection log.
In one or more embodiments of the present invention, invoking a corresponding auto-correction module to correct the chip design code according to the error code includes: generating corrected chip design codes according to the error codes and the corresponding automatic correction method, and replacing original chip design codes; and recording the corrected chip design code into an inspection log.
In one or more embodiments of the present invention, the obtaining of the error code when the syntax of the chip design code is wrong or warned includes: checking syntax of a chip design code, wherein when the chip design code is checked to be wrong or warned, a corresponding check log is generated; and acquiring error or warning information of the chip design code, wherein the error or warning information comprises: error codes, lines where the chip design codes are located and contents of the chip design codes.
In one or more embodiments of the invention, the method further comprises: creating a document as said database for recording said error codes and corresponding automatic correction methods.
In another aspect of the present invention, an apparatus for automatically correcting a chip design code is provided, which includes an obtaining module, a matching module, and a correcting module.
The acquisition module is used for acquiring error codes when grammar of chip design codes is wrong or warning is given, wherein the chip design codes are RTL codes.
And the matching module is used for matching in a database based on the error code.
And the correcting module is used for calling a corresponding automatic correcting method according to the error code to correct the chip design code.
In one or more embodiments of the invention, the correction module is further configured to: adding the error code to the database, and recording the error code and the chip design code into an inspection log.
In one or more embodiments of the invention, the correction module is further configured to: generating corrected chip design codes according to the error codes and the corresponding automatic correction method, and replacing original chip design codes; and recording the corrected chip design code into an inspection log.
In one or more embodiments of the present invention, the obtaining module is further configured to: checking syntax of a chip design code, wherein when the chip design code is checked to be wrong or warned, a corresponding check log is generated; and acquiring error or warning information of the chip design code, wherein the error or warning information comprises: error codes, lines where the chip design codes are located and contents of the chip design codes.
In one or more embodiments of the present invention, the obtaining module is further configured to: creating a document as said database for recording said error codes and corresponding automatic correction methods.
In another aspect of the present invention, there is provided an electronic device including: at least one processor; and a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform a method of chip design code auto-correction as described above.
In another aspect of the present invention, a computer-readable storage medium is provided, having stored thereon a computer program, which when executed by a processor, implements the steps of the method for automatic correction of chip design code as described.
Compared with the prior art, the method for automatically correcting the chip design codes and the application thereof can automatically correct the error codes when the same error repeatedly occurs by matching the error codes of the codes; by automatically adding the unrecognized error codes to the database, chip designers are reminded to add a corresponding automatic correction method, so that the database is expanded to deal with more grammar errors which may be encountered in the future, and the chip development efficiency is improved.
Drawings
FIG. 1 is a flow diagram of a method for automatic correction of chip design code according to an embodiment of the present invention;
FIG. 2 is a block diagram of an apparatus for automatic correction of chip design codes according to an embodiment of the present invention;
FIG. 3 is a hardware block diagram of a computing device for automatic correction of chip design code according to an embodiment of the invention.
Detailed Description
The following detailed description of the present invention is provided in conjunction with the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
Throughout the specification and claims, unless explicitly stated otherwise, the word "comprise", or variations such as "comprises" or "comprising", will be understood to imply the inclusion of a stated element or component but not the exclusion of any other element or component.
The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Example 1
Referring to fig. 1, a method for automatically correcting a chip design code according to an embodiment of the present invention is described, which includes the following steps.
In step S101, an error code at the time of a chip design code syntax error or warning is acquired.
And checking the chip design codes through a grammar checking tool, and when errors or warnings exist in the grammars of the chip design codes, generating corresponding error or warning checking logs for the chip design codes. After the audit log is generated, the script captures the following information: the error code, the row of the wrong chip design code and the specific content of the wrong chip design code. And storing the error codes in a database so that when the errors occur again later, the error codes are automatically corrected according to the matching of the error codes and the corresponding automatic correction method. In the present embodiment, an excel document is created as the database for recording the syntax checking error code and the corresponding automatic correction method.
In step S102, matching is performed in the database based on the error code.
And searching whether the same error codes exist in the database, if the same error codes exist and the corresponding automatic correction methods exist, indicating that the errors or the warnings exist, adding the corresponding correction methods into the database by designers, and correcting the chip design codes of the errors or the warnings according to the corresponding correction methods in the database.
When there is no identical error code in the database, meaning that the error or warning is the first occurrence, an error code is added to the database and the error code and the wrong chip design code content are recorded in the audit log. Therefore, chip designers are reminded to add corresponding chip correction methods in the database. The next time the same error code is encountered, the corresponding correction method may be automatically invoked.
In step S103, a corresponding auto-correction method is called according to the error code to correct the chip design code.
And when the same error codes exist in the database, correcting the wrong chip design codes according to the specific contents of the wrong chip design codes and a corresponding automatic correction method, and generating corrected chip design codes to replace the original wrong chip design codes.
And recording the corrected chip design code into an inspection log for a chip designer to check. At this time, the chip designer only needs to know that the error has been corrected, and does not need to correct the error. If only one error exists in the chip design code, the energy saving is limited, but if a grammar checking tool checks a large number of errors and warnings, a chip designer can save a large amount of time for modifying the chip design code, and the chip development efficiency is greatly improved.
Taking [ WARNING ] B _1403: Flip-flop allocated not initiated, the error code of the alarm is B _ 1403. What is meant is that the trigger is assigned but not initialized. If a flip-flop is not initialized, it may represent an indeterminate state, i.e., it cannot be determined whether the output of the flip-flop is a 0 or a 1. Conversely, if a flip-flop is successfully initialized, the flip-flop can explicitly indicate whether the output is a 0 or a 1. If the output end of one trigger is in an indeterminate state, subsequent signal processing may be affected, so that the chip function fails and the expected function cannot be realized. For this reason, the chip designer needs to pay attention to the warning and make a modification to the code. The only way to process the alert is to initialize the trigger. Therefore, after the step of matching the error code is successful, a preset error correction method is called to correct the wrong chip design code.
In step S104, the error code is added to the database, and the error code and the chip design code are recorded in the inspection log.
And when the same error code does not exist in the database, adding the error code to the database, and recording the error code and the wrong chip design code content into the inspection log. Therefore, chip designers are reminded to add corresponding chip correction methods in the database. The next time the same error code is encountered, the corresponding correction method may be automatically invoked.
On the basis, more and more errors or warnings can be identified by the database, and most of errors or warnings encountered in chip design are covered finally, so that the aim of automatically correcting grammatical errors of chip design codes is fulfilled.
Referring to fig. 2, an apparatus for automatically correcting a chip design code according to an embodiment of the present invention will be described.
In the embodiment of the present invention, the apparatus for automatically correcting a chip design code includes an obtaining module 201, a matching module 202, and a correcting module 203.
An obtaining module 201, configured to obtain an error code when a syntax of a chip design code is wrong or an alarm occurs, where the chip design code is an RTL code.
A matching module 202, configured to perform matching in the database based on the error code.
And the correcting module 203 is used for calling a corresponding automatic correcting method according to the error code to correct the chip design code.
The correction module 203 is further configured to: the error code is added to the database and the error code and chip design code are recorded into the audit log.
The correction module 203 is further configured to: generating corrected chip design codes according to the error codes and a corresponding automatic correction method, and replacing original chip design codes; and recording the corrected chip design code into an inspection log.
The obtaining module 201 is further configured to: checking the syntax of the chip design code, wherein when the chip design code is checked to be wrong or warned, generating a corresponding check log; and acquiring error or warning information of the chip design code, wherein the error or warning information comprises: error code, row of chip design code and contents of chip design code.
The obtaining module 201 is further configured to: a document is created as a database for recording error codes and corresponding automatic correction methods.
FIG. 3 shows a hardware block diagram of a computing device 30 for chip design code auto-correction according to an embodiment of the present description. As shown in fig. 3, computing device 30 may include at least one processor 301, storage 302 (e.g., non-volatile storage), memory 303, and a communication interface 304, and at least one processor 301, storage 302, memory 303, and communication interface 304 are connected together via a bus 305. The at least one processor 301 executes at least one computer readable instruction stored or encoded in the memory 302.
It should be appreciated that the computer-executable instructions stored in the memory 302, when executed, cause the at least one processor 301 to perform the various operations and functions described above in connection with fig. 1-3 in the various embodiments of the present specification.
In embodiments of the present description, computing device 30 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 electronics, and so forth.
According to one embodiment, a program product, such as a machine-readable medium, is provided. A machine-readable medium may have instructions (i.e., elements described above as being implemented in software) that, when executed by a machine, cause the machine to perform various operations and functions described above in connection with fig. 1-3 in the various embodiments of the present specification. Specifically, a system or apparatus may be provided which is provided with a readable storage medium on which software program code implementing the functions of any of the above embodiments is stored, and causes a computer or processor of the system or apparatus to read out and execute instructions stored in the readable storage medium.
According to the method and the application for automatically correcting the chip design codes, the error codes can be automatically corrected when the same error repeatedly occurs by matching the error codes of the codes; by automatically adding the unrecognized error codes to the database, chip designers are reminded to add a corresponding automatic correction method, so that the database is expanded to deal with more grammar errors which may be encountered in the future, and the chip development efficiency is improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. It is not intended to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain certain principles of the invention and its practical application to enable one skilled in the art to make and use various exemplary embodiments of the invention and various alternatives and modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims and their equivalents.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111520066.XA CN114138672A (en) | 2021-12-13 | 2021-12-13 | Method for automatically correcting chip design code and application |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111520066.XA CN114138672A (en) | 2021-12-13 | 2021-12-13 | Method for automatically correcting chip design code and application |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114138672A true CN114138672A (en) | 2022-03-04 |
Family
ID=80382252
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111520066.XA Pending CN114138672A (en) | 2021-12-13 | 2021-12-13 | Method for automatically correcting chip design code and application |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114138672A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115658036A (en) * | 2022-10-19 | 2023-01-31 | 长沙景嘉微电子股份有限公司 | Register model verification output method, device, equipment and storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030033595A1 (en) * | 2001-06-22 | 2003-02-13 | Fujitsu Limited | Automated HDL modifying apparatus and computer-readable recording medium in which program for automatically modifying HDL is recorded |
US20100050151A1 (en) * | 2008-08-20 | 2010-02-25 | International Business Machines Corporation | System, method and program product for correcting semantic errors in code using peer submitted code snippets |
US20100325618A1 (en) * | 2009-06-22 | 2010-12-23 | Sun Microsystems, Inc. | Fault tolerant compilation with automatic error correction |
CN102054100A (en) * | 2010-12-17 | 2011-05-11 | 中国科学院计算技术研究所 | Static analysis-based method and system for detecting RTL (Resistor Transistor Logic) design errors |
CN103530199A (en) * | 2012-07-02 | 2014-01-22 | 腾讯科技(深圳)有限公司 | Software running error repairing method, device and system |
CN109325865A (en) * | 2018-08-13 | 2019-02-12 | 中国平安人寿保险股份有限公司 | Abnormality eliminating method, device, computer equipment and storage medium |
US20190121621A1 (en) * | 2017-10-25 | 2019-04-25 | Aspiring Minds Assessment Private Limited | Generating compilable code from uncompilable code |
CN109960690A (en) * | 2019-03-18 | 2019-07-02 | 新华三大数据技术有限公司 | A kind of operation and maintenance method and device of big data cluster |
CN111752802A (en) * | 2020-06-28 | 2020-10-09 | 中国银行股份有限公司 | System management method and device based on error codes |
CN112631599A (en) * | 2020-12-09 | 2021-04-09 | 潍柴动力股份有限公司 | Compiling method, device and storage medium |
-
2021
- 2021-12-13 CN CN202111520066.XA patent/CN114138672A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030033595A1 (en) * | 2001-06-22 | 2003-02-13 | Fujitsu Limited | Automated HDL modifying apparatus and computer-readable recording medium in which program for automatically modifying HDL is recorded |
US20100050151A1 (en) * | 2008-08-20 | 2010-02-25 | International Business Machines Corporation | System, method and program product for correcting semantic errors in code using peer submitted code snippets |
US20100325618A1 (en) * | 2009-06-22 | 2010-12-23 | Sun Microsystems, Inc. | Fault tolerant compilation with automatic error correction |
CN102054100A (en) * | 2010-12-17 | 2011-05-11 | 中国科学院计算技术研究所 | Static analysis-based method and system for detecting RTL (Resistor Transistor Logic) design errors |
CN103530199A (en) * | 2012-07-02 | 2014-01-22 | 腾讯科技(深圳)有限公司 | Software running error repairing method, device and system |
US20190121621A1 (en) * | 2017-10-25 | 2019-04-25 | Aspiring Minds Assessment Private Limited | Generating compilable code from uncompilable code |
CN109325865A (en) * | 2018-08-13 | 2019-02-12 | 中国平安人寿保险股份有限公司 | Abnormality eliminating method, device, computer equipment and storage medium |
CN109960690A (en) * | 2019-03-18 | 2019-07-02 | 新华三大数据技术有限公司 | A kind of operation and maintenance method and device of big data cluster |
CN111752802A (en) * | 2020-06-28 | 2020-10-09 | 中国银行股份有限公司 | System management method and device based on error codes |
CN112631599A (en) * | 2020-12-09 | 2021-04-09 | 潍柴动力股份有限公司 | Compiling method, device and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115658036A (en) * | 2022-10-19 | 2023-01-31 | 长沙景嘉微电子股份有限公司 | Register model verification output method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111538651B (en) | Interface testing method, device, server and storage medium | |
CN104516921B (en) | Automatic reply method and device | |
CN107016047A (en) | Document query, document storing method and device | |
CN111126010B (en) | Freemaker template file restoration method and device, computer equipment and storage medium | |
CN108121774B (en) | Data table backup method and terminal equipment | |
CN112035355A (en) | Data processing method, apparatus, computer equipment and storage medium | |
CN105302924A (en) | File management method and device | |
CN112256672B (en) | Database change approval method and device | |
CN110750440A (en) | Data testing method and terminal equipment | |
CN114138672A (en) | Method for automatically correcting chip design code and application | |
CN114896161A (en) | Artificial intelligence-based file construction method, device, computer equipment and medium | |
CN114171205A (en) | Medical data processing method and device and digital model editor | |
CN114006819A (en) | A detection strategy generation and device, data transmission method and device | |
US11182375B2 (en) | Metadata validation tool | |
CN112083952A (en) | An exception handling method and system based on spring architecture | |
CN117591260A (en) | Task execution method, device, equipment, storage medium and program product | |
CN111143461A (en) | Mapping relation processing system and method and electronic equipment | |
CN117171030A (en) | Method, device, equipment and storage medium for detecting software running environment | |
CN113722321A (en) | Data export method and device and electronic equipment | |
CN115309554A (en) | Debugging method, debugging system and computing device for application running based on compatible layer | |
CN103761247B (en) | A kind of processing method and processing device of error file | |
CN114564465A (en) | Data processing method, apparatus, device and storage medium | |
CN111427571A (en) | Data verification method and device | |
CN117744579B (en) | Exemption document generation method, chip inspection method, device and electronic equipment | |
TWI816415B (en) | Verification method,system and computer readable storage medium for pin naming |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |