-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When you configure a uvm_map, it is not added to the block specified as its parent. You must explicitly call add_map, although this is not part of the standard API.
import uvm_pkg::*;
class Reg extends uvm_reg;
function new(string name, int width=32);
super.new(name, width, UVM_NO_COVERAGE);
endfunction
endclass
class Block extends uvm_reg_block;
Reg a;
uvm_reg_map map;
function new(string name);
super.new(name);
this.a = new("a");
this.a.configure(this, null, "");
// this.map = this.create_map("map", 0, 4, UVM_LITTLE_ENDIAN, 0);
this.map = new("map");
this.map.configure(this, 0, 4, UVM_LITTLE_ENDIAN, 0);
this.map.add_reg(this.a, 0, "RW", 0);
// this.add_map(this.map);
endfunction
endclass
module test;
initial begin
uvm_reg register;
automatic Block block = new("block");
block.lock_model();
register = block.get_default_map().get_reg_by_offset(0);
assert(register.get_name() == "a");
end
endmoduleMetadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working