sc_report_handler.cc revision 12921:51212996643f
16145Snate@binkert.org/*
26145Snate@binkert.org * Copyright 2018 Google, Inc.
36145Snate@binkert.org *
46145Snate@binkert.org * Redistribution and use in source and binary forms, with or without
56145Snate@binkert.org * modification, are permitted provided that the following conditions are
66145Snate@binkert.org * met: redistributions of source code must retain the above copyright
76145Snate@binkert.org * notice, this list of conditions and the following disclaimer;
86145Snate@binkert.org * redistributions in binary form must reproduce the above copyright
96145Snate@binkert.org * notice, this list of conditions and the following disclaimer in the
106145Snate@binkert.org * documentation and/or other materials provided with the distribution;
116145Snate@binkert.org * neither the name of the copyright holders nor the names of its
126145Snate@binkert.org * contributors may be used to endorse or promote products derived from
136145Snate@binkert.org * this software without specific prior written permission.
146145Snate@binkert.org *
156145Snate@binkert.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
166145Snate@binkert.org * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
176145Snate@binkert.org * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
186145Snate@binkert.org * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
196145Snate@binkert.org * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
206145Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
216145Snate@binkert.org * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
226145Snate@binkert.org * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
236145Snate@binkert.org * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
246145Snate@binkert.org * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
256145Snate@binkert.org * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
266145Snate@binkert.org *
276145Snate@binkert.org * Authors: Gabe Black
286145Snate@binkert.org */
297832Snate@binkert.org
307547SBrad.Beckmann@amd.com#include "base/logging.hh"
317547SBrad.Beckmann@amd.com#include "systemc/ext/utils/sc_report_handler.hh"
328645Snilay@cs.wisc.edu
337454Snate@binkert.orgnamespace sc_core
347054Snate@binkert.org{
3510301Snilay@cs.wisc.edu
368258SBrad.Beckmann@amd.comvoid
376154Snate@binkert.orgsc_report_handler::report(sc_severity, const char *msg_type, const char *msg,
387054Snate@binkert.org                          const char *file, int line)
397547SBrad.Beckmann@amd.com{
406154Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
416154Snate@binkert.org}
426145Snate@binkert.org
437055Snate@binkert.orgvoid
447454Snate@binkert.orgsc_report_handler::report(sc_severity, const char *msg_type, const char *msg,
457055Snate@binkert.org                          int verbosity, const char *file, int line)
466876Ssteve.reinhardt@amd.com{
476876Ssteve.reinhardt@amd.com    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
486285Snate@binkert.org}
498259SBrad.Beckmann@amd.com
508259SBrad.Beckmann@amd.comvoid
518259SBrad.Beckmann@amd.comsc_report_handler::report(sc_severity, int id, const char *msg,
528259SBrad.Beckmann@amd.com                          const char *file, int line)
537054Snate@binkert.org{
547054Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
557054Snate@binkert.org}
566285Snate@binkert.org
577454Snate@binkert.orgsc_actions
586285Snate@binkert.orgsc_report_handler::set_actions(sc_severity, sc_actions)
597454Snate@binkert.org{
607454Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
617054Snate@binkert.org    return SC_UNSPECIFIED;
627054Snate@binkert.org}
637054Snate@binkert.org
646285Snate@binkert.orgsc_actions
657054Snate@binkert.orgsc_report_handler::set_actions(const char *msg_type, sc_actions)
667054Snate@binkert.org{
677454Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
687454Snate@binkert.org    return SC_UNSPECIFIED;
697054Snate@binkert.org}
707454Snate@binkert.org
717454Snate@binkert.orgsc_actions
727054Snate@binkert.orgsc_report_handler::set_actions(const char *msg_type, sc_severity, sc_actions)
737056Snate@binkert.org{
747056Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
757056Snate@binkert.org    return SC_UNSPECIFIED;
767056Snate@binkert.org}
777054Snate@binkert.org
787054Snate@binkert.orgint
799274Snilay@cs.wisc.edusc_report_handler::stop_after(sc_severity, int limit)
809274Snilay@cs.wisc.edu{
819593Snilay@cs.wisc.edu    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
829593Snilay@cs.wisc.edu    return 0;
839274Snilay@cs.wisc.edu}
849858Snilay@cs.wisc.edu
859274Snilay@cs.wisc.eduint
869274Snilay@cs.wisc.edusc_report_handler::stop_after(const char *msg_type, int limit)
876881SBrad.Beckmann@amd.com{
886285Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
897054Snate@binkert.org    return 0;
907054Snate@binkert.org}
916881SBrad.Beckmann@amd.com
927054Snate@binkert.orgint
936881SBrad.Beckmann@amd.comsc_report_handler::stop_after(const char *msg_type, sc_severity, sc_actions)
947054Snate@binkert.org{
957054Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
967054Snate@binkert.org    return 0;
979799Snilay@cs.wisc.edu}
986285Snate@binkert.org
996145Snate@binkert.orgint
1006145Snate@binkert.orgsc_report_handler::get_count(sc_severity)
1016145Snate@binkert.org{
1027054Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1037454Snate@binkert.org    return 0;
1047454Snate@binkert.org}
1057054Snate@binkert.org
1069858Snilay@cs.wisc.eduint
1077454Snate@binkert.orgsc_report_handler::get_count(const char *msg_type)
1087054Snate@binkert.org{
1096145Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1106145Snate@binkert.org    return 0;
1116145Snate@binkert.org}
1127054Snate@binkert.org
1138257SBrad.Beckmann@amd.comint
1148257SBrad.Beckmann@amd.comsc_report_handler::get_count(const char *msg_type, sc_severity)
1159799Snilay@cs.wisc.edu{
1166145Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1177054Snate@binkert.org    return 0;
1189858Snilay@cs.wisc.edu}
1199858Snilay@cs.wisc.edu
1207054Snate@binkert.orgint
1218258SBrad.Beckmann@amd.comsc_report_handler::set_verbosity_level(int)
1228258SBrad.Beckmann@amd.com{
1239858Snilay@cs.wisc.edu    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1248257SBrad.Beckmann@amd.com    return 0;
1258258SBrad.Beckmann@amd.com}
1268258SBrad.Beckmann@amd.com
1278257SBrad.Beckmann@amd.comint
1289858Snilay@cs.wisc.edusc_report_handler::get_verbosity_level()
1296145Snate@binkert.org{
1306145Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1316145Snate@binkert.org    return 0;
1327054Snate@binkert.org}
1338257SBrad.Beckmann@amd.com
1348257SBrad.Beckmann@amd.com
1359799Snilay@cs.wisc.edusc_actions
1366145Snate@binkert.orgsc_report_handler::suppress(sc_actions)
1377054Snate@binkert.org{
1389858Snilay@cs.wisc.edu    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1396145Snate@binkert.org    return SC_UNSPECIFIED;
1406145Snate@binkert.org}
1416145Snate@binkert.org
1427054Snate@binkert.orgsc_actions
1438257SBrad.Beckmann@amd.comsc_report_handler::suppress()
1448257SBrad.Beckmann@amd.com{
1459799Snilay@cs.wisc.edu    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1466145Snate@binkert.org    return SC_UNSPECIFIED;
1476145Snate@binkert.org}
1487454Snate@binkert.org
1496145Snate@binkert.orgsc_actions
1507054Snate@binkert.orgsc_report_handler::force(sc_actions)
1517054Snate@binkert.org{
1527054Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1537054Snate@binkert.org    return SC_UNSPECIFIED;
1547454Snate@binkert.org}
1557054Snate@binkert.org
1567454Snate@binkert.orgsc_actions
1577054Snate@binkert.orgsc_report_handler::force()
1587454Snate@binkert.org{
1597054Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1607054Snate@binkert.org    return SC_UNSPECIFIED;
1618258SBrad.Beckmann@amd.com}
1628258SBrad.Beckmann@amd.com
1639858Snilay@cs.wisc.edu
1649858Snilay@cs.wisc.edusc_actions
1658258SBrad.Beckmann@amd.comsc_report_handler::set_catch_actions(sc_actions)
1668258SBrad.Beckmann@amd.com{
1677054Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1687054Snate@binkert.org    return SC_UNSPECIFIED;
1697054Snate@binkert.org}
1707054Snate@binkert.org
1717054Snate@binkert.orgsc_actions
1727832Snate@binkert.orgsc_report_handler::get_catch_actions()
1737832Snate@binkert.org{
1747054Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1757054Snate@binkert.org    return SC_UNSPECIFIED;
1767054Snate@binkert.org}
1777054Snate@binkert.org
1787054Snate@binkert.org
1797054Snate@binkert.orgvoid
1807054Snate@binkert.orgsc_report_handler::set_handler(sc_report_handler_proc)
1817054Snate@binkert.org{
1828308Stushar@csail.mit.edu    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1838308Stushar@csail.mit.edu}
1847054Snate@binkert.org
1857054Snate@binkert.orgvoid
1867054Snate@binkert.orgsc_report_handler::default_handler(const sc_report &, const sc_actions &)
1877054Snate@binkert.org{
1887054Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1897054Snate@binkert.org}
1908308Stushar@csail.mit.edu
1918308Stushar@csail.mit.edusc_actions
1927054Snate@binkert.orgsc_report_handler::get_new_action_id()
1937054Snate@binkert.org{
1947054Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
1957054Snate@binkert.org    return SC_UNSPECIFIED;
1967054Snate@binkert.org}
1977054Snate@binkert.org
1989863Snilay@cs.wisc.edusc_report *
1997054Snate@binkert.orgsc_report_handler::get_cached_report()
2009863Snilay@cs.wisc.edu{
2019863Snilay@cs.wisc.edu    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
2029863Snilay@cs.wisc.edu    return nullptr;
2039863Snilay@cs.wisc.edu}
2049863Snilay@cs.wisc.edu
2059863Snilay@cs.wisc.eduvoid
2069863Snilay@cs.wisc.edusc_report_handler::clear_cached_report()
2079863Snilay@cs.wisc.edu{
2089863Snilay@cs.wisc.edu    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
2099863Snilay@cs.wisc.edu}
2107547SBrad.Beckmann@amd.com
2119863Snilay@cs.wisc.edubool
2129863Snilay@cs.wisc.edusc_report_handler::set_log_file_name(const char *)
2139863Snilay@cs.wisc.edu{
2149863Snilay@cs.wisc.edu    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
2157547SBrad.Beckmann@amd.com    return false;
2169863Snilay@cs.wisc.edu}
2179863Snilay@cs.wisc.edu
2189863Snilay@cs.wisc.educonst char *
2199863Snilay@cs.wisc.edusc_report_handler::get_log_file_name()
2207054Snate@binkert.org{
2217054Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
2227054Snate@binkert.org    return nullptr;
2237054Snate@binkert.org}
2249863Snilay@cs.wisc.edu
2257054Snate@binkert.orgvoid
2269858Snilay@cs.wisc.edusc_interrupt_here(const char *msg_type, sc_severity)
2279863Snilay@cs.wisc.edu{
2287054Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
2297054Snate@binkert.org}
2307054Snate@binkert.org
2317054Snate@binkert.orgvoid
2327054Snate@binkert.orgsc_stop_here(const char *msg_type, sc_severity)
2336145Snate@binkert.org{
2347054Snate@binkert.org    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
2356145Snate@binkert.org}
2366876Ssteve.reinhardt@amd.com
2376876Ssteve.reinhardt@amd.comconst std::string
2386876Ssteve.reinhardt@amd.comsc_report_compose_message(const sc_report &)
2396876Ssteve.reinhardt@amd.com{
2406876Ssteve.reinhardt@amd.com    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
2416876Ssteve.reinhardt@amd.com    return "";
2429302Snilay@cs.wisc.edu}
2439302Snilay@cs.wisc.edu
2449302Snilay@cs.wisc.edubool
2459302Snilay@cs.wisc.edusc_report_close_default_log()
2469302Snilay@cs.wisc.edu{
2479302Snilay@cs.wisc.edu    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
2489302Snilay@cs.wisc.edu    return false;
2499302Snilay@cs.wisc.edu}
2509302Snilay@cs.wisc.edu
2519858Snilay@cs.wisc.edu} // namespace sc_core
2529858Snilay@cs.wisc.edu