CN102495766A - Consistency detection system of equipment specification and equipment behavior - Google Patents

Consistency detection system of equipment specification and equipment behavior Download PDF

Info

Publication number
CN102495766A
CN102495766A CN2011103912034A CN201110391203A CN102495766A CN 102495766 A CN102495766 A CN 102495766A CN 2011103912034 A CN2011103912034 A CN 2011103912034A CN 201110391203 A CN201110391203 A CN 201110391203A CN 102495766 A CN102495766 A CN 102495766A
Authority
CN
China
Prior art keywords
language
equipment
uclid
conversion module
variable
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
CN2011103912034A
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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN2011103912034A priority Critical patent/CN102495766A/en
Publication of CN102495766A publication Critical patent/CN102495766A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Catching Or Destruction (AREA)

Abstract

The invention discloses a consistency detection system of equipment specification and equipment behavior, which comprises an equipment specification conversion module, an equipment behavior conversion module and a consistency detection module. The equipment specification conversion module is used for converting equipment specification described by Termite language into equipment specification described by UCLID language and capable of being recognized by a model detection tool. The equipment behavior conversion module is used for converting hardware equipment behavior described by Verilog language into hardware equipment behavior described by UCLID language. The consistency detection module is used for inputting the equipment specification and hardware equipment behavior into the model detection tool to obtain detection results. The consistency detection system converts equipment specification language and equipment behavior language into languages capable of being recognized by the model detection tool, compares all the register variable values of the equipment when the equipment specification language and the equipment behavior language are converted into the UCLID language of the model detection tool under the condition that the equipment carries out the same state, so that the consistency of the equipment specification and the equipment behavior can be detected, and reliability of the equipment specification and the equipment drive can be improved.

Description

