TIMER: Fix internal calibrated clock to be well behaved while idling.
This commit is contained in:
parent
c9af9a70fa
commit
b8842e40e5
2 changed files with 4 additions and 4 deletions
2
scp.c
2
scp.c
|
@ -4628,7 +4628,7 @@ else {
|
|||
if ((dptr = find_dev_from_unit (uptr)) != NULL) {
|
||||
fprintf (st, " %s", sim_dname (dptr));
|
||||
if (dptr->numunits > 1)
|
||||
fprintf (st, " unit %d", (int32) (uptr - dptr->units));
|
||||
fprintf (st, " at %d%s\n", accum + uptr->time, (uptr->flags & UNIT_IDLE) ? " (Idle capable)" : "");
|
||||
}
|
||||
else
|
||||
fprintf (st, " Unknown");
|
||||
|
|
|
@ -843,10 +843,10 @@ uint32 clock_start, clock_last, clock_now;
|
|||
sim_debug (DBG_TRC, &sim_timer_dev, "sim_timer_init()\n");
|
||||
for (i=0; i<SIM_NTIMERS; i++) {
|
||||
sim_timer_units[i].action = &sim_timer_tick_svc;
|
||||
sim_timer_units[i].flags = UNIT_DIS;
|
||||
sim_timer_units[i].flags = UNIT_DIS | UNIT_IDLE;
|
||||
}
|
||||
sim_timer_units[SIM_NTIMERS].action = &sim_throt_svc;
|
||||
sim_timer_units[SIM_NTIMERS].flags = UNIT_DIS;
|
||||
sim_timer_units[SIM_NTIMERS].flags = UNIT_DIS | UNIT_IDLE;
|
||||
sim_register_internal_device (&sim_timer_dev);
|
||||
sim_idle_enab = FALSE; /* init idle off */
|
||||
sim_idle_rate_ms = sim_os_ms_sleep_init (); /* get OS timer rate */
|
||||
|
@ -1552,7 +1552,7 @@ for (i = 0; i < SIM_NTIMERS; i++)
|
|||
if (i == SIM_NTIMERS) { /* No clocks have signed in. */
|
||||
/* setup internal clock */
|
||||
sim_timer_units[SIM_NTIMERS+1].action = &sim_timer_clock_tick_svc;
|
||||
sim_timer_units[SIM_NTIMERS+1].flags = UNIT_DIS;
|
||||
sim_timer_units[SIM_NTIMERS+1].flags = UNIT_DIS | UNIT_IDLE;
|
||||
}
|
||||
if (sim_timer_units[SIM_NTIMERS+1].action == &sim_timer_clock_tick_svc) {
|
||||
/* actual clock reset */
|
||||
|
|
Loading…
Add table
Reference in a new issue