112854Sgabeblack@google.com/*****************************************************************************
212854Sgabeblack@google.com
312854Sgabeblack@google.com  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
412854Sgabeblack@google.com  more contributor license agreements.  See the NOTICE file distributed
512854Sgabeblack@google.com  with this work for additional information regarding copyright ownership.
612854Sgabeblack@google.com  Accellera licenses this file to you under the Apache License, Version 2.0
712854Sgabeblack@google.com  (the "License"); you may not use this file except in compliance with the
812854Sgabeblack@google.com  License.  You may obtain a copy of the License at
912854Sgabeblack@google.com
1012854Sgabeblack@google.com    http://www.apache.org/licenses/LICENSE-2.0
1112854Sgabeblack@google.com
1212854Sgabeblack@google.com  Unless required by applicable law or agreed to in writing, software
1312854Sgabeblack@google.com  distributed under the License is distributed on an "AS IS" BASIS,
1412854Sgabeblack@google.com  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
1512854Sgabeblack@google.com  implied.  See the License for the specific language governing
1612854Sgabeblack@google.com  permissions and limitations under the License.
1712854Sgabeblack@google.com
1812854Sgabeblack@google.com *****************************************************************************/
1912854Sgabeblack@google.com
2012854Sgabeblack@google.com/*****************************************************************************
2112854Sgabeblack@google.com
2212854Sgabeblack@google.com  sc_value_base.cpp -- Base class for all SystemC data values.
2312854Sgabeblack@google.com
2412854Sgabeblack@google.com  Original Author: Andy Goodrich, Forte Design Systems
2512854Sgabeblack@google.com
2612854Sgabeblack@google.com *****************************************************************************/
2712854Sgabeblack@google.com
2812854Sgabeblack@google.com/*****************************************************************************
2912854Sgabeblack@google.com
3012854Sgabeblack@google.com  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
3112854Sgabeblack@google.com  changes you are making here.
3212854Sgabeblack@google.com
3312854Sgabeblack@google.com      Name, Affiliation, Date:
3412854Sgabeblack@google.com  Description of Modification:
3512854Sgabeblack@google.com
3612854Sgabeblack@google.com *****************************************************************************/
3712854Sgabeblack@google.com
3812854Sgabeblack@google.com
3912854Sgabeblack@google.com// $Log: sc_value_base.cpp,v $
4012854Sgabeblack@google.com// Revision 1.2  2011/08/15 16:43:24  acg
4112854Sgabeblack@google.com//  Torsten Maehne: changes to remove unused argument warnings.
4212854Sgabeblack@google.com//
4312854Sgabeblack@google.com// Revision 1.1.1.1  2006/12/15 20:20:05  acg
4412854Sgabeblack@google.com// SystemC 2.3
4512854Sgabeblack@google.com//
4612854Sgabeblack@google.com// Revision 1.3  2006/01/13 18:54:01  acg
4712854Sgabeblack@google.com// Andy Goodrich: added $Log command so that CVS comments are reproduced in
4812854Sgabeblack@google.com// the source.
4912854Sgabeblack@google.com//
5012854Sgabeblack@google.com
5112854Sgabeblack@google.com#include <cctype>
5212854Sgabeblack@google.com#include <cstdio>
5312854Sgabeblack@google.com#include <cstdlib>
5412854Sgabeblack@google.com
5513325Sgabeblack@google.com#include "systemc/ext/dt/int/messages.hh"
5612854Sgabeblack@google.com#include "systemc/ext/dt/misc/sc_value_base.hh"
5712854Sgabeblack@google.com#include "systemc/ext/utils/sc_report_handler.hh"
5812854Sgabeblack@google.com
5912854Sgabeblack@google.comnamespace sc_dt
6012854Sgabeblack@google.com{
6112854Sgabeblack@google.com
6212854Sgabeblack@google.comvoid
6312854Sgabeblack@google.comsc_value_base::concat_clear_data(bool /* to_ones */)
6412854Sgabeblack@google.com{
6512854Sgabeblack@google.com    static const char error_message[] =
6612854Sgabeblack@google.com        "concat_clear_data method not supported by this type";
6713325Sgabeblack@google.com    SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
6812854Sgabeblack@google.com}
6912854Sgabeblack@google.com
7012854Sgabeblack@google.combool
7112854Sgabeblack@google.comsc_value_base::concat_get_ctrl(sc_digit * /*dst_p*/, int /*low_i*/) const
7212854Sgabeblack@google.com{
7312854Sgabeblack@google.com    static const char error_message[] =
7412854Sgabeblack@google.com        "concat_get_ctrl method not supported by this type";
7513325Sgabeblack@google.com    SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
7612854Sgabeblack@google.com    return false;
7712854Sgabeblack@google.com}
7812854Sgabeblack@google.com
7912854Sgabeblack@google.combool
8012854Sgabeblack@google.comsc_value_base::concat_get_data(sc_digit * /*dst_p*/, int /*low_i*/) const
8112854Sgabeblack@google.com{
8212854Sgabeblack@google.com    static const char error_message[] =
8312854Sgabeblack@google.com        "concat_get_data method not supported by this type";
8413325Sgabeblack@google.com    SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
8512854Sgabeblack@google.com    return false;
8612854Sgabeblack@google.com}
8712854Sgabeblack@google.com
8812854Sgabeblack@google.comsc_dt::uint64
8912854Sgabeblack@google.comsc_value_base::concat_get_uint64() const
9012854Sgabeblack@google.com{
9112854Sgabeblack@google.com    static const char error_message[] =
9212854Sgabeblack@google.com        "concat_get_uint64 method not supported by this type";
9313325Sgabeblack@google.com    SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
9412854Sgabeblack@google.com    return 0;
9512854Sgabeblack@google.com}
9612854Sgabeblack@google.com
9712854Sgabeblack@google.comint
9812854Sgabeblack@google.comsc_value_base::concat_length(bool * /*xz_present_p*/) const
9912854Sgabeblack@google.com{
10012854Sgabeblack@google.com    static const char error_message[] =
10112854Sgabeblack@google.com        "concat_length method not supported by this type";
10213325Sgabeblack@google.com    SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
10312854Sgabeblack@google.com    return 0;
10412854Sgabeblack@google.com}
10512854Sgabeblack@google.com
10612854Sgabeblack@google.comvoid
10712854Sgabeblack@google.comsc_value_base::concat_set(int64 /*src*/, int /*low_i*/)
10812854Sgabeblack@google.com{
10912854Sgabeblack@google.com    static const char error_message[] =
11012854Sgabeblack@google.com        "concat_set(int64) method not supported by this type";
11113325Sgabeblack@google.com    SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
11212854Sgabeblack@google.com}
11312854Sgabeblack@google.com
11412854Sgabeblack@google.comvoid
11512854Sgabeblack@google.comsc_value_base::concat_set(const sc_signed &/*src*/, int /*low_i*/)
11612854Sgabeblack@google.com{
11712854Sgabeblack@google.com    static const char error_message[] =
11812854Sgabeblack@google.com        "concat_set(sc_signed) method not supported by this type";
11913325Sgabeblack@google.com    SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
12012854Sgabeblack@google.com}
12112854Sgabeblack@google.com
12212854Sgabeblack@google.comvoid
12312854Sgabeblack@google.comsc_value_base::concat_set(const sc_unsigned &/*src*/, int /*low_i*/)
12412854Sgabeblack@google.com{
12512854Sgabeblack@google.com    static const char error_message[] =
12612854Sgabeblack@google.com        "concat_set(sc_unsigned) method not supported by this type";
12713325Sgabeblack@google.com    SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
12812854Sgabeblack@google.com}
12912854Sgabeblack@google.com
13012854Sgabeblack@google.comvoid
13112854Sgabeblack@google.comsc_value_base::concat_set(uint64 /*src*/, int /*low_i*/)
13212854Sgabeblack@google.com{
13312854Sgabeblack@google.com    static const char error_message[] =
13412854Sgabeblack@google.com        "concat_set(uint64) method not supported by this type";
13513325Sgabeblack@google.com    SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
13612854Sgabeblack@google.com}
13712854Sgabeblack@google.com
13812854Sgabeblack@google.com} // namespace sc_dt
139