This repository contains a collection of SystemVerilog (.sv) files demonstrating various concepts including arrays, strings, packet structures, mailboxes, and testbench-style comparisons.
-
apb_tx.sv
Defines a basic APB transaction structure. -
apb_tx_compare.sv
Implements comparison logic between APB transactions. -
apb_tx_compare_copy.sv
Demonstrates copying and comparing APB transaction objects.
-
arr.sv
Basic array usage in SystemVerilog. -
dynamic_array.sv
Demonstrates dynamic array allocation and operations. -
mul_array.sv
Multi-dimensional array examples.
-
string_arr.sv
Arrays of strings. -
string_methods.sv
Common built-in string methods. -
string_reversal.sv
Example of reversing a string.
-
mailbox_ex.sv
Demonstrates inter-process communication using mailboxes. -
eth_pkt.sv
Defines an Ethernet packet structure and related operations.
This repository is intended for:
- Learning SystemVerilog fundamentals
- Practicing data structures and OOP concepts
- Understanding verification-oriented coding patterns
- Quick reference for common SV constructs
-
Clone the repository:
git clone https://github.com/devendra-vlsi-engineer/SystemVerilog_Examples.git
-
Navigate to the directory:
cd SystemVerilog_Examples -
Compile and simulate using your preferred simulator:
- Synopsys VCS
- QuestaSim / ModelSim
- Xcelium
Example:
vcs file_name.sv ./simv
- SystemVerilog Arrays (Static, Dynamic, Multi-dimensional)
- Strings and String Methods
- Object-Oriented Concepts
- Transaction Modeling
- Mailboxes & IPC
- Packet Representation
Contributions are welcome! Feel free to:
- Add new examples
- Improve existing code
- Fix issues or bugs
This project is open-source and available under the MIT License.