1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 extern char * ctlr_type_strs [];
18 extern char * chan_type_strs [];
19
20 typedef enum chanType { chanTypeCPI, chanTypePSI, chanTypeDirect } chanType;
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71 enum chan_type_e { chan_type_CPI, chan_type_PSI, chan_type_direct };
72
73 enum ctlr_type_e
74 {
75 CTLR_T_NONE = 0,
76 CTLR_T_MTP,
77 CTLR_T_MSP,
78 CTLR_T_IPC,
79 CTLR_T_OPC,
80 CTLR_T_URP,
81 CTLR_T_FNP,
82 CTLR_T_ABSI,
83 CTLR_T_MGP,
84 CTLR_T_SKC,
85
86 };
87
88
89
90
91
92
93
94
95
96
97
98
99
100 struct scu_to_iom_s
101 {
102 bool in_use;
103 uint iom_unit_idx;
104 uint iom_port_num;
105 };
106
107 struct iom_to_scu_s
108 {
109 bool in_use;
110 uint scu_unit_idx;
111 uint scu_port_num;
112 uint scu_subport_num;
113 };
114
115 struct scu_to_cpu_s
116 {
117 bool in_use;
118 uint cpu_unit_idx;
119 uint cpu_port_num;
120 };
121
122 struct cpu_to_scu_s
123 {
124 bool in_use;
125 uint scu_unit_idx;
126 uint scu_port_num;
127 uint scu_subport_num;
128 };
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146 struct iom_to_ctlr_s
147 {
148 bool in_use;
149 uint ctlr_unit_idx;
150 uint port_num;
151 enum ctlr_type_e ctlr_type;
152 enum chan_type_e chan_type;
153 DEVICE * dev;
154 UNIT * board;
155 iom_cmd_t * iom_cmd;
156 };
157
158 struct ctlr_to_iom_s
159 {
160 bool in_use;
161 uint iom_unit_idx;
162 uint chan_num;
163 };
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196 struct ctlr_to_dev_s
197 {
198 bool in_use;
199 uint unit_idx;
200 iom_cmd_t * iom_cmd;
201 };
202
203 struct dev_to_ctlr_s
204 {
205 bool in_use;
206 uint ctlr_unit_idx;
207 uint dev_code;
208 enum ctlr_type_e ctlr_type;
209
210 };
211
212 struct cables_s
213 {
214
215
216 struct scu_to_iom_s scu_to_iom [N_SCU_UNITS_MAX] [N_SCU_PORTS];
217 struct iom_to_scu_s iom_to_scu [N_IOM_UNITS_MAX] [N_IOM_PORTS];
218
219 struct scu_to_cpu_s scu_to_cpu [N_SCU_UNITS_MAX] [N_SCU_PORTS] [N_SCU_SUBPORTS];
220 struct cpu_to_scu_s cpu_to_scu [N_CPU_UNITS_MAX] [N_CPU_PORTS];
221
222
223 struct iom_to_ctlr_s iom_to_ctlr [N_IOM_UNITS_MAX] [MAX_CHANNELS];
224
225 struct ctlr_to_iom_s mtp_to_iom [N_MTP_UNITS_MAX] [MAX_CTLR_PORTS];
226
227 struct ctlr_to_iom_s msp_to_iom [N_MSP_UNITS_MAX] [MAX_CTLR_PORTS];
228
229 struct ctlr_to_iom_s ipc_to_iom [N_IPC_UNITS_MAX] [MAX_CTLR_PORTS];
230
231 struct ctlr_to_iom_s urp_to_iom [N_URP_UNITS_MAX] [MAX_CTLR_PORTS];
232
233 struct ctlr_to_iom_s dia_to_iom [N_DIA_UNITS_MAX] [MAX_CTLR_PORTS];
234
235 struct ctlr_to_iom_s fnp_to_iom [N_FNP_UNITS_MAX] [MAX_CTLR_PORTS];
236
237 struct ctlr_to_iom_s absi_to_iom [N_ABSI_UNITS_MAX] [MAX_CTLR_PORTS];
238
239 struct ctlr_to_iom_s mgp_to_iom [N_MGP_UNITS_MAX] [MAX_CTLR_PORTS];
240
241 struct ctlr_to_iom_s opc_to_iom [N_OPC_UNITS_MAX] [MAX_CTLR_PORTS];
242
243 struct ctlr_to_iom_s sk_to_iom [N_SKC_UNITS_MAX] [MAX_CTLR_PORTS];
244
245
246
247 struct ctlr_to_dev_s mtp_to_tape [N_MTP_UNITS_MAX] [N_DEV_CODES];
248 struct dev_to_ctlr_s tape_to_mtp [N_MT_UNITS_MAX];
249
250 struct ctlr_to_dev_s ipc_to_dsk [N_IPC_UNITS_MAX] [N_DEV_CODES];
251
252 struct ctlr_to_dev_s msp_to_dsk [N_MSP_UNITS_MAX] [N_DEV_CODES];
253 struct dev_to_ctlr_s dsk_to_ctlr [N_DSK_UNITS_MAX];
254
255 struct ctlr_to_dev_s urp_to_urd [N_URP_UNITS_MAX] [N_DEV_CODES];
256 struct dev_to_ctlr_s rdr_to_urp [N_RDR_UNITS_MAX];
257 struct dev_to_ctlr_s pun_to_urp [N_PUN_UNITS_MAX];
258 struct dev_to_ctlr_s prt_to_urp [N_PRT_UNITS_MAX];
259 };
260
261 extern struct cables_s * cables;
262
263 t_stat sys_cable (UNUSED int32 arg, const char * buf);
264
265
266
267
268
269 #define get_ctlr_idx(iom_unit_idx, chan) \
270 (cables->iom_to_ctlr[iom_unit_idx][chan].ctlr_unit_idx)
271
272
273
274 #define get_ctlr_in_use(iom_unit_idx, chan) \
275 (cables->iom_to_ctlr[iom_unit_idx][chan].in_use)
276
277
278
279 #define get_scu_idx(cpu_unit_idx, cpu_port_num) \
280 (cables->cpu_to_scu[cpu_unit_idx][cpu_port_num].scu_unit_idx)
281
282
283
284 #define get_scu_in_use(cpu_unit_idx, cpu_port_num) \
285 (cables->cpu_to_scu[cpu_unit_idx][cpu_port_num].in_use)
286
287 t_stat sys_cable (UNUSED int32 arg, const char * buf);
288 t_stat sys_cable_ripout (UNUSED int32 arg, UNUSED const char * buf);
289 t_stat sys_cable_show (UNUSED int32 arg, UNUSED const char * buf);
290 void sysCableInit (void);