OpenCores
URL https://opencores.org/ocsvn/i650/i650/trunk

Subversion Repositories i650

[/] [i650/] [trunk/] [rtl/] [toplev.v] - Blame information for rev 28

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 eightycc
`timescale 1ns / 1ps
2
//////////////////////////////////////////////////////////////////////////////////
3
// IBM 650 Reconstruction in Verilog (i650)
4
// 
5
// This file is part of the IBM 650 Reconstruction in Verilog (i650) project
6
// http:////www.opencores.org/project,i650
7
//
8
// Description: Top level.
9
// 
10 23 eightycc
// Additional Comments: 
11 12 eightycc
//
12
// Copyright (c) 2015 Robert Abeles
13
//
14
// This source file is free software; you can redistribute it
15
// and/or modify it under the terms of the GNU Lesser General
16
// Public License as published by the Free Software Foundation;
17
// either version 2.1 of the License, or (at your option) any
18
// later version.
19
//
20
// This source is distributed in the hope that it will be
21
// useful, but WITHOUT ANY WARRANTY; without even the implied
22
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
23
// PURPOSE.  See the GNU Lesser General Public License for more
24
// details.
25
//
26
// You should have received a copy of the GNU Lesser General
27
// Public License along with this source; if not, download it
28
// from http://www.opencores.org/lgpl.shtml
29
//////////////////////////////////////////////////////////////////////////////////
30
`include "defines.v"
31
 
32
module toplev (
33
      input clk,
34
      input rst,
35
 
36 13 eightycc
      input [0:6] cmd_digit_in, io_buffer_in,
37
      input [0:5] command,
38 12 eightycc
 
39 15 eightycc
      output [0:6] cmd_digit_out, display_digit,
40 13 eightycc
      output busy, digit_ready, punch_card, read_card, card_digit_ready,
41 15 eightycc
      output digit_sync, word_upper,
42
      output [0:3] digit_ctr
43 12 eightycc
  );
44
 
45 13 eightycc
   wire ap, bp, cp, dp;
46
   wire dx, d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10,
47
        d1_d5, d5_dx, d5_d10, d1_dx, d5_d9, d10_d1_d5,
48
        dxl, dxu, d0l, d0u, d1l, d1u, d2l, d10u;
49
   wire w0, w1, w2, w3, w4, w5, w6, w7, w8, w9,
50
        wl, wu, ewl;
51
   wire s0, s1, s2, s3, s4, hp;
52
   wire [0:9] digit_idx;
53
   wire [0:3] early_idx, ontime_idx;
54
 
55 15 eightycc
   assign digit_sync = bp;
56
   assign digit_ctr = ontime_idx;
57
   assign word_upper = wu;
58 13 eightycc
 
59
   timing tm (
60 12 eightycc
    .clk(clk),
61
    .rst(rst),
62
    .ap(ap),
63
    .bp(bp),
64
    .cp(cp),
65
    .dp(dp),
66
    .dx(dx),
67
    .d0(d0),
68
    .d1(d1),
69
    .d2(d2),
70
    .d3(d3),
71
    .d4(d4),
72
    .d5(d5),
73
    .d6(d6),
74
    .d7(d7),
75
    .d8(d8),
76
    .d9(d9),
77
    .d10(d10),
78
    .d1_d5(d1_d5),
79
    .d5_dx(d5_dx),
80
    .d5_d10(d5_d10),
81
    .d1_dx(d1_dx),
82
    .d5_d9(d5_d9),
83
    .d10_d1_d5(d10_d1_d5),
84
    .dxl(dxl),
85
    .dxu(dxu),
86
    .d0l(d0l),
87
    .d0u(d0u),
88
    .d1l(d1l),
89
    .d1u(d1u),
90
    .d2l(d2l),
91
    .d10u(d10u),
92
    .w0(w0),
93
    .w1(w1),
94
    .w2(w2),
95
    .w3(w3),
96
    .w4(w4),
97
    .w5(w5),
98
    .w6(w6),
99
    .w7(w7),
100
    .w8(w8),
101
    .w9(w9),
102
    .wl(wl),
103
    .wu(wu),
104
    .ewl(ewl),
105
    .s0(s0),
106
    .s1(s1),
107
    .s2(s2),
108
    .s3(s3),
109
    .s4(s4),
110
    .hp(hp),
111
    .digit_idx(digit_idx),
112
    .early_idx(early_idx),
113
    .ontime_idx(ontime_idx)
114
   );
115 13 eightycc
 
116 12 eightycc
   //-----------------------------------------------------------------------------
117 21 eightycc
   // Adder input muxes
118
   //-----------------------------------------------------------------------------
119
   wire [0:6] aa_entry_a, ab_entry_b;
120
 
121
   //-----------------------------------------------------------------------------
122 15 eightycc
   // Accumulator
123
   //-----------------------------------------------------------------------------
124
   wire [0:6] ac_early_out, ac_ontime_out, ac_ped_out;
125 22 eightycc
 
126
   //-----------------------------------------------------------------------------
127
   // Adder
128
   //-----------------------------------------------------------------------------
129
   wire [0:6] ad_adder_out;
