Learn SystemVerilog
SystemVerilog Fundamentals
1. Introduction 2. logic and Data Types 3. always_comb and always_ff 4. Arrays, Structs, Enums 5. Tasks and FunctionsVerification Features
6. Interfaces and Modports 7. Classes and Randomization 8. Assertions Open EDA PlaygroundSystemVerilog
Learn SystemVerilog
Move from Verilog syntax to reusable classes, constraints, interfaces, assertions, and verification-oriented code.
What you will learn
Study each lesson by reading the concept, running the example, changing one detail, and checking the resulting behavior. These skills form the language foundation for UVM.
Start with the learning path
SystemVerilog adds the data types, object-oriented programming, constrained randomization, interfaces, assertions, and coverage features used by modern verification environments.
Lesson 4 of 8: Arrays, Structures, and Enums
Group related data into expressive transaction-like structures.
typedef struct packed {
logic [7:0] address;
logic [31:0] data;
logic write;
} bus_item_t;
bus_item_t request;
logic [7:0] memory [0:255];
What to notice
- bus_item_t keeps related bus fields together.
- packed makes the struct a contiguous bit vector.
- memory is an unpacked array of 256 bytes.
Practice: Add a 2-bit size field to bus_item_t and assign it a value.
Verification habits to build
| Skill | Habit | Why it matters in UVM |
|---|---|---|
| Classes | Keep data and behavior together | Creates reusable sequence items and configuration objects |
| Constraints | Generate legal, meaningful values | Explores scenarios without producing invalid noise |
| Interfaces | Bundle signals and directions | Gives drivers and monitors a stable DUT boundary |
| Assertions | State timing rules precisely | Catches protocol violations near their cause |
| Coverage | Measure planned behavior | Shows which verification scenarios still need stimulus |