In reply to rijosh:
Few things to note:
- Verilog/SV integer is 4-state and perhaps you wanted int
- Assuming you are doing the ::get inside a sequence, use null as context as Sequences do not have a fixed hierarchy. Kind of a namespace in global and both set and get will use that.
Good Luck
Srini
www.go2uvm.org