130
   wire ad_carry_test, ad_no_carry_test, ad_d0l_carry_sig, ad_overflow_stop,
131
        ad_overflow_light, ad_overflow_sense_sig;
132 20 eightycc
 
133
   //-----------------------------------------------------------------------------
134 21 eightycc
   // Address register
135
   //-----------------------------------------------------------------------------
136
   wire [0:6] ar_addr_th, ar_addr_h, ar_addr_t, ar_addr_u;
137
   wire ar_dynamic_addr_hit, ar_addr_no_800x, ar_addr_8000, ar_addr_8001,
138
        ar_addr_8002, ar_addr_8003, ar_addr_8002_8003, ar_invalid_addr;
139
 
140
   //-----------------------------------------------------------------------------
141 23 eightycc
   // Accumulator and TLU validity checking
142
   //-----------------------------------------------------------------------------
143
   wire ca_acc_zero, ca_acc_no_zero, ca_check_latch;
144
 
145
   //-----------------------------------------------------------------------------
146 27 eightycc
   // Control commutator
147
   //-----------------------------------------------------------------------------
148
   wire cc_restart_a, cc_restart_b, cc_i_alt, cc_d_alt, cc_man_stop_start,
149
        cc_run_latch, cc_enable_ri, cc_man_ri_storage, cc_man_ro_storage,
150
        cc_man_start_ri_dist_latch, cc_i_control_pulse, cc_i_control,
151
        cc_d_control, cc_d_control_no_8001, cc_start_ri, cc_rips_ri_dist_intlk_a,
152
        cc_rips_ri_dist_intlk_b, cc_op_intlk, cc_single_intlk, cc_rips,
153
        cc_ri_dist, cc_acc_to_dist_ri_latch, cc_start_acc_to_dist_ri,
154
        cc_end_acc_to_dist_ri, cc_rigs, cc_end_rigs;
155
 
156
   //-----------------------------------------------------------------------------
157 23 eightycc
   // Register validity checking
158
   //-----------------------------------------------------------------------------
159
   wire ck_error_stop, ck_acc_check_light, ck_prog_check_light,
160
        ck_dist_check_light;
161
 
162
   //-----------------------------------------------------------------------------
163
   // Decode control
164
   //-----------------------------------------------------------------------------
165
   wire dc_all_restarts, dc_use_d_for_i, dc_turn_on_single_intlk,
166
        dc_turn_on_op_intlk, dc_stop_code, dc_code_69, dc_tlu_sig, dc_mult_sig,
167
        dc_divide_sig, dc_reset_sig, dc_no_reset_sig, dc_abs_sig, dc_no_abs_sig,
168
        dc_lower_sig, dc_upper_sig, dc_add_sig, dc_subt_sig, dc_right_shift_sig,
169
        dc_left_shift_sig, dc_half_correct_sig, dc_shift_count_sig,
170 28 eightycc
        dc_end_shift_control, dc_overflow_sense_latch;
171 23 eightycc
 
172
   //-----------------------------------------------------------------------------
173 20 eightycc
   // Distributor
174
   //-----------------------------------------------------------------------------
175
   wire [0:6] ds_early_out, ds_ontime_out;
176
   wire ds_back_sig;
177 15 eightycc
 
178
   //-----------------------------------------------------------------------------
179 23 eightycc
   // Error stop
180 18 eightycc
   //-----------------------------------------------------------------------------
181 27 eightycc
   wire es_err_stop, es_err_sense_light, es_err_stop_ed0u, es_err_sense_restart,
182 23 eightycc
        es_restart_reset;
183 18 eightycc
 
184
   //-----------------------------------------------------------------------------
185 12 eightycc
   // General storage
186
   //-----------------------------------------------------------------------------
187 13 eightycc
   wire [0:4] gs_out;
188
   wire gs_double_write, gs_no_write;
189
 
190 12 eightycc
   //-----------------------------------------------------------------------------
191 21 eightycc
   // Opcode register
192
   //-----------------------------------------------------------------------------
193
   wire [0:6] op_opreg_t, op_opreg_u;
194
   wire op_ri_addr_reg;
195
 
196
   //-----------------------------------------------------------------------------
197 12 eightycc
   // Operator controls
198
   //-----------------------------------------------------------------------------
199 15 eightycc
   wire [0:6] oc_data_out, oc_addr_out, oc_console_out, oc_display_digit;
200 21 eightycc
   wire oc_console_to_addr, oc_acc_ri_console;
201 13 eightycc
   wire [0:14] oc_gs_ram_addr;
202
   wire oc_read_gs, oc_write_gs;
203
   wire oc_pgm_start, oc_pgm_stop, oc_err_reset, oc_err_sense_reset;
204
   wire oc_run_control, oc_half_or_pgm_stop, oc_ri_storage, oc_ro_storage,
205 23 eightycc
        oc_storage_control, oc_err_restart_sw, oc_ovflw_stop_sw,
206 27 eightycc
        oc_ovflw_sense_sw, oc_pgm_stop_sw;
207 13 eightycc
   wire oc_man_pgm_reset, oc_man_acc_reset, oc_set_8000, oc_reset_8000,
