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

Subversion Repositories uart2bus_testbench

[/] [uart2bus_testbench/] [trunk/] [tb/] [test/] [uart_test.svh] - Diff between revs 16 and 17

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 16 Rev 17
Line 88... Line 88...
    env = uart_env::type_id::create("env",this);
    env = uart_env::type_id::create("env",this);
 
 
    _config = uart_config::type_id::create("_config",this);
    _config = uart_config::type_id::create("_config",this);
 
 
    printer = new();
    printer = new();
 
    `ifdef UVM_1p2
    report_server = new("report_server");
    report_server = new("report_server");
 
    `else
 
     report_server = new();
 
    `endif
    env_configuration();
    env_configuration();
    TE_configuration();
    TE_configuration();
    uvm_config_db#(uart_config)::set(this,"*","UART_CONFIGURATION",_config);
    uvm_config_db#(uart_config)::set(this,"*","UART_CONFIGURATION",_config);
    uvm_resource_db #(int)::set("coverage_cloud","text_coverage",0,null);
    uvm_resource_db #(int)::set("coverage_cloud","text_coverage",0,null);
    uvm_resource_db #(int)::set("coverage_cloud","binary_coverage",0,null);
    uvm_resource_db #(int)::set("coverage_cloud","binary_coverage",0,null);
Line 113... Line 117...
    _config.response_time = 8680;
    _config.response_time = 8680;
    _config.use_false_data= no;
    _config.use_false_data= no;
  endfunction:env_configuration
  endfunction:env_configuration
 
 
 function void TE_configuration();
 function void TE_configuration();
 
    report_server.set_server(report_server);
    printer.knobs.depth = 3;
    printer.knobs.depth = 3;
    uvm_resource_db#(int)::set("Reporting","matched_packets",0,null);
    uvm_resource_db#(int)::set("Reporting","matched_packets",0,null);
    uvm_root::get().set_timeout(10s);
    uvm_root::get().set_timeout(10s);
    //uvm_root::get().finish_on_completion=1'b0;
    //uvm_root::get().finish_on_completion=1'b0;
 endfunction // TE_configuration
 endfunction // TE_configuration
Line 126... Line 131...
  endtask:run_phase
  endtask:run_phase
 
 
  function void report_phase (uvm_phase phase);
  function void report_phase (uvm_phase phase);
     int num_errors;
     int num_errors;
     string status;
     string status;
     num_errors = report_server.get_severity_count(UVM_INFO);
     num_errors = report_server.get_severity_count(UVM_ERROR);
     //num_errors = uvm_report_server.get_severity_count(UVM_ERROR);
 
     uvm_resource_db#(int)::read_by_name("Reporting","matched_packets",matched);
     uvm_resource_db#(int)::read_by_name("Reporting","matched_packets",matched);
 
 
     if(num_errors == 0) status =  "PASSED";
     if(num_errors == 0) status =  "PASSED";
     else status = "FAILED";
     else status = "FAILED";
     $display("--------------------------------------------------\n");
     $display("--------------------------------------------------\n");
     $display("\t\t SIMULATION %s \n",status);
     $display("\t\t SIMULATION %s \n",status);
     $display("--------------------------------------------------");
     $display("--------------------------------------------------");

powered by: WebSVN 2.1.0

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