Foreword
Preface
Acknowledgments
Contents
Figures
Tables
1 Introduction
1.1…How Will This Book Help You?
1.2…SystemVerilog Assertions and Functional CoverageFunctional Coverage Under IEEE 1800 SystemVerilogIEEE 1800 SystemVerilog Umbrella
1.3…SystemVerilog Assertions EvolutionAssertions Evolution
2 System Verilog Assertions
2.1…What is an AssertionAssertionWhat is an Assertion?
2.2…Why Assertions? What are the AdvantagesAssertions advantages?
2.2.1 Assertions Shorten Time to DevelopAssertions shorten time to develop
2.2.2 Assertions Improve ObservabilityAssertions improve observabilityobservability
2.2.3 Assertions Provide Temporal Domain Functional Coveragefunctional coverage
2.2.3.1 Assertion Based Methodology Allows for Full Random Verificationrandom verification
2.2.3.2 Assertions Help Detect Bugsdetect bugs not Easily Observed at Primary Outputs
2.2.3.3 Other Major Benefitsmajor benefits
2.3…How do Assertions Work with an EmulatorAssertions in an emulator?
2.4…Assertions in Static FormalAssertions in Static Formal
2.5…One Time Effort, Many Benefits
2.6…Assertions Whining
2.6.1 Who Will Add Assertions? War Within!
2.7…A Simple PCI ReadPCI Read Example: Creating an Assertions Test PlanCreating an assertions test plan
2.8…What Type of Assertionstype of assertions Should I Add?
2.9…Protocol for Adding AssertionsProtocol for adding assertions
2.10…How do I Know I have Enough Assertions?enough assertions?
2.11…Use Assertions for Specification and ReviewAssertions for Specification and Review
2.12…Assertion Types
2.13…ConventionsConventions Used in the Book
3 Immediate Assertions
4 Concurrent Assertions: Basics (Sequence, Property, Assert)
4.1…Implication Operator, Antecedent and Consequent
4.2…Clocking Basics
4.3…Sampling Edge (Clock Edge) Value: How are Assertions Evaluated in a Simulation Time Tick?
4.3.1 Default Clocking Block
4.3.2 Gated Clk
4.4…Concurrent Assertions are Multi-Threaded
4.5…Formal Arguments
4.6…Disable (Property) Operator: ‘disable iff’
4.7…Severity Levels (for Both Concurrent and Immediate Assertions)
4.8…Bindingbinding Properties
4.8.1 Binding Properties (Scope Visibility)
4.8.2 Assertion Adoption in Existing DesignABV Adoption in Existing Design
4.9…Difference Between ‘sequence’ and ‘property’
5 Sampled Value FunctionsSampled Value Functions $rose$rose, $fell$fell
5.1…$rose: Edge DetectionEdge detection$rose -- edge detection in Property/Sequence
5.1.1 Edge Detection is Useful Because hellip
5.1.2 $fell$fell: Edge Detectionedge detection in Property/Sequence
5.1.3 $rose, $fell: In Procedural$rose, $fell -- in Procedural
5.2…$stable$stable
5.2.1 $stable in Procedural Block$stable in procedural block
5.3…$past$past
5.3.1 Application: $pastApplication\$past$past()
5.3.2 $past$past rescues $fell!
6 Operators
6.1…##m##m: Clock DelayClock Delay
6.1.1 Clock Delay Operator :: ##m##m Where m=0
6.1.1.1 Application: Clock Delay OperatorApplication\Clock delay operator :: ##m##m (m=0)
6.2…##[m:n]##[m\n]: Clock DelayClock Delay Range
6.2.1 Clock Delay Range Operator: ## [m:n] :: Multiple Threads
6.2.2 Clock Delay Range OperatorClock delay range operator :: ##[m:n]##[m\n] (m=0; n=$)
6.3…[*m][*m]: Consecutive Repetition OperatorConsecutive repetition operator
6.4…[*m:n][*m\n]: Consecutive Repetition RangeConsecutive Repetition Range
6.4.1 Application: Consecutive Repetition Range OperatorConsecutive Repetition Range operatorApplication\Consecutive Repetition Range operator
6.5…[=m][=m]: Repetition Non-Consecutivenon-consecutiveRepetition non-consecutive
6.6…[=m:n][= m\n]: Repetition Non-Consecutivenon-consecutive RangeRepetition non-consecutive range
6.6.1 Application: Repetition Non-Consecutive OperatorApplication\Repetition non-consecutive operator
6.7…[- greaterthan m][- greaterthan m] Non-Consecutive GoTo RepetitionGoTo repetition Operator
6.8…Difference Between [=m:n] and [- greaterthan m:n]Difference between [=m\n] and [- greaterthan m\n]
6.8.1 Application: GoTo Repetition---Non-Consecutive OperatorApplication\GoTo repetition---non-consecutive operator
6.9…sig1 ThroughoutThroughout seq1
6.9.1 Application: sig1 Throughout seq1Application \sig1 throughout seq1
6.10…seq1 withinwithin seq2
6.10.1 Application: seq1 within seq2Application\seq1 within seq2
6.10.2 ‘within’ Operator PASS CASES
6.10.3 ‘within’ Operator: FAIL CASES6.11…seq1 andand seq2seq1 and seq2
6.11…seq1 andand seq2seq1 and seq2
6.11.1 Application: ‘and’ OperatorApplication\‘and’ operator
6.12…seq1 ‘or’ seq2seq1 or seq2
6.12.1 Application: or OperatorApplication\or operator
6.13…seq1 ‘intersect’Intersect seq2
6.14…Application: ‘intersect’ OperatorApplication\‘intersect’ perator
6.14.1 Application: Intersect Operator (Interesting Application)Application\intersect operator (interesting application)
6.14.2 ‘intersect’ and ‘and’ :: What’s the Difference?‘Intersect’ and ‘and’ \\What’s the difference?
6.15…first_matchfirst_match complex_seq1
6.15.1 Application: first_matchApplication \first_match
6.16…not lessthan property expr greaterthan not lessthan property expr greaterthan
6.16.1 Application: not OperatorApplication\not operatornot operator
6.17…if (expression) property_expr1 else property_expr2if (expression) property_expr1 else property_expr2
6.17.1 Application: if then elseif then elseApplication\if then else
7 System Functions and Tasks
7.1…$onehot, $onehot0$onehot, $onehot0
7.2…$isunknown$isunknown
7.2.1 Application $isunknownApplication $isunknown
7.3…$countones$countones
7.3.1 $countones (as a boolean)$countones (as a boolean!!)
7.4…$assertoff$assertoff, $asserton$asserton, $assertkill$assertkill
8 Multiple Clocks
8.1…Multiply Clocked Sequences and Property OperatorsMultiply clocked Sequences and Property operators
8.1.1 Multiply Clocked Sequences
8.1.2 Multiply Clocked Sequences: Legal and Illegal SequencesMultiply clocked sequences: Legal and illegal sequences
8.1.3 Multiply Clocked Properties---‘and’ OperatorMultiply Clocked Properties---‘and’ Operator
8.1.4 Multiply Clocked Properties---‘or’ OperatorMultiply Clocked Properties---‘or’ operator
8.1.5 Multiply Clocked Properties---‘not’ OperatorMultiply clocked Properties---‘not’ Operator
8.1.6 Multiply Clocked Properties---Clock ResolutionMultiply Clocked Properties---Clock Resolution
8.1.7 Multiply Clocked Properties---Legal and Illegal ConditionsMultiply clocked Properties---Legal and Illegal conditions
9 Local VariablesLocal Variables
9.1…Application: Local VariablesApplication \Local Variables
10 Recursive PropertyRecursive property
10.1…Application: Recursive PropertyApplicationRecursive Property
11 Detecting and Using Endpoint of a SequenceDetecting and Using Endpoint of a Sequence
11.1….ended.ended
11.2….matched.matched
11.2.1 Application: .matchedApplication: .matched
12 ‘expect’expect and ‘assume’
13 ‘assume’assume and Formal (Static Functionalstatic functionalformal (static functional) Verification
14 Other Important TopicsApplications and important topics
14.1…Asynchronous FIFO AssertionsAsynchronous FIFO AssertionsFIFO AssertionsApplication\
14.1.1 FIFO Design
14.1.2 FIFO Test-Bench and AssertionsFIFO DESIGN, TESTBENCH AND ASSERTIONS
14.1.3 Test the Test-benchTest the Testbench
14.2…Embedding Concurrent Assertions in Procedural CodeEmbedding concurrent assertions in procedural code
14.3…Calling SubroutinesCalling subroutines
14.4…Sequence as a Formal ArgumentSequence as a formal argument
14.5…Sequence as an AntecedentSequence as an antecedent
14.6…Sequence in Sensitivity ListSequence in sensitivity list
14.7…Building a CounterBuilding a counter
14.8…Clock DelayClock Delay: What if You Want Variable Clock Delay?Variable delay?
14.9…What if the ‘action blockrsquor is Blocking?
14.10…Interesting Observation with Multiple Implications in a Property. Be Very Carefulhellip
14.11…Subsequence in a SequenceSubsequence in a sequence
14.12…Cyclic DependencyCyclic dependency
14.13…Refinement on a ThemeRefinement on a themehellip
14.14…Simulation Performanceperformance EfficiencySimulation performance efficiency
14.15…Itrsquors a Vacuous Worldvacuous world! Huh?
14.15.1 Concurrent Assertion --Without- an Implicationimplication
14.15.2 Concurrent Assertion --with- an ImplicationConcurrent assertion --with- an implicationimplication
14.15.3 Vacuous PassVacuous pass. What?
14.15.4 Concurrent Assertion--with ‘coverrsquorConcurrent Assertion---with ‘coverrsquor
14.16…Empty Sequence
15 Asynchronous Assertions !!!Asynchronous Assertions !!!
Outline placeholder
16.1…Strong and Weak SequencesWeak sequencesStrong and Weak sequences
16.2…Deferred Assertions
16.3…$changed
16.4…$sampled
16.5…$past_gclk, $rose_gclk, $fell_gclk, $stable_gclk, $changed_gclk, $future_gclk, $rising_gclk, $falling_gclk, $steady_gclk, $changing_gclk
16.6…‘triggeredtriggered’
16.7…‘followed by’ Property #-# and #=#
16.8…‘always’always and ‘s_always’s_always Property
16.9…‘eventually’eventually, ‘s_eventually’s_eventually
16.10…until, s_until, until_with and s_until_with Properties
16.11…nexttimeNexttime and s_nexttime
16.12…Case Statement
16.13…$inferred_clock$inferred_clock and $inferred_disable
16.14…Let Declarations
16.14.1 Let: Local Scope
16.14.2 Let: with Parameters
16.14.3 Let: In Immediate and Concurrent Assertions
16.15…‘restrictrestrict’ for Formal Verification
16.16…Abort Properties: reject_onreject_on, accept_onaccept_on, sync_reject_onsync_reject_on, sync_accept_onsync_accept_on
16.17…$assertpassoff, $assertpasson, $assertfailoff, $assertfailon, $assertnonvacuouson, $assertvacuousoff
16.18…CheckersCheckers
16.18.1 Nested CheckersCheckersNested
16.18.2 Checkers: Illegal ConditionsCheckers\illegal conditions
16.18.3 Checkers: Important PointsCheckers\Important Points
16.18.4 Checker: Instantiation RulesChecker\Instantiation Rules
17 SystemVerilog Assertions LABs
17.1…LAB1: Assertions with/without Implication
17.1.1 LAB1: ‘bind’ DUT Model and Test-Bench
17.1.2 LAB1: Questions
17.2…LAB 2: Overlap and Non-Overlap Operators
17.2.1 LAB2 DUT Model and Test-Bench
17.2.2 LAB2: Questions
17.3…LAB3: FIFO Assertions
17.3.1 LAB3: DUT Model and Test-Bench
17.3.2 LAB3: Questions
17.4…LAB4: Counter
17.4.1 LAB4: Questions
17.5…LAB5: Data Transfer Protocol
17.5.1 LAB5: Questions
17.6…LAB6: PCI Read Protocol
17.6.1 LAB6: Questions
18 System Verilog Assertions: LAB Answers
18.1…LAB1: Answers : ‘Bind’ and Implication Operators (Figs. 18.1, 18.2, 18.3)
18.2…LAB2: Answers : Overlap and Non-Overlap Operators (Figs. 18.4, 18.5)
18.3…LAB3: Answers : FIFO (Fig. 18.6)
18.4…LAB4: Answers : Counter (Fig. 18.7)
18.5…LAB5: Answers : Data Transfer Protocol (Fig. 18.8)
18.6…LAB6: Answers (Fig. 18.9)
19 Functional CoverageFunctional Coverage
19.1…Difference Between Code CoverageCode Coverage and Functional CoverageFunctional Coverage
19.2…Assertion Based Verification and Functional Coverage Based Methodology
19.2.1 Follow the BugsFollow the Bugs !!
20 Functional Coverage: Language Features
20.1…Covergroup/CoverpointCovergroup
20.2…SystemVerilog ‘covergroupCovergroup’: Basicshellip
20.3…SystemVerilog coverpointcoverpoint Basicshellip
20.3.1 Covergroup/Coverpoint ExampleCovergroup/Coverpoint Example hellip
20.4…SystemVerilog ‘binsbins’: Basics‘bins’ -- basicsSystemVerilog ‘bins’: basics hellip
20.4.1 Covergroup/Coverpoint with bins: ExampleCovergroup/Coverpoint with bins -- example hellip
20.4.2 SystemVerilog ‘covergroup’: Formal and Actual Arguments
20.4.3 ‘covergroupCovergroup’ in a ‘class’
20.5…‘crosscross’ Coverage‘cross’ coverage
20.6…More ‘bins’
20.6.1 ‘bins’ for Transition Coverage‘bins’ for transition coverage
20.6.2 ‘wildcard’ ‘bins’‘wildcard’ ‘bins’
20.6.3 ‘ignore_bins’‘ignore_bins’
20.6.4 ‘illegal_bins’‘illegal_bins’
20.6.5 ‘binsof’ and ‘intersect’‘binsof’ and ‘intersect’
21 Performance Implications of Coverage Methodology
21.1…Know what you Should Cover
21.2…Know when you Should Cover
21.3…When to ‘Cover’ (Performance Implication)
21.4…Application: Have you Transmitted All Different Lengths of a Frame?
22 Coverage Options (Reference Material)
22.1…Coverage Options: Instance Specific---Example (Figs. 22.1 and 22.2)
22.2…Coverage Options: Instance Specific Per-Syntactic Level (Figs. 22.3 and 22.4)
22.3…Coverage Options for ‘Covergroup’ Type: Example (Figs. 22.5 and 22.6)
Index