208 12 eightycc
        oc_hard_reset;
209 22 eightycc
   wire oc_restart_reset_busy;
210 15 eightycc
   assign display_digit = oc_display_digit;
211
 
212 12 eightycc
   //-----------------------------------------------------------------------------
213 20 eightycc
   // Program step register
214
   //-----------------------------------------------------------------------------
215
   wire [0:6] ps_early_out, ps_ontime_out, ps_ped_out;
216
   wire ps_restart_sig;
217 21 eightycc
 
218
   //-----------------------------------------------------------------------------
219
   // Storage select
220
   //-----------------------------------------------------------------------------
221
   wire [0:6] ss_selected_out;
222 20 eightycc
 
223
   //-----------------------------------------------------------------------------
224 27 eightycc
   // Table look-up
225
   //-----------------------------------------------------------------------------
226
   wire tl_tlu_on, tl_early_dist_zero_entry, tl_early_dist_zero_control,
227
        tl_prog_to_acc_add, tl_prog_add, tl_prog_add_d0, tl_prog_ped_regen,
228
        tl_tlu_band_change, tl_dist_blank_gate, tl_sel_stor_add_gate,
229
        tl_ontime_dist_add_gate, tl_upper_lower_check;
230
   wire [0:9] tl_special_digit;
231
 
232
   //-----------------------------------------------------------------------------
233 12 eightycc
   // Translators
234
   //-----------------------------------------------------------------------------
235 13 eightycc
   wire tr_gs_write;
236
   wire [0:4] tr_gs_in;
237 21 eightycc
   wire [0:6] tr_gs_out;
238 23 eightycc
 
239
   //-----------------------------------------------------------------------------
240
   // Accumulator zero check
241
   //-----------------------------------------------------------------------------
242
   wire zc_acc_no_zero_test, zc_acc_zero_test;
243 12 eightycc
 
