Meaning of Handles and Objects

In SystemVerilog a handle variable holds an reference to an object

In the below example handle is defined but not constructed

             animal     a_h ;    // Here handle is defined but the objects are null

             a_h      =  new() ;   // Here the Handle is created using new() 

 once the handle is created, internally it will create the objects  by alloting new memory locations

Comments

Popular posts from this blog

What is Class based Randomization and how do we define ?

How Disable Constraints in SystemVerilog

How do we define Weighted Distribution Constraint in SystemVerilog