Write function

In reply to dayalan.natarajan:

The error message has to appear when constructing/connecting the class-based testbench, not during simulation.
Using get/put is a different story. But haave in mind get and put are blocking. You might miss/lose transactions.