244 21 eightycc
   add_in_a aa (
245
    .acc_early_out(ac_early_out),
246
    .acc_ontime_out(ac_ontime_out),
247
    .prog_step_early_out(ps_early_out),
248
    .select_storage_out(ss_selected_out),
249
    .addr_u(ar_addr_u),
250 28 eightycc
    .acc_true_add_gate(1'b0),                // 85o
251
    .acc_compl_add_gate(1'b0),               // 85r
252
    .left_shift_gate(1'b0),                  // 85b 
253
    .prog_step_add_gate(tl_prog_add),
254
    .shift_num_gate(1'b0),                   // 85a
255 27 eightycc
    .select_stor_add_gate(tl_sel_stor_add_gate),
256 21 eightycc
    .adder_entry_a(aa_entry_a)
257
    );
258
 
259
   add_in_b ab (
260
    .dist_early_out(ds_early_out),
261
    .dist_ontime_out(ds_ontime_out),
262 27 eightycc
    .special_int_entry(tl_special_digit),
263
    .ontime_dist_add_gate_tlu(tl_ontime_dist_add_gate),
264 28 eightycc
    .dist_compl_add_gate(1'b0),              // 85r
265 27 eightycc
    .upper_lower_check(tl_upper_lower_check),
266
    .dist_blank_gate(tl_dist_blank_gate),
267 28 eightycc
    .early_dist_zero_entry(tl_early_dist_zero_entry),
268
    .dist_true_add_gate(1'b0),               // 85r
269 21 eightycc
    .adder_entry_b(ab_entry_b)
270
    );
271
 
272 15 eightycc
   accumulator ac (
273 21 eightycc
    .rst(oc_hard_reset),
274 15 eightycc
    .ap(ap),
275
    .bp(bp),
276 18 eightycc
    .dp(dp),
277
    .dx(dx),
278 15 eightycc
    .d1(d1),
279
    .d2(d2),
280 21 eightycc
    .d10(d10),
281 15 eightycc
    .dxu(dxu),
282
    .d0u(d0u),
283
    .wu(wu),
284
    .wl(wl),
285 22 eightycc
    .adder_out(ad_adder_out),
286 21 eightycc
    .console_out(oc_console_out),
287 28 eightycc
    .acc_regen_gate(1'b1),                   // 85c
288
    .right_shift_gate(1'b0),                 // 85f
289
    .acc_ri_gate(1'b0),                      // 85c
290 21 eightycc
    .acc_ri_console(oc_acc_ri_console),
291 28 eightycc
    .zero_shift_count(1'b0),                 // 85b
292 15 eightycc
    .man_acc_reset(oc_man_acc_reset),
293 27 eightycc
    .reset_op(dc_reset_sig),
294 15 eightycc
    .early_idx(early_idx),
295
    .ontime_idx(ontime_idx),
296
    .early_out(ac_early_out),
297
    .ontime_out(ac_ontime_out),
298
    .ped_out(ac_ped_out)
299
    );
300
 
301 22 eightycc
   adder ad (
302 23 eightycc
    .rst(oc_hard_reset),
303 22 eightycc
    .ap(ap),
304
    .bp(bp),
305
    .dp(dp),
306
    .dxu(dxu),
307
    .dx(dx),
308
    .d0u(d0u),
309
    .d1(d1),
310
    .d1l(d1l),
311
    .d10(d10),
312
    .d10u(d10u),
313
    .wl(wl),
314
    .entry_a(aa_entry_a),
315
    .entry_b(ab_entry_b),
316 28 eightycc
    .tlu_on(tl_tlu_on),
317
    .left_shift_off(1'b1),                   // 85d
318
    .left_shift_on(1'b0),                    // 85d
319
    .no_carry_insert(1'b0),                  // 85e
320
    .no_carry_blank(1'b0),                   // 85e
321
    .carry_insert(1'b0),                     // 85e
322
    .carry_blank(1'b0),                      // 85e
323
    .zero_insert(1'b0),                      // 85j
324 22 eightycc
    .error_reset(oc_err_reset),
325 28 eightycc
    .quotient_digit_on(1'b0),                // 85p
326 23 eightycc
    .overflow_stop_sw(oc_ovflw_stop_sw),
327
    .overflow_sense_sw(oc_ovflw_sense_sw),
328 28 eightycc
    .mult_div_off(1'b0),                     // 85k
329
    .dist_true_add_gate(1'b0),               // 85r
330
    .acc_true_add_latch(1'b0),               // 85r
331
    .shift_overflow(1'b0),                   // 85b
332 22 eightycc
    .adder_out(ad_adder_out),
333
    .carry_test(ad_carry_test),
334
    .no_carry_test(ad_no_carry_test),
335
    .d0l_carry_sig(ad_d0l_carry_sig),
336
    .overflow_stop(ad_overflow_stop),
337
    .overflow_light(ad_overflow_light),
338
    .overflow_sense_sig(ad_overflow_sense_sig)
339
    );
340
 
341 21 eightycc
   addr_reg ar (
342 23 eightycc
    .rst(oc_hard_reset),
343 21 eightycc
    .ap(ap),
344 18 eightycc
    .bp(bp),
345 21 eightycc
    .dx(dx),
346
    .d1(d1),
347
    .d2(d2),
348
    .d3(d3),
349
    .d4(d4),
350
    .d5(d5),
351
    .d6(d6),
352
    .d7(d7),
353
    .d8(d8),
354
    .d9(d9),
355
    .w0(w0),
356
    .w1(w1),
357
    .w2(w2),
358
    .w3(w3),
359
    .w4(w4),
360
    .w5(w5),
361
    .w6(w6),
362
    .w7(w7),
363
    .w8(w8),
364
    .w9(w9),
365
    .s0(s0),
366
    .s1(s1),
367
    .s2(s2),
368
    .s3(s3),
369
    .s4(s4),
370
    .error_reset(oc_err_reset),
371 27 eightycc
    .restart_a(cc_restart_a),
372 21 eightycc
    .set_8000(oc_set_8000),
373
    .reset_8000(oc_reset_8000),
374 27 eightycc
    .tlu_band_change(tl_tlu_band_change),
375 21 eightycc
    .double_write(gs_double_write),
376
    .no_write(gs_no_write),
377 28 eightycc
    .bs_to_gs(1'b0),                         // 87b ***
378 27 eightycc
    .rigs(cc_rigs),
379 21 eightycc
    .ps_reg_in(ps_ontime_out),
380
    .console_in(oc_addr_out),
381
    .ri_addr_reg(op_ri_addr_reg),
382
    .console_to_addr_reg(oc_console_to_addr),
383
    .addr_th(ar_addr_th),
384
    .addr_h(ar_addr_h),
385
    .addr_t(ar_addr_t),
386
    .addr_u(ar_addr_u),
387
    .dynamic_addr_hit(ar_dynamic_addr_hit),
388
    .addr_no_800x(ar_addr_no_800x),
389
    .addr_8000(ar_addr_8000),
390
    .addr_8001(ar_addr_8001),
391
    .addr_8002(ar_addr_8002),
392
    .addr_8003(ar_addr_8003),
393
    .addr_8002_8003(ar_addr_8002_8003),
394
    .invalid_addr(ar_invalid_addr)
395
    );
396
 
397 23 eightycc
   check_acc_tlu ca (
398
    .rst(oc_hard_reset),
399
    .ap(ap),
400
    .bp(bp),
401
    .d0(d0),
402
    .d2(d2),
403
    .d1_dx(d1_dx),
404
    .acc_ped_out(ac_ped_out),
405 27 eightycc
    .sel_store_add_gate(tl_sel_stor_add_gate),
406 23 eightycc
    .err_reset(oc_err_reset),
407
    .carry_test_latch(ad_carry_test),
408
    .no_carry_test_latch(ad_no_carry_test),
409
    .acc_zero(ca_acc_zero),
410
    .acc_no_zero(ca_acc_no_zero),
411
    .check_latch(ca_check_latch)
412
    );
413
 
414 27 eightycc
   ctl_commutator cc (
415
    .rst(oc_hard_reset),
416
    .ap(ap),
417
    .bp(bp),
418
    .cp(cp),
419
    .dp(dp),
420
    .dx(dx),
421
    .d1(d1),
422
    .d3(d3),
423
    .d7(d7),
424
    .d9(d9),
425
    .d10(d10),
426
    .dxu(dxu),
427
    .dxl(dxl),
428
    .wu(wu),
429
    .wl(wl),
430
    .invalid_addr(ar_invalid_addr),
431
    .man_prog_reset(oc_man_pgm_reset),
432
    .run_control_sw(oc_run_control),
433
    .program_start_sw(oc_pgm_start),
434
    .manual_ri_storage_sw(oc_ri_storage),
435
    .manual_ro_storage_sw(oc_ro_storage),
436
    .manual_error_reset_sw(oc_err_reset),
437
    .half_or_pgm_stop(oc_half_or_pgm_stop),
438
    .prog_restart(ps_restart_sig),
439
    .error_stop(es_err_stop),
440
    .error_sense_restart(es_err_sense_restart),
441 28 eightycc
    .arith_restart(1'b0),                    // 85d
442 27 eightycc
    .stop_code(dc_stop_code),
443
    .code_69(dc_code_69),
444
    .start_10s_60s(dc_turn_on_single_intlk),
445 28 eightycc
    .end_shift_cntrl(dc_end_shift_control),
446 27 eightycc
    .tlu_on(tl_tlu_on),
447 28 eightycc
    .end_of_operation(1'b0),                 // 85d
448 27 eightycc
    .turn_on_op_intlk(dc_turn_on_op_intlk),
449
    .decode_restarts(dc_all_restarts),
450
    .use_d_for_i(dc_use_d_for_i),
451
    .dist_back_signal(ds_back_sig),
452
    .error_stop_ed0u(es_err_stop_ed0u),
453 28 eightycc
    .divide_overflow_stop(1'b0),             // 68a ***
454
    .exceed_address_or_stor_select_light(1'b0), // 71a ***
455 27 eightycc
    .opreg_t(op_opreg_t),
456
    .opreg_u(op_opreg_u),
457
    .addr_no_800x(ar_addr_no_800x),
458
    .addr_8001(ar_addr_8001),
459
    .dynamic_addr_hit(ar_dynamic_addr_hit),
460
    .restart_a(cc_restart_a),
461
    .restart_b(cc_restart_b),
462
    .i_alt(cc_i_alt),
463
    .d_alt(cc_d_alt),
464
    .manual_stop_start(cc_man_stop_start),
465
    .run_latch(cc_run_latch),
466
    .enable_ri(cc_enable_ri),
467
    .manual_ri_storage(cc_man_ri_storage),
468
    .manual_ro_storage(cc_man_ro_storage),
469
    .manual_start_ri_dist_latch(cc_man_start_ri_dist_latch),
470
    .i_control_pulse(cc_i_control_pulse),
471
    .i_control(cc_i_control),
472
    .d_control(cc_d_control),
473
    .d_control_no_8001(cc_d_control_no_8001),
474
    .start_ri(cc_start_ri),
475
    .rips_ri_dist_intlk_a(cc_rips_ri_dist_intlk_a),
476
    .rips_ri_dist_intlk_b(cc_rips_ri_dist_intlk_b),
477
    .op_intlk(cc_op_intlk),
478
    .single_intlk(cc_single_intlk),
479
    .rips(cc_rips),
480
    .ri_dist(cc_ri_dist),
481
    .acc_to_dist_ri_latch(cc_acc_to_dist_ri_latch),
482
    .start_acc_to_dist_ri(cc_start_acc_to_dist_ri),
483
    .end_acc_to_dist_ri(cc_end_acc_to_dist_ri),
484
    .rigs(cc_rigs),
485
    .end_rigs(cc_end_rigs)
486
    );
487
 
488 21 eightycc
   checking ck (
489
    .rst(oc_hard_reset),
490
    .bp(bp),
491 18 eightycc
    .d1_dx(d1_dx),
492
    .acc_ontime(ac_ontime_out),
493 20 eightycc
    .prog_ontime(ps_ontime_out),
494
    .dist_ontime(ds_ontime_out),
495 18 eightycc
    .error_reset(oc_err_reset),
496 23 eightycc
    .tlu_or_zero_check(ca_check_latch),
497 18 eightycc
    .error_stop(ck_error_stop),
498
    .acc_check_light(ck_acc_check_light),
499
    .prog_check_light(ck_prog_check_light),
500
    .dist_check_light(ck_dist_check_light)
501
    );
502 27 eightycc
 
503
   decode_ctl dc (
504 23 eightycc
    .rst(oc_hard_reset),
505
    .ap(ap),
506
    .bp(bp),
507
    .cp(cp),
508
    .dx(dx),
509
    .d0(d0),
510
    .d1(d1),
511
    .d2(d2),
512
    .d3(d3),
513
    .d4(d4),
514
    .d5(d5),
515
    .d6(d6),
516
    .d7(d7),
517
    .d8(d8),
518
    .d9(d9),
519
    .d10(d10),
520
    .d5_d10(d5_d10),
521
    .d10_d1_d5(d10_d1_d5),
522
    .dxl(dxl),
523
    .dxu(dxu),
524
    .d10u(d10u),
525
    .opreg_t(op_opreg_t),
526
    .opreg_u(op_opreg_u),
527
    .addr_u(ar_addr_u),
528
    .ontime_dist(ds_ontime_out),
529 27 eightycc
    .man_ro_storage(cc_man_ro_storage),
530 23 eightycc
    .dist_back_sig(ds_back_sig),
531 27 eightycc
    .d_control(cc_d_control),
532 28 eightycc
    .ena_arith_codes(1'b0),                  // 81i ***
533 27 eightycc
    .pgm_stop_sw(oc_pgm_stop_sw),
534 23 eightycc
    .acc_zero_test(zc_acc_zero_test),
535
    .acc_no_zero_test(zc_acc_no_zero_test),
536 28 eightycc
    .acc_plus_test(1'b0),                    // 85t
537
    .acc_minus_test(1'b0),                   // 85t
538 27 eightycc
    .single_intlk(cc_single_intlk),
539 28 eightycc
    .arith_restart(1'b0),                    // 85d 
540 23 eightycc
    .overflow_sense_sig(ad_overflow_sense_sig),
541
    .man_acc_reset(oc_man_acc_reset),
542
    .all_restarts(dc_all_restarts),
543
    .use_d_for_i(dc_use_d_for_i),
544
    .turn_on_single_intlk(dc_turn_on_single_intlk),
545
    .turn_on_op_intlk(dc_turn_on_op_intlk),
546
    .stop_code(dc_stop_code),
547
    .code_69(dc_code_69),
548
    .tlu_sig(dc_tlu_sig),
549
    .mult_sig(dc_mult_sig),
550
    .divide_sig(dc_divide_sig),
551
    .reset_sig(dc_reset_sig),
552
    .no_reset_sig(dc_no_reset_sig),
553
    .abs_sig(dc_abs_sig),
554
    .no_abs_sig(dc_no_abs_sig),
555
    .lower_sig(dc_lower_sig),
556
    .upper_sig(dc_upper_sig),
557
    .add_sig(dc_add_sig),
558
    .subt_sig(dc_subt_sig),
559
    .right_shift_sig(dc_right_shift_sig),
560
    .left_shift_sig(dc_left_shift_sig),
561
    .half_correct_sig(dc_half_correct_sig),
562 28 eightycc
    .shift_count_sig(dc_shift_count_sig),
563
    .end_shift_control(dc_end_shift_control),
564 23 eightycc
    .overflow_sense_latch(dc_overflow_sense_latch)
565
    );
566 18 eightycc
 
567 20 eightycc
   distributor ds (
568 21 eightycc
    .rst(oc_hard_reset),
569 20 eightycc
    .ap(ap),
570
    .cp(cp),
571
    .dp(dp),
572
    .dx(dx),
573
    .d0(d0),
574
    .d10(d10),
575 21 eightycc
    .selected_storage(ss_selected_out),
576 27 eightycc
    .ri_dist(cc_ri_dist),
577 20 eightycc
    .acc_ontime(ac_ontime_out),
578 27 eightycc
    .start_acc_dist_ri(cc_start_acc_to_dist_ri),
579
    .end_acc_dist_ri(cc_end_acc_to_dist_ri),
580
    .acc_dist_ri(cc_acc_to_dist_ri_latch),
581 20 eightycc
    .man_acc_reset(oc_man_acc_reset),
582
    .early_idx(early_idx),
583
    .ontime_idx(ontime_idx),
584
    .ontime_out(ds_ontime_out),
585
    .early_out(ds_early_out),
586
    .dist_back_sig(ds_back_sig)
587
    );
588
 
589 23 eightycc
   error_stop es (
590
    .rst(oc_hard_reset),
591
    .ap(ap),
592
    .dp(dp),
593
    .dxu(dxu),
594
    .d10(d10),
595
    .wl(wl),
596
    .err_restart_sw(oc_err_restart_sw),
597
    .err_reset(oc_err_reset),
598
    .err_sense_reset(oc_err_sense_reset),
599 28 eightycc
    .clock_err_sig(1'b0),                    // not possible
600 23 eightycc
    .err_stop_sig(ck_error_stop),
601
    .restart_reset_busy(oc_restart_reset_busy),
602 27 eightycc
    .err_stop(es_err_stop),
603 23 eightycc
    .err_sense_light(es_err_sense_light),
604
    .err_stop_ed0u(es_err_stop_ed0u),
605
    .err_sense_restart(es_err_sense_restart),
606
    .restart_reset(es_restart_reset)
607
    );
608
 
609 13 eightycc
   gen_store gs (
610 12 eightycc
    .rst(oc_hard_reset),
611
    .ap(ap),
612
    .dp(dp),
613
    .write_gate(tr_gs_write),
614 21 eightycc
    .addr_th(ar_addr_th),
615
    .addr_h(ar_addr_h),
616
    .addr_t(ar_addr_t),
617 12 eightycc
    .dynamic_addr(digit_idx),
618
    .gs_in(tr_gs_in),
619
    .console_ram_addr(oc_gs_ram_addr),
620
    .console_read_gs(oc_read_gs),
621 13 eightycc
    .console_write_gs(oc_write_gs),
622 12 eightycc
    .gs_out(gs_out),
623
    .double_write(gs_double_write),
624
    .no_write(gs_no_write)
625
    );
626
 
627 13 eightycc
   operator_ctl oc (
628 12 eightycc
    .rst(rst),
629
    .clk(clk),
630
    .ap(ap),
631
    .dp(dp),
632
    .dx(dx),
633
    .d0(d0),
634
    .d1(d1),
635
    .d2(d2),
636
    .d3(d3),
637
    .d4(d4),
638
    .d5(d5),
639 16 eightycc
    .d6(d6),
640
    .d9(d9),
641 12 eightycc
    .d10(d10),
642 16 eightycc
    .wu(wu),
643
    .wl(wl),
644 12 eightycc
    .hp(hp),
645
    .early_idx(early_idx),
646
    .ontime_idx(ontime_idx),
647
    .cmd_digit_in(cmd_digit_in),
648
    .io_buffer_in(io_buffer_in),
649 21 eightycc
    .gs_in(tr_gs_out),
650 15 eightycc
    .acc_ontime(ac_ontime_out),
651 20 eightycc
    .dist_ontime(ds_ontime_out),
652
    .prog_ontime(ps_ontime_out),
653 12 eightycc
    .command(command),
654 23 eightycc
    .restart_reset(es_restart_reset),
655 12 eightycc
    .data_out(oc_data_out),
656
    .addr_out(oc_addr_out),
657
    .console_out(oc_console_out),
658 15 eightycc
    .display_digit(oc_display_digit),
659 21 eightycc
    .console_to_addr(oc_console_to_addr),
660
    .acc_ri_console(oc_acc_ri_console),
661 12 eightycc
    .gs_ram_addr(oc_gs_ram_addr),
662 13 eightycc
    .read_gs(oc_read_gs),
663
    .write_gs(oc_write_gs),
664 12 eightycc
    .pgm_start(oc_pgm_start),
665
    .pgm_stop(oc_pgm_stop),
666
    .err_reset(oc_err_reset),
667
    .err_sense_reset(oc_err_sense_reset),
668
    .run_control(oc_run_control),
669
    .half_or_pgm_stop(oc_half_or_pgm_stop),
670
    .ri_storage(oc_ri_storage),
671
    .ro_storage(oc_ro_storage),
672
    .storage_control(oc_storage_control),
673 23 eightycc
    .err_restart_sw(oc_err_restart_sw),
674
    .ovflw_stop_sw(oc_ovflw_stop_sw),
675
    .ovflw_sense_sw(oc_ovflw_sense_sw),
676 27 eightycc
    .pgm_stop_sw(oc_pgm_stop_sw),
677 12 eightycc
    .man_pgm_reset(oc_man_pgm_reset),
678
    .man_acc_reset(oc_man_acc_reset),
679
    .set_8000(oc_set_8000),
680
    .reset_8000(oc_reset_8000),
681
    .hard_reset(oc_hard_reset),
682
    .cmd_digit_out(cmd_digit_out),
683
    .busy(busy),
684 22 eightycc
    .digit_ready(digit_ready),
685
    .restart_reset_busy(oc_restart_reset_busy),
686 12 eightycc
    .punch_card(punch_card),
687
    .read_card(read_card),
688
    .card_digit_ready(card_digit_ready)
689
    );
690
 
691 21 eightycc
   op_reg op (
692
    .rst(oc_hard_reset),
693
    .cp(cp),
694
    .d0(d0),
695
    .d9(d9),
696
    .d10(d10),
697
    .d1_d5(d1_d5),
698
    .d5_dx(d5_dx),
699 27 eightycc
    .restart_a(cc_restart_a),
700
    .restart_b(cc_restart_b),
701
    .d_alt(cc_d_alt),
702
    .i_alt(cc_i_alt),
703
    .tlu_band_change(tl_tlu_band_change),
704 21 eightycc
    .man_prog_reset(oc_man_pgm_reset),
705
    .prog_step_ped(ps_ped_out),
706
    .opreg_t(op_opreg_t),
707
    .opreg_u(op_opreg_u),
708
    .ri_addr_reg(op_ri_addr_reg)
709
    );
710
 
711 20 eightycc
   prog_step ps (
712 21 eightycc
    .rst(oc_hard_reset),
713 20 eightycc
    .ap(ap),
714
    .dp(dp),
715
    .dx(dx),
716
    .d0(d0),
717
    .d10(d10),
718
    .early_idx(early_idx),
719
    .ontime_idx(ontime_idx),
720
    .man_prog_reset(oc_man_pgm_reset),
721 27 eightycc
    .rips(cc_rips),
722 23 eightycc
    .adder_out(ad_adder_out),
723
    .sel_store_out(ss_selected_out),
724 27 eightycc
    .prog_ped_regen(tl_prog_ped_regen),
725
    .prog_add(tl_prog_add),
726 20 eightycc
    .early_out(ps_early_out),
727
    .ontime_out(ps_ontime_out),
728
    .ped_out(ps_ped_out),
729
    .prog_restart_sig(ps_restart_sig)
730
    );
731
 
732 21 eightycc
   store_select ss (
733
    .d0(d0),
734
    .d1_dx(d1_dx),
735
    .addr_no_800x(ar_addr_no_800x),
736
    .addr_8000(ar_addr_8000),
737
    .addr_8001(ar_addr_8001),
738
    .addr_8002_8003(ar_addr_8002_8003),
739 27 eightycc
    .addr_hot_8000(1'b0),                    // *** see cc 
740 21 eightycc
    .acc_ontime(ac_ontime_out),
741
    .dist_ontime(ds_ontime_out),
742
    .gs_out(tr_gs_out),
743
    .console_switches(oc_data_out),
744 28 eightycc
    .acc_plus(1'b0),                         // 85o
745
    .acc_minus(1'b0),                        // 85o
746 21 eightycc
    .selected_out(ss_selected_out)
747
    );
748
 
749 27 eightycc
   tlu tl (
750
    .rst(oc_hard_reset),
751
    .ap(ap),
752
    .bp(bp),
753
    .dx(dx),
754
    .d0(d0),
755
    .d4(d4),
756
    .d5(d5),
757
    .d10(d10),
758
    .dxl(dxl),
759
    .d0l(d0l),
760
    .d10u(d10u),
761
    .w0(w0),
762
    .w1(w1),
763
    .w2(w2),
764
    .w3(w3),
765
    .w4(w4),
766
    .w5(w5),
767
    .w6(w6),
768
    .w7(w7),
769
    .w8(w8),
770
    .w9(w9),
771
    .wl(wl),
772
    .wu(wu),
773
    .s0(s0),
774
    .s1(s1),
775
    .s2(s2),
776
    .s3(s3),
777
    .s4(s4),
778
    .tlu_sig(dc_tlu_sig),
779
    .upper_sig(dc_upper_sig),
780
    .lower_sig(dc_lower_sig),
781 28 eightycc
    .divide_on(1'b0),                        // 85p
782
    .mult_nozero_edxl(1'b0),                 // 85j
783 27 eightycc
    .carry_test_latch(ad_carry_test),
784
    .tlu_or_acc_zero_check(ca_check_latch),
785
    .man_acc_reset(oc_man_acc_reset),
786
    .reset_sig(dc_reset_sig),
787
    .no_reset_sig(dc_no_reset_sig),
788 28 eightycc
    .acc_minus_sign(1'b0),                   // 85t
789
    .compl_adj(1'b0),                        // 85s
790
    .quot_digit_on(1'b0),                    // 85p
791
    .dist_compl_add(1'b0),                   // 85p
792
    .any_left_shift_on(1'b0),                // 85j
793
    .right_shift_on(1'b0),                   // 85a
794
    .left_shift_on(1'b0),                    // 85b
795
    .mult_div_left_shift(1'b0),              // 85k
796
    .sig_digit_on(1'b0),                     // 85j
797
    .hc_add_5(1'b0),                         // 85a
798
    .mult_on(1'b0),                          // 85q
799
    .acc_true_add_gate(1'b0),                // 85d
800 27 eightycc
    .tlu_on(tl_tlu_on),
801
    .early_dist_zero_entry(tl_early_dist_zero_entry),
802
    .early_dist_zero_control(tl_early_dist_zero_control),
803
    .prog_to_acc_add(tl_prog_to_acc_add),
804
    .prog_add(tl_prog_add),
805
    .prog_add_d0(tl_prog_add_d0),
806
    .prog_ped_regen(tl_prog_ped_regen),
807
    .special_digit(tl_special_digit),
808
    .tlu_band_change(tl_tlu_band_change),
809
    .dist_blank_gate(tl_dist_blank_gate),
810
    .sel_stor_add_gate(tl_sel_stor_add_gate),
811
    .ontime_dist_add_gate(tl_ontime_dist_add_gate),
812
    .upper_lower_check(tl_upper_lower_check)
813
    );
814
 
815 13 eightycc
    translators tr (
816 12 eightycc
    .dist_early_out(`biq_blank),
817
    .bs_out(`biq_blank),
818
    .console_out(oc_console_out),
819 27 eightycc
    .ri_gs(cc_rigs),
820 28 eightycc
    .ri_bs(1'b0),                            // 87b ***
821 12 eightycc
    .ri_console(oc_write_gs),
822 21 eightycc
    .n800x(ar_addr_no_800x),
823
    .console_read_gs(oc_read_gs),
824 12 eightycc
    .gs_out(gs_out),
825
    .gs_write(tr_gs_write),
826
    .gs_in(tr_gs_in),
827 21 eightycc
    .gs_biq_out(tr_gs_out)
828 12 eightycc
    );
829 23 eightycc
 
830
   zero_check zc (
831
    .rst(oc_hard_reset),
832
    .bp(bp),
833
    .d0(d0),
834
    .d1_dx(d1_dx),
835
    .wu(wu),
836
    .acc_no_zero(ca_acc_no_zero),
837
    .acc_no_zero_test(zc_acc_no_zero_test),
838
    .acc_zero_test(zc_acc_zero_test)
839
    );
840 12 eightycc
 
841
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.