Hi Slashdot,
While you can instantiate a uvm_mem inside of any object, it’s designed to work inside of a register model. The configure() method requires a uvm_reg_block parent reference or a fatal message is produced. And while you may be able to call the write() and read() methods without putting it in a register model, you’ll most likely run into problems. A uvm_mem object expects to be placed inside of a register model’s address mapping, and many of the internal operations and methods (especially backdoor/frontdoor access) reference the internal m_parent variable, which can only be set by configure().
If you really want to by-pass using a register model to access memory, you could just build your own memory object and use the function that uvm_mem uses for backdoor access—uvm_hdl_deposit().
Good luck,
-Doug