CN111045948A - Method, apparatus and storage medium for checking interface signal between modules - Google Patents

Method, apparatus and storage medium for checking interface signal between modules Download PDF

Info

Publication number
CN111045948A
CN111045948A CN201911284431.4A CN201911284431A CN111045948A CN 111045948 A CN111045948 A CN 111045948A CN 201911284431 A CN201911284431 A CN 201911284431A CN 111045948 A CN111045948 A CN 111045948A
Authority
CN
China
Prior art keywords
interface
information
database
checking
signal
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
Application number
CN201911284431.4A
Other languages
Chinese (zh)
Inventor
江源
朱彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Centec Networks Suzhou Co Ltd
Original Assignee
Centec Networks Suzhou Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Centec Networks Suzhou Co Ltd filed Critical Centec Networks Suzhou Co Ltd
Priority to CN201911284431.4A priority Critical patent/CN111045948A/en
Publication of CN111045948A publication Critical patent/CN111045948A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, equipment and a storage medium for checking interface signals between modules, wherein the method comprises the following steps: acquiring a list of files to be checked, and retrieving an interface of a module contained in each file in the list; when the interface of the module is retrieved, checking whether the database contains the information of the interface; if the database does not contain the information of the interface, the information of the interface is stored into the database; if the database contains the information of the interface, judging whether the information of the interface is matched with the information of the corresponding interface in the database, and if not, judging that the interface is not matched with the corresponding interface signal in the database. Compared with the prior art, the method for checking the interface signals between the modules takes the script language as a tool, adopts a mode of checking and checking, can quickly check the matching problem of the interface signals, and has the advantages of high checking efficiency, comprehensive and detailed checking content and less memory occupation.

Description

