sc_report_handler.hh (13312:a7685ffbead8) | sc_report_handler.hh (13322:7391057615bd) |
---|---|
1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 18 unchanged lines hidden (view full) --- 27 * Authors: Gabe Black 28 */ 29 30#ifndef __SYSTEMC_EXT_UTIL_SC_REPORT_HANDLER_HH__ 31#define __SYSTEMC_EXT_UTIL_SC_REPORT_HANDLER_HH__ 32 33#include <string> 34 | 1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 18 unchanged lines hidden (view full) --- 27 * Authors: Gabe Black 28 */ 29 30#ifndef __SYSTEMC_EXT_UTIL_SC_REPORT_HANDLER_HH__ 31#define __SYSTEMC_EXT_UTIL_SC_REPORT_HANDLER_HH__ 32 33#include <string> 34 |
35#include "messages.hh" |
|
35#include "sc_report.hh" // for sc_severity 36 37namespace sc_core 38{ 39 40typedef unsigned sc_actions; 41 42enum --- 86 unchanged lines hidden (view full) --- 129 ::sc_core::sc_report_handler::report( \ 130 ::sc_core::SC_ERROR, msg_type, msg, __FILE__, __LINE__) 131 132#define SC_REPORT_FATAL(msg_type, msg) \ 133 ::sc_core::sc_report_handler::report( \ 134 ::sc_core::SC_FATAL, msg_type, msg, __FILE__, __LINE__) 135 136#define sc_assert(expr) \ | 36#include "sc_report.hh" // for sc_severity 37 38namespace sc_core 39{ 40 41typedef unsigned sc_actions; 42 43enum --- 86 unchanged lines hidden (view full) --- 130 ::sc_core::sc_report_handler::report( \ 131 ::sc_core::SC_ERROR, msg_type, msg, __FILE__, __LINE__) 132 133#define SC_REPORT_FATAL(msg_type, msg) \ 134 ::sc_core::sc_report_handler::report( \ 135 ::sc_core::SC_FATAL, msg_type, msg, __FILE__, __LINE__) 136 137#define sc_assert(expr) \ |
137 ((void)((expr) ? 0 : (SC_REPORT_FATAL("assertion failed", #expr), 0))) | 138 ((void)((expr) ? 0 : (SC_REPORT_FATAL( \ 139 ::sc_core::SC_ID_ASSERTION_FAILED_, #expr), 0))) |
138 139void sc_interrupt_here(const char *msg_type, sc_severity); 140void sc_stop_here(const char *msg_type, sc_severity); 141 142// Nonstandard 143// From Accellera, "not documented, but available". 144const std::string sc_report_compose_message(const sc_report &); 145bool sc_report_close_default_log(); 146 147} // namespace sc_core 148 149#endif //__SYSTEMC_EXT_UTIL_SC_REPORT_HANDLER_HH__ | 140 141void sc_interrupt_here(const char *msg_type, sc_severity); 142void sc_stop_here(const char *msg_type, sc_severity); 143 144// Nonstandard 145// From Accellera, "not documented, but available". 146const std::string sc_report_compose_message(const sc_report &); 147bool sc_report_close_default_log(); 148 149} // namespace sc_core 150 151#endif //__SYSTEMC_EXT_UTIL_SC_REPORT_HANDLER_HH__ |