sc_value_base.cpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002 
00003   The following code is derived, directly or indirectly, from the SystemC
00004   source code Copyright (c) 1996-2006 by all Contributors.
00005   All Rights reserved.
00006 
00007   The contents of this file are subject to the restrictions and limitations
00008   set forth in the SystemC Open Source License Version 2.4 (the "License");
00009   You may not use this file except in compliance with such restrictions and
00010   limitations. You may obtain instructions on how to receive a copy of the
00011   License at http://www.systemc.org/. Software distributed by Contributors
00012   under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
00013   ANY KIND, either express or implied. See the License for the specific
00014   language governing rights and limitations under the License.
00015 
00016  *****************************************************************************/
00017 
00018 /*****************************************************************************
00019 
00020   sc_value_base.cpp -- Base class for all SystemC data values.
00021 
00022   Original Author: Andy Goodrich, Forte Design Systems
00023 
00024  *****************************************************************************/
00025 
00026 /*****************************************************************************
00027 
00028   MODIFICATION LOG - modifiers, enter your name, affiliation, date and
00029   changes you are making here.
00030 
00031       Name, Affiliation, Date:
00032   Description of Modification:
00033 
00034  *****************************************************************************/
00035 
00036 
00037 // $Log: sc_value_base.cpp,v $
00038 // Revision 1.1.1.1  2006/12/15 20:31:36  acg
00039 // SystemC 2.2
00040 //
00041 // Revision 1.3  2006/01/13 18:54:01  acg
00042 // Andy Goodrich: added $Log command so that CVS comments are reproduced in
00043 // the source.
00044 //
00045 
00046 #include <stdio.h>
00047 #include <cstdlib>
00048 #include <assert.h>
00049 #include <ctype.h>
00050 
00051 #include "sysc/datatypes/int/sc_int_ids.h"
00052 #include "sysc/datatypes/misc/sc_value_base.h"
00053 
00054 namespace sc_dt
00055 {
00056 
00057 void sc_value_base::concat_clear_data( bool to_ones )
00058 {
00059     char error_message[128];
00060     std::sprintf(error_message, 
00061     "concat_clear_data method not supported by this type");
00062     SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
00063 }
00064 
00065 bool sc_value_base::concat_get_ctrl( sc_digit* dst_p, int low_i ) const
00066 {
00067     char error_message[128];
00068     std::sprintf(error_message, 
00069     "concat_get_ctrl method not supported by this type");
00070     SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
00071     return false;
00072 }
00073 
00074 bool sc_value_base::concat_get_data( sc_digit* dst_p, int low_i ) const
00075 {
00076     char error_message[128];
00077     std::sprintf(error_message, 
00078     "concat_get_data method not supported by this type");
00079     SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
00080     return false;
00081 }
00082 
00083 sc_dt::uint64 sc_value_base::concat_get_uint64() const
00084 {
00085     char error_message[128];
00086     std::sprintf(error_message, 
00087     "concat_get_uint64 method not supported by this type");
00088     SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
00089     return 0;
00090 }
00091 
00092 int sc_value_base::concat_length(bool* xz_present_p) const
00093 {
00094     char error_message[128];
00095     std::sprintf(error_message, 
00096     "concat_length method not supported by this type");
00097     SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
00098     return 0;
00099 }
00100 
00101 void sc_value_base::concat_set( int64 src, int i_low )
00102 {
00103     char error_message[128];
00104     std::sprintf(error_message, 
00105     "concat_set(int64) method not supported by this type");
00106     SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
00107 }
00108 
00109 void sc_value_base::concat_set( const sc_signed& src, int low_i )
00110 {
00111     char error_message[128];
00112     std::sprintf(error_message, 
00113     "concat_set(sc_signed) method not supported by this type");
00114     SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
00115 }
00116 
00117 void sc_value_base::concat_set( const sc_unsigned& src, int low_i )
00118 {
00119     char error_message[128];
00120     std::sprintf(error_message, 
00121     "concat_set(sc_unsigned) method not supported by this type");
00122     SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
00123 }
00124 
00125 void sc_value_base::concat_set( uint64 src, int i_low )
00126 {
00127     char error_message[128];
00128     std::sprintf(error_message, 
00129     "concat_set(uint64) method not supported by this type");
00130     SC_REPORT_ERROR( sc_core::SC_ID_OPERATION_FAILED_, error_message );
00131 }
00132 
00133 } // namespace sc_dt

Generated on Wed Jan 21 15:32:09 2009 for SystemC by  doxygen 1.5.5