Following is the snippet of uvm_reg
source code.
task uvm_reg::do_read(uvm_reg_item rw)
...
UVM_FRONTDOOR: begin
...
if (rw.local_map.get_check_on_read()) exp = get();
...
if (system_map.get_auto_predict()) begin
uvm_status_e status;
if (rw.local_map.get_check_on_read() &&
rw.status != UVM_NOT_OK) begin
void'(do_check(exp, rw.value[0], system_map));
end
From code it seems do_check is called only is auto predict is enabled and compares desired with read value.
Queries
- Is there any particular reason why checking is enabled for auto predict only or is it a bug?
- Code shows do_check checks desired vs read value not mirrored vs read value! Same goes for uvm_reg::mirror().