Line 60... |
Line 60... |
|
|
uvm_table_printer printer;
|
uvm_table_printer printer;
|
|
|
uart_config _config;
|
uart_config _config;
|
|
|
`uvm_component_utils(uart_base_test)
|
int matched ;
|
|
|
|
`uvm_component_utils_begin(uart_base_test)
|
|
`uvm_field_int(matched,UVM_ALL_ON)
|
|
`uvm_component_utils_end
|
|
|
function new (string name,uvm_component parent);
|
function new (string name,uvm_component parent);
|
super.new(name,parent);
|
super.new(name,parent);
|
endfunction:new
|
endfunction:new
|
|
|
Line 78... |
Line 82... |
uvm_config_db#(uart_config)::set(this,"*","UART_CONFIGURATION",_config);
|
uvm_config_db#(uart_config)::set(this,"*","UART_CONFIGURATION",_config);
|
|
|
printer = new();
|
printer = new();
|
printer.knobs.depth = 3;
|
printer.knobs.depth = 3;
|
env_configuration();
|
env_configuration();
|
|
uvm_resource_db#(int)::set("Reporting","matched_packets",0,null);
|
endfunction:build_phase
|
endfunction:build_phase
|
|
|
function void connect_phase (uvm_phase phase);
|
function void connect_phase (uvm_phase phase);
|
super.connect_phase(phase);
|
super.connect_phase(phase);
|
endfunction:connect_phase
|
endfunction:connect_phase
|
Line 98... |
Line 103... |
endfunction:env_configuration
|
endfunction:env_configuration
|
|
|
task run_phase (uvm_phase phase);
|
task run_phase (uvm_phase phase);
|
phase.phase_done.set_drain_time(this,5000);
|
phase.phase_done.set_drain_time(this,5000);
|
endtask:run_phase
|
endtask:run_phase
|
|
|
|
function void report_phase (uvm_phase phase);
|
|
uvm_resource_db#(int)::read_by_name("Reporting","matched_packets",matched);
|
|
`uvm_info("FINAL STATUS",$sformatf("The number of matched packets are %0d",matched),UVM_NONE);
|
|
endfunction // report_phase
|
|
|
endclass:uart_base_test
|
endclass:uart_base_test
|
|
|
//-------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
//
|
//
|
// PURE TEXT MODE TESTS
|
// PURE TEXT MODE TESTS
|