Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / fnx / clib / report / cc / veriuser.c
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: veriuser.c
5* Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
6* 4150 Network Circle, Santa Clara, California 95054, U.S.A.
7*
8* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9*
10* This program is free software; you can redistribute it and/or modify
11* it under the terms of the GNU General Public License as published by
12* the Free Software Foundation; version 2 of the License.
13*
14* This program is distributed in the hope that it will be useful,
15* but WITHOUT ANY WARRANTY; without even the implied warranty of
16* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17* GNU General Public License for more details.
18*
19* You should have received a copy of the GNU General Public License
20* along with this program; if not, write to the Free Software
21* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22*
23* For the avoidance of doubt, and except that if any non-GPL license
24* choice is available it will apply instead, Sun elects to use only
25* the General Public License version 2 (GPLv2) at this time for any
26* software where a choice of GPL license versions is made
27* available with the language indicating that GPLv2 or any later version
28* may be used, or where a choice of which version of the GPL is applied is
29* otherwise unspecified.
30*
31* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
32* CA 95054 USA or visit www.sun.com if you need additional information or
33* have any questions.
34*
35*
36* ========== Copyright Header End ============================================
37*/
38#include "veriuser.h"
39#include "acc_user.h"
40
41#ifndef accVersionLatest
42#include "vxl_acc_user.h"
43#include "vxl_veriuser.h"
44#endif
45
46char *veriuser_version_str =
47 "=== Verilog with report pli ===\n";
48
49
50bool err_intercept(int level, char *facility, char *code)
51{
52 return(true);
53}
54
55/* Report utility */
56extern int check_number_of_args();
57extern int report_verilog_check();
58extern int set_start_timestamp();
59extern int ReportClass_report();
60extern int ReportClass_set_global_print_threshold();
61extern int ReportClass_get_global_print_threshold();
62extern int ReportClass_set_max_error_count();
63extern int ReportClass_get_max_error_count();
64extern int ReportClass_inc_global_error_count();
65extern int ReportClass_get_global_error_count();
66extern int ReportClass_inc_global_warning_count();
67extern int ReportClass_get_global_warning_count();
68extern int ReportClass_set_short_pathnames();
69extern int ReportClass_get_short_pathnames();
70extern int ReportClass_set_path_prefix();
71extern int ReportClass_get_path_prefix();
72extern int ReportClass_disable_fatal_errors();
73extern int ReportClass_get_num_remaining_nonfatal_cycles();
74extern int ReportClass_set_show_simulation_time();
75extern int ReportClass_get_show_simulation_time();
76extern int report_inc_cycle_count();
77extern int ReportClass_set_print_level();
78extern int ReportClass_set_default_print_level();
79extern int ReportClass_set_table_mode();
80extern int ReportClass_set_default_table_mode();
81/* UNIMPLEMENTED: extern int ReportClass_get_table_mode(); */
82extern int ReportClass_set_error_level();
83extern int ReportClass_set_default_error_level();
84/* UNIMPLEMENTED: extern int report_get_error_level(); */
85extern int report_set_exit_on_error();
86extern int report_get_exit_on_error();
87extern int report_print_cycles_per_second();
88
89p_tfcell report_boot() {
90
91 static s_tfcell report_util_tfs[] = {
92
93 /* Report utility */
94
95 { usertask, 0, report_verilog_check, 0, ReportClass_report, 0, "$report", 1 },
96 { usertask, 0, 0, 0, ReportClass_set_global_print_threshold, 0, "$report_set_global_print_threshold", 1 },
97 { userfunction, 0, check_number_of_args, 0, ReportClass_get_global_print_threshold, 0, "$report_get_global_print_threshold", 1 },
98 { usertask, 1, check_number_of_args, 0, ReportClass_set_max_error_count, 0, "$report_set_max_error_count", 1 },
99 { userfunction, 0, check_number_of_args, 0, ReportClass_get_max_error_count, 0, "$report_get_max_error_count", 1 },
100 { usertask, 0, check_number_of_args, 0, ReportClass_inc_global_error_count, 0, "$report_inc_global_error_count", 1 },
101 { userfunction, 0, check_number_of_args, 0, ReportClass_get_global_error_count, 0, "$report_get_global_error_count", 1 },
102 { usertask, 0, check_number_of_args, 0, ReportClass_inc_global_warning_count, 0, "$report_inc_global_warning_count", 1 },
103 { userfunction, 0, check_number_of_args, 0, ReportClass_get_global_warning_count, 0, "$report_get_global_warning_count", 1 },
104 { usertask, 1, check_number_of_args, 0, ReportClass_set_short_pathnames, 0, "$report_set_short_pathnames", 1 },
105 { userfunction, 0, check_number_of_args, 0, ReportClass_get_short_pathnames, 0, "$report_get_short_pathnames", 1 },
106 { usertask, 1, check_number_of_args, 0, ReportClass_set_path_prefix, 0, "$report_set_path_prefix", 1 },
107 /* review! { userfunction, 0, check_number_of_args, 0, ReportClass_get_path_prefix, 0, "$report_get_path_prefix", 1 }, */
108 { usertask, 1, check_number_of_args, 0, ReportClass_disable_fatal_errors, 0, "$report_disable_fatal_errors", 1 },
109 { userfunction, 0, check_number_of_args, 0, ReportClass_get_num_remaining_nonfatal_cycles, 0, "$report_get_num_remaining_nonfatal_cycles", 1 },
110 { usertask, 1, check_number_of_args, 0, ReportClass_set_show_simulation_time, 0, "$report_set_show_simulation_time", 1 },
111 { userfunction, 0, check_number_of_args, 0, ReportClass_get_show_simulation_time, 0, "$report_get_show_simulation_time", 1 },
112 { usertask, 0, check_number_of_args, 0, report_inc_cycle_count, 0, "$report_inc_cycle_count", 1 },
113 { usertask, 3, check_number_of_args, 0, ReportClass_set_print_level, 0, "$report_set_print_level", 1 },
114 { usertask, 2, check_number_of_args, 0, ReportClass_set_default_print_level, 0, "$report_set_default_print_level", 1 },
115 { usertask, 3, check_number_of_args, 0, ReportClass_set_table_mode, 0, "$report_set_table_mode", 1 },
116 { usertask, 2, check_number_of_args, 0, ReportClass_set_default_table_mode, 0, "$report_set_default_table_mode", 1 },
117 /* UNIMPLEMENTED: { userfunction, 0, check_number_of_args, 0, ReportClass_get_table_mode, 0, "$report_get_table_mode", 1 }, */
118 { usertask, 3, check_number_of_args, 0, ReportClass_set_error_level, 0, "$report_set_error_level", 1 },
119 { usertask, 2, check_number_of_args, 0, ReportClass_set_default_error_level, 0, "$report_set_default_error_level", 1 },
120 /* UNIMPLEMENTED: { userfunction, 0, check_number_of_args, 0, report_get_error_level, 0, "$report_get_error_level", 1 }, */
121 { usertask, 1, check_number_of_args, 0, report_set_exit_on_error, 0, "$report_set_exit_on_error", 1 },
122 { userfunction, 0, check_number_of_args, 0, report_get_exit_on_error, 0, "$report_get_exit_on_error", 1 },
123 { usertask, 0, set_start_timestamp, 0, report_print_cycles_per_second, 0, "$report_print_cycles_per_second", 1 },
124
125 {0}
126
127 };
128
129 io_printf("*** Report PLI tasks completed registration ***\n");
130 return (report_util_tfs);
131}
132
133int (*endofcompile_routines[])() =
134{
135 /*** my_eoc_routine, ***/
136 0 /*** final entry must be 0 ***/
137};
138