OpenCores
URL https://opencores.org/ocsvn/uart2bus_testbench/uart2bus_testbench/trunk

Subversion Repositories uart2bus_testbench

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /uart2bus_testbench/trunk/tb/agent/coverage
    from Rev 13 to Rev 14
    Reverse comparison

Rev 13 → Rev 14

/uart_coverage.svh
31,14 → 31,11
communication_mode:
coverpoint trans._mode{
bins valid_mode = {text,binary};
bins invalid_mode = {wrong_mode_text,wrong_mode_bin};
illegal_bins invalid_mode = {wrong_mode_text,wrong_mode_bin};
}
address:
coverpoint trans.address;
false_data:
coverpoint trans.false_data_en;
unknown_prefix:
coverpoint trans.wrong_prefix;
 
endgroup:trans_attrib
 
covergroup text_mode_cov;
48,13 → 45,17
illegal_bins invalid_command={nop,invalid_read,invalid_write};
}
first_white_space_field:
coverpoint trans._spacetype1;
coverpoint trans._spacetype1{bins validspace ={single,tab};
illegal_bins invalidspace ={wrong_space};}
second_white_space_field:
coverpoint trans._spacetype2;
coverpoint trans._spacetype2{bins validspace ={single,tab};
illegal_bins invalidspace ={wrong_space};}
end_of_line_field:
coverpoint trans._eoltype;
coverpoint trans._eoltype{bins valideol={cr,lf};
illegal_bins eol ={wrong_eol};}
prefix_character_type:
coverpoint trans._chartype;
endgroup:text_mode_cov
 
covergroup binary_mode_cov;
61,7 → 62,7
command:
coverpoint trans._command{
bins normal_command={read,2,nop};
bins wrong_command ={invalid_read,invalid_write};
illegal_bins wrong_command ={invalid_read,invalid_write};
}
acknowledge_requirement:
coverpoint trans._reqack;
105,7 → 106,6
endfunction:build_phase
 
function void uart_coverage::connect_phase(uvm_phase phase);
// cov_mon.connect(mon_fifo.analysis_export);
endfunction:connect_phase
 
task uart_coverage::run_phase(uvm_phase phase);
114,7 → 114,8
 
function void uart_coverage::write(uart_transaction t);
$cast(trans,t.clone());
trans_attrib.sample();
trans_attrib.sample();
uvm_resource_db#(int)::write_by_name("coverage_cloud","general_coverage",trans_attrib.get_coverage());
if(trans._mode == text)
begin
text_mode_cov.sample();
123,5 → 124,6
else if (trans._mode == binary)
begin
binary_mode_cov.sample();
uvm_resource_db#(int)::write_by_name("coverage_cloud","binary_coverage",binary_mode_cov.get_coverage());
end
endfunction // write

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.