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

Subversion Repositories uart2bus_testbench

[/] [uart2bus_testbench/] [trunk/] [tb/] [uvm_src/] [dpi/] [uvm_common.c] - Blame information for rev 16

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 16 HanySalah
//----------------------------------------------------------------------
2
//   Copyright 2010 Synopsys, Inc.
3
//   Copyright 2011 Mentor Graphics Corporation
4
//   Copyright 2013 NVIDIA Corporation
5
//   All Rights Reserved Worldwide
6
//
7
//   Licensed under the Apache License, Version 2.0 (the
8
//   "License"); you may not use this file except in
9
//   compliance with the License.  You may obtain a copy of
10
//   the License at
11
//
12
//       http://www.apache.org/licenses/LICENSE-2.0
13
//
14
//   Unless required by applicable law or agreed to in
15
//   writing, software distributed under the License is
16
//   distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
17
//   CONDITIONS OF ANY KIND, either express or implied.  See
18
//   the License for the specific language governing
19
//   permissions and limitations under the License.
20
//----------------------------------------------------------------------
21
 
22
// Implementation of common methods for DPI
23
 
24
extern void m__uvm_report_dpi(int,const char*,const char*,int,const char*, int);
25
 
26
#if defined(INCA) || defined(NCSC)
27
const static char* uvm_package_scope_name = "uvm_pkg::";
28
#else
29
const static char* uvm_package_scope_name = "uvm_pkg";
30
#endif
31
 
32
void m_uvm_report_dpi( int severity,
33
                char* id,
34
                char* message,
35
                int verbosity,
36
                char* file,
37
                int linenum) {
38
  svScope old_scope = svSetScope(svGetScopeFromName(uvm_package_scope_name));
39
  m__uvm_report_dpi(severity, id, message, verbosity, file, linenum);
40
  svSetScope(old_scope);
41
 }
42
 
43
 
44
int int_str_max ( int radix_bits ) {
45
    int val = INT_MAX;
46
    int ret = 1;
47
    while ((val = (val /radix_bits)))
48
        ret++;
49
    return ret;
50
}

powered by: WebSVN 2.1.0

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