messages.cc revision 13325
113325Sgabeblack@google.com/* 213325Sgabeblack@google.com * Copyright 2018 Google, Inc. 313325Sgabeblack@google.com * 413325Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without 513325Sgabeblack@google.com * modification, are permitted provided that the following conditions are 613325Sgabeblack@google.com * met: redistributions of source code must retain the above copyright 713325Sgabeblack@google.com * notice, this list of conditions and the following disclaimer; 813325Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright 913325Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the 1013325Sgabeblack@google.com * documentation and/or other materials provided with the distribution; 1113325Sgabeblack@google.com * neither the name of the copyright holders nor the names of its 1213325Sgabeblack@google.com * contributors may be used to endorse or promote products derived from 1313325Sgabeblack@google.com * this software without specific prior written permission. 1413325Sgabeblack@google.com * 1513325Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1613325Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1713325Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1813325Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1913325Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2013325Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2113325Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2213325Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2313325Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2413325Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2513325Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2613325Sgabeblack@google.com * 2713325Sgabeblack@google.com * Authors: Gabe Black 2813325Sgabeblack@google.com */ 2913325Sgabeblack@google.com 3013325Sgabeblack@google.com#include "systemc/ext/dt/fx/messages.hh" 3113325Sgabeblack@google.com#include "systemc/utils/report.hh" 3213325Sgabeblack@google.com 3313325Sgabeblack@google.comnamespace sc_core 3413325Sgabeblack@google.com{ 3513325Sgabeblack@google.com 3613325Sgabeblack@google.comconst char SC_ID_INVALID_WL_[] = "total wordlength <= 0 is not valid"; 3713325Sgabeblack@google.comconst char SC_ID_INVALID_N_BITS_[] = "number of bits < 0 is not valid"; 3813325Sgabeblack@google.comconst char SC_ID_INVALID_DIV_WL_[] = "division wordlength <= 0 is not valid"; 3913325Sgabeblack@google.comconst char SC_ID_INVALID_CTE_WL_[] = "constant wordlength <= 0 is not valid"; 4013325Sgabeblack@google.comconst char SC_ID_INVALID_MAX_WL_[] = 4113325Sgabeblack@google.com "maximum wordlength <= 0 and != -1 is not valid"; 4213325Sgabeblack@google.comconst char SC_ID_INVALID_FX_VALUE_[] = "invalid fixed-point value"; 4313325Sgabeblack@google.comconst char SC_ID_INVALID_O_MODE_[] = "invalid overflow mode"; 4413325Sgabeblack@google.comconst char SC_ID_OUT_OF_RANGE_[] = "index out of range"; 4513325Sgabeblack@google.comconst char SC_ID_CONTEXT_BEGIN_FAILED_[] = "context begin failed"; 4613325Sgabeblack@google.comconst char SC_ID_CONTEXT_END_FAILED_[] = "context end failed"; 4713325Sgabeblack@google.comconst char SC_ID_WRAP_SM_NOT_DEFINED_[] = 4813325Sgabeblack@google.com "SC_WRAP_SM not defined for unsigned numbers"; 4913325Sgabeblack@google.com 5013325Sgabeblack@google.comnamespace 5113325Sgabeblack@google.com{ 5213325Sgabeblack@google.com 5313325Sgabeblack@google.comsc_gem5::DefaultReportMessages predefinedMessages{ 5413325Sgabeblack@google.com {300, SC_ID_INVALID_WL_}, 5513325Sgabeblack@google.com {301, SC_ID_INVALID_N_BITS_}, 5613325Sgabeblack@google.com {302, SC_ID_INVALID_DIV_WL_}, 5713325Sgabeblack@google.com {303, SC_ID_INVALID_CTE_WL_}, 5813325Sgabeblack@google.com {304, SC_ID_INVALID_MAX_WL_}, 5913325Sgabeblack@google.com {305, SC_ID_INVALID_FX_VALUE_}, 6013325Sgabeblack@google.com {306, SC_ID_INVALID_O_MODE_}, 6113325Sgabeblack@google.com {307, SC_ID_OUT_OF_RANGE_}, 6213325Sgabeblack@google.com {308, SC_ID_CONTEXT_BEGIN_FAILED_}, 6313325Sgabeblack@google.com {309, SC_ID_CONTEXT_END_FAILED_}, 6413325Sgabeblack@google.com {310, SC_ID_WRAP_SM_NOT_DEFINED_} 6513325Sgabeblack@google.com}; 6613325Sgabeblack@google.com 6713325Sgabeblack@google.com} // anonymous namespace 6813325Sgabeblack@google.com 6913325Sgabeblack@google.com} // namespace sc_core 70