86 if (_clockFrequencyFixed)
89 using namespace sim_clock;
90 Frequency = _ticksPerSecond;
91 as_float::s =
static_cast<double>(Frequency);
92 as_float::ms = as_float::s / 1.0e3;
93 as_float::us = as_float::s / 1.0e6;
94 as_float::ns = as_float::s / 1.0e9;
95 as_float::ps = as_float::s / 1.0e12;
97 as_float::Hz = 1.0 / as_float::s;
98 as_float::kHz = 1.0 / as_float::ms;
99 as_float::MHz = 1.0 / as_float::us;
100 as_float::GHz = 1.0 / as_float::ns;
102 as_int::s = Frequency;
103 as_int::ms = as_int::s / 1000;
104 as_int::us = as_int::ms / 1000;
105 as_int::ns = as_int::us / 1000;
106 as_int::ps = as_int::ns / 1000;
108 cprintf(
"Global frequency set at %d ticks per second\n", _ticksPerSecond);
110 _clockFrequencyFixed =
true;