sc_value_base.cc (12854:c95c35407325) sc_value_base.cc (13325:86323e6cc8ec)
1/*****************************************************************************
2
3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4 more contributor license agreements. See the NOTICE file distributed
5 with this work for additional information regarding copyright ownership.
6 Accellera licenses this file to you under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with the
8 License. You may obtain a copy of the License at

--- 38 unchanged lines hidden (view full) ---

47// Andy Goodrich: added $Log command so that CVS comments are reproduced in
48// the source.
49//
50
51#include <cctype>
52#include <cstdio>
53#include <cstdlib>
54
1/*****************************************************************************
2
3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4 more contributor license agreements. See the NOTICE file distributed
5 with this work for additional information regarding copyright ownership.
6 Accellera licenses this file to you under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with the
8 License. You may obtain a copy of the License at

--- 38 unchanged lines hidden (view full) ---

47// Andy Goodrich: added $Log command so that CVS comments are reproduced in
48// the source.
49//
50
51#include <cctype>
52#include <cstdio>
53#include <cstdlib>
54
55#include "systemc/ext/dt/int/messages.hh"
55#include "systemc/ext/dt/misc/sc_value_base.hh"
56#include "systemc/ext/utils/sc_report_handler.hh"
57
58namespace sc_dt
59{
60
61void
62sc_value_base::concat_clear_data(bool /* to_ones */)
63{
64 static const char error_message[] =
65 "concat_clear_data method not supported by this type";
56#include "systemc/ext/dt/misc/sc_value_base.hh"
57#include "systemc/ext/utils/sc_report_handler.hh"
58
59namespace sc_dt
60{
61
62void
63sc_value_base::concat_clear_data(bool /* to_ones */)
64{
65 static const char error_message[] =
66 "concat_clear_data method not supported by this type";
66 SC_REPORT_ERROR("operation failed", error_message);
67 SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
67}
68
69bool
70sc_value_base::concat_get_ctrl(sc_digit * /*dst_p*/, int /*low_i*/) const
71{
72 static const char error_message[] =
73 "concat_get_ctrl method not supported by this type";
68}
69
70bool
71sc_value_base::concat_get_ctrl(sc_digit * /*dst_p*/, int /*low_i*/) const
72{
73 static const char error_message[] =
74 "concat_get_ctrl method not supported by this type";
74 SC_REPORT_ERROR("operation failed", error_message);
75 SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
75 return false;
76}
77
78bool
79sc_value_base::concat_get_data(sc_digit * /*dst_p*/, int /*low_i*/) const
80{
81 static const char error_message[] =
82 "concat_get_data method not supported by this type";
76 return false;
77}
78
79bool
80sc_value_base::concat_get_data(sc_digit * /*dst_p*/, int /*low_i*/) const
81{
82 static const char error_message[] =
83 "concat_get_data method not supported by this type";
83 SC_REPORT_ERROR("operation failed", error_message);
84 SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
84 return false;
85}
86
87sc_dt::uint64
88sc_value_base::concat_get_uint64() const
89{
90 static const char error_message[] =
91 "concat_get_uint64 method not supported by this type";
85 return false;
86}
87
88sc_dt::uint64
89sc_value_base::concat_get_uint64() const
90{
91 static const char error_message[] =
92 "concat_get_uint64 method not supported by this type";
92 SC_REPORT_ERROR("operation failed", error_message);
93 SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
93 return 0;
94}
95
96int
97sc_value_base::concat_length(bool * /*xz_present_p*/) const
98{
99 static const char error_message[] =
100 "concat_length method not supported by this type";
94 return 0;
95}
96
97int
98sc_value_base::concat_length(bool * /*xz_present_p*/) const
99{
100 static const char error_message[] =
101 "concat_length method not supported by this type";
101 SC_REPORT_ERROR("operation failed", error_message);
102 SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
102 return 0;
103}
104
105void
106sc_value_base::concat_set(int64 /*src*/, int /*low_i*/)
107{
108 static const char error_message[] =
109 "concat_set(int64) method not supported by this type";
103 return 0;
104}
105
106void
107sc_value_base::concat_set(int64 /*src*/, int /*low_i*/)
108{
109 static const char error_message[] =
110 "concat_set(int64) method not supported by this type";
110 SC_REPORT_ERROR("operation failed", error_message);
111 SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
111}
112
113void
114sc_value_base::concat_set(const sc_signed &/*src*/, int /*low_i*/)
115{
116 static const char error_message[] =
117 "concat_set(sc_signed) method not supported by this type";
112}
113
114void
115sc_value_base::concat_set(const sc_signed &/*src*/, int /*low_i*/)
116{
117 static const char error_message[] =
118 "concat_set(sc_signed) method not supported by this type";
118 SC_REPORT_ERROR("operation failed", error_message);
119 SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
119}
120
121void
122sc_value_base::concat_set(const sc_unsigned &/*src*/, int /*low_i*/)
123{
124 static const char error_message[] =
125 "concat_set(sc_unsigned) method not supported by this type";
120}
121
122void
123sc_value_base::concat_set(const sc_unsigned &/*src*/, int /*low_i*/)
124{
125 static const char error_message[] =
126 "concat_set(sc_unsigned) method not supported by this type";
126 SC_REPORT_ERROR("operation failed", error_message);
127 SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
127}
128
129void
130sc_value_base::concat_set(uint64 /*src*/, int /*low_i*/)
131{
132 static const char error_message[] =
133 "concat_set(uint64) method not supported by this type";
128}
129
130void
131sc_value_base::concat_set(uint64 /*src*/, int /*low_i*/)
132{
133 static const char error_message[] =
134 "concat_set(uint64) method not supported by this type";
134 SC_REPORT_ERROR("operation failed", error_message);
135 SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message);
135}
136
137} // namespace sc_dt
136}
137
138} // namespace sc_dt