Deleted Added
sdiff udiff text old ( 13057:b1cdffff3bed ) new ( 13124:538eff58fb30 )
full compact
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

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

129 pythonReady = true;
130
131 // If time is already fixed, let python know.
132 if (timeFixed)
133 fixTime();
134 }
135} timeSetter;
136
137} // anonymous namespace
138
139sc_time::sc_time() : val(0) {}
140
141sc_time::sc_time(double d, sc_time_unit tu)
142{
143 val = 0;
144 if (d != 0)
145 set(this, d, tu);
146}
147
148sc_time::sc_time(const sc_time &t)
149{
150 val = t.val;
151}
152
153sc_time::sc_time(double d, bool scale)
154{
155 //XXX Assuming the time resolution is 1ps, and the default unit is 1ns.
156 set(this, d, scale ? SC_NS : SC_PS);
157}
158
159sc_time::sc_time(sc_dt::uint64 v, bool scale)
160{
161 //XXX Assuming the time resolution is 1ps, and the default unit is 1ns.
162 set(this, static_cast<double>(v), scale ? SC_NS : SC_PS);
163}
164
165sc_time &
166sc_time::operator = (const sc_time &t)
167{
168 val = t.val;
169 return *this;
170}

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

365const sc_time &
366sc_max_time()
367{
368 static const sc_time MaxScTime = sc_time::from_value(MaxTick);
369 return MaxScTime;
370}
371
372void
373sc_set_default_time_unit(double, sc_time_unit)
374{
375 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
376}
377
378sc_time
379sc_get_default_time_unit()
380{
381 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
382 return *(sc_time *)nullptr;
383}
384
385sc_time_tuple::sc_time_tuple(const sc_time &)
386{
387 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
388}
389
390bool

--- 35 unchanged lines hidden ---