EDA365电子工程师网
标题:
SystemVerilog for Verification
[打印本页]
作者:
xuzwg
时间:
2016-5-4 16:14
标题:
SystemVerilog for Verification
6 L; a& U2 S# B5 u: P. F* b+ X5 A
SystemVerilog for Verification:
- q7 V2 z# a! F- M- [8 z. N0 ^
A Guide to Learning the Testbench Language Features
& Z4 c; j/ Z1 s) W" E) f2 M
1. VERIFICATION GUIDELINES 1
0 b- ]. w# `% o1 c* o
1.1 Introduction 1
6 |9 o- S1 y; j
1.2 The Verification Process 2
: o; c! P& n0 f& O7 V( J
1.3 The Verification Plan 4
- B- o# f9 S# ?
1.4 The Verification Methodology Manual 4
" G. k+ v( m- x3 }6 _+ c7 w) c
1.5 Basic Testbench Functionality 5
/ |9 E! o: ^+ D) t$ o4 v; ?0 `$ p
1.6 Directed Testing 5
" ?' b( m, _: {0 }
1.7 Methodology Basics 7
/ M* {; O- M6 \9 |- Q
1.8 Constrained-Random Stimulus 8
2 O; s# j* p! G1 m2 }3 v
1.9 What Should You Randomize? 10
1 P4 U2 M' z+ L
1.10 Functional Coverage 13
1 C* i9 Y& ]& l' t$ ?
1.11 Testbench Components 15
/ K8 W- U% H9 m9 ^& E
1.12 Layered Testbench 16
8 ]" I' n) _! L: b, ?/ ]
1.13 Building a Layered Testbench 22
" R% O6 Z8 b$ I& [' y
1.14 Simulation Environment Phases 23
4 `$ D/ O8 Z. d0 N, b6 E
1.15 Maximum Code Reuse 24
+ {8 e' O* Y) A* Z% l4 B; m ]
1.16 Testbench Performance 24
7 X, h1 b; a6 W- H
1.17 Conclusion 25
2 X f' B- w5 _( y% _9 U
2. DATA TYPES 27
( A) z# y4 p# [' s" y6 P& @1 o
2.1 Introduction 27
! T5 p* G' ]6 h1 o C
2.2 Built-in Data Types 27
2 s6 k4 [7 P- e) H$ O( {
viii SystemVerilog for Verification
1 G/ K3 E% |6 c- V- _5 h
2.3 Fixed-Size Arrays 29
* M- E* _) D7 g4 j" s# p u
2.4 Dynamic Arrays 34
2 n3 ^3 j& x4 A, L; i
2.5 Queues 36
8 P |& W) h9 {6 l0 @1 Y; n
2.6 Associative Arrays 37
' j k2 x# ^( T, |% g1 R) L. F9 F
2.7 Linked Lists 39
) K. B# T$ c. m X/ V( W# m. H; b
2.8 Array Methods 40
# o \. D3 w* a* q/ D6 H
2.9 Choosing a Storage Type 42
2 M [% J: b) j9 f) R; R l7 e" [9 f
2.10 Creating New Types with typedef 45
( Z3 a7 x t( r; M$ K5 u
2.11 Creating User-Defined Structures 46
4 h6 z6 N K- m+ ^# _! c) \. F, S- O
2.12 Enumerated Types 47
- ]$ ^; |+ j6 I
2.13 Constants 51
+ G: r- E$ p7 b# n% [. S
2.14 Strings 51
/ x3 Y4 r+ E# X# a; x
2.15 Expression Width 52
7 w# R$ L3 }" U6 Y% G; ]# O. Y
2.16 Net Types 53
1 N3 Q; U) G C2 b
2.17 Conclusion 53
% V8 A0 @4 G; R
3. PROCEDURAL STATEMENTS AND ROUTINES 55
% l" @7 l2 }3 a1 S9 P
3.1 Introduction 55
4 D0 i9 S n! J! v8 B' p
3.2 Procedural Statements 55
( [* s; h2 T. p5 }: ^ l' y
3.3 Tasks, Functions, and Void Functions 56
+ R: e( e% C. o, H! ]( x
3.4 Task and Function Overview 57
* ?7 i. _) x1 q& N. n& X g% ~" Z6 K
3.5 Routine Arguments 57
; r' r' L: o/ W9 v+ B
3.6 Returning from a Routine 62
P" N) Q! D+ o4 ~9 k& {- Y. r' a' J& t a
3.7 Local Data Storage 62
( u u( w1 X7 H& J3 _8 [# x
3.8 Time Values 64
" b+ |+ M" J( o
3.9 Conclusion 65
* Z |& A5 G& b. Y
4. BASIC OOP 67
/ e* J5 F! Q+ I
4.1 Introduction 67
# w \! F; ^, u" e' E1 y
4.2 Think of Nouns, not Verbs 67
" L' w, H# w! m, [7 U
4.3 Your First Class 68
$ z( N# _7 ^. j+ U; x9 \, v! b
4.4 Where to Define a Class 69
: e7 l6 [' Q; b+ H* r
4.5 OOP Terminology 69
! ]( Z0 k" i! W3 t
4.6 Creating New Objects 70
' X, O8 U- ?) \ ?8 b% [3 Y
4.7 Object Deallocation 74
% O3 N: b& N9 u: q! V2 ?5 I% c
4.8 Using Objects 76
# U; ? y$ s$ [9 M
4.9 Static Variables vs. Global Variables 76
1 D4 ]4 P/ h9 j- ~
4.10 Class Routines 78
0 p% j9 x1 u% ]+ d' C M! p- N
4.11 Defining Routines Outside of the Class 79
( V: a+ J1 O& ^3 B
4.12 Scoping Rules 81
* t: r& t% x4 c1 v6 L! ]
4.13 Using One Class Inside Another 85
# M# }0 l5 l& p+ f! j6 d# C' A
4.14 Understanding Dynamic Objects 87
$ o. I Z. \2 k ?7 h9 j* b
4.15 Copying Objects 91
, S- T. r @& H! `2 B9 y
4.16 Public vs. Private 95
( J, ?$ M* ]' J% C
Contents ix
' c$ k, W, R8 B) P& ?3 J
4.17 Straying Off Course 96
: m6 C2 u, `+ r4 l0 d2 w. P4 _
4.18 Building a Testbench 96
% O0 v" D" L4 W4 c
4.19 Conclusion 97
8 _; j- l9 b8 n( o( Q7 B
5. CONNECTING THE TESTBENCH AND DESIGN 99
1 b1 E. y1 D1 `2 r: }
5.1 Introduction 99
; ~, B1 k- Q( m2 I
5.2 Separating the Testbench and Design 99
6 _5 V# B$ y$ G+ M5 f
5.3 The Interface Construct 102
/ A5 L; u8 ]; D0 M$ h0 y, s
5.4 Stimulus Timing 108
7 m0 h2 G; P2 O7 M0 C9 l' u* H
5.5 Interface Driving and Sampling 114
$ L n+ n3 d5 `+ Y
5.6 Connecting It All Together 121
3 f$ Q. Z9 i( X, ]& o
5.7 Top-Level Scope 121
. W. {. H8 \" x% i5 K2 O! c
5.8 Program – Module Interactions 123
) t" T/ x0 R% t& F
5.9 SystemVerilog Assertions 124
7 y8 ~- M0 Y0 V; y" r
5.10 The Four-Port ATM Router 126
+ p, W4 I8 o }+ b. A
5.11 Conclusion 134
: i4 q+ K" _4 U$ p) {" b2 w, C, H
6. RANDOMIZATION 135
% E1 M; R- G8 V
6.1 Introduction 135
' e$ u- R) i/ m! w
6.2 What to Randomize 136
: B% t; F1 J1 q& B9 {
6.3 Randomization in SystemVerilog 138
; Y$ P) G# u8 Z( ~3 N. `
6.4 Constraint Details 141
: ^2 F$ o/ ~) J
6.5 Solution Probabilities 149
% K3 r& F$ Z6 @% I
6.6 Controlling Multiple Constraint Blocks 154
% F/ r: B2 H0 _0 Y
6.7 Valid Constraints 154
. j5 k. |# M/ [: ?: \) r! @$ F
6.8 In-line Constraints 155
7 `- D L- N; ?. c% r; K
6.9 The pre_randomize and post_randomize Functions 156
4 k% f6 s2 K. v, [
6.10 Constraints Tips and Techniques 158
7 \0 ]9 G- B7 [# p
6.11 Common Randomization Problems 164
2 e7 _) e2 G ]1 b. F7 J
6.12 Iterative and Array Constraints 165
2 B9 t/ W9 _; T5 _; y8 k& Q
6.13 Atomic Stimulus Generation vs. Scenario Generation 172
* d# {% p8 p6 S$ i4 ?6 {! D
6.14 Random Control 175
# P2 g: F' X% |8 T! f" w$ ?3 n
6.15 Random Generators 177
0 r9 f7 l9 Z' E. V g9 q$ ~
6.16 Random Device Configuration 180
* ? r- k5 N# c( c4 l, F8 A# a6 e
6.17 Conclusion 182
2 q' U% u& _. K" ?" V6 A- p
7. THREADS AND INTERPROCESS COMMUNICATION 183
. w& r! U/ Y5 F6 f# Q
7.1 Introduction 183
# z u0 }0 h, e' v1 u. W1 {
7.2 Working with Threads 184
3 K8 B2 q' Q! w+ n- `( e
7.3 Interprocess Communication 194
: j9 M( E! M" Q |
7.4 Events 195
. e8 L0 P' z# {$ l0 i1 d' d
7.5 Semaphores 199
: `2 N9 j- ^# P' w
7.6 Mailboxes 201
& x' L; h- ?; A; O' i% s! W" }: K, ?
7.7 Building a Testbench with Threads and IPC 210
8 [/ u6 t* h5 }# F% V6 q
x SystemVerilog for Verification
# K7 w/ K, ?2 m8 A* i J
7.8 Conclusion 214
. |, y7 Z2 @. }2 L: z, S
8. ADVANCED OOP AND GUIDELINES 215
( T3 p& [: O1 P/ j8 |% K
8.1 Introduction 215
y1 m# Y9 P# _
8.2 Introduction to Inheritance 216
! J# n6 Y! C2 h4 U
8.3 Factory Patterns 221
5 h" X+ N+ |2 O, d1 x0 d' |
8.4 Type Casting and Virtual Methods 225
- [) {- j1 ?& ^% N+ c' y7 U
8.5 Composition, Inheritance, and Alternatives 228
" ]6 T) [4 z/ y8 z/ M
8.6 Copying an Object 233
( Z }) L8 f* c* ^9 y
8.7 Callbacks 236
# ^; Z7 ?4 x* C6 u9 f
8.8 Conclusion 240
5 X5 v4 ?4 F k. R
9. FUNCTIONAL COVERAGE 241
; r1 |6 P. @- b! c d7 b, p
9.1 Introduction 241
& `* B- k2 @& r' j
9.2 Coverage Types 243
! ]2 ]$ x* w; Z( w4 x1 i5 ^- o
9.3 Functional Coverage Strategies 246
4 M, C8 w. m# f
9.4 Simple Functional Coverage Example 248
1 b1 L) J9 A7 F+ S5 T" k. \
9.5 Anatomy of a Cover Group 251
- s: e s; m; u8 b3 M' Z+ ~
9.6 Triggering a Cover Group 253
6 A2 o- T+ E" D* C
9.7 Data Sampling 256
1 C' U4 k* X ^; d' f
9.8 Cross Coverage 265
0 [6 n" i7 W4 m$ Y Q
9.9 Coverage Options 272
+ e3 _/ J* U/ G; V4 f @/ @" B
9.10 Parameterized Cover Groups 274
! r& s! p3 A0 E$ r' h2 U1 E: X
9.11 Analyzing Coverage Data 275
. d+ w. K9 D" H, i1 H0 W# Z
9.12 Measuring Coverage Statistics During Simulation 276
0 T5 |9 O. L U( M4 N$ }
9.13 Conclusion 277
, e$ _' w& R) }$ [
10. ADVANCED INTERFACES 279
( q. R# @8 ?. i4 X7 }
10.1 Introduction 279
8 f: e4 N7 c! U1 s" ~/ p
10.2 Virtual Interfaces with the ATM Router 279
' U( l- ^( q) v3 T# u/ d, U( |
10.3 Connecting to Multiple Design Configurations 284
# p& m' N# L, b) c, w
10.4 Procedural Code in an Interface 290
/ z$ @* j1 w+ t! O8 y/ L
10.5 Conclusion 294
7 P1 N# x' Q4 [2 X
References 295
$ a; z' n. w: F7 J. y8 R8 O v
Index 297
; m* M) @2 _. E0 M5 j6 n7 Z
Systemverilog for Verification.rar
2016-5-4 16:14 上传
点击文件名下载附件
下载积分: 威望 -5
1.26 MB, 下载次数: 0, 下载积分: 威望 -5
作者:
xuzwg
时间:
2016-5-4 16:14
欢迎光临 EDA365电子工程师网 (https://bbs.elecnest.cn/)
Powered by Discuz! X3.2