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
- from Rev 9 to Rev 10
- ↔ Reverse comparison
Rev 9 → Rev 10
/trunk/tb/analysis/uart_scoreboard.svh
56,6 → 56,8
|
extern task run_phase (uvm_phase phase); |
|
extern function void extract_phase (uvm_phase phase); |
|
extern function void ack_checker (); |
endclass:uart_scoreboard |
|
248,10 → 250,15
end |
endcase |
end // else: !if(frm_drv._command inside {invalid_read,invalid_write}) |
uvm_resource_db#(int)::write_by_name("Reporting","matched_packets",match); |
|
end |
endtask:run_phase |
|
function void uart_scoreboard::extract_phase(uvm_phase phase); |
uvm_resource_db#(int)::write_by_name("Reporting","matched_packets",match); |
endfunction // extract_phase |
|
|
function void uart_scoreboard::ack_checker(); |
|
if(frm_drv._reqack == yes && frm_mon.acknowledge != 8'h5A) |
/trunk/tb/test/uart_test.svh
63,6 → 63,8
uart_config _config; |
|
int matched ; |
|
uvm_report_server report_server; |
|
`uvm_component_utils_begin(uart_base_test) |
`uvm_field_int(matched,UVM_ALL_ON) |
78,13 → 80,12
env = uart_env::type_id::create("env",this); |
|
_config = uart_config::type_id::create("_config",this); |
|
uvm_config_db#(uart_config)::set(this,"*","UART_CONFIGURATION",_config); |
|
printer = new(); |
printer.knobs.depth = 3; |
report_server = new(); |
env_configuration(); |
uvm_resource_db#(int)::set("Reporting","matched_packets",0,null); |
TE_configuration(); |
uvm_config_db#(uart_config)::set(this,"*","UART_CONFIGURATION",_config); |
endfunction:build_phase |
|
function void connect_phase (uvm_phase phase); |
102,12 → 103,27
_config.use_false_data= no; |
endfunction:env_configuration |
|
function void TE_configuration(); |
report_server.set_server(report_server); |
printer.knobs.depth = 3; |
uvm_resource_db#(int)::set("Reporting","matched_packets",0,null); |
uvm_root::get().set_timeout(10s); |
endfunction // TE_configuration |
|
task run_phase (uvm_phase phase); |
phase.phase_done.set_drain_time(this,5000); |
endtask:run_phase |
|
function void report_phase (uvm_phase phase); |
int num_errors; |
string status; |
num_errors = report_server.get_severity_count(UVM_ERROR); |
uvm_resource_db#(int)::read_by_name("Reporting","matched_packets",matched); |
if(num_errors == 0) status = "PASSED"; |
else status = "FAILED"; |
$display("--------------------------------------------------\n"); |
$display("\t\t SIMULATION %s \n",status); |
$display("--------------------------------------------------"); |
`uvm_info("FINAL STATUS",$sformatf("The number of matched packets are %0d",matched),UVM_NONE); |
endfunction // report_phase |
|