Method, apparatus and storage medium for checking interface signal between modules
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method, a device, and a storage medium for checking an interface signal between modules.
Background
In the current chip design, various modules are often instantiated from sub-modules to functional modules, to physical implementation modules, to a top chip system, all requiring a level of down-instantiation. In the design implementation, each module often has a change between interface signals, and once the change of the module is declared to not be reflected to the instantiated layer module, a functional problem is caused, so that the matching check of the signal connection between the modules is very important.
The Lint tool can do some checks for signal matches between modules, but it has two problems:
firstly, the inspection can only be performed on modules, and the inspection in this way can generally only set one top module, and then all instantiated modules are inspected from the top module. When two modules have interfaces with each other but no module in a higher layer instantiates the two modules, the Lint tool cannot check the two modules.
Secondly, the inspection efficiency is low, because before the inspection, a large pile of intermediate steps are often needed, and the inspection can be started after various engineering files are set up; and once the module to be inspected becomes large, its inspection time is multiplied and a very large memory space is required.
Disclosure of Invention
The invention aims to provide a method, equipment and a storage medium for checking an interface signal between modules.
In order to achieve one of the above objects, an embodiment of the present invention provides a method for checking an interface signal between modules, the method including:
acquiring a list of files to be checked, and retrieving an interface of a module contained in each file in the list;
when the interface of the module is retrieved, checking whether the database contains the information of the interface;
if the database does not contain the information of the interface, the information of the interface is stored into the database;
if the database contains the information of the interface, judging whether the information of the interface is matched with the information of the corresponding interface in the database, and if not, judging that the interface is not matched with the corresponding interface signal in the database.
As a further improvement of an embodiment of the present invention, the information of the interface includes a name and a bit width of the interface, when checking whether the database includes the information of the interface, the name of the interface is used as a keyword, the keyword is searched in the database, if found, it is determined that the database includes the information of the interface, otherwise, it is determined that the database does not include the information of the interface;
and if the database does not contain the information of the interface, storing the information of the interface into the database by taking the name of the interface as a keyword.
As a further improvement of an embodiment of the present invention, the "determining whether the information of the interface matches the information of the corresponding interface in the database" specifically includes:
and comparing whether the bit width of the interface is equal to the bit width corresponding to the name of the interface in the database, if so, judging that the information of the interface is matched with the information of the corresponding interface in the database, otherwise, judging that the information of the interface is not matched with the information of the corresponding interface in the database.
As a further improvement of an embodiment of the present invention, the method further comprises:
and if the information of the interface is matched with the information of the interface in the database, deleting the information of the interface in the database.
As a further improvement of an embodiment of the present invention, the method further comprises:
and after all the files in the list are checked, if the information of the interface exists in the database and the interface does not have the problem of unmatched signals, judging that the interface has signal suspension errors.
As a further improvement of an embodiment of the present invention, the method further comprises:
and if the information of the interface is matched with the information of the interface in the database, marking the interface in the database with a check mark.
As a further improvement of an embodiment of the present invention, the method further comprises:
and after all the files in the list are checked, if an interface without a check mark exists in the database and the interface does not have the problem of signal mismatching, judging that the interface has a signal suspension error.
As a further improvement of an embodiment of the present invention, the database is a hash array.
In order to achieve one of the above objects, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory stores a computer program operable on the processor, and the processor implements the steps in the method for checking an inter-module interface signal according to any one of the above methods when executing the program.
To achieve one of the above objects, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps in the method for checking an interface signal between modules according to any one of the above aspects.
Compared with the prior art, the method for checking the interface signals between the modules takes the script language as a tool, adopts a mode of checking and checking, can quickly check the matching problem of the interface signals, and has the advantages of high checking efficiency, comprehensive and detailed checking content and less memory occupation.
Drawings
FIG. 1 is a flow chart of a method for checking an inter-module interface signal according to the present invention.
Detailed Description
The present invention will be described in detail below with reference to specific embodiments shown in the drawings. These embodiments are not intended to limit the present invention, and structural, methodological, or functional changes made by those skilled in the art according to these embodiments are included in the scope of the present invention.
No matter how complex the system is, the system can be divided into a plurality of small functional modules, when the modules are used, the modules need to be declared firstly and then called through instantiation (instantiation), the module declaration is used for describing the module structure, and the module declaration refers to the following steps:
module < module name > (< interface list >);
< definition >
< Module entry >
endmodule
Wherein: < module name > is an identifier unique to the module;
the interface list is a list of input, output or bi-directional interfaces that are used to connect with other modules, and the interface list is a list of interface names.
< definition > is a program for specifying data objects as register type, memory type, line type, and process block such as function block and task block; but also to define the bit width of each interface in the interface list.
The general form of a module call or module instantiation is:
< module name > < instance name > (< interface List >);
the interface signals can be associated through positions or names, and when the interface signals are associated through the positions, the interface signals need to be connected according to the interface sequence defined by the modules strictly. When associated by name, the ". multidot.n" symbol is used to designate the name of the interface specified when the module is declared.
To take a simple example, the following:
module and(C,A,B);
input A,B;
output C;
...
and A1(T3, A, B); and/when the data is instantiated, position association is adopted, T3 corresponds to an output interface C, A corresponds to A, and B corresponds to B.
and A2(.C(T3),
.A(A),
B (b); c is the interface name of the and device, which is connected to signal T3.
module and is the declaration of module and, and A1 and A2 are two instantiations of module and, the two modules are signal-transmitting or signal-connecting through interfaces, when the interface information of the declaration module does not match with the interface information of the instantiating module, the signal-transmitting or signal-connecting is wrong.
As shown in fig. 1, the present invention provides a method for checking an inter-module interface signal, which uses a script language as a tool, and can quickly check an error with high checking efficiency for the problem of inconsistent bit widths of an instantiated signal between modules. The method comprises the following steps:
step S100: and acquiring a list of files to be checked, and retrieving an interface of a module contained in each file in the list.
A system comprises a plurality of modules, different modules can be stored in different files, and when the condition that whether the interface signals between the modules are not matched exists in the system needs to be checked, all the files of the system need to be checked.
The invention uses script language to automatically check the files, so that the checking of all the files of the system can be realized only by importing the catalogues of the files contained in the system into the script language.
After a list of files to be checked (all files of the system) is obtained, the interfaces of the modules contained in each file in the list can be sequentially retrieved, and the sequence of retrieving the files does not affect the final checking result.
Step S200: when an interface of a module is retrieved, it is checked whether the database contains information of the interface.
The information of the interface of the system is stored in a database, and the database is preferably a hash array. When an interface of a module is retrieved in a file, it is first checked whether the database contains information of the interface.
Step S300: and if the database does not contain the information of the interface, storing the information of the interface into the database.
Step S400: if the database contains the information of the interface, judging whether the information of the interface is matched with the information of the corresponding interface in the database, and if not, judging that the interface is not matched with the corresponding interface signal in the database.
When the database does not contain the retrieved information of the interface, the information of the interface is stored in the database, otherwise, whether the information of the interface is matched with the information of the corresponding interface in the database is compared, if the information of the interface is not matched with the information of the corresponding interface in the database, the interface is judged not to be matched with the corresponding interface signal in the database, at the moment, the related error information can be recorded, or a mismatch mark is added under the interface of the database.
It should be noted that, the method for checking interface signals between modules of the present invention checks all files of a system one by one, because both the declaration module and the instantiation module include interface information, and the same interface in the present invention has the same interface name between the declaration module and the instantiation module. Therefore, the interface information of the declaration module and the instantiation module is not distinguished, the first retrieved interface information is stored in the database, the subsequently retrieved interface information is compared with the interface information in the database, and when mismatching is found, the unmatched interface information is recorded. Therefore, this checking method may not depend on the arrangement order of the system files. Meanwhile, the inspection method does not inspect all modules appearing in the system from a top module downwards, the inspection content is comprehensive and detailed, and omission does not occur.
The method for checking the interface signals between the modules takes the script language as a tool, adopts a mode of checking and checking, can quickly check the matching problem of the interface signals, and has high checking efficiency and less memory occupation. The mode of checking and examining is as follows: when an interface of a module is searched, whether the interface has the problem of unmatched interface signals corresponding to the declaration module or the instantiation module of the module is immediately checked, and not all searched interfaces are stored in a database and finally checked.
In a preferred embodiment, the information of the interface includes a name and a bit width of the interface, when checking whether the database includes the information of the interface, the name of the interface is used as a keyword, the keyword is searched in the database, if the keyword is found, it is determined that the database includes the information of the interface, otherwise, it is determined that the database does not include the information of the interface.
If the database does not include the information of the interface, the name of the interface is used as a key word, the information of the interface is stored into the database, and the information of the interface stored into the database is indexed by taking the name of the interface as an index.
And when judging whether the information of the interface is matched with the information of the corresponding interface in the database, comparing whether the bit width of the interface is equal to the bit width corresponding to the name of the interface in the database, if so, judging that the information of the interface is matched with the information of the corresponding interface in the database, otherwise, judging that the information of the interface is not matched with the information of the corresponding interface in the database.
As a simple example, an interface of an instantiated module is retrieved from a file, the name of the interface is a, the bit width is 8 bits, a keyword a is searched in a database, if the keyword a is found, the interface a is retrieved from the previous file, at this time, whether the bit width corresponding to the keyword a in the database is 8 bits is judged, if the keyword a is found, the bit widths of the interfaces a of the two modules are the same, signals are matched, otherwise, the information of the two interfaces which are not matched needs to be recorded. If the key A is not found in the database, the name and bit width of the interface are stored in the database.
In many systems, module declarations and module instantiations are in a one-to-one relationship, so in a preferred embodiment, the method further comprises:
and if the information of the interface is matched with the information of the interface in the database, deleting the information of the interface in the database.
Because the module declaration and the module instantiation are in a one-to-one relationship, normally, the information of one interface can only be retrieved twice, and the information is stored in the database when the information is retrieved for the first time, and the information is compared with the information of the interface stored in the database for the first time when the information is retrieved for the second time. When the signals of the same interface searched twice are matched, the interface information in the database can be deleted, so that the memory occupation of the database is less.
By using the method, when all files in the system list are checked, if the information of the interface exists in the database and the interface has no problem of signal mismatching, the interface is judged to have signal suspension errors. Signal floating means that interface information is present in only one of the declaring module and the instantiating module.
In some systems, a declaration module is instantiated multiple times, so in another preferred embodiment, the method further comprises:
and if the information of the interface is matched with the information of the interface in the database, marking the interface in the database with a check mark.
By using the method, when all files in the system list are checked, if an interface without a check mark exists in the database and the interface has no problem of signal mismatch, the interface is judged to have a signal suspension error.
In a specific embodiment, a file directory of a system to be checked is imported into a script tool, and the script tool sequentially checks according to the order of the directory. When a module in a file is retrieved, an interface of the module is acquired, and whether a database (hash data) contains the name of the interface is checked. And when the name of the interface is not contained in the database, storing the name of the interface as a key and the bit width of the interface as a value into the database. When the database contains the interface name, comparing whether the bit width of the interface is equal to the bit width of the interface in the database, if so, deleting the information of the interface in the database, if not, indicating that the interface signals are not matched, recording the information of the two unmatched interfaces, and also marking a unmatched mark on the interface of the database. When all files are checked, the interfaces in the database except the interface with unmatched signals are the interfaces with suspended signals. The designer of the system can check and correct the defects of the system according to the interfaces.
In another specific embodiment, different from the previous specific embodiment, when the database includes the retrieved interface name of the module, comparing whether the bit width of the interface is equal to the bit width of the interface in the database, if so, marking the interface in the database with a check mark, if not, indicating that the interface signals are not matched, recording information of the two unmatched interfaces, and also marking the interface of the database with a unmatched mark. When all files are checked, the interfaces without check marks in the database are the interfaces with signals floating except the interfaces with signals not matched. The designer of the system can check and correct the defects of the system according to the interfaces.
The present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program operable on the processor, and the processor implements any one of the steps of the method for checking an inter-module interface signal when executing the program, that is, implements the steps of any one of the technical solutions of the method for checking an inter-module interface signal.
The present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any one of the steps in the method for checking inter-module interface signals, that is, implements any one of the steps in the method for checking inter-module interface signals.
It should be understood that although the present description refers to embodiments, not every embodiment contains only a single technical solution, and such description is for clarity only, and those skilled in the art should make the description as a whole, and the technical solutions in the embodiments can also be combined appropriately to form other embodiments understood by those skilled in the art.
The above-listed detailed description is only a specific description of a possible embodiment of the present invention, and they are not intended to limit the scope of the present invention, and equivalent embodiments or modifications made without departing from the technical spirit of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for checking an interface signal between modules, the method comprising:
acquiring a list of files to be checked, and retrieving an interface of a module contained in each file in the list;
when the interface of the module is retrieved, checking whether the database contains the information of the interface;
if the database does not contain the information of the interface, the information of the interface is stored into the database;
if the database contains the information of the interface, judging whether the information of the interface is matched with the information of the corresponding interface in the database, and if not, judging that the interface is not matched with the corresponding interface signal in the database.
2. The method for checking an interface signal between modules according to claim 1, wherein:
the information of the interface comprises the name and bit width of the interface, when the information of the interface is checked to be contained in a database, the name of the interface is used as a keyword, the keyword is searched in the database, if the keyword is found, the information of the interface contained in the database is judged, otherwise, the information of the interface not contained in the database is judged;
and if the database does not contain the information of the interface, storing the information of the interface into the database by taking the name of the interface as a keyword.
3. The method for checking an interface signal between modules according to claim 2, wherein said determining whether the information of the interface matches the information of the corresponding interface in the database specifically comprises:
and comparing whether the bit width of the interface is equal to the bit width corresponding to the name of the interface in the database, if so, judging that the information of the interface is matched with the information of the corresponding interface in the database, otherwise, judging that the information of the interface is not matched with the information of the corresponding interface in the database.
4. The method for checking the interface signal between the modules according to claim 1, further comprising:
and if the information of the interface is matched with the information of the interface in the database, deleting the information of the interface in the database.
5. The method for checking the interface signal between the modules according to claim 4, further comprising:
and after all the files in the list are checked, if the information of the interface exists in the database and the interface does not have the problem of unmatched signals, judging that the interface has signal suspension errors.
6. The method for checking the interface signal between the modules according to claim 1, further comprising:
and if the information of the interface is matched with the information of the interface in the database, marking the interface in the database with a check mark.
7. The method for checking the interface signal between the modules according to claim 6, further comprising:
and after all the files in the list are checked, if an interface without a check mark exists in the database and the interface does not have the problem of signal mismatching, judging that the interface has a signal suspension error.
8. The method for checking an interface signal between modules according to claim 1, wherein:
the database is a hash array.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program operable on the processor, and wherein the processor executes the program to implement the steps in the method for checking an inter-module interface signal according to any one of claims 1 to 8.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for checking an interface signal between modules according to any one of claims 1 to 8.
CN201911284431.4A 2019-12-13 2019-12-13 Method, apparatus and storage medium for checking interface signal between modules Pending CN111045948A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911284431.4A CN111045948A (en) 2019-12-13 2019-12-13 Method, apparatus and storage medium for checking interface signal between modules

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911284431.4A CN111045948A (en) 2019-12-13 2019-12-13 Method, apparatus and storage medium for checking interface signal between modules

Publications (1)

Publication Number Publication Date
CN111045948A true CN111045948A (en) 2020-04-21

Family

ID=70236210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911284431.4A Pending CN111045948A (en) 2019-12-13 2019-12-13 Method, apparatus and storage medium for checking interface signal between modules

Country Status (1)

Country Link
CN (1) CN111045948A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111666730A (en) * 2020-05-22 2020-09-15 中国人民解放军国防科技大学 Verilog module interface signal automatic connection method and system based on signal name hash matching
CN112861454A (en) * 2021-01-30 2021-05-28 芯河半导体科技(无锡)有限公司 Method for realizing top-level automatic instantiation of chip system based on python

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106529099A (en) * 2016-12-20 2017-03-22 盛科网络(苏州)有限公司 Method for automatically generating verification model on the basis of interface
CN108363567A (en) * 2018-02-12 2018-08-03 盛科网络(苏州)有限公司 A kind of verification platform driver automatic generating method based on database
CN110175099A (en) * 2019-04-15 2019-08-27 平安普惠企业管理有限公司 Interface changes reminding method, device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106529099A (en) * 2016-12-20 2017-03-22 盛科网络(苏州)有限公司 Method for automatically generating verification model on the basis of interface
CN108363567A (en) * 2018-02-12 2018-08-03 盛科网络(苏州)有限公司 A kind of verification platform driver automatic generating method based on database
CN110175099A (en) * 2019-04-15 2019-08-27 平安普惠企业管理有限公司 Interface changes reminding method, device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111666730A (en) * 2020-05-22 2020-09-15 中国人民解放军国防科技大学 Verilog module interface signal automatic connection method and system based on signal name hash matching
CN111666730B (en) * 2020-05-22 2022-10-28 中国人民解放军国防科技大学 Verilog module interface signal automatic connection method and system based on signal name hash matching
CN112861454A (en) * 2021-01-30 2021-05-28 芯河半导体科技(无锡)有限公司 Method for realizing top-level automatic instantiation of chip system based on python
CN112861454B (en) * 2021-01-30 2024-02-06 芯河半导体科技(无锡)有限公司 Method for realizing automatic instantiation of chip system top layer based on python

Similar Documents

Publication Publication Date Title
CN109062794B (en) Method and device for determining software evaluation result and electronic equipment
US20100023898A1 (en) Circuit design assisting apparatus, computer-readable medium storing circuit design assisting program, and circuit design assisting method
US10354031B2 (en) Information processing by interpenetrating signal transmission channel in design for testability of chip
CN109783346B (en) Keyword-driven automatic testing method and device and terminal equipment
CN111045948A (en) Method, apparatus and storage medium for checking interface signal between modules
KR100873885B1 (en) Design Verification Device, Design Verification Method and CAD System
CN114449254A (en) High-accuracy camera module OTP (one time programmable) burning method and system
US20230018381A1 (en) Method for automatically identifying design changes in building information model
CN115238616A (en) Automatic modification method and device for chip netlist and electronic equipment
CN108829903B (en) Method and system for judging consistency of codes of FPGA redundant design and integrated circuit
CN103745050A (en) Pin mapping method and system
CN116776786A (en) Chip verification method and device and related equipment
CN112567375A (en) Format verification method, information identification method, device and storage medium
US6675323B2 (en) Incremental fault dictionary
CN111259619A (en) Control method and device for configuration object, storage medium and verification platform
CN114091391A (en) Chip verification method, device, equipment and storage medium
CN111950231B (en) BMC sensor information checking and comparing method and system
CN107656187A (en) A kind of differential line test information determines method and apparatus
CN110119351B (en) Test case execution method and device
US7149995B2 (en) Graphical interface to layout processing components and connections
CN109710651B (en) Data type identification method and device
CN101206679B (en) Method for examination of layout design regulation and recording medium capable of reading by computer
CN117574817B (en) Design automatic verification method, system and verification platform for self-adaptive time sequence change
CN112464608B (en) Method, system and medium for automatically adding ground level measuring point in PCB
CN112183016B (en) Method, device, equipment and storage medium for quickly establishing pinpair equal-length constraint

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 215000 unit 13 / 16, 4th floor, building B, No.5 Xinghan street, Suzhou Industrial Park, Jiangsu Province

Applicant after: Suzhou Shengke Communication Co.,Ltd.

Address before: Xinghan Street Industrial Park of Suzhou city in Jiangsu province 215021 B No. 5 Building 4 floor 13/16 unit

Applicant before: CENTEC NETWORKS (SUZHOU) Co.,Ltd.

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200421