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     bool tandd_io;        // Devices behave as the T&D tape expects (set sys config=tandd_io=on)
  48 } sysinfo_t;
  49 
  50 # if defined(THREADZ) || defined(LOCKLESS)
  51 extern volAtomic bool syncClockMode;
  52 extern volAtomic uint syncClockModeMasterIdx; // The CPU sync master
  53 # endif
  54 
  55 # if defined(THREADZ) || defined(LOCKLESS)
  56 #  define DO_WORK                          \
  57   do {                                     \
  58     cpu.rTRticks ++;                       \
  59     if (cpu.syncClockModeCache)            \
  60       cpu.workAllocation --;               \
  61   } while (0)
  62 # else
  63 #  define DO_WORK                          \
  64   do {                                     \
  65     cpu.rTRticks ++;                       \
  66   } while (0)
  67 # endif
  68 
  69 # if defined(TR_WORK_EXEC)
  70 #  define DO_WORK_EXEC DO_WORK
  71 # else
  72 #  define DO_WORK_EXEC
  73 # endif
  74 
  75 # if defined(TR_WORK_MEM)
  76 #  define DO_WORK_MEM DO_WORK
  77 # else
  78 #  define DO_WORK_MEM
  79 # endif
  80 
  81 # if defined(DBGEVENT)
  82 #  define max_dbgevents 128u
  83 #  define dbgevent_tagsize 128
  84 struct dbgevent_t
  85   {
  86     word15 segno;
  87     word18 offset;
  88     bool t0;
  89     char tag[dbgevent_tagsize];
  90   };
  91 
  92 extern uint n_dbgevents;
  93 extern struct dbgevent_t dbgevents[max_dbgevents];
  94 extern struct timespec dbgevent_t0;
  95 int dbgevent_lookup (word15 segno, word18 offset);
  96 # endif
  97 
  98 extern volAtomic word36 * M;  //-V707
  99 extern sysinfo_t sys_opts;
 100 extern uint64 sim_deb_start;
 101 extern uint64 sim_deb_stop;
 102 extern uint64 sim_deb_break;
 103 # define DEBUG_SEGNO_LIMIT 1024
 104 extern bool sim_deb_segno_on;
 105 extern bool sim_deb_segno[DEBUG_SEGNO_LIMIT];
 106 # define NO_SUCH_RINGNO ((uint64) -1ll)
 107 extern uint64 sim_deb_ringno;
 108 extern uint64 sim_deb_skip_limit;
 109 extern uint64 sim_deb_mme_cntdwn;
 110 extern uint64 sim_deb_skip_cnt;
 111 extern bool sim_deb_bar;
 112 extern DEVICE *sim_devices[];
 113 extern uint dbgCPUMask;
 114 extern bool breakEnable;
 115 
 116 char * lookup_address (word18 segno, word18 offset, char * * compname, word18 * compoffset);
 117 void list_source (char * compname, word18 offset, uint dflag);
 118 //t_stat computeAbsAddrN (word24 * absAddr, int segno, uint offset);
 119 
 120 t_stat brkbrk (int32 arg, const char * buf);
 121 extern int32 luf_flag;
 122 
 123 #endif

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