root/src/dps8/hdbg.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: 5e1e2bcf-f62f-11ec-8cca-80ee73e9b8e7
   5  *
   6  * ---------------------------------------------------------------------------
   7  *
   8  * Copyright (c) 2016 Charles Anthony
   9  * Copyright (c) 2021-2023 The DPS8M Development Team
  10  *
  11  * All rights reserved.
  12  *
  13  * This software is made available under the terms of the ICU
  14  * License, version 1.8.1 or later.  For more details, see the
  15  * LICENSE.md file at the top-level directory of this distribution.
  16  *
  17  * ---------------------------------------------------------------------------
  18  */
  19 
  20 #ifdef TESTING
  21 
  22 # ifndef Hdbg_def
  23 #  define Hdbg_def
  24 
  25 
  26 
  27 
  28 t_stat hdbg_size (int32 arg, UNUSED const char * buf);
  29 t_stat hdbg_print (int32 arg, UNUSED const char * buf);
  30 t_stat hdbg_cpu_mask (UNUSED int32 arg, const char * buf);
  31 t_stat hdbgSegmentNumber (UNUSED int32 arg, const char * buf);
  32 t_stat hdbgBlacklist (UNUSED int32 arg, const char * buf);
  33 
  34 void hdbgTrace (const char * ctx);
  35 void hdbgPrint (void);
  36 enum hdbgIEFP_e
  37   {
  38     hdbgIEFP_abs_bar_read,
  39     hdbgIEFP_abs_read,
  40     hdbgIEFP_bar_read,
  41     hdbgIEFP_read,
  42     hdbgIEFP_abs_bar_write,
  43     hdbgIEFP_abs_write,
  44     hdbgIEFP_bar_write,
  45     hdbgIEFP_write
  46   };
  47 void hdbgIEFP (enum hdbgIEFP_e type, word15 segno, word18 offset, const char * ctx);
  48 void hdbgMRead (word24 addr, word36 data, const char * ctx);
  49 void hdbgMWrite (word24 addr, word36 data, const char * ctx);
  50 void hdbgFault (_fault faultNumber, _fault_subtype subFault,
  51                 const char * faultMsg, const char * ctx);
  52 void hdbgIntrSet (uint inum, uint cpuUnitIdx, uint scuUnitIdx, const char * ctx);
  53 void hdbgIntr (uint intr_pair_addr, const char * ctx);
  54 void hdbgNote (const char * ctx, const char * fmt, ...)
  55 #  ifdef __GNUC__
  56   __attribute__ ((format (printf, 2, 3)))
  57 #  endif
  58 ;
  59 
  60 // Keep sync'd with regNames
  61 enum hregs_t
  62   {
  63     hreg_A,
  64     hreg_Q,
  65     hreg_X0, hreg_X1, hreg_X2, hreg_X3, hreg_X4, hreg_X5, hreg_X6, hreg_X7,
  66     hreg_AR0, hreg_AR1, hreg_AR2, hreg_AR3, hreg_AR4, hreg_AR5, hreg_AR6, hreg_AR7,
  67     hreg_PR0, hreg_PR1, hreg_PR2, hreg_PR3, hreg_PR4, hreg_PR5, hreg_PR6, hreg_PR7,
  68     hreg_Y, hreg_Z,
  69     hreg_IR,
  70     hreg_DSBR,
  71   };
  72 void hdbgRegR (enum hregs_t type, word36 data, const char * ctx);
  73 void hdbgRegW (enum hregs_t type, word36 data, const char * ctx);
  74 struct par_s;
  75 void hdbgPARegR (enum hregs_t type, struct par_s * data, const char * ctx);
  76 void hdbgPARegW (enum hregs_t type, struct par_s * data, const char * ctx);
  77 struct dsbr_s;
  78 
  79 
  80 
  81 
  82 void hdbgAPURead (word15 segno, word18 offset, word24 final, word36 data, const char * ctx);
  83 void hdbgAPUWrite (word15 segno, word18 offset, word24 final, word36 data, const char * ctx);
  84 
  85 #  define HDBGMRead(a, d, c) hdbgMRead (a, d, c)
  86 #  define HDBGMWrite(a, d, c) hdbgMWrite (a, d, c)
  87 #  define HDBGIEFP(t, s, o, c) hdbgIEFP (t, s, o, c);
  88 #  define HDBGAPURead(s, o, f, d, c) hdbgAPURead (s, o, f, d, c)
  89 #  define HDBGAPUWrite(s, o, f, d, c) hdbgAPUWrite (s, o, f, d, c)
  90 #  define HDBGRegAR(c) hdbgRegR (hreg_A, cpu.rA, c)
  91 #  define HDBGRegAW(c) hdbgRegW (hreg_A, cpu.rA, c)
  92 #  define HDBGRegQR(c) hdbgRegR (hreg_Q, cpu.rQ, c)
  93 #  define HDBGRegQW(c) hdbgRegW (hreg_Q, cpu.rQ, c)
  94 #  define HDBGRegXR(i, c) hdbgRegR (hreg_X0+(i), (word36) cpu.rX[i], c)
  95 #  define HDBGRegXW(i, c) hdbgRegW (hreg_X0+(i), (word36) cpu.rX[i], c)
  96 #  define HDBGRegYR(c) hdbgRegR (hreg_Y, (word36) cpu.rY, c)
  97 #  define HDBGRegYW(c) hdbgRegW (hreg_Y, (word36) cpu.rY, c)
  98 #  define HDBGRegZR(r, c) hdbgRegR (hreg_Z, (word36) r, c)
  99 #  define HDBGRegZW(r, c) hdbgRegW (hreg_Z, (word36) r, c)
 100 #  define HDBGRegPRR(i, c) hdbgPARegR (hreg_PR0+(i), & cpu.PAR[i], c)
 101 #  define HDBGRegPRW(i, c) hdbgPARegW (hreg_PR0+(i), & cpu.PAR[i], c)
 102 #  define HDBGRegARR(i, c) hdbgPARegR (hreg_AR0+(i), & cpu.PAR[i], c)
 103 #  define HDBGRegARW(i, c) hdbgPARegW (hreg_AR0+(i), & cpu.PAR[i], c)
 104 
 105 
 106 
 107 
 108 #  define HDBGRegIR(c) hdbgRegW (hreg_IR, (word36) cpu.cu.IR, c)
 109 #  define HDBGTrace(c) hdbgTrace(c)
 110 #  define HDBGIntr(i, c) hdbgIntr(i, c)
 111 #  define HDBGIntrSet(i, c, s, ctx) hdbgIntrSet(i, c, s, ctx)
 112 #  define HDBGFault(n, s, m, c) hdbgFault(n, s, m, c)
 113 #  define HDBGPrint() hdbgPrint()
 114 # endif
 115 #endif

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