uvm_rookie Posted January 13, 2012 Report Share Posted January 13, 2012 I am trying to use get_mem_by_offset to identify the memory name by providing the offset address. I could not get it to work as the function return null. uvm_reg_by_offset works fine for me. Anyone has any ideas ? Note: I am using both uvm1.1 and uvm1.1a Quote Link to comment Share on other sites More sharing options...
apayal Posted January 19, 2012 Report Share Posted January 19, 2012 Hello How to use uvm_reg_by_offset if i have address but not the register name ? can you show me some example Quote Link to comment Share on other sites More sharing options...
uvm_rookie Posted January 19, 2012 Author Report Share Posted January 19, 2012 Hello How to use uvm_reg_by_offset if i have address but not the register name ? can you show me some example Here's the code I use the get_reg_by_offset mybus_rdb_pkg::mybus_am model; uvm_reg_map maps[$]; uvm_reg current_reg; ... ... model.get_maps(maps); current_reg = maps[0].get_reg_by_offset(reg_addr, (rw.kind == UVM_READ)); I was not able to use get the get_mem_by_offset to work. My workaround is the following : uvm_mem uvmmems[$]; model.get_memories(uvmmems); foreach (uvmmems) begin base_addr = uvmmems.get_address; if ((rw.addr >= base_addr) && (rw.addr <= base_addr + uvmmems.get_size() - 1)) 1)) current_mem = uvmmems; end Quote Link to comment Share on other sites More sharing options...
janick Posted January 19, 2012 Report Share Posted January 19, 2012 This is a known issue that will be fixed in 1.1b: http://www.eda.org/svdb/view.php?id=3985 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.