Slide 1Applying Data Abstraction to Hardware VerificationChallenge: System-Level VerificationSources of ComplexityExisting Verification MethodsWord-Level AbstractionData Abstraction #1: Bits → IntegersModeling Data SelectionAbstracting Data BitsAbstraction #2: Uninterpreted FunctionsAbstracting FunctionsModeling Data-Dependent ControlAbstraction #3: Modeling Memories as Mutable FunctionsEffect of Memory Write OperationSystems with BuffersSome History of Term-Level ModelingUCLIDChallenge: Model GenerationGenerating Term-Level ModelUnderlying LogicEUF: Equality with Uninterp. FunctsUCLID OperationUCLID ExampleWriting & Reading Register FileWriting Register FileReading Register FileVerifying Safety PropertiesBounded Model CheckingTrue Model CheckingInductive Invariant CheckingAn Out-of-order Processor (OOO)Verifying OOOAdding Shadow StateInvariant CheckingOOO InvariantsState Consistency Invariant ExamplesExtending the OOO ProcessorComparative Verification Effort“I Just Want a Loaf of Bread”Cooking with InvariantsAutomatic Recipe GenerationAutomatic Predicate AbstractionAbstract State SpaceAbstract State MachineGenerating Concrete InvariantSystems Verified with Predicate AbstractionAutomatic Predicate DiscoveryImplementation of Predicate DiscoveryFuture ProspectsCarnegie Mellon UniversitySystem ModelingSystem Modelingand Verificationand Verificationwith UCLIDwith UCLIDSystem ModelingSystem Modelingand Verificationand Verificationwith UCLIDwith UCLIDhttp://www.cs.cmu.edu/~bryantRandal E. BryantContributions by former graduate students:Sanjit Seshia, Shuvendu Lahiri– 2 –Applying Data Abstraction to Hardware VerificationApplying Data Abstraction to Hardware VerificationIdeaIdeaAbstract details of data encodings and operationsKeep control logic preciseApplicationsApplicationsVerify overall correctness of systemAssuming individual functional units correctTechnologyTechnologyUse restricted subset of first-order logicImplement efficient decision proceduresMultiple methods of performing verification– 3 –Alpha 21264 MicroprocessorMicroprocessor Report, Oct. 28, 1996Challenge: System-Level VerificationChallenge: System-Level VerificationVerification TaskVerification TaskDoes processor implement its ISA?Why is it Hard?Why is it Hard?Lots of internal stateComplex control logicComplex functionality– 4 –Sources of ComplexitySources of ComplexityStateStateISA: registers, memoryMicroarchitectural: caches, buffers, reservation stationsConceptually finite state, but practically unboundedControlControlPipelines spread execution across multiple cyclesOut-of-order execution modifies processing orderSuperscalar operation creates parallelismControl logic coordinates everythingResulting behavior matches that of sequential ISA modelFunctionalityFunctionalityArithmetic functions, instruction decoding– 5 –Existing Verification MethodsExisting Verification MethodsSimulators, equivalence checkers, model checkers, …All Operate at Bit LevelAll Operate at Bit LevelRTL modelState encoded as words and arrays of wordsComprised of bitsMost Operate at Cycle or Subcycle LevelMost Operate at Cycle or Subcycle LevelHow each bit of state gets updatedSystem Modeling LanguagesSystem Modeling LanguagesAbstract time up to transaction levelStill view state as collection of bits– 6 –Word-Level AbstractionWord-Level AbstractionData: Abstract details of form & functionsControl: Keep at bit levelTiming: Keep at cycle levelControl LogicControl LogicData PathData PathCom.Log.1Com.Log.2– 7 –Data Abstraction #1: Bits → IntegersData Abstraction #1: Bits → IntegersView Data as Symbolic WordsView Data as Symbolic WordsArbitrary integersNo assumptions about size or encodingClassic model for reasoning about softwareCan store in memories & registersx0x1x2xn-1x– 8 –Modeling Data SelectionModeling Data SelectionIf-Then-Else OperationIf-Then-Else OperationMulitplexorAllows control-dependent data flow10xypITE(p, x, y)10xy1x10xy0y– 9 –Data PathData PathCom.Log.1Com.Log.2Abstracting Data BitsAbstracting Data BitsControl LogicControl LogicData PathData PathCom.Log.1Com.Log.1? ?What do we do about logic functions?– 10 –Abstraction #2:Uninterpreted FunctionsAbstraction #2:Uninterpreted FunctionsFor any Block that Transforms or Evaluates Data:For any Block that Transforms or Evaluates Data:Replace with generic, unspecified functionOnly assumed property is functional consistency:a = x b = y f (a, b) = f (x, y)ALUf– 11 –Abstracting FunctionsAbstracting FunctionsFor Any Block that Transforms Data:For Any Block that Transforms Data:Replace by uninterpreted functionIgnore detailed functionalityConservative approximation of actual systemData PathData PathControl LogicControl LogicCom.Log.1Com.Log.1F1F2– 12 –Modeling Data-Dependent ControlModeling Data-Dependent ControlModel by Uninterpreted PredicateModel by Uninterpreted PredicateYields arbitrary Boolean value for each control + data combinationProduces same result when arguments matchPipeline & reference model will branch under same conditionsCondAdataBdataBranch?BranchLogicp– 13 –Abstraction #3: Modeling Memories as Mutable FunctionsAbstraction #3: Modeling Memories as Mutable FunctionsMemory M Modeled as FunctionMemory M Modeled as FunctionM(a): Value at location aInitiallyInitiallyArbitrary stateModeled by uninterpreted function m0MaMam0– 14 –Effect of Memory Write OperationEffect of Memory Write OperationWriting Transforms MemoryWriting Transforms MemoryM = Write(M, wa, wd)Reading from updated memory:Address wa will get wdOtherwise get what’s already in M Express with Lambda NotationExpress with Lambda NotationNotation for defining functionsM = a . ITE(a = wa, wd, M(a))MMa10wd=wa– 15 –Systems with BuffersSystems with BuffersModeling MethodModeling MethodMutable function to describe buffer contentsIntegers to represent head & tail pointers•••••••••tailtailheadheadIn Use••••••tailtailheadheadheadheadIn Use•••0 0 0 0 MaxMax--11MaxMax--11Unbounded BufferCircular Queue– 16 –Some History of Term-Level ModelingSome History of Term-Level ModelingHistoricallyHistoricallyStandard model used for program verificationWidely used with theorem-proving approaches to hardware verificationE.g, Hunt ’85Automated
or
We will never post anything without your permission.
Don't have an account? Sign up