The consistency detection system of equipment code and equipment behavior
Technical field
The present invention relates to the reliability engineering field of equipment code and equipment behavior, relate in particular to the consistency detection system of a kind of equipment code and equipment behavior.
Background technology
Reliability is an important goal of operating system.The inefficacy of Windows XP operating system 85% is caused by device drives.The frequency that the (SuSE) Linux OS device drives lost efficacy is more than 3-7 a times of other part.Driving is write personnel and is carried out writing of device drives according to equipment code, and therefore, the consistance of equipment code and hardware device behavior is significant for the reliability of device drives.
Summary of the invention
The technical matters that (one) will solve
The technical matters that the present invention will solve is: the consistency detection system of a kind of equipment code and equipment behavior is provided, and it can the checkout equipment standard and the consistance of equipment behavior, thereby can improve the reliability of equipment code and device drives.
(2) technical scheme
For addressing the above problem, the invention provides the consistency detection system of a kind of equipment code and equipment behavior, comprising:
The equipment code conversion module is used for the equipment code that equipment code with the Termite language description is converted into the UCLID language description that model checking tools can discern;
The equipment behavior conversion module is used for the hardware device behavior of Verilog language description is converted into the hardware device behavior of UCLID language description;
The consistency detection module is used for the equipment code and the hardware device behavior input model testing tool of said UCLID language description are drawn testing result.
Preferably, said equipment code conversion module comprises:
The variable conversion module is used for the variable of the Termite language that uses is converted into the variable of UCLID language;
The constant conversion module is used for the constant of the Termite language that uses is converted into the constant of UCLID language;
The operational order conversion module is used for the operational order of the Termite language that uses is converted into the FUNC and the PRED operational order function of UCLID language.
Preferably, said variable conversion module comprises:
The enumeration type conversion module is used for the enumeration type of Termite language is converted into the enumeration type of UCLID language;
The pointer type conversion module, being used for Termite Guide Finger of Language conversion in type is that variable and the parameter of the TERM type of UCLID language is 1 FUNC function.
Preferably, said constant conversion module comprises:
Big constant conversion module is used for the big constant of Termite language is converted into the CONST TERM of UCLID language;
Little constant conversion module is used to use succ function and pred function that the little constant of Termite language is handled.
Preferably, said operational order conversion module comprises:
TRUTH variable conversion module is used to use the Boolean connective operation operational order of Termite language to be converted into the TRUTH variable of UCLID language;
TERM variable conversion module is used for the operational order of Termite language is converted into the TERM variable of UCLID language.If compare computing, then convert the PRED function to, if do not compare computing, then convert the FUNC function to.
Preferably; Said consistency detection module comprises: variable adds module; Be used for partly adding two variablees in the variable-definition of model checking tools control module; Be respectively applied for the value of UCLID code that storage transforms by the Termite code all registers when carrying out predetermined state, and the value of all registers when transferring to above-mentioned state by the UCLID code that the Verilog code transforms.
Preferably, said consistency detection module comprises: matching module is used to judge whether the value of all registers of two variable storage is equal fully.
(3) beneficial effect
The present invention is through all being converted into the language that model checking tools can be discerned with equipment code language and equipment behavior language; And compare facilities is carried out under the same state status; The value of all register variables of equipment when equipment code language and equipment behavior language are converted into the UCLID language of model checking tools; Come the consistance of checkout equipment standard and equipment behavior, can improve the reliability of equipment code and device drives.
Description of drawings
Fig. 1 is the structural representation of the consistency detection system of equipment code described in the embodiment of the present invention and equipment behavior.
Wherein, 1: equipment code conversion module, 2: equipment behavior conversion module, 3: the consistency detection module; 4: variable conversion module, 5: constant conversion module, 6: operational order conversion module, 7: the enumeration type conversion module; 8: pointer type conversion module, 9: big constant conversion module, 10: little constant conversion module, 11:TRUTH variable conversion module; 12:TERM variable conversion module, 13: variable adds module, 14: matching module.
Embodiment
Below in conjunction with accompanying drawing and embodiment, specific embodiments of the invention describes in further detail.Following examples are used to explain the present invention, but are not used for limiting scope of the present invention.
The consistency detection system of equipment code of the present invention and equipment behavior is based on that the consistency detecting method of a kind of equipment code and equipment behavior proposes, and this may further comprise the steps:
At first, the Termite language description code with equipment code is converted into the UCLID specification normative language that model checking tools can be discerned.Conversion is divided into three parts: the variable that the variable of the Termite language that uses is converted into the UCLID language; Transform the constant of the Termite language that uses; The operational order of the Termite language that uses is converted into the FUNC and the PRED function of UCLID language.
The variable that the variable of the Termite language that uses is converted into the UCLID language adopts following method: the enumeration type that the enumeration type of Termite language is converted into the UCLID language; Variable and the parameter that with Termite Guide Finger of Language conversion in type is a TERM type of UCLID language is 1 FUNC function; Wherein, Variable in the UCLID language is used to store Termite Guide Finger of Language value; Be its memory address that points to variable, the FUNC function obtains the value of the variable of pointed according to the variable of above-mentioned TERM type; If the data width of Termite language integer variable is 1, then be converted into the variable of the TRUTH type of UCLID language; If the data width of Termite language integer variable is not 1, then be converted into the variable of the TERM type of UCLID language; If in the Termite code, there is the variable of a structure type, then be that each data item of this structure categorical variable is created a variable in the UCLID code.
The constant that transforms the Termite language that uses adopts following method: the CONST TERM that the big constant of Termite language is converted into the UCLID language; To the little constant of TERM language, use succ function and pred function to handle.
The FUNC and the PRED function that the operational order of the Termite language that uses are converted into the UCLID language adopt following method: use Boolean connective to operate the TRUTH variable that changes into the UCLID specification normative language; When changing into the TERM categorical variable of UCLID specification normative language,, then convert the PRED function to,, then convert the FUNC function to if do not compare computing if compare computing.
Then, the Verilog language codes that adopts " Automatic Abstraction and Verification of Verilog Models " said method of paper will describe hardware device is converted into the code of UCLID language.
At last, the UCLID descriptive language input UCLID model checking tools with equipment code, hardware device behavior, consistance target draws testing result.The variable-definition of control module is partly added all register variables of two alternate devices in UCLID model detection of code; Portion is used to store the value of UCLID code all registers when certain state of execution that transformed by the Termite code, the value of all registers when another part is used to store certain state of UCLID code execution that is transformed by the Verilog code.
Treat detection of code and carry out initialization; Make the UCLID code that transforms by the Termite code transfer to the value of certain state and storage all registers this moment then; Carry out initialization after the completion once more; Make the UCLID code that transforms by the Verilog code transfer to the state that the above-mentioned UCLID code that is transformed by the Termite code moves, and the value of storage all registers this moment.The consistance target is exactly to judge whether the value of all registers of twice storage is equal fully.If the value of two parts of all register variables equates respectively all that under various state transitions conditions then behavior is consistent to the devices illustrated standard with hardware device.
As shown in Figure 1, based on the equipment code of said method the present invention proposition and the consistency detection system of equipment behavior, comprising:
Equipment code conversion module 1 is used for the equipment code that equipment code with the Termite language description is converted into the UCLID language description that model checking tools can discern;
Equipment behavior conversion module 2 is used for the hardware device behavior of Verilog language description is converted into the hardware device behavior of UCLID language description; Equipment behavior transforms can adopt " Automatic Abstraction and Verification of Verilog Models " said method of paper.
Consistency detection module 3 is used for the equipment code and the hardware device behavior input model testing tool of said UCLID language description are drawn testing result.Also need import the consistance target of UCLID language description here, to model checking tools.
Wherein, said equipment code conversion module 1 comprises:
Variable conversion module 4 is used for the variable of the Termite language that uses is converted into the variable of UCLID language;
Constant conversion module 5 is used for the constant of the Termite language that uses is converted into the constant of UCLID language;
Operational order conversion module 6 is used for the operational order of the Termite language that uses is converted into the FUNC and the PRED operational order function of UCLID language.
Said variable conversion module 4 comprises:
Enumeration type conversion module 7 is used for the enumeration type of Termite language is converted into the enumeration type of UCLID language;
Pointer type conversion module 8, being used for Termite Guide Finger of Language conversion in type is that variable and the parameter of the TERM type of UCLID language is 1 FUNC function.
Variable in the UCLID language is used to store the value of Termite Guide Finger of Language, and promptly it points to the memory address of variable, and the FUNC function obtains the value of pointed variable according to the variable of above-mentioned TERM type; If the data width of Termite language integer variable is 1, then be converted into the variable of the TRUTH type of UCLID language; If the data width of Termite language shaping variable is not 1, then be converted into the variable of the TERM type of UCLID language; If in the Termite code, there is the variable of a structure type, be that each data item of this structure categorical variable is created a variable in the UCLID code.
Said constant conversion module 5 comprises:
Big constant conversion module 9 is used for the big constant of Termite language is converted into the CONST TERM of UCLID language;
Little constant conversion module 10 is used to use succ function and pred function that the little constant of Termite language is handled.
Said operational order conversion module 6 comprises:
TRUTH variable conversion module 11 is used to use the Boolean connective operation operational order of Termite language to be converted into the TRUTH variable of UCLID language;
TERM variable conversion module 12 is used for the operational order of Termite language is converted into the TERM variable of UCLID language.If compare computing, then convert the PRED function to, if do not compare computing, then convert the FUNC function to.
Said consistency detection module 3 comprises: variable adds module 13; Be used for partly adding two variablees in the variable-definition of model checking tools control module; Be respectively applied for the value of UCLID code that storage transforms by the Termite code all registers when carrying out predetermined state, and the value of all registers when transferring to above-mentioned state by the UCLID code that the Verilog code transforms.
Said consistency detection module comprises: matching module 14 is used to judge whether the value of all registers of two variable storage is equal fully.
Through equipment code and equipment behavior are carried out consistency detection, can effectively improve the reliability of equipment code and device drives.
Above embodiment only is used to explain the present invention; And be not limitation of the present invention; The those of ordinary skill in relevant technologies field under the situation that does not break away from the spirit and scope of the present invention, can also be made various variations and modification; Therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.

