Introduction
What is SystemVerilog? • Language Evolution • SystemVerilog versus Verilog • Reg, Logic, and Bit • Variables, Wires, and Ports • SystemVerilog Language Features • Caveats • The UVM Family Tree • Books and Resources
Programming Language Features
C-Like Language Features • Static vs Automatic Variables • Static vs Automatic Tasks • ++, --, and Assignment Operators • Labeling • Time Units • Do While Loop • Enhanced Tasks and Functions • Task and Function Arguments • Void Functions • Argument and Return Types • Type string • $sformatf
Basic Data Types
4-state and 2-state Types • Caveats with Signed Types • Initial Values • Every variable and wire has a well-defined initial value • Enumerations • Type-Checking of Enumerations • struct • typedef struct • Packed Struct • Packed and Unpacked Arrays • Indexing Multidimensional Arrays • Packages • Packages and Ports
Interfaces
Modelling a Bus • APB with Master and Single Slave • Modelling APB using Ports • Simple Interface = Bundle of wires/vars • Using an Interface • Accessing Interface Members • Modports • Modport Directions • Connecting Interfaces with Modports • Generic Interface Ports • Ports and Parameters to Interfaces
RTL Process
SystemVerilog and RTL synthesis • Register Transfer Level • Combinational Logic • Clocked Processes • always_comb, always_latch, always_ff • Synthesis-Friendly If / Case • priority case • unique if • unique case • Wild Equality Operators • case inside • inside Operator
RTL Types
Synthesizable Data Types • Enums for Finite State Machines • Base Types and Values • Rules for Overriding the Enum Values • Packed Struct (Review) • Packed Union • Multidimensional Arrays • Odds and Ends • Nets, Ports and Data Types • Types and Packages • Type Parameters • Synthesis of Interfaces (Review) • Synthesis Results (Review) • Multiple Drivers on a Bus • How to Differentiate Connections? • Modport Expressions • Modport Expressions with Generate
Clocking Blocks and Timing
Input and Output Skew • Creating a Clocking Block • Testbench and Clocking Block • Cycle Delays and Clocking • Input and Output Skew Syntax Summary • Scheduler Regions • Stimulus and Response • Signal Aliasing • Multiple Clocking Blocks • Driving a Net • Clocking Blocks in Interfaces • Clocking Blocks versus Program
Arrays and Queues
Dynamic Arrays • Queues • Working with Queues • Queue Methods • Associative Arrays • Associative Array Methods • Foreach
Bus-Functional Modeling
Simple Module-Based BFM • Testbench using BFM • Separate Test from Test Harness • Task/Function in Interface • APB Interface With Tasks • An APB Test
Randomization
Testbench Automation • Random Numbers in SystemVerilog • std::randomize • Seeding and Random Stability • Saving & Restoring Seeds • Random Sequence of Valid Actions • Randcase • Randsequence • More Randsequence Features
Coverage
Test bench Automation • Functional Coverage • Covergroup Syntax • Coverage Bins • Cross Coverage
Other Language Features
$root and $unit • Enumeration Methods • Arrays for Multidimensional Structures • Initializing an Unpacked Array • Replication in an Assignment Pattern • Packed Arrays and Structures • Pass-by-Copy • Pass-by-Reference • const ref • Array Querying Functions (1) • Array Querying Functions (2) • $bits • Bit-stream Casting • Array Manipulation Methods • Array Locator Methods • Array Ordering Methods • Array Reduction Methods
The Direct Programming Interface
DPI Simulation Flow • Command-line Switches • Importing a C Function • Changing the Imported Function Name • Mapping Data Types of Arguments • Exporting a Function to C • Sandwiches and Transparency • Importing and Exporting Tasks • Scalar Bit and Logic Arguments • Packed Arrays • Decoding the Canonical Representation • String Arguments • Open Array Arguments • Task Return Values • Task Disable Flow • Pure and Context