Inheritance in SystemVerilog OOPs:

Inheritance in SystemVerilog is the most commonly used principle of Object Oriented Programming (OOP) that facilitates reuse. It’s called Inheritance because it creates new classes taking all the existing Properties and Methods from the Base Class or Super Class. The new Class is called Extended Class or Derived Class. The Extended Class contains everything declared…

plusargs in systemverilog

Master the Power of Plusargs in SystemVerilog: Must-Know Tips

Plus args are command-line switches supported by the simulator. Usually, they are application-specific. As per SystemVerilog LRM, arguments beginning with the ‘+’ character will be available using the $test$plusargs and $value$plusargs PLI APIs. Plus args are very useful in controlling many things in your environment, such as controlling your debug mode, setting a value like…

randomize() Vs std::randomize()

The built-in class randomize method operates exclusively on class member variables. Using classes to model the data to be randomized is a powerful mechanism that enables the creation of generic, reusable objects containing random variables and constraints that can be later extended, inherited, constrained, overridden, enabled, disabled, and merged with or separated from other objects….

How to generate an array of unique random values

Nowadays in many verification scenarios, it requires to create a set of random instructions or addresses with each unique value or we can say that no repeating values, usually represented as elements in a dynamic array.  Earlier versions of SystemVerilog required you to use either nested foreach loops to constraint all combinations of array elements…

System Verilog rand_mode() and constraint_mode()

rand_mode(): Variables who is having random nature declared as rand or randc can be turned on or off dynamically by using an in-built method called rand_mode(). It can be called either function or task. In the below example, you can see that how rand_mode we are going to use to disabled and enabled all variables….