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-2024 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         int connect;    // Delay between CIOC instr & connect channel operation
  32         //int chan_activate;  // Time for a list service to send a DCW
  33         //int boot_time; // delay between CPU start and IOM starting boot process
  34         //int terminate_time; // delay between CPU start and IOM starting boot process
  35       } iom_times;
  36     // struct {
  37         // int read;
  38         // int xfer;
  39     // } mt_times;
  40     // bool warn_uninit; // Warn when reading uninitialized memory
  41 
  42     bool no_color;
  43     uint sys_poll_interval; // Polling interval in milliseconds
  44     uint sys_slow_poll_interval; // Polling interval in polling intervals
  45     uint sys_poll_check_rate; // Check for pooling interval rate in CPU cycles
  46 } sysinfo_t;
  47 
  48 # if defined(THREADZ) || defined(LOCKLESS)
  49 extern volatile atomic_bool syncClockMode;
  50 extern volatile atomic_uint syncClockModeMasterIdx; // The CPU sync master
  51 # endif
  52 
  53 # if defined(THREADZ) || defined(LOCKLESS)
  54 #  define DO_WORK                          \
  55   do {                                     \
  56     cpu.rTRticks ++;                       \
  57     if (cpu.syncClockModeCache)            \
  58       cpu.workAllocation --;               \
  59   } while (0)
  60 # else
  61 #  define DO_WORK                          \
  62   do {                                     \
  63     cpu.rTRticks ++;                       \
  64   } while (0)
  65 # endif
  66 
  67 # if defined(TR_WORK_EXEC)
  68 #  define DO_WORK_EXEC DO_WORK
  69 # else
  70 #  define DO_WORK_EXEC
  71 # endif
  72 
  73 # if defined(TR_WORK_MEM)
  74 #  define DO_WORK_MEM DO_WORK
  75 # else
  76 #  define DO_WORK_MEM
  77 # endif
  78 
  79 # if defined(DBGEVENT)
  80 #  define max_dbgevents 128u
  81 #  define dbgevent_tagsize 128
  82 struct dbgevent_t
  83   {
  84     word15 segno;
  85     word18 offset;
  86     bool t0;
  87     char tag[dbgevent_tagsize];
  88   };
  89 
  90 extern uint n_dbgevents;
  91 extern struct dbgevent_t dbgevents[max_dbgevents];
  92 extern struct timespec dbgevent_t0;
  93 int dbgevent_lookup (word15 segno, word18 offset);
  94 # endif
  95 
  96 extern vol word36 * M;  //-V707
  97 extern sysinfo_t sys_opts;
  98 extern uint64 sim_deb_start;
  99 extern uint64 sim_deb_stop;
 100 extern uint64 sim_deb_break;
 101 # define DEBUG_SEGNO_LIMIT 1024
 102 extern bool sim_deb_segno_on;
 103 extern bool sim_deb_segno[DEBUG_SEGNO_LIMIT];
 104 # define NO_SUCH_RINGNO ((uint64) -1ll)
 105 extern uint64 sim_deb_ringno;
 106 extern uint64 sim_deb_skip_limit;
 107 extern uint64 sim_deb_mme_cntdwn;
 108 extern uint64 sim_deb_skip_cnt;
 109 extern bool sim_deb_bar;
 110 extern DEVICE *sim_devices[];
 111 extern uint dbgCPUMask;
 112 extern bool breakEnable;
 113 
 114 char * lookup_address (word18 segno, word18 offset, char * * compname, word18 * compoffset);
 115 void list_source (char * compname, word18 offset, uint dflag);
 116 //t_stat computeAbsAddrN (word24 * absAddr, int segno, uint offset);
 117 
 118 t_stat brkbrk (int32 arg, const char * buf);
 119 extern int32 luf_flag;
 120 
 121 #endif

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