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/bit/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_LENGTH_MISMATCH_[] = 3713325Sgabeblack@google.com "length mismatch in bit/logic vector assignment"; 3813325Sgabeblack@google.comconst char SC_ID_INCOMPATIBLE_TYPES_[] = "incompatible types"; 3913325Sgabeblack@google.comconst char SC_ID_CANNOT_CONVERT_[] = "cannot perform conversion"; 4013325Sgabeblack@google.comconst char SC_ID_INCOMPATIBLE_VECTORS_[] = "incompatible vectors"; 4113325Sgabeblack@google.comconst char SC_ID_VALUE_NOT_VALID_[] = "value is not valid"; 4213325Sgabeblack@google.comconst char SC_ID_ZERO_LENGTH_[] = "zero length"; 4313325Sgabeblack@google.comconst char SC_ID_VECTOR_CONTAINS_LOGIC_VALUE_[] = 4413325Sgabeblack@google.com "vector contains 4-value logic"; 4513325Sgabeblack@google.comconst char SC_ID_SC_BV_CANNOT_CONTAIN_X_AND_Z_[] = 4613325Sgabeblack@google.com "sc_bv cannot contain values X and Z"; 4713325Sgabeblack@google.comconst char SC_ID_VECTOR_TOO_LONG_[] = "vector is too long: truncated"; 4813325Sgabeblack@google.comconst char SC_ID_VECTOR_TOO_SHORT_[] = "vector is too short: 0-padded"; 4913325Sgabeblack@google.comconst char SC_ID_WRONG_VALUE_[] = "wrong value"; 5013325Sgabeblack@google.comconst char SC_ID_LOGIC_Z_TO_BOOL_[] = 5113325Sgabeblack@google.com "sc_logic value 'Z' cannot be converted to bool"; 5213325Sgabeblack@google.comconst char SC_ID_LOGIC_X_TO_BOOL_[] = 5313325Sgabeblack@google.com "sc_logic value 'X' cannot be converted to bool"; 5413325Sgabeblack@google.com 5513325Sgabeblack@google.comnamespace 5613325Sgabeblack@google.com{ 5713325Sgabeblack@google.com 5813325Sgabeblack@google.comsc_gem5::DefaultReportMessages predefinedMessages{ 5913325Sgabeblack@google.com {200, SC_ID_LENGTH_MISMATCH_}, 6013325Sgabeblack@google.com {201, SC_ID_INCOMPATIBLE_TYPES_}, 6113325Sgabeblack@google.com {202, SC_ID_CANNOT_CONVERT_}, 6213325Sgabeblack@google.com {203, SC_ID_INCOMPATIBLE_VECTORS_}, 6313325Sgabeblack@google.com {204, SC_ID_VALUE_NOT_VALID_}, 6413325Sgabeblack@google.com {205, SC_ID_ZERO_LENGTH_}, 6513325Sgabeblack@google.com {206, SC_ID_VECTOR_CONTAINS_LOGIC_VALUE_}, 6613325Sgabeblack@google.com {207, SC_ID_SC_BV_CANNOT_CONTAIN_X_AND_Z_}, 6713325Sgabeblack@google.com {208, SC_ID_VECTOR_TOO_LONG_}, 6813325Sgabeblack@google.com {209, SC_ID_VECTOR_TOO_SHORT_}, 6913325Sgabeblack@google.com {210, SC_ID_WRONG_VALUE_}, 7013325Sgabeblack@google.com {211, SC_ID_LOGIC_Z_TO_BOOL_}, 7113325Sgabeblack@google.com {212, SC_ID_LOGIC_X_TO_BOOL_} 7213325Sgabeblack@google.com}; 7313325Sgabeblack@google.com 7413325Sgabeblack@google.com} // anonymous namespace 7513325Sgabeblack@google.com 7613325Sgabeblack@google.com} // namespace sc_core 77