root/src/dps8/dps8_sys.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * vim: filetype=c:tabstop=4:ai:expandtab
   3  * SPDX-License-Identifier: ICU
   4  * scspell-id: 0538414e-f62f-11ec-8915-80ee73e9b8e7
   5  *
   6  * ---------------------------------------------------------------------------
   7  *
   8  * Copyright (c) 2007-2013 Michael Mondy
   9  * Copyright (c) 2012-2016 Harry Reed
  10  * Copyright (c) 2013-2022 Charles Anthony
  11  * Copyright (c) 2021-2025 The DPS8M Development Team
  12  *
  13  * This software is made available under the terms of the ICU License.
  14  * See the LICENSE.md file at the top-level directory of this distribution.
  15  *
  16  * ---------------------------------------------------------------------------
  17  */
  18 
  19 #if !defined(_DPS8_SYS_H)
  20 # define _DPS8_SYS_H
  21 
  22 # include <uv.h>
  23 # include "uvutil.h"
  24 
  25 // System-wide info and options not tied to a specific CPU, IOM, or SCU
  26 typedef struct
  27   {
  28     // Delay times are in cycles; negative for immediate
  29     struct
  30       {
  31         volAtomic int connect;    // Delay between CIOC instr & connect channel operation
  32         //volAtomic int chan_activate;  // Time for a list service to send a DCW
  33         //volAtomic int boot_time; // delay between CPU start and IOM starting boot process
  34         //volAtomic int terminate_time; // delay between CPU start and IOM starting boot process
  35       } iom_times;
  36     // struct {
  37         // volAtomic int read;
  38         // volAtomic int xfer;
  39     // } mt_times;
  40     // bool volAtomic warn_uninit; // Warn when reading uninitialized memory
  41 
  42     volAtomic bool no_color;
  43     volAtomic uint sys_poll_interval; // Polling interval in milliseconds
  44     volAtomic uint sys_slow_poll_interval; // Polling interval in polling intervals
  45     volAtomic uint sys_poll_check_rate; // Check for pooling interval rate in CPU cycles
  46     bool nosync;          // If true, disable clock sync.
  47 } sysinfo_t;
  48 
  49 # if defined(THREADZ) || defined(LOCKLESS)
  50 extern volAtomic bool syncClockMode;
  51 extern volAtomic uint syncClockModeMasterIdx; // The CPU sync master
  52 # endif
  53 
  54 # if defined(THREADZ) || defined(LOCKLESS)
  55 #  define DO_WORK                          \
  56   do {                                     \
  57     cpu.rTRticks ++;                       \
  58     if (cpu.syncClockModeCache)            \
  59       cpu.workAllocation --;               \
  60   } while (0)
  61 # else
  62 #  define DO_WORK                          \
  63   do {                                     \
  64     cpu.rTRticks ++;                       \
  65   } while (0)
  66 # endif
  67 
  68 # if defined(TR_WORK_EXEC)
  69 #  define DO_WORK_EXEC DO_WORK
  70 # else
  71 #  define DO_WORK_EXEC
  72 # endif
  73 
  74 # if defined(TR_WORK_MEM)
  75 #  define DO_WORK_MEM DO_WORK
  76 # else
  77 #  define DO_WORK_MEM
  78 # endif
  79 
  80 # if defined(DBGEVENT)
  81 #  define max_dbgevents 128u
  82 #  define dbgevent_tagsize 128
  83 struct dbgevent_t
  84   {
  85     word15 segno;
  86     word18 offset;
  87     bool t0;
  88     char tag[dbgevent_tagsize];
  89   };
  90 
  91 extern uint n_dbgevents;
  92 extern struct dbgevent_t dbgevents[max_dbgevents];
  93 extern struct timespec dbgevent_t0;
  94 int dbgevent_lookup (word15 segno, word18 offset);
  95 # endif
  96 
  97 extern volAtomic word36 * M;  //-V707
  98 extern sysinfo_t sys_opts;
  99 extern uint64 sim_deb_start;
 100 extern uint64 sim_deb_stop;
 101 extern uint64 sim_deb_break;
 102 # define DEBUG_SEGNO_LIMIT 1024
 103 extern bool sim_deb_segno_on;
 104 extern bool sim_deb_segno[DEBUG_SEGNO_LIMIT];
 105 # define NO_SUCH_RINGNO ((uint64) -1ll)
 106 extern uint64 sim_deb_ringno;
 107 extern uint64 sim_deb_skip_limit;
 108 extern uint64 sim_deb_mme_cntdwn;
 109 extern uint64 sim_deb_skip_cnt;
 110 extern bool sim_deb_bar;
 111 extern DEVICE *sim_devices[];
 112 extern uint dbgCPUMask;
 113 extern bool breakEnable;
 114 
 115 char * lookup_address (word18 segno, word18 offset, char * * compname, word18 * compoffset);
 116 void list_source (char * compname, word18 offset, uint dflag);
 117 //t_stat computeAbsAddrN (word24 * absAddr, int segno, uint offset);
 118 
 119 t_stat brkbrk (int32 arg, const char * buf);
 120 extern int32 luf_flag;
 121 
 122 #endif

/* [previous][next][first][last][top][bottom][index][help] */