112027Sjungma@eit.uni-kl.de/*****************************************************************************
212027Sjungma@eit.uni-kl.de
312027Sjungma@eit.uni-kl.de  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
412027Sjungma@eit.uni-kl.de  more contributor license agreements.  See the NOTICE file distributed
512027Sjungma@eit.uni-kl.de  with this work for additional information regarding copyright ownership.
612027Sjungma@eit.uni-kl.de  Accellera licenses this file to you under the Apache License, Version 2.0
712027Sjungma@eit.uni-kl.de  (the "License"); you may not use this file except in compliance with the
812027Sjungma@eit.uni-kl.de  License.  You may obtain a copy of the License at
912027Sjungma@eit.uni-kl.de
1012027Sjungma@eit.uni-kl.de    http://www.apache.org/licenses/LICENSE-2.0
1112027Sjungma@eit.uni-kl.de
1212027Sjungma@eit.uni-kl.de  Unless required by applicable law or agreed to in writing, software
1312027Sjungma@eit.uni-kl.de  distributed under the License is distributed on an "AS IS" BASIS,
1412027Sjungma@eit.uni-kl.de  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
1512027Sjungma@eit.uni-kl.de  implied.  See the License for the specific language governing
1612027Sjungma@eit.uni-kl.de  permissions and limitations under the License.
1712027Sjungma@eit.uni-kl.de
1812027Sjungma@eit.uni-kl.de *****************************************************************************/
1912027Sjungma@eit.uni-kl.de
2012027Sjungma@eit.uni-kl.de/*****************************************************************************
2112027Sjungma@eit.uni-kl.de
2212027Sjungma@eit.uni-kl.de  sc_value_base.cpp -- Base class for all SystemC data values.
2312027Sjungma@eit.uni-kl.de
2412027Sjungma@eit.uni-kl.de  Original Author: Andy Goodrich, Forte Design Systems
2512027Sjungma@eit.uni-kl.de
2612027Sjungma@eit.uni-kl.de *****************************************************************************/
2712027Sjungma@eit.uni-kl.de
2812027Sjungma@eit.uni-kl.de/*****************************************************************************
2912027Sjungma@eit.uni-kl.de
3012027Sjungma@eit.uni-kl.de  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
3112027Sjungma@eit.uni-kl.de  changes you are making here.
3212027Sjungma@eit.uni-kl.de
3312027Sjungma@eit.uni-kl.de      Name, Affiliation, Date:
3412027Sjungma@eit.uni-kl.de  Description of Modification:
3512027Sjungma@eit.uni-kl.de
3612027Sjungma@eit.uni-kl.de *****************************************************************************/
3712027Sjungma@eit.uni-kl.de
3812027Sjungma@eit.uni-kl.de
3912027Sjungma@eit.uni-kl.de// $Log: sc_value_base.cpp,v $
4012027Sjungma@eit.uni-kl.de// Revision 1.2  2011/08/15 16:43:24  acg
4112027Sjungma@eit.uni-kl.de//  Torsten Maehne: changes to remove unused argument warnings.
4212027Sjungma@eit.uni-kl.de//
4312027Sjungma@eit.uni-kl.de// Revision 1.1.1.1  2006/12/15 20:20:05  acg
4412027Sjungma@eit.uni-kl.de// SystemC 2.3
4512027Sjungma@eit.uni-kl.de//
4612027Sjungma@eit.uni-kl.de// Revision 1.3  2006/01/13 18:54:01  acg
4712027Sjungma@eit.uni-kl.de// Andy Goodrich: added $Log command so that CVS comments are reproduced in
4812027Sjungma@eit.uni-kl.de// the source.
4912027Sjungma@eit.uni-kl.de//
5012027Sjungma@eit.uni-kl.de
5112027Sjungma@eit.uni-kl.de#include <cstdlib>
5212027Sjungma@eit.uni-kl.de#include <assert.h>
5312027Sjungma@eit.uni-kl.de#include <ctype.h>
5412027Sjungma@eit.uni-kl.de#include <cstdio>
5512027Sjungma@eit.uni-kl.de
5612027Sjungma@eit.uni-kl.de#include "sysc/datatypes/int/sc_int_ids.h"
5712027Sjungma@eit.uni-kl.de#include "sysc/datatypes/misc/sc_value_base.h"
5812027Sjungma@eit.uni-kl.de
5912027Sjungma@eit.uni-kl.denamespace sc_dt
6012027Sjungma@eit.uni-kl.de{
6112027Sjungma@eit.uni-kl.de
6212027Sjungma@eit.uni-kl.devoid sc_value_base::concat_clear_data( bool /* to_ones */ )
6312027Sjungma@eit.uni-kl.de{
6412027Sjungma@eit.uni-kl.de    char error_message[128];
6512027Sjungma@eit.uni-kl.de    std::sprintf(error_message,
6612027Sjungma@eit.uni-kl.de	"concat_clear_data method not supported by this type");
6712027Sjungma@eit.uni-kl.de    SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
6812027Sjungma@eit.uni-kl.de}
6912027Sjungma@eit.uni-kl.de
7012027Sjungma@eit.uni-kl.debool sc_value_base::concat_get_ctrl( sc_digit* /*dst_p*/, int /*low_i*/ ) const
7112027Sjungma@eit.uni-kl.de{
7212027Sjungma@eit.uni-kl.de    char error_message[128];
7312027Sjungma@eit.uni-kl.de    std::sprintf(error_message,
7412027Sjungma@eit.uni-kl.de	"concat_get_ctrl method not supported by this type");
7512027Sjungma@eit.uni-kl.de    SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
7612027Sjungma@eit.uni-kl.de    return false;
7712027Sjungma@eit.uni-kl.de}
7812027Sjungma@eit.uni-kl.de
7912027Sjungma@eit.uni-kl.debool sc_value_base::concat_get_data( sc_digit* /*dst_p*/, int /*low_i*/ ) const
8012027Sjungma@eit.uni-kl.de{
8112027Sjungma@eit.uni-kl.de    char error_message[128];
8212027Sjungma@eit.uni-kl.de    std::sprintf(error_message,
8312027Sjungma@eit.uni-kl.de	"concat_get_data method not supported by this type");
8412027Sjungma@eit.uni-kl.de    SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
8512027Sjungma@eit.uni-kl.de    return false;
8612027Sjungma@eit.uni-kl.de}
8712027Sjungma@eit.uni-kl.de
8812027Sjungma@eit.uni-kl.desc_dt::uint64 sc_value_base::concat_get_uint64() const
8912027Sjungma@eit.uni-kl.de{
9012027Sjungma@eit.uni-kl.de    char error_message[128];
9112027Sjungma@eit.uni-kl.de    std::sprintf(error_message,
9212027Sjungma@eit.uni-kl.de	"concat_get_uint64 method not supported by this type");
9312027Sjungma@eit.uni-kl.de    SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
9412027Sjungma@eit.uni-kl.de    return 0;
9512027Sjungma@eit.uni-kl.de}
9612027Sjungma@eit.uni-kl.de
9712027Sjungma@eit.uni-kl.deint sc_value_base::concat_length(bool* /*xz_present_p*/) const
9812027Sjungma@eit.uni-kl.de{
9912027Sjungma@eit.uni-kl.de    char error_message[128];
10012027Sjungma@eit.uni-kl.de    std::sprintf(error_message,
10112027Sjungma@eit.uni-kl.de	"concat_length method not supported by this type");
10212027Sjungma@eit.uni-kl.de    SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
10312027Sjungma@eit.uni-kl.de    return 0;
10412027Sjungma@eit.uni-kl.de}
10512027Sjungma@eit.uni-kl.de
10612027Sjungma@eit.uni-kl.devoid sc_value_base::concat_set( int64 /*src*/, int /*low_i*/ )
10712027Sjungma@eit.uni-kl.de{
10812027Sjungma@eit.uni-kl.de    char error_message[128];
10912027Sjungma@eit.uni-kl.de    std::sprintf(error_message,
11012027Sjungma@eit.uni-kl.de	"concat_set(int64) method not supported by this type");
11112027Sjungma@eit.uni-kl.de    SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
11212027Sjungma@eit.uni-kl.de}
11312027Sjungma@eit.uni-kl.de
11412027Sjungma@eit.uni-kl.devoid sc_value_base::concat_set( const sc_signed& /*src*/, int /*low_i*/ )
11512027Sjungma@eit.uni-kl.de{
11612027Sjungma@eit.uni-kl.de    char error_message[128];
11712027Sjungma@eit.uni-kl.de    std::sprintf(error_message,
11812027Sjungma@eit.uni-kl.de	"concat_set(sc_signed) method not supported by this type");
11912027Sjungma@eit.uni-kl.de    SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
12012027Sjungma@eit.uni-kl.de}
12112027Sjungma@eit.uni-kl.de
12212027Sjungma@eit.uni-kl.devoid sc_value_base::concat_set( const sc_unsigned& /*src*/, int /*low_i*/ )
12312027Sjungma@eit.uni-kl.de{
12412027Sjungma@eit.uni-kl.de    char error_message[128];
12512027Sjungma@eit.uni-kl.de    std::sprintf(error_message,
12612027Sjungma@eit.uni-kl.de	"concat_set(sc_unsigned) method not supported by this type");
12712027Sjungma@eit.uni-kl.de    SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
12812027Sjungma@eit.uni-kl.de}
12912027Sjungma@eit.uni-kl.de
13012027Sjungma@eit.uni-kl.devoid sc_value_base::concat_set( uint64 /*src*/, int /*low_i*/ )
13112027Sjungma@eit.uni-kl.de{
13212027Sjungma@eit.uni-kl.de    char error_message[128];
13312027Sjungma@eit.uni-kl.de    std::sprintf(error_message,
13412027Sjungma@eit.uni-kl.de	"concat_set(uint64) method not supported by this type");
13512027Sjungma@eit.uni-kl.de    SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
13612027Sjungma@eit.uni-kl.de}
13712027Sjungma@eit.uni-kl.de
13812027Sjungma@eit.uni-kl.de} // namespace sc_dt
139