SystemVerilog Introduction
SystemVerilog is built on top of Verilog 2001. SystemVerilog improves the productivity, readability, and reusability of Verilog based code. The language enhancements in SystemVerilog provide more concise hardware descriptions, while still providing an easy route with existing tools into current hardware implementation flows. The enhancements also provide extensive support for directed and constrained-random testbench development, coverage-driven verification, and assertion-based verification.
SystemVerilog adds extended and new constructs to Verilog-2001, including:
- Extensions to data types for better encapsulation and compactness of code and tighter specification. C data types like int, typedef, struct, union, enum etc. also, dynamic data types like string, classes, dynamic queues, dynamic arrays, and associative arrays including automatic memory management freeing users from de-allocation issues.
- Dynamic casting and bit-stream casting, extended operators for concise description, extended equality and inequality, and built-in methods to extend the language.
- Enhanced loop statements plus the foreach statement, C like jump statements: return, break, continue. final block that executes at the end of the simulation (inverse of initial)
- Extended event control and sequence events
- Extensions to always block to include synthesis consistent simulation semantics
- Extensions to fork…join to model pipelines and for enhanced process control
- Enhanced tasks and functions also include C like void functions, pass by references, default arguments, pass by name, and optional arguments.
- Import/Export functions for DPI (Direct Programming Interface)
- Classes: Object-oriented mechanism that provides abstraction, encapsulation, and safe pointer capabilities
- Random constraints support
- Interprocess communication synchronization, Semaphores, and mailboxes
- Clarification and extension of the scheduling semantics
- Cycle-Based Functionality: Clocking blocks and cycle-based attributes that help reduce development, ease maintainability, and promote reusability.
- Assertion mechanism for verifying design intent and functional coverage intent. property and sequence declarations, Assertions, and Coverage statements with action blocks, and concurrent assertions.
- Packages for declaration encapsulation with import for controlled access
- Compilation-unit scope nested modules and extern modules for separate compilation support
- Extension of port declarations to support interfaces, events, and variables.
- $root to provide unambiguous access using hierarchical references
- Interfaces to encapsulate communication and facilitate “Communication Oriented” design
- Functional coverage
- Direct Programming Interface (DPI) for clean, efficient interoperation with other languages (C provided)
- APIs like Assertion API, Coverage API, and Data Read API