sc_time.cc (12986:761e57785c6a) sc_time.cc (12989:f5e0cebe6999)
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

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

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"
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

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

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 "base/types.hh"
31#include "python/pybind11/pybind.hh"
32#include "systemc/ext/core/sc_time.hh"
33
34namespace sc_core
35{
36
37namespace
38{

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

234sc_time
235sc_time::from_string(const char *str)
236{
237 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
238 return sc_time();
239}
240
241const sc_time
32#include "python/pybind11/pybind.hh"
33#include "systemc/ext/core/sc_time.hh"
34
35namespace sc_core
36{
37
38namespace
39{

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

235sc_time
236sc_time::from_string(const char *str)
237{
238 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
239 return sc_time();
240}
241
242const sc_time
242operator + (const sc_time &, const sc_time &)
243operator + (const sc_time &a, const sc_time &b)
243{
244{
244 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
245 return sc_time();
245 return sc_time::from_value(a.value() + b.value());
246}
247
248const sc_time
246}
247
248const sc_time
249operator - (const sc_time &, const sc_time &)
249operator - (const sc_time &a, const sc_time &b)
250{
250{
251 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
252 return sc_time();
251 return sc_time::from_value(a.value() - b.value());
253}
254
255const sc_time
256operator * (const sc_time &, double)
257{
258 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
259 return sc_time();
260}

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

300{
301 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
302 return sc_time();
303}
304
305const sc_time &
306sc_max_time()
307{
252}
253
254const sc_time
255operator * (const sc_time &, double)
256{
257 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
258 return sc_time();
259}

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

299{
300 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
301 return sc_time();
302}
303
304const sc_time &
305sc_max_time()
306{
308 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
309 return *(const sc_time *)nullptr;
307 static const sc_time MaxScTime = sc_time::from_value(MaxTick);
308 return MaxScTime;
310}
311
312void
313sc_set_default_time_unit(double, sc_time_unit)
314{
315 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
316}
317

--- 48 unchanged lines hidden ---
309}
310
311void
312sc_set_default_time_unit(double, sc_time_unit)
313{
314 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
315}
316

--- 48 unchanged lines hidden ---