allancarter Posted December 16, 2014 Report Share Posted December 16, 2014 I added a new register to a register block, but didn't add it to the map. When I try to read it in my test I get a null pointer access in: uvm-1.2c/src/reg/uvm_reg.svh, line 2624 The bug is that get_local_map returns a null pointer and rw.map is null because it wasn't specified in the read method. But the uvm_error macro references rw.map.get_full_name() when rw.map is null. Quote Link to comment Share on other sites More sharing options...
allancarter Posted December 16, 2014 Author Report Share Posted December 16, 2014 I guess related to this is that the following warning is output before this. Seems like it should be an error: UVM_WARNING /path/tools/uvm/uvm-1.1d/src/reg/uvm_reg.svh(1646) @ 0: reporter [RegModel] Register 'm_mem_block.regfile.regc' is not registered with any map Quote Link to comment Share on other sites More sharing options...
allancarter Posted December 16, 2014 Author Report Share Posted December 16, 2014 The following fix gets rid of the null poiter reference: if (rw.local_map == null) begin if (rw.map == null) begin `uvm_error("RegModel", {"Register '", get_full_name(), "' is not registered with any map."}) rw.status = UVM_NOT_OK; return 0; end else begin `uvm_error(get_type_name(), {"No transactor available to physically access register on map '", rw.map.get_full_name(),"'"}) rw.status = UVM_NOT_OK; return 0; end end Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.