Go to the documentation of this file.
56 volatile double tmp =
d *
scale + 0.5;
60 double defaultUnit = 1.0e-9;
104 set(
this,
static_cast<double>(
v) * scaler,
SC_SEC);
123 return static_cast<double>(
val);
134 std::ostringstream
ss;
192 val =
static_cast<int64_t
>(
static_cast<double>(
val) *
d + 0.5);
199 val =
static_cast<int64_t
>(
static_cast<double>(
val) /
d + 0.5);
232 double d = str ? std::strtod(str, &end) : 0.0;
233 if (str == end ||
d < 0.0) {
238 while (*end && std::isspace(*end))
259 volatile double tmp =
static_cast<double>(
t.value()) *
d + 0.5;
266 volatile double tmp =
d *
static_cast<double>(
t.value()) + 0.5;
273 volatile double tmp =
static_cast<double>(
t.value()) /
d + 0.5;
280 return t1.to_double() /
t2.to_double();
299 if (modf(log10(
d), &dummy) != 0.0) {
301 "value not a power of ten");
306 static bool specified =
false;
314 "sc_time object(s) constructed");
321 if (seconds > defaultUnit) {
323 defaultUnit = seconds;
327 while (d < 1.0 && tu >
SC_FS) {
332 Tick ticks_per_second =
358 if (modf(log10(
d), &dummy) != 0.0) {
360 "value not a power of ten");
365 static bool specified =
false;
373 "sc_time object(s) constructed");
381 if (resolution == 0.0)
383 if (defaultUnit < resolution) {
385 "value smaller than time resolution");
396 _value(), _unit(
SC_SEC), _set(true)
405 while (
_unit > 1 && (frequency % 1000 == 0)) {
414 period = 1000 / frequency;
449 std::ostringstream
ss;
static sc_time from_value(sc_dt::uint64)
double s
These variables equal the number of ticks in the unit of time they're named after in a double.
bool operator>(const sc_time &) const
const char SC_ID_DEFAULT_TIME_UNIT_CHANGED_[]
static sc_time from_string(const char *str)
void setClockFrequency(Tick tps)
sc_time & operator=(const sc_time &)
std::string to_string() const
void sc_set_default_time_unit(double d, sc_time_unit tu)
uint64_t Tick
Tick count type.
const sc_time SC_ZERO_TIME
const char * unit_symbol() const
bool operator==(const sc_time &) const
Tick Frequency
The simulated frequency of curTick(). (In ticks per second)
sc_time & operator+=(const sc_time &)
const sc_time & sc_max_time()
#define SC_REPORT_ERROR(msg_type, msg)
double Hz
These variables the inverse of above.
sc_dt::uint64 value() const
bool operator<(const sc_time &) const
double to_seconds() const
sc_dt::uint64 value() const
const char SC_ID_TIME_CONVERSION_FAILED_[]
std::ostream & operator<<(std::ostream &os, sc_status s)
bool clockFrequencyFixed()
sc_time sc_get_default_time_unit()
const sc_time operator-(const sc_time &a, const sc_time &b)
const char * TimeUnitNames[]
#define SC_REPORT_WARNING(msg_type, msg)
sc_time & operator*=(double)
const sc_time operator/(const sc_time &t, double d)
sc_time sc_get_time_resolution()
void sc_set_time_resolution(double d, sc_time_unit tu)
const char * TimeUnitConstantNames[]
sc_time & operator/=(double)
void print(std::ostream &=std::cout) const
const sc_time operator*(const sc_time &t, double d)
const sc_time operator+(const sc_time &a, const sc_time &b)
bool operator>=(const sc_time &) const
bool operator!=(const sc_time &) const
sc_time & operator-=(const sc_time &)
const char SC_ID_SET_DEFAULT_TIME_UNIT_[]
const char SC_ID_SET_TIME_RESOLUTION_[]
const std::string to_string() const
bool operator<=(const sc_time &) const
static sc_time from_seconds(double)
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17