Trying to determine if there is a way to pass comparator matches and mismatches from a lower-level agent's scoreboard to the overall testbench environment's scoreboard.
In that way when a test is ran, all checked variables or comparator matches/mismatches are funneled up to the top.
For example, I'm envisioning in my top scoreboard_c that my report_phase can gather the comparator results from any agent that ran a comparison.
function void scoreboard_c::report_phase(uvm_phase phase);
int checked;
`uvm_info(name,$sformatf("Reporting scoreboard information...\n%s", this.sprint()), UVM_LOW)
//add results of lower level comparators to number of checked
top.checked += tb_env_h.env1_h.comparator_h.m_matches + env1_h.comparator_h.m_mismatches;
`uvm_info(get_type_name(), $sformatf("Matches: %0d", tb_env_h.env1_h.comparator_h.m_matches), UVM_LOW)
`uvm_info(get_type_name(), $sformatf("Mismatches: %0d", env1_h.comparator_h.m_mismatches), UVM_LOW)
if (top.checked == 0)
`uvm_error(name, "No Transactions Processed.");
if (env1_h.comparator_h.m_mismatches > 0)
`uvm_error(name, "Compare Failed");
endfunction : report_phase