1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 enum active_dev { ADEV_NONE, ADEV_CPU, ADEV_IOM };
21
22 typedef struct
23 {
24 volAtomic uint port_enable [N_SCU_PORTS];
25
26
27 volAtomic word32 exec_intr_mask [N_ASSIGNMENTS];
28
29
30
31
32
33
34
35
36
37
38
39
40 volAtomic uint mask_enable [N_ASSIGNMENTS];
41 volAtomic uint mask_assignment [N_ASSIGNMENTS];
42
43 volAtomic uint cells [N_CELL_INTERRUPTS];
44
45 uint lower_store_size;
46 uint cyclic;
47 uint nea;
48 uint onl;
49 uint interlace;
50 uint lwr;
51
52
53
54
55
56
57
58
59
60
61 struct ports
62 {
63
64 enum active_dev type;
65 int dev_idx;
66 bool is_exp;
67
68
69
70 volAtomic int dev_port [N_SCU_SUBPORTS];
71 volAtomic bool subport_enables [N_SCU_SUBPORTS];
72 volAtomic bool xipmask [N_SCU_SUBPORTS];
73 volAtomic int xipmaskval;
74 } ports [N_SCU_PORTS];
75
76
77 word4 id;
78 word18 mode_reg;
79
80 uint elapsed_days;
81 uint steady_clock;
82 uint bullet_time;
83 uint y2k;
84 int64 user_correction;
85 uint64 last_time;
86 } scu_t;
87
88 extern scu_t scu [N_SCU_UNITS_MAX];
89
90 extern DEVICE scu_dev;
91
92 int scu_set_interrupt(uint scu_unit_idx, uint inum);
93 void scu_init (void);
94 t_stat scu_sscr (cpu_state_t * cpup, uint scu_unit_idx, UNUSED uint cpu_unit_idx, uint cpu_port_num, word18 addr,
95 word36 rega, word36 regq);
96 t_stat scu_smic (cpu_state_t * cpup, uint scu_unit_idx, uint UNUSED cpu_unit_idx, uint cpu_port_num, word36 rega);
97 t_stat scu_rscr (cpu_state_t * cpup, uint scu_unit_idx, uint cpu_unit_idx, word18 addr, word36 * rega, word36 * regq);
98 int scu_cioc (uint cpu_unit_idx, uint scu_unit_idx, uint scu_port_num, uint expander_command, uint sub_mask);
99 t_stat scu_rmcm (uint scu_unit_idx, uint cpu_unit_idx, word36 * rega, word36 * regq);
100 t_stat scu_smcm (uint scu_unit_idx, uint cpu_unit_idx, word36 rega, word36 regq);
101 void scu_clear_interrupt (uint scu_unit_idx, uint inum);
102 uint scu_get_highest_intr (uint scu_unit_idx);
103 t_stat scu_reset (DEVICE *dptr);
104 t_stat scu_reset_unit (UNIT * uptr, int32 value, const char * cptr,
105 void * desc);
106 void scu_unit_reset (int scu_unit_idx);