sc_time.cc (12925:a745745a930b) sc_time.cc (12927:6be191c20575)
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in the
10 * documentation and/or other materials provided with the distribution;
11 * neither the name of the copyright holders nor the names of its
12 * contributors may be used to endorse or promote products derived from
13 * this software without specific prior written permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#include "base/logging.hh"
31#include "systemc/ext/core/sc_time.hh"
32
33namespace sc_core
34{
35
36sc_time::sc_time()
37{
38 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
39}
40
41sc_time::sc_time(double, sc_time_unit)
42{
43 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
44}
45
46sc_time::sc_time(const sc_time &)
47{
48 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
49}
50
51sc_time::sc_time(double, bool)
52{
53 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
54}
55
56sc_time::sc_time(sc_dt::uint64, bool)
57{
58 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
59}
60
61sc_time &
62sc_time::operator = (const sc_time &)
63{
64 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
65 return *this;
66}
67
68sc_dt::uint64
69sc_time::value() const
70{
71 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
72 return 0;
73}
74
75double
76sc_time::to_double() const
77{
78 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
79 return 0.0;
80}
81double
82sc_time::to_seconds() const
83{
84 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
85 return 0.0;
86}
87
88const std::string
89sc_time::to_string() const
90{
91 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
92 return "";
93}
94
95bool
96sc_time::operator == (const sc_time &) const
97{
98 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
99 return true;
100}
101
102bool
103sc_time::operator != (const sc_time &) const
104{
105 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
106 return false;
107}
108
109bool
110sc_time::operator < (const sc_time &) const
111{
112 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
113 return false;
114}
115
116bool
117sc_time::operator <= (const sc_time &) const
118{
119 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
120 return true;
121}
122
123bool
124sc_time::operator > (const sc_time &) const
125{
126 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
127 return false;
128}
129
130bool
131sc_time::operator >= (const sc_time &) const
132{
133 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
134 return true;
135}
136
137sc_time &
138sc_time::operator += (const sc_time &)
139{
140 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
141 return *this;
142}
143
144sc_time &
145sc_time::operator -= (const sc_time &)
146{
147 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
148 return *this;
149}
150
151sc_time &
152sc_time::operator *= (double)
153{
154 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
155 return *this;
156}
157
158sc_time &
159sc_time::operator /= (double)
160{
161 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
162 return *this;
163}
164
165void
166sc_time::print(std::ostream &) const
167{
168 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
169}
170
171sc_time
172sc_time::from_value(sc_dt::uint64)
173{
174 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
175 return sc_time();
176}
177
178sc_time
179sc_time::from_seconds(double)
180{
181 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
182 return sc_time();
183}
184
185sc_time
186sc_time::from_string(const char *str)
187{
188 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
189 return sc_time();
190}
191
192const sc_time
193operator + (const sc_time &, const sc_time &)
194{
195 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
196 return sc_time();
197}
198
199const sc_time
200operator - (const sc_time &, const sc_time &)
201{
202 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
203 return sc_time();
204}
205
206const sc_time
207operator * (const sc_time &, double)
208{
209 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
210 return sc_time();
211}
212
213const sc_time
214operator * (double, const sc_time &)
215{
216 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
217 return sc_time();
218}
219
220const sc_time
221operator / (const sc_time &, double)
222{
223 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
224 return sc_time();
225}
226
227double
228operator / (const sc_time &, const sc_time &)
229{
230 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
231 return 0.0;
232}
233
234std::ostream &
235operator << (std::ostream &os, const sc_time &)
236{
237 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
238 return os;
239}
240
241const sc_time SC_ZERO_TIME;
242
243void
244sc_set_time_resolution(double, sc_time_unit)
245{
246 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
247}
248
249sc_time
250sc_get_time_resolution()
251{
252 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
253 return sc_time();
254}
255
256const sc_time &
257sc_max_time()
258{
259 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
260 return *(const sc_time *)nullptr;
261}
262
263void
264sc_set_default_time_unit(double, sc_time_unit)
265{
266 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
267}
268
269sc_time
270sc_get_default_time_unit()
271{
272 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
273 return *(sc_time *)nullptr;
274}
275
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in the
10 * documentation and/or other materials provided with the distribution;
11 * neither the name of the copyright holders nor the names of its
12 * contributors may be used to endorse or promote products derived from
13 * this software without specific prior written permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#include "base/logging.hh"
31#include "systemc/ext/core/sc_time.hh"
32
33namespace sc_core
34{
35
36sc_time::sc_time()
37{
38 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
39}
40
41sc_time::sc_time(double, sc_time_unit)
42{
43 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
44}
45
46sc_time::sc_time(const sc_time &)
47{
48 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
49}
50
51sc_time::sc_time(double, bool)
52{
53 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
54}
55
56sc_time::sc_time(sc_dt::uint64, bool)
57{
58 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
59}
60
61sc_time &
62sc_time::operator = (const sc_time &)
63{
64 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
65 return *this;
66}
67
68sc_dt::uint64
69sc_time::value() const
70{
71 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
72 return 0;
73}
74
75double
76sc_time::to_double() const
77{
78 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
79 return 0.0;
80}
81double
82sc_time::to_seconds() const
83{
84 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
85 return 0.0;
86}
87
88const std::string
89sc_time::to_string() const
90{
91 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
92 return "";
93}
94
95bool
96sc_time::operator == (const sc_time &) const
97{
98 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
99 return true;
100}
101
102bool
103sc_time::operator != (const sc_time &) const
104{
105 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
106 return false;
107}
108
109bool
110sc_time::operator < (const sc_time &) const
111{
112 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
113 return false;
114}
115
116bool
117sc_time::operator <= (const sc_time &) const
118{
119 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
120 return true;
121}
122
123bool
124sc_time::operator > (const sc_time &) const
125{
126 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
127 return false;
128}
129
130bool
131sc_time::operator >= (const sc_time &) const
132{
133 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
134 return true;
135}
136
137sc_time &
138sc_time::operator += (const sc_time &)
139{
140 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
141 return *this;
142}
143
144sc_time &
145sc_time::operator -= (const sc_time &)
146{
147 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
148 return *this;
149}
150
151sc_time &
152sc_time::operator *= (double)
153{
154 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
155 return *this;
156}
157
158sc_time &
159sc_time::operator /= (double)
160{
161 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
162 return *this;
163}
164
165void
166sc_time::print(std::ostream &) const
167{
168 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
169}
170
171sc_time
172sc_time::from_value(sc_dt::uint64)
173{
174 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
175 return sc_time();
176}
177
178sc_time
179sc_time::from_seconds(double)
180{
181 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
182 return sc_time();
183}
184
185sc_time
186sc_time::from_string(const char *str)
187{
188 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
189 return sc_time();
190}
191
192const sc_time
193operator + (const sc_time &, const sc_time &)
194{
195 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
196 return sc_time();
197}
198
199const sc_time
200operator - (const sc_time &, const sc_time &)
201{
202 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
203 return sc_time();
204}
205
206const sc_time
207operator * (const sc_time &, double)
208{
209 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
210 return sc_time();
211}
212
213const sc_time
214operator * (double, const sc_time &)
215{
216 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
217 return sc_time();
218}
219
220const sc_time
221operator / (const sc_time &, double)
222{
223 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
224 return sc_time();
225}
226
227double
228operator / (const sc_time &, const sc_time &)
229{
230 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
231 return 0.0;
232}
233
234std::ostream &
235operator << (std::ostream &os, const sc_time &)
236{
237 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
238 return os;
239}
240
241const sc_time SC_ZERO_TIME;
242
243void
244sc_set_time_resolution(double, sc_time_unit)
245{
246 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
247}
248
249sc_time
250sc_get_time_resolution()
251{
252 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
253 return sc_time();
254}
255
256const sc_time &
257sc_max_time()
258{
259 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
260 return *(const sc_time *)nullptr;
261}
262
263void
264sc_set_default_time_unit(double, sc_time_unit)
265{
266 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
267}
268
269sc_time
270sc_get_default_time_unit()
271{
272 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
273 return *(sc_time *)nullptr;
274}
275
276sc_time_tuple::sc_time_tuple(const sc_time &)
277{
278 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
279}
280
281bool
282sc_time_tuple::has_value() const
283{
284 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
285 return false;
286}
287
288sc_dt::uint64
289sc_time_tuple::value() const
290{
291 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
292 return 0;
293}
294
295const char *
296sc_time_tuple::unit_symbol() const
297{
298 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
299 return "";
300}
301
302double
303sc_time_tuple::to_double() const
304{
305 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
306 return 0.0;
307}
308
309std::string
310sc_time_tuple::to_string() const
311{
312 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
313 return "";
314}
315
276} // namespace sc_core
316} // namespace sc_core