113322Sgabeblack@google.com/* 213322Sgabeblack@google.com * Copyright 2018 Google, Inc. 313322Sgabeblack@google.com * 413322Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without 513322Sgabeblack@google.com * modification, are permitted provided that the following conditions are 613322Sgabeblack@google.com * met: redistributions of source code must retain the above copyright 713322Sgabeblack@google.com * notice, this list of conditions and the following disclaimer; 813322Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright 913322Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the 1013322Sgabeblack@google.com * documentation and/or other materials provided with the distribution; 1113322Sgabeblack@google.com * neither the name of the copyright holders nor the names of its 1213322Sgabeblack@google.com * contributors may be used to endorse or promote products derived from 1313322Sgabeblack@google.com * this software without specific prior written permission. 1413322Sgabeblack@google.com * 1513322Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1613322Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1713322Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1813322Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1913322Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2013322Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2113322Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2213322Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2313322Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2413322Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2513322Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2613322Sgabeblack@google.com * 2713322Sgabeblack@google.com * Authors: Gabe Black 2813322Sgabeblack@google.com */ 2913322Sgabeblack@google.com 3013322Sgabeblack@google.com#include "systemc/ext/utils/messages.hh" 3113322Sgabeblack@google.com#include "systemc/utils/report.hh" 3213322Sgabeblack@google.com 3313322Sgabeblack@google.comnamespace sc_core 3413322Sgabeblack@google.com{ 3513322Sgabeblack@google.com 3613322Sgabeblack@google.comconst char SC_ID_REGISTER_ID_FAILED_[] = "register_id failed"; 3713322Sgabeblack@google.comconst char SC_ID_UNKNOWN_ERROR_[] = "unknown error"; 3813322Sgabeblack@google.comconst char SC_ID_WITHOUT_MESSAGE_[] = ""; 3913322Sgabeblack@google.comconst char SC_ID_NOT_IMPLEMENTED_[] = "not implemented"; 4013322Sgabeblack@google.comconst char SC_ID_INTERNAL_ERROR_[] = "internal error"; 4113322Sgabeblack@google.comconst char SC_ID_ASSERTION_FAILED_[] = "assertion failed"; 4213322Sgabeblack@google.comconst char SC_ID_OUT_OF_BOUNDS_[] = "out of bounds"; 4313322Sgabeblack@google.comconst char SC_ID_ABORT_[] = "simulation aborted"; 4413322Sgabeblack@google.com 4513322Sgabeblack@google.comconst char SC_ID_STRING_TOO_LONG_[] = "string is too long"; 4613322Sgabeblack@google.comconst char SC_ID_FRONT_ON_EMPTY_LIST_[] = 4713322Sgabeblack@google.com "attempt to take front() on an empty list"; 4813322Sgabeblack@google.comconst char SC_ID_BACK_ON_EMPTY_LIST_[] = 4913322Sgabeblack@google.com "attempt to take back() on an empty list"; 5013322Sgabeblack@google.comconst char SC_ID_IEEE_1666_DEPRECATION_[] = 5113322Sgabeblack@google.com "/IEEE_Std_1666/deprecated"; 5213322Sgabeblack@google.comconst char SC_ID_VECTOR_INIT_CALLED_TWICE_[] = 5313322Sgabeblack@google.com "sc_vector::init has already been called"; 5413322Sgabeblack@google.comconst char SC_ID_VECTOR_BIND_EMPTY_[] = 5513322Sgabeblack@google.com "sc_vector::bind called with empty range"; 5613322Sgabeblack@google.comconst char SC_ID_VECTOR_NONOBJECT_ELEMENTS_[] = 5713322Sgabeblack@google.com "sc_vector::get_elements called for element type " 5813322Sgabeblack@google.com "not derived from sc_object"; 5913322Sgabeblack@google.com 6013322Sgabeblack@google.comnamespace 6113322Sgabeblack@google.com{ 6213322Sgabeblack@google.com 6313322Sgabeblack@google.comsc_gem5::DefaultReportMessages predefinedMessages{ 6413322Sgabeblack@google.com {800, SC_ID_REGISTER_ID_FAILED_}, 6513322Sgabeblack@google.com {0, SC_ID_UNKNOWN_ERROR_}, 6613322Sgabeblack@google.com {1, SC_ID_WITHOUT_MESSAGE_}, 6713322Sgabeblack@google.com {2, SC_ID_NOT_IMPLEMENTED_}, 6813322Sgabeblack@google.com {3, SC_ID_INTERNAL_ERROR_}, 6913322Sgabeblack@google.com {4, SC_ID_ASSERTION_FAILED_}, 7013322Sgabeblack@google.com {5, SC_ID_OUT_OF_BOUNDS_}, 7113322Sgabeblack@google.com 7213322Sgabeblack@google.com {99, SC_ID_ABORT_}, 7313322Sgabeblack@google.com 7413322Sgabeblack@google.com {801, SC_ID_STRING_TOO_LONG_}, 7513322Sgabeblack@google.com {802, SC_ID_FRONT_ON_EMPTY_LIST_}, 7613322Sgabeblack@google.com {803, SC_ID_BACK_ON_EMPTY_LIST_}, 7713322Sgabeblack@google.com {804, SC_ID_IEEE_1666_DEPRECATION_}, 7813322Sgabeblack@google.com {805, SC_ID_VECTOR_INIT_CALLED_TWICE_}, 7913322Sgabeblack@google.com {807, SC_ID_VECTOR_BIND_EMPTY_}, 8013322Sgabeblack@google.com {808, SC_ID_VECTOR_NONOBJECT_ELEMENTS_} 8113322Sgabeblack@google.com}; 8213322Sgabeblack@google.com 8313322Sgabeblack@google.com} // anonymous namespace 8413322Sgabeblack@google.com 8513322Sgabeblack@google.com} // namespace sc_core 86