24.22.4.1.2. AtomicSimpleCPU tick reschedule timing
Inside AtomicSimpleCPU::tick()
we saw previously that the reschedule happens at:
if (latency < clockPeriod()) latency = clockPeriod(); if (_status != Idle) reschedule(tickEvent, curTick() + latency, true);
so it is interesting to learn where that latency
comes from.
From our logs, we see that all events happened with a 500
time unit interval between them, so that must be the value for all instructions of our simple example.
By GDBing it a bit, we see that none of our instructions incremented latency
, and so it got set to clockPeriod()
, which comes from ClockDomain::clockPeriod()
which then likely comes from:
parser.add_option("--cpu-clock", action="store", type="string", default='2GHz',
because the time unit is picoseconds. This then shows on the config.ini
as:
[system.cpu_clk_domain] type=SrcClockDomain clock=500