Randcase Vs Randsequence in Systemverilog

Randcase: Randcase is a case statement that randomly selects one of its branches just like a case statement in Verilog but here as its randcase so it will pick statements randomly. Randcase can be used in class or modules. The randcase item expressions are non-negative integral values that constitute the branch weights. An item weight…

@event Vs wait(event.triggered) in SystemVerilog

SystemVerilog supports two ways through which we can wait for a particular event to be triggered. So let’s understand what is the exact difference between those two ways of event trigger with the following example. An event trigger ->e is an instantaneous event. The event control @e has to execute and block the current process…

Directed Testing Vs Constraint Random Verification

Directed Verification Technique with a set of directed tests is extremely time-consuming and difficult to maintain for more complex designs to verify. Directed tests only cover scenarios that have been anticipated by the verification team by going through specifications, This can lead to costly re-spins and still, there are chances of missing time to market…

Different Array Types and Queues in System Verilog

Dynamic Array:  Usage of dynamic array when user to allocate its size for storage during run time. Dynamic array store a contiguous collection of data. The array indexing should be always integer type. To allocate the size of a dynamic array, we have to use a new[] operator. Example: How to resize a dynamic array?…

Encapsulation:

Many times we might use the Base Class or Base Class library provided by third party sources. By default, These Class Members are Public in nature. It means these Class Members can be accessed directly from outside of that Class. But sometimes Base Class providers may restrict how others can access the Class members as…