Claims (7)

1. the consistency detection system of equipment code and equipment behavior is characterized in that, comprising:
Equipment code conversion module (1) is used for the equipment code that equipment code with the Termite language description is converted into the UCLID language description that model checking tools can discern;
Equipment behavior conversion module (2) is used for the hardware device behavior of Verilog language description is converted into the hardware device behavior of UCLID language description;
Consistency detection module (3) is used for the equipment code and the hardware device behavior input model testing tool of said UCLID language description are drawn testing result.
2. the consistency detection system of equipment code as claimed in claim 1 and equipment behavior is characterized in that, said equipment code conversion module (1) comprising:
Variable conversion module (4) is used for the variable of the Termite language that uses is converted into the variable of UCLID language;
Constant conversion module (5) is used for the constant of the Termite language that uses is converted into the constant of UCLID language;
Operational order conversion module (6) is used for the operational order of the Termite language that uses is converted into the FUNC and the PRED operational order function of UCLID language.
3. the consistency detection system of equipment code as claimed in claim 2 and equipment behavior is characterized in that, said variable conversion module (4) comprising:
Enumeration type conversion module (7) is used for the enumeration type of Termite language is converted into the enumeration type of UCLID language;
Pointer type conversion module (8), being used for Termite Guide Finger of Language conversion in type is that variable and the parameter of the TERM type of UCLID language is 1 FUNC function.
4. the consistency detection system of equipment code as claimed in claim 2 and equipment behavior is characterized in that, said constant conversion module (5) comprising:
Big constant conversion module (9) is used for the big constant of Termite language is converted into the CONST TERM of UCLID language;
Little constant conversion module (10) is used to use succ function and pred function that the little constant of Termite language is handled.
5. the consistency detection system of equipment code as claimed in claim 2 and equipment behavior is characterized in that, said operational order conversion module (6) comprising:
TRUTH variable conversion module (11) is used to use the Boolean connective operation operational order of Termite language to be converted into the TRUTH variable of UCLID language;
TERM variable conversion module (12) is used for the operational order of Termite language is converted into the TERM variable of UCLID language.
6. the consistency detection system of equipment code as claimed in claim 1 and equipment behavior; It is characterized in that; Said consistency detection module (3) comprising: variable adds module (13); Be used for partly adding two variablees, be respectively applied for the value of UCLID code that storage transforms by the Termite code all registers when carrying out predetermined state in the variable-definition of model checking tools control module, and the value of all registers when transferring to above-mentioned state by the UCLID code that the Verilog code transforms.
7. the consistency detection system of equipment code as claimed in claim 6 and equipment behavior is characterized in that, said consistency detection module (3) comprising: matching module (14) is used to judge whether the value of all registers of two variable storage is equal fully.
CN2011103912034A 2011-11-30 2011-11-30 Consistency detection system of equipment specification and equipment behavior Pending CN102495766A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103912034A CN102495766A (en) 2011-11-30 2011-11-30 Consistency detection system of equipment specification and equipment behavior

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103912034A CN102495766A (en) 2011-11-30 2011-11-30 Consistency detection system of equipment specification and equipment behavior

