UVM RAL: RAL methods(write,read etc) can be used in testcase

Hello,

Recently I started working on UVM RAL, there I was trying to write to some of register from testcase without using any sequence and I am facing the error as described below:

Testcase:
env_obj.regmodel.reg1.write(status,32’h0000_9000);

NOTE: Reg_model is instantiated, build and locked in ENV.

The error I am getting is:
Illegal usage of class method. Class methods can’t be used in current context.

So my doubt is the methods can be used from sequences, if not why I am facing the error.

Thank you.
Asha

You can always use read/write method of Register in testcase.

above error message is not much clear! can you post complete ERROR message and check below common issue once in your code.