1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-05-05 15:35:19 +00:00

SCP: Updated to current version

This commit is contained in:
Richard Cornwell
2017-06-08 20:51:14 -04:00
parent e4a916f001
commit 42df8ef82b
14 changed files with 678 additions and 316 deletions

View File

@@ -1602,6 +1602,8 @@ else {
sim_throt_val = (uint32) (val * (1 + (sim_idle_rate_ms / val2)));
}
}
sim_throt_state = SIM_THROT_STATE_THROTTLE; /* force state */
sim_throt_wait = sim_throt_val;
}
}
sim_register_internal_device (&sim_throttle_dev); /* Register Throttle Device */
@@ -1635,7 +1637,8 @@ else {
break;
case SIM_THROT_SPC:
fprintf (st, "Throttle: sleep %d ms every %d cycles\n", sim_throt_sleep_time, sim_throt_val);
fprintf (st, "Throttle: %d/%d\n", sim_throt_val, sim_throt_sleep_time);
fprintf (st, "Throttling by sleeping for: %d ms every %d cycles\n", sim_throt_sleep_time, sim_throt_val);
break;
default:
@@ -1684,7 +1687,7 @@ if (sim_throt_type == SIM_THROT_SPC) { /* Non dynamic? */
switch (sim_throt_state) {
case SIM_THROT_STATE_INIT: /* take initial reading */
sim_idle_ms_sleep (sim_idle_rate_ms); /* start on a tick boundart to calibrate */
sim_idle_ms_sleep (sim_idle_rate_ms); /* start on a tick boundary to calibrate */
sim_throt_ms_start = sim_os_msec ();
sim_throt_inst_start = sim_gtime();
sim_throt_wait = SIM_THROT_WST;
@@ -2221,8 +2224,8 @@ for (tmr=0; tmr<=SIM_NTIMERS; tmr++) {
if (clock_time < 0)
clock_time = 0;
/* Stop clock assist unit and make sure the clock unit has a tick queued */
sim_cancel (&sim_timer_units[tmr]);
if (rtc_hz[tmr]) {
if (sim_is_active (&sim_timer_units[tmr])) {
sim_cancel (&sim_timer_units[tmr]);
sim_debug (DBG_QUE, &sim_timer_dev, "sim_stop_timer_services() - tmr=%d scheduling %s after %d\n", tmr, sim_uname (sim_clock_unit[tmr]), clock_time);
_sim_activate (sim_clock_unit[tmr], clock_time);
}