tmr               357 src/simh/sim_timer.c int32 tmr;
tmr               359 src/simh/sim_timer.c for (tmr = 0; tmr <= SIM_NTIMERS; tmr++)
tmr               360 src/simh/sim_timer.c     if (rtc_initd[tmr] != 0)
tmr               361 src/simh/sim_timer.c         sim_rtcn_init (rtc_initd[tmr], tmr);
tmr               365 src/simh/sim_timer.c int32 sim_rtcn_init (int32 time, int32 tmr)
tmr               367 src/simh/sim_timer.c return sim_rtcn_init_unit (NULL, time, tmr);
tmr               370 src/simh/sim_timer.c int32 sim_rtcn_init_unit (UNIT *uptr, int32 time, int32 tmr)
tmr               374 src/simh/sim_timer.c if (tmr == SIM_INTERNAL_CLK)
tmr               375 src/simh/sim_timer.c     tmr = SIM_NTIMERS;
tmr               377 src/simh/sim_timer.c     if ((tmr < 0) || (tmr >= SIM_NTIMERS))
tmr               385 src/simh/sim_timer.c if (rtc_currd[tmr])
tmr               386 src/simh/sim_timer.c     time = rtc_currd[tmr];
tmr               388 src/simh/sim_timer.c     uptr = sim_clock_unit[tmr];
tmr               389 src/simh/sim_timer.c sim_debug (DBG_CAL, &sim_timer_dev, "_sim_rtcn_init_unit(unit=%s, time=%d, tmr=%d)\n", sim_uname(uptr), time, tmr);
tmr               391 src/simh/sim_timer.c     if (!sim_clock_unit[tmr])
tmr               392 src/simh/sim_timer.c         sim_register_clock_unit_tmr (uptr, tmr);
tmr               394 src/simh/sim_timer.c rtc_clock_start_gtime[tmr]        = sim_gtime();
tmr               395 src/simh/sim_timer.c rtc_rtime[tmr]                    = sim_os_msec ();
tmr               396 src/simh/sim_timer.c rtc_vtime[tmr]                    = rtc_rtime[tmr];
tmr               397 src/simh/sim_timer.c rtc_nxintv[tmr]                   = 1000;
tmr               398 src/simh/sim_timer.c rtc_ticks[tmr]                    = 0;
tmr               399 src/simh/sim_timer.c rtc_hz[tmr]                       = 0;
tmr               400 src/simh/sim_timer.c rtc_based[tmr]                    = time;
tmr               401 src/simh/sim_timer.c rtc_currd[tmr]                    = time;
tmr               402 src/simh/sim_timer.c rtc_initd[tmr]                    = time;
tmr               403 src/simh/sim_timer.c rtc_elapsed[tmr]                  = 0;
tmr               404 src/simh/sim_timer.c rtc_calibrations[tmr]             = 0;
tmr               405 src/simh/sim_timer.c rtc_clock_ticks_tot[tmr]         += rtc_clock_ticks[tmr];
tmr               406 src/simh/sim_timer.c rtc_clock_ticks[tmr]              = 0;
tmr               407 src/simh/sim_timer.c rtc_calib_tick_time_tot[tmr]     += rtc_calib_tick_time[tmr];
tmr               408 src/simh/sim_timer.c rtc_calib_tick_time[tmr]          = 0;
tmr               409 src/simh/sim_timer.c rtc_clock_catchup_pending[tmr]    = FALSE;
tmr               410 src/simh/sim_timer.c rtc_clock_catchup_eligible[tmr]   = FALSE;
tmr               411 src/simh/sim_timer.c rtc_clock_catchup_ticks_tot[tmr] += rtc_clock_catchup_ticks[tmr];
tmr               412 src/simh/sim_timer.c rtc_clock_catchup_ticks[tmr]      = 0;
tmr               413 src/simh/sim_timer.c rtc_calib_ticks_acked_tot[tmr]   += rtc_calib_ticks_acked[tmr];
tmr               414 src/simh/sim_timer.c rtc_calib_ticks_acked[tmr]        = 0;
tmr               415 src/simh/sim_timer.c ++rtc_calib_initializations[tmr];
tmr               416 src/simh/sim_timer.c _rtcn_configure_calibrated_clock (tmr);
tmr               420 src/simh/sim_timer.c int32 sim_rtcn_calb (uint32 ticksper, int32 tmr)
tmr               422 src/simh/sim_timer.c if (tmr == SIM_INTERNAL_CLK)
tmr               423 src/simh/sim_timer.c     tmr = SIM_NTIMERS;
tmr               425 src/simh/sim_timer.c     if ((tmr < 0) || (tmr >= SIM_NTIMERS))
tmr               428 src/simh/sim_timer.c if (rtc_hz[tmr] != ticksper) {                          /* changing tick rate? */
tmr               429 src/simh/sim_timer.c     rtc_hz[tmr] = ticksper;
tmr               430 src/simh/sim_timer.c     rtc_clock_tick_size[tmr] = 1.0/ticksper;
tmr               431 src/simh/sim_timer.c     _rtcn_configure_calibrated_clock (tmr);
tmr               432 src/simh/sim_timer.c     rtc_currd[tmr] = (int32)(sim_timer_inst_per_sec()/ticksper);
tmr               434 src/simh/sim_timer.c if (sim_clock_unit[tmr] == NULL) {                      /* Not using TIMER units? */
tmr               435 src/simh/sim_timer.c     rtc_clock_ticks[tmr] += 1;
tmr               436 src/simh/sim_timer.c     rtc_calib_tick_time[tmr] += rtc_clock_tick_size[tmr];
tmr               438 src/simh/sim_timer.c if (rtc_clock_catchup_pending[tmr]) {                   /* catchup tick? */
tmr               439 src/simh/sim_timer.c     ++rtc_clock_catchup_ticks[tmr];                     /* accumulating which were catchups */
tmr               440 src/simh/sim_timer.c     rtc_clock_catchup_pending[tmr] = FALSE;
tmr               442 src/simh/sim_timer.c return rtc_currd[tmr];                                  /* return now avoiding counting catchup tick in calibration */
tmr               449 src/simh/sim_timer.c int tmr;
tmr               453 src/simh/sim_timer.c for (tmr=0; tmr<=SIM_NTIMERS; tmr++) {
tmr               454 src/simh/sim_timer.c     sim_timer_units[tmr].action = &sim_timer_tick_svc;
tmr               455 src/simh/sim_timer.c     sim_timer_units[tmr].flags  = UNIT_DIS | UNIT_IDLE;
tmr               480 src/simh/sim_timer.c int tmr, clocks;
tmr               485 src/simh/sim_timer.c for (tmr=clocks=0; tmr<=SIM_NTIMERS; ++tmr) {
tmr               486 src/simh/sim_timer.c     if (0 == rtc_initd[tmr])
tmr               489 src/simh/sim_timer.c     if (sim_clock_unit[tmr]) {
tmr               493 src/simh/sim_timer.c                  (tmr == SIM_NTIMERS) ? "Internal Calibrated Timer(" : "",
tmr               494 src/simh/sim_timer.c                  sim_uname(sim_clock_unit[tmr]),
tmr               495 src/simh/sim_timer.c                  (tmr == SIM_NTIMERS) ? ")" : "");
tmr               499 src/simh/sim_timer.c              rtc_hz[tmr] ? "Calibrated " : "Uncalibrated ",
tmr               500 src/simh/sim_timer.c              tmr);
tmr               501 src/simh/sim_timer.c     if (rtc_hz[tmr]) {
tmr               503 src/simh/sim_timer.c                  (unsigned long)rtc_hz[tmr]);
tmr               505 src/simh/sim_timer.c                  sim_fmt_secs (rtc_clock_tick_size[tmr]));
tmr               507 src/simh/sim_timer.c                  (unsigned long)rtc_ticks[tmr]);
tmr               510 src/simh/sim_timer.c              (unsigned long)rtc_elapsed[tmr],
tmr               511 src/simh/sim_timer.c              sim_fmt_secs ((double)rtc_elapsed[tmr]));
tmr               512 src/simh/sim_timer.c     if (tmr == calb_tmr) {
tmr               514 src/simh/sim_timer.c                  (unsigned long)rtc_calibrations[tmr]);
tmr               518 src/simh/sim_timer.c         if (rtc_clock_calib_skip_idle[tmr])
tmr               520 src/simh/sim_timer.c                      (unsigned long)rtc_clock_calib_skip_idle[tmr]);
tmr               521 src/simh/sim_timer.c         if (rtc_clock_calib_backwards[tmr])
tmr               523 src/simh/sim_timer.c                      (unsigned long)rtc_clock_calib_backwards[tmr]);
tmr               524 src/simh/sim_timer.c         if (rtc_clock_calib_gap2big[tmr])
tmr               526 src/simh/sim_timer.c                      (unsigned long)rtc_clock_calib_gap2big[tmr]);
tmr               528 src/simh/sim_timer.c     if (rtc_gtime[tmr])
tmr               530 src/simh/sim_timer.c                  rtc_gtime[tmr]);
tmr               532 src/simh/sim_timer.c              (unsigned long)rtc_currd[tmr]);
tmr               534 src/simh/sim_timer.c              (unsigned long)rtc_calib_initializations[tmr]);
tmr               536 src/simh/sim_timer.c              (unsigned long)rtc_clock_ticks_tot[tmr]+(unsigned long)rtc_clock_ticks[tmr]);
tmr               537 src/simh/sim_timer.c     if (rtc_clock_skew_max[tmr] != 0.0)
tmr               539 src/simh/sim_timer.c                  sim_fmt_secs (fabs(rtc_clock_skew_max[tmr])),
tmr               540 src/simh/sim_timer.c                  (rtc_clock_skew_max[tmr] < 0) ? " fast" : " slow");
tmr               541 src/simh/sim_timer.c     if (rtc_calib_ticks_acked[tmr])
tmr               543 src/simh/sim_timer.c                  (unsigned long)rtc_calib_ticks_acked[tmr]);
tmr               544 src/simh/sim_timer.c     if (rtc_calib_ticks_acked_tot[tmr]+rtc_calib_ticks_acked[tmr] != rtc_calib_ticks_acked[tmr]) //-V584
tmr               546 src/simh/sim_timer.c                  (unsigned long)rtc_calib_ticks_acked_tot[tmr]+(unsigned long)rtc_calib_ticks_acked[tmr]);
tmr               547 src/simh/sim_timer.c     if (rtc_calib_tick_time[tmr])
tmr               549 src/simh/sim_timer.c                  sim_fmt_secs (rtc_calib_tick_time[tmr]));
tmr               550 src/simh/sim_timer.c     if (rtc_calib_tick_time_tot[tmr]+rtc_calib_tick_time[tmr] != rtc_calib_tick_time[tmr])
tmr               552 src/simh/sim_timer.c                  sim_fmt_secs (rtc_calib_tick_time_tot[tmr]+rtc_calib_tick_time[tmr]));
tmr               553 src/simh/sim_timer.c     if (rtc_clock_catchup_ticks[tmr])
tmr               555 src/simh/sim_timer.c                  (unsigned long)rtc_clock_catchup_ticks[tmr]);
tmr               556 src/simh/sim_timer.c     if (rtc_clock_catchup_ticks_tot[tmr]+rtc_clock_catchup_ticks[tmr] != rtc_clock_catchup_ticks[tmr]) //-V584
tmr               558 src/simh/sim_timer.c                  (unsigned long)rtc_clock_catchup_ticks_tot[tmr]+(unsigned long)rtc_clock_catchup_ticks[tmr]);
tmr               562 src/simh/sim_timer.c     if (rtc_clock_catchup_eligible[tmr]) {
tmr               563 src/simh/sim_timer.c         _double_to_timespec (&now, rtc_clock_catchup_base_time[tmr]+rtc_calib_tick_time[tmr]);
tmr               566 src/simh/sim_timer.c         _double_to_timespec (&now, rtc_clock_catchup_base_time[tmr]);
tmr               570 src/simh/sim_timer.c     if (rtc_clock_time_idled[tmr])
tmr               571 src/simh/sim_timer.c         fprintf (st, "  Total Time Idled:          %s\n",   sim_fmt_secs (rtc_clock_time_idled[tmr]/1000.0));
tmr               580 src/simh/sim_timer.c int tmr;
tmr               582 src/simh/sim_timer.c for (tmr=0; tmr<=SIM_NTIMERS; ++tmr) {
tmr               583 src/simh/sim_timer.c     if (sim_clock_unit[tmr] == NULL)
tmr               585 src/simh/sim_timer.c     if (sim_clock_cosched_queue[tmr] != QUEUE_LIST_END) {
tmr               589 src/simh/sim_timer.c                  sim_name, sim_uname(sim_clock_unit[tmr]));
tmr               591 src/simh/sim_timer.c         for (uptr = sim_clock_cosched_queue[tmr]; uptr != QUEUE_LIST_END; uptr = uptr->next) { //-V763
tmr               654 src/simh/sim_timer.c int tmr = (int)(uptr-sim_timer_units);
tmr               657 src/simh/sim_timer.c rtc_clock_ticks[tmr] += 1;
tmr               658 src/simh/sim_timer.c rtc_calib_tick_time[tmr] += rtc_clock_tick_size[tmr];
tmr               667 src/simh/sim_timer.c if (sim_clock_unit[tmr]->action == NULL)
tmr               669 src/simh/sim_timer.c stat = sim_clock_unit[tmr]->action (sim_clock_unit[tmr]);
tmr               670 src/simh/sim_timer.c --sim_cosched_interval[tmr];                    /* Countdown ticks */
tmr               672 src/simh/sim_timer.c     if (rtc_clock_catchup_eligible[tmr]) {      /* calibration started? */
tmr               677 src/simh/sim_timer.c         skew = (_timespec_to_double(&now) - (rtc_calib_tick_time[tmr]+rtc_clock_catchup_base_time[tmr]));
tmr               679 src/simh/sim_timer.c         if (fabs(skew) > fabs(rtc_clock_skew_max[tmr]))
tmr               680 src/simh/sim_timer.c             rtc_clock_skew_max[tmr]   = skew;
tmr               682 src/simh/sim_timer.c     while ((sim_clock_cosched_queue[tmr] != QUEUE_LIST_END) &&
tmr               683 src/simh/sim_timer.c            (sim_cosched_interval[tmr] < sim_clock_cosched_queue[tmr]->time)) {
tmr               684 src/simh/sim_timer.c         UNIT *cptr                    = sim_clock_cosched_queue[tmr];
tmr               685 src/simh/sim_timer.c         sim_clock_cosched_queue[tmr]  = cptr->next;
tmr               690 src/simh/sim_timer.c     if (sim_clock_cosched_queue[tmr] != QUEUE_LIST_END)
tmr               691 src/simh/sim_timer.c         sim_cosched_interval[tmr]     = sim_clock_cosched_queue[tmr]->time;
tmr               693 src/simh/sim_timer.c         sim_cosched_interval[tmr]     = 0;
tmr               695 src/simh/sim_timer.c sim_timer_activate_after (uptr, 1000000/rtc_hz[tmr]);
tmr               777 src/simh/sim_timer.c int32 tmr;
tmr               781 src/simh/sim_timer.c for (tmr=0; tmr<SIM_NTIMERS; tmr++) {
tmr               782 src/simh/sim_timer.c     if ((rtc_hz[tmr]) &&
tmr               783 src/simh/sim_timer.c         (rtc_hz[tmr] <= (uint32)sim_os_tick_hz))
tmr               786 src/simh/sim_timer.c if (tmr == SIM_NTIMERS) {                   /* None found? */
tmr               787 src/simh/sim_timer.c     if ((tmr != newtmr) && (!sim_is_active (&SIM_INTERNAL_UNIT))) {
tmr               800 src/simh/sim_timer.c if ((tmr == newtmr) &&
tmr               806 src/simh/sim_timer.c                tmr, rtc_hz[tmr]);
tmr               820 src/simh/sim_timer.c                sim_calb_tmr, rtc_hz[sim_calb_tmr], tmr, rtc_hz[tmr]);
tmr               821 src/simh/sim_timer.c     sim_calb_tmr = tmr;
tmr               823 src/simh/sim_timer.c sim_calb_tmr = tmr;
tmr               845 src/simh/sim_timer.c int tmr;
tmr               849 src/simh/sim_timer.c for (tmr=0; tmr<=SIM_NTIMERS; tmr++) {
tmr               852 src/simh/sim_timer.c     if (sim_clock_unit[tmr]) {
tmr               854 src/simh/sim_timer.c         sim_cancel (&sim_timer_units[tmr]);
tmr               855 src/simh/sim_timer.c         if (rtc_hz[tmr])
tmr               856 src/simh/sim_timer.c             sim_activate (sim_clock_unit[tmr], rtc_currd[tmr]);
tmr               859 src/simh/sim_timer.c         while (sim_clock_cosched_queue[tmr] != QUEUE_LIST_END) {
tmr               860 src/simh/sim_timer.c             UNIT *cptr = sim_clock_cosched_queue[tmr];
tmr               862 src/simh/sim_timer.c             sim_clock_cosched_queue[tmr] = cptr->next;
tmr               867 src/simh/sim_timer.c             _sim_activate (cptr, accum*rtc_currd[tmr]);
tmr               898 src/simh/sim_timer.c int inst_delay, tmr;
tmr               902 src/simh/sim_timer.c for (tmr=0; tmr<=SIM_NTIMERS; tmr++)
tmr               903 src/simh/sim_timer.c     if (sim_clock_unit[tmr] == uptr) {
tmr               904 src/simh/sim_timer.c         uptr = &sim_timer_units[tmr];
tmr               923 src/simh/sim_timer.c t_stat sim_register_clock_unit_tmr (UNIT *uptr, int32 tmr)
tmr               925 src/simh/sim_timer.c if (tmr == SIM_INTERNAL_CLK)
tmr               926 src/simh/sim_timer.c     tmr = SIM_NTIMERS;
tmr               928 src/simh/sim_timer.c     if ((tmr < 0) || (tmr >= SIM_NTIMERS))
tmr               932 src/simh/sim_timer.c     while (sim_clock_cosched_queue[tmr] != QUEUE_LIST_END) {
tmr               933 src/simh/sim_timer.c         UNIT *uptr = sim_clock_cosched_queue[tmr];
tmr               938 src/simh/sim_timer.c     sim_clock_unit[tmr] = NULL;
tmr               941 src/simh/sim_timer.c if (NULL == sim_clock_unit[tmr])
tmr               942 src/simh/sim_timer.c     sim_clock_cosched_queue[tmr] = QUEUE_LIST_END;
tmr               943 src/simh/sim_timer.c sim_clock_unit[tmr] = uptr;
tmr               945 src/simh/sim_timer.c sim_timer_units[tmr].flags = UNIT_DIS | (sim_clock_unit[tmr] ? UNIT_IDLE : 0); //-V547
tmr               953 src/simh/sim_timer.c     int tmr;
tmr               955 src/simh/sim_timer.c     for (tmr=0; tmr<SIM_NTIMERS; tmr++) {
tmr               956 src/simh/sim_timer.c         if (uptr == sim_clock_cosched_queue[tmr]) {
tmr               957 src/simh/sim_timer.c             sim_clock_cosched_queue[tmr] = uptr->next;
tmr               962 src/simh/sim_timer.c             for (cptr = sim_clock_cosched_queue[tmr];
tmr                62 src/simh/sim_timer.h int32 sim_rtcn_init (int32 time, int32 tmr);
tmr                63 src/simh/sim_timer.h int32 sim_rtcn_init_unit (UNIT *uptr, int32 time, int32 tmr);
tmr                66 src/simh/sim_timer.h int32 sim_rtcn_calb (uint32 ticksper, int32 tmr);
tmr                79 src/simh/sim_timer.h t_stat sim_register_clock_unit_tmr (UNIT *uptr, int32 tmr);