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/test
- from Rev 9 to Rev 10
- ↔ Reverse comparison
Rev 9 → Rev 10
/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 |
|