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

Subversion Repositories lpffir

[/] [lpffir/] [trunk/] [uvm/] [tools/] [uvm_syoscb/] [src/] [cl_syoscb_report_catcher.svh] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 vladimirar
//----------------------------------------------------------------------
2
//   Copyright 2014-2015 SyoSil ApS
3
//   All Rights Reserved Worldwide
4
//
5
//   Licensed under the Apache License, Version 2.0 (the
6
//   "License"); you may not use this file except in
7
//   compliance with the License.  You may obtain a copy of
8
//   the License at
9
//
10
//       http://www.apache.org/licenses/LICENSE-2.0
11
//
12
//   Unless required by applicable law or agreed to in
13
//   writing, software distributed under the License is
14
//   distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
15
//   CONDITIONS OF ANY KIND, either express or implied.  See
16
//   the License for the specific language governing
17
//   permissions and limitations under the License.
18
//----------------------------------------------------------------------
19
class cl_syoscb_report_catcher extends uvm_report_catcher;
20
  //-------------------------------------
21
  // Non randomizable variables
22
  //-------------------------------------
23
  int max_num_scb_errors = 10;          // allow that many SCB errors before stopping the simulation
24
  int num_scb_errors = 0;
25
 
26
  //-------------------------------------
27
  // API
28
  //-------------------------------------
29
  extern virtual function action_e catch();
30
endclass: cl_syoscb_report_catcher
31
 
32
function cl_syoscb_report_catcher::action_e cl_syoscb_report_catcher::catch();
33
   if (get_severity()==UVM_INFO) begin
34
      if (get_id()=="MISCMP") begin
35
         return CAUGHT;       // Avoid the OOO compare to report lots of mismatches for the compare method
36
      end
37
   end else if (get_severity()==UVM_ERROR) begin
38
      if (get_id() == "SYOSCB") begin
39
         if (num_scb_errors < max_num_scb_errors) begin
40
            set_severity(UVM_WARNING);
41
         end
42
         num_scb_errors++;
43
      end
44
    end
45
   return THROW;
46
endfunction
47
 

powered by: WebSVN 2.1.0

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