Cover
Copyright
Contents
Preface
Part I Design Principles
1 A VHDL Refresher
1.1 Why This Book?
1.2 What Is VHDL?
1.2.1 Key Features of VHDL
1.2.2 The LRM
1.2.3 VHDL versus General-Purpose Languages
1.3 Levels of Abstraction in Digital Systems
1.4 A Summary of VHDL
1.4.1 Entities and Architectures
1.4.2 Statements in VHDL
1.4.3 Concurrent Statements
1.4.4 Sequential Statements
1.4.5 Subprograms
1.4.6 Expressions
1.4.7 Packages
1.4.8 Data Types
1.4.9 Predefined Attributes
1.4.10 Generics
1.5 VHDL-2008
2 Design and Architecture
2.1 What Is Design?
2.2 Quality Measures
2.2.1 Design Qualities
2.2.2 Business Qualities
2.3 Architecture
3 Design Challenges
3.1 Complexity
3.2 Changes
3.3 Dependencies
3.4 Duplicate Information
3.5 Technical Debt
3.6 Your Wetware
3.6.1 Recognition versus Recall
4 Design Principles
4.1 Modularity
4.1.1 What Is a Module?
4.1.2 Key Benefits of Modularity
4.1.3 Effectively Decomposing a System into Modules
4.2 Abstraction
4.2.1 Levels of Abstraction
4.2.2 Key Benefits of Abstraction
4.2.3 Using Abstraction Effectively
4.3 Hierarchy
4.3.1 Key Benefits of Hierarchy
4.4 Loose Coupling
4.4.1 Types of Coupling
4.4.2 Decoupling
4.5 Strong Cohesion
4.6 The Single Responsibility Principle
4.7 Orthogonality
4.7.1 Guidelines for Creating Orthogonal Systems
4.8 Single Source of Truth (The DRY Principle)
Part II Basic Elements of VHDL
5 Analysis, Elaboration, and Execution
5.1 VHDL in the System Design Flow
5.2 The Design Processing Flow
5.3 Overview of the Analysis and Elaboration Process
5.4 Detailed View of the Analysis Phase
5.4.1 Lexical Analysis
5.4.2 Lexical Elements
5.4.3 Syntax Analysis
5.4.4 Semantic Analysis
5.5 Detailed View of the Elaboration Phase
5.6 The Execution Phase
5.6.1 Discrete-Event Simulation
5.6.2 Drivers
5.6.3 Initialization Phase
5.6.4 The Simulation Cycle
6 VHDL Design Units
6.1 Design Units
6.1.1 Entity Declaration
6.1.2 Architecture Body
6.1.3 Package Declaration and Package Body
6.2 Design Libraries and Library Units
6.3 Guidelines and Recommendations for VHDL Design Units
7 Statements, Declarations, and Expressions
7.1 Statements
7.2 Declarations
7.2.1 Scope
7.2.2 Visibility
7.2.3 Overloading
7.2.4 Scope, Visibility, and Overloading
7.2.5 Use Clauses
7.2.6 Live Time and Span
7.3 Expressions
7.4 Guidelines and Recommendations for Statements, Declarations, and Expressions
8 Operators, Operands, and Attributes
8.1 Operators
8.1.1 Condition Operator (??)
8.1.2 Logical Operators
8.1.3 Relational Operators
8.1.4 Shift Operators
8.1.5 Adding Operators
8.1.6 Operator Overloading
8.2 Operands
8.2.1 Literals
8.2.2 Aggregates
8.2.3 Names
8.2.4 Aliases
8.2.5 Other Kinds of Operands
8.3 Attributes
8.4 Guidelines and Recommendations for Operators, Operands, and Attributes
Part III Statements
9 Concurrent Statements
9.1 Introduction
9.2 The process Statement
9.2.1 The Ins and Outs of VHDL Processes
9.2.2 The Sensitivity List
9.2.3 Equivalence between Processes and Other Concurrent Statements
9.2.4 Guidelines and Recommendations for Writing Processes
9.3 The Concurrent Procedure Call Statement
9.4 The Component Instantiation Statement
9.5 The generate Statement
9.5.1 General Remarks about generate Statements
9.6 Other Concurrent Statements
9.6.1 The block Statement
9.6.2 The Concurrent Signal Assignment Statement
9.6.3 The Concurrent Assertion Statement
10 Sequential Statements
10.1 Control Structures
10.1.1 The Problems with Deep Nesting
10.2 The if Statement
10.2.1 Guidelines for the if Statement
10.3 The case Statement
10.3.1 Guidelines for the case Statement
10.4 Loops
10.4.1 Kinds of Loops
10.4.2 Auxiliary Loop Control Statements
10.4.3 Loops in Hardware
10.4.4 Guidelines for Using Loops
10.5 The wait Statement
10.5.1 Synthesizable wait Statements
10.6 The assert Statement
10.6.1 When to Use an Assertion
10.6.2 When Not to Use an Assertion
10.6.3 Severity Levels
10.7 The null Statement
11 Assignment Statements
11.1 Kinds of Assignments in VHDL
11.1.1 Classification by Target Class (Signal vs. Variable)
11.1.2 Classification by Assignment Statement (Simple vs. Conditional vs. Selected)
11.1.3 Classification by Kind of VHDL Code (Sequential vs. Concurrent)
11.2 Assignment Sources and Targets
11.2.1 Assignment Sources
11.2.2 Assignment Targets
11.3 Assignments with Timing and Delay
11.3.1 Delay Mechanisms
11.4 Force and Release Assignments
Part IV Types and Objects
12 Categories of Types in VHDL
12.1 Overview of Data in VHDL
12.1.1 Types in VHDL
12.1.2 Objects in VHDL
12.1.3 Object Classes
12.1.4 Use of the Terms class and object in VHDL and Object-Oriented Languages
12.1.5 What Does Strongly Typed Mean?
12.2 VHDL Type Hierarchy
12.2.1 Scalar Types
12.2.2 Composite Types
12.2.3 Access Types
12.2.4 File Types
12.2.5 Protected Types
12.3 Subtypes
12.4 Resolved Types
13 Predefined and User-Defined Types
13.1 Predefined and Standard Types
13.2 Types and Packages for Integer Values and Operations
13.3 Converting between Types
13.4 Abstract Data Types
13.5 Other Recommendations on Using Types
14 VHDL Data Objects
14.1 Constants
14.1.1 Why Use Constants?
14.1.2 Recommendations for Using Constants
14.2 Variables
14.3 Signals
14.4 Signals versus Variables
14.5 Shared Variables
14.6 Files
14.7 Object Initial Values
Part V Practical Coding Recommendations
15 Excellent Routines
15.1 What Is a Routine?
15.2 Why Use Routines?
15.3 Functions versus Procedures
15.3.1 Functions
15.3.2 Procedures
15.3.3 Choosing between Functions and Procedures
15.4 Writing Great Routines
15.5 Parameters
15.5.1 Formal versus Actual Parameters
15.5.2 Interface Objects
15.5.3 Subprogram Calls
15.5.4 Guidelines for Using Parameters
15.6 Where Should Routines Go?
16 Excellent Names
16.1 How Long Should a Name Be?
16.2 General Naming Guidelines
16.3 Guidelines for Naming Data Objects
16.4 Guidelines for Naming Routines
16.5 Guidelines for Naming Other VHDL Constructs
17 Excellent Comments
17.1 Comments: Good or Bad?
17.2 Basic Principles
17.3 Types of Comments
17.3.1 Good Comments
17.3.2 Double-Edged Comments
17.3.3 Bad Comments
17.4 Comment Layout
17.4.1 Comment Syntax in VHDL
17.4.2 Comment Layout Choices
17.5 Commenting Guidelines
17.5.1 Layout Guidelines
17.5.2 Language and Content
17.5.3 General Commenting Guidelines
17.5.4 Guidelines for Specific Kinds of Code
17.6 Self-Documenting Code
18 Excellent Style
18.1 Programming Style
18.1.1 Programming Style Matters
18.2 Code Layout
18.2.1 Layout Goals
18.2.2 Basic Layout Types
18.3 Indentation
18.4 Paragraphs of Code
18.5 Line Length
18.5.1 Wrapping Long Lines
18.6 Spaces and Punctuation
18.7 Letter Case
18.8 Other Layout and Style Recommendations
Part VI Synthesis and Testbenches
19 Synthesis
19.1 Introduction
19.2 What Is the Difference?
19.2.1 Syntactic Restrictions
19.2.2 Semantic Restrictions
19.2.3 Synthesizable Types
19.3 Creating Synthesizable Designs
19.3.1 RTL Design Methodology
19.3.2 Synchronous Circuits
19.4 Inferring Hardware Elements
19.4.1 Combinational Logic
19.4.2 Sequential Logic
19.4.3 Three-State Logic
19.4.4 ROM Memories
19.4.5 RAM Memories
19.5 Initialization and Reset
19.6 Pragmas
19.6.1 Synthesis Attributes
19.6.2 Metacomments
20 Testbenches
20.1 Introduction
20.1.1 Test or Verification?
20.1.2 Functional Verification
20.1.3 What Should We Test?
20.1.4 Self-Checking Testbenches
20.1.5 Basic Parts of a Testbench
20.1.6 What is the Output of a Testbench?
20.1.7 Test-Driven Development
20.2 Example #1: Testbench for a Combinational Circuit
20.3 Example #2: Testbench for a Clocked Circuit
20.4 Example #3: Testbench for an FSM
20.5 Example #4: Testbenches with File I/O
20.6 Random Stimulus and Functional Coverage
20.6.1 Functional Coverage
20.6.2 Directed Testing
20.6.3 Random-Based Verification
20.6.4 Intelligent Coverage
20.6.5 Coverage Bins
20.6.6 VHDL and Random-Based Verification
20.7 Example #5: Testbench with Random Stimulus and Functional Coverage
20.8 Example #6: FSM Transition Coverage
20.9 Conclusion
Notes
Bibliography
Index