Publications (1)

Publication Number Publication Date
CN102495766A true CN102495766A (en) 2012-06-13

Family

ID=46187593

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103912034A Pending CN102495766A (en) 2011-11-30 2011-11-30 Consistency detection system of equipment specification and equipment behavior

Country Status (1)

Country Link
CN (1) CN102495766A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113763429A (en) * 2021-09-08 2021-12-07 广州市健坤网络科技发展有限公司 Pig behavior recognition system and method based on video

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101167050A (en) * 2005-04-21 2008-04-23 阿尔斯通铁路公开有限公司 Control system for railway signalling network
CN101833510A (en) * 2010-03-29 2010-09-15 清华大学 Address translation method for flash storage FTL
US20100251224A1 (en) * 2009-03-27 2010-09-30 Cheriton David R Interpreter-based program language translator using embedded interpreter types and variables

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101167050A (en) * 2005-04-21 2008-04-23 阿尔斯通铁路公开有限公司 Control system for railway signalling network
US20100251224A1 (en) * 2009-03-27 2010-09-30 Cheriton David R Interpreter-based program language translator using embedded interpreter types and variables
CN101833510A (en) * 2010-03-29 2010-09-15 清华大学 Address translation method for flash storage FTL

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZAHER S.ANDRAUS ET AL: "《Automatic Abstraction and Verification of Verilog Models》", 《DESIGN AUTOMATION CONFERENCE》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113763429A (en) * 2021-09-08 2021-12-07 广州市健坤网络科技发展有限公司 Pig behavior recognition system and method based on video

Similar Documents

Publication Publication Date Title
CN108089974B (en) Testing applications with defined input formats
US8578216B2 (en) Execution history tracing method
CN101976187B (en) Stack tracing method and device in decompilation process and decompiler
KR101081090B1 (en) Register-based instruction optimization for facilitating efficient emulation of an instruction stream
CN101127015A (en) Method and system for controlling and processing data transmission of environment
US20090300613A1 (en) Input/output emulation system for virtual machine
CN115952758B (en) Chip verification method and device, electronic equipment and storage medium
CN103279846A (en) Project acceptance method and system based on BIM model
US20100257407A1 (en) Electronic card able to execute a command originating from a simulation system and a command originating from a diagnostic module and associated simulation method
CN106598564A (en) Method for implementing BIOS capable of self-adapting to different main boards, BIOS, and main board
CN105518622A (en) Methods and apparatus to validate translated guest code in dynamic binary translator
CN100416496C (en) Scratch memory for updating instruction error state
CN101344856A (en) Apparatus and method for increasing the speed of performing task
CN101763324B (en) Method for realizing equipment simulating and device thereof
CN105607874B (en) SATA (Serial advanced technology attachment) protocol acceleration module, host and hard disk communication method, as well as solid state drive controller
CN102495766A (en) Consistency detection system of equipment specification and equipment behavior
CN112596868A (en) Model training method and device
CN112347017A (en) PS/2 keyboard dual-host plug-in system with LPC bus interface and switching method
CN204480170U (en) Based on processor Autonomous test, abnormal time resetting system
CN203894745U (en) Interface control circuit and related input system
CN103164357A (en) Removal strategy setting method of electronic device and universal serial bus (USB) device
CN103389922B (en) For the bus ECC check system of random access memory
CN102508769A (en) Debugged program debugging method based on core-implanted debugger
CN102955545A (en) Computer
CN201527648U (en) System-on-chip data writing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120613