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

Subversion Repositories i650

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

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
        dc_overflow_sense_latch;
171
 
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 23 eightycc
    .acc_true_add_gate(1'b0),                //
251
    .acc_compl_add_gate(1'b0),               // 
252
    .left_shift_gate(1'b0),                  // 
253
    .prog_step_add_gate(1'b0),               // 
254
    .shift_num_gate(1'b0),                   // 
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 23 eightycc
    .dist_compl_add_gate(1'b0),              // 
265 27 eightycc
    .upper_lower_check(tl_upper_lower_check),
266
    .dist_blank_gate(tl_dist_blank_gate),
267 23 eightycc
    .early_dist_zero_entry(1'b0),            // 
268
    .dist_true_add_gate(1'b0),               // 
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 23 eightycc
    .acc_regen_gate(1'b1),                   // 
288
    .right_shift_gate(1'b0),                 // 
289
    .acc_ri_gate(1'b0),                      //
290 21 eightycc
    .acc_ri_console(oc_acc_ri_console),
291 23 eightycc
    .zero_shift_count(1'b0),                 // 
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 23 eightycc
    .tlu_on(1'b0),                           // 
317
    .left_shift_off(1'b1),                   // 
318
    .left_shift_on(1'b0),                    // 
319
    .no_carry_insert(1'b0),                  // 
320
    .no_carry_blank(1'b0),                   // 
321
    .carry_insert(1'b0),                     // 
322
    .carry_blank(1'b0),                      // 
323
    .zero_insert(1'b0),                      // 
324 22 eightycc
    .error_reset(oc_err_reset),
325 23 eightycc
    .quotient_digit_on(1'b0),                // 
326
    .overflow_stop_sw(oc_ovflw_stop_sw),
327
    .overflow_sense_sw(oc_ovflw_sense_sw),
328
    .mult_div_off(1'b0),                     // 
329
    .dist_true_add_gate(1'b0),               // 
330
    .acc_true_add_latch(1'b0),               // 
331
    .shift_overflow(1'b0),                   // 
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 23 eightycc
    .bs_to_gs(1'b0),                         // 
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
    .arith_restart(1'b0),                    // 
442
    .stop_code(dc_stop_code),
443
    .code_69(dc_code_69),
444
    .start_10s_60s(dc_turn_on_single_intlk),
445
    .end_shift_cntrl(1'b0),                  // 
446
    .tlu_on(tl_tlu_on),
447
    .end_of_operation(1'b0),                 // 
448
    .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
    .divide_overflow_stop(1'b0),             // 
454
    .exceed_address_or_stor_select_light(1'b0), // 
455
    .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 23 eightycc
    .ena_arith_codes(1'b0),                  // 
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
    .acc_plus_test(1'b0),                    // 
537
    .acc_minus_test(1'b0),                   // 
538 27 eightycc
    .single_intlk(cc_single_intlk),
539 23 eightycc
    .arith_restart(1'b0),                    // 
540
    .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
    .shift_count_sig(dc_shift_count_sig),
563
    .overflow_sense_latch(dc_overflow_sense_latch)
564
    );
565 18 eightycc
 
566 20 eightycc
   distributor ds (
567 21 eightycc
    .rst(oc_hard_reset),
568 20 eightycc
    .ap(ap),
569
    .cp(cp),
570
    .dp(dp),
571
    .dx(dx),
572
    .d0(d0),
573
    .d10(d10),
574 21 eightycc
    .selected_storage(ss_selected_out),
575 27 eightycc
    .ri_dist(cc_ri_dist),
576 20 eightycc
    .acc_ontime(ac_ontime_out),
577 27 eightycc
    .start_acc_dist_ri(cc_start_acc_to_dist_ri),
578
    .end_acc_dist_ri(cc_end_acc_to_dist_ri),
579
    .acc_dist_ri(cc_acc_to_dist_ri_latch),
580 20 eightycc
    .man_acc_reset(oc_man_acc_reset),
581
    .early_idx(early_idx),
582
    .ontime_idx(ontime_idx),
583
    .ontime_out(ds_ontime_out),
584
    .early_out(ds_early_out),
585
    .dist_back_sig(ds_back_sig)
586
    );
587
 
588 23 eightycc
   error_stop es (
589
    .rst(oc_hard_reset),
590
    .ap(ap),
591
    .dp(dp),
592
    .dxu(dxu),
593
    .d10(d10),
594
    .wl(wl),
595
    .err_restart_sw(oc_err_restart_sw),
596
    .err_reset(oc_err_reset),
597
    .err_sense_reset(oc_err_sense_reset),
598
    .clock_err_sig(1'b0),                    // 
599
    .err_stop_sig(ck_error_stop),
600
    .restart_reset_busy(oc_restart_reset_busy),
601 27 eightycc
    .err_stop(es_err_stop),
602 23 eightycc
    .err_sense_light(es_err_sense_light),
603
    .err_stop_ed0u(es_err_stop_ed0u),
604
    .err_sense_restart(es_err_sense_restart),
605
    .restart_reset(es_restart_reset)
606
    );
607
 
608 13 eightycc
   gen_store gs (
609 12 eightycc
    .rst(oc_hard_reset),
610
    .ap(ap),
611
    .dp(dp),
612
    .write_gate(tr_gs_write),
613 21 eightycc
    .addr_th(ar_addr_th),
614
    .addr_h(ar_addr_h),
615
    .addr_t(ar_addr_t),
616 12 eightycc
    .dynamic_addr(digit_idx),
617
    .gs_in(tr_gs_in),
618
    .console_ram_addr(oc_gs_ram_addr),
619
    .console_read_gs(oc_read_gs),
620 13 eightycc
    .console_write_gs(oc_write_gs),
621 12 eightycc
    .gs_out(gs_out),
622
    .double_write(gs_double_write),
623
    .no_write(gs_no_write)
624
    );
625
 
626 13 eightycc
   operator_ctl oc (
627 12 eightycc
    .rst(rst),
628
    .clk(clk),
629
    .ap(ap),
630
    .dp(dp),
631
    .dx(dx),
632
    .d0(d0),
633
    .d1(d1),
634
    .d2(d2),
635
    .d3(d3),
636
    .d4(d4),
637
    .d5(d5),
638 16 eightycc
    .d6(d6),
639
    .d9(d9),
640 12 eightycc
    .d10(d10),
641 16 eightycc
    .wu(wu),
642
    .wl(wl),
643 12 eightycc
    .hp(hp),
644
    .early_idx(early_idx),
645
    .ontime_idx(ontime_idx),
646
    .cmd_digit_in(cmd_digit_in),
647
    .io_buffer_in(io_buffer_in),
648 21 eightycc
    .gs_in(tr_gs_out),
649 15 eightycc
    .acc_ontime(ac_ontime_out),
650 20 eightycc
    .dist_ontime(ds_ontime_out),
651
    .prog_ontime(ps_ontime_out),
652 12 eightycc
    .command(command),
653 23 eightycc
    .restart_reset(es_restart_reset),
654 12 eightycc
    .data_out(oc_data_out),
655
    .addr_out(oc_addr_out),
656
    .console_out(oc_console_out),
657 15 eightycc
    .display_digit(oc_display_digit),
658 21 eightycc
    .console_to_addr(oc_console_to_addr),
659
    .acc_ri_console(oc_acc_ri_console),
660 12 eightycc
    .gs_ram_addr(oc_gs_ram_addr),
661 13 eightycc
    .read_gs(oc_read_gs),
662
    .write_gs(oc_write_gs),
663 12 eightycc
    .pgm_start(oc_pgm_start),
664
    .pgm_stop(oc_pgm_stop),
665
    .err_reset(oc_err_reset),
666
    .err_sense_reset(oc_err_sense_reset),
667
    .run_control(oc_run_control),
668
    .half_or_pgm_stop(oc_half_or_pgm_stop),
669
    .ri_storage(oc_ri_storage),
670
    .ro_storage(oc_ro_storage),
671
    .storage_control(oc_storage_control),
672 23 eightycc
    .err_restart_sw(oc_err_restart_sw),
673
    .ovflw_stop_sw(oc_ovflw_stop_sw),
674
    .ovflw_sense_sw(oc_ovflw_sense_sw),
675 27 eightycc
    .pgm_stop_sw(oc_pgm_stop_sw),
676 12 eightycc
    .man_pgm_reset(oc_man_pgm_reset),
677
    .man_acc_reset(oc_man_acc_reset),
678
    .set_8000(oc_set_8000),
679
    .reset_8000(oc_reset_8000),
680
    .hard_reset(oc_hard_reset),
681
    .cmd_digit_out(cmd_digit_out),
682
    .busy(busy),
683 22 eightycc
    .digit_ready(digit_ready),
684
    .restart_reset_busy(oc_restart_reset_busy),
685 12 eightycc
    .punch_card(punch_card),
686
    .read_card(read_card),
687
    .card_digit_ready(card_digit_ready)
688
    );
689
 
690 21 eightycc
   op_reg op (
691
    .rst(oc_hard_reset),
692
    .cp(cp),
693
    .d0(d0),
694
    .d9(d9),
695
    .d10(d10),
696
    .d1_d5(d1_d5),
697
    .d5_dx(d5_dx),
698 27 eightycc
    .restart_a(cc_restart_a),
699
    .restart_b(cc_restart_b),
700
    .d_alt(cc_d_alt),
701
    .i_alt(cc_i_alt),
702
    .tlu_band_change(tl_tlu_band_change),
703 21 eightycc
    .man_prog_reset(oc_man_pgm_reset),
704
    .prog_step_ped(ps_ped_out),
705
    .opreg_t(op_opreg_t),
706
    .opreg_u(op_opreg_u),
707
    .ri_addr_reg(op_ri_addr_reg)
708
    );
709
 
710 20 eightycc
   prog_step ps (
711 21 eightycc
    .rst(oc_hard_reset),
712 20 eightycc
    .ap(ap),
713
    .dp(dp),
714
    .dx(dx),
715
    .d0(d0),
716
    .d10(d10),
717
    .early_idx(early_idx),
718
    .ontime_idx(ontime_idx),
719
    .man_prog_reset(oc_man_pgm_reset),
720 27 eightycc
    .rips(cc_rips),
721 23 eightycc
    .adder_out(ad_adder_out),
722
    .sel_store_out(ss_selected_out),
723 27 eightycc
    .prog_ped_regen(tl_prog_ped_regen),
724
    .prog_add(tl_prog_add),
725 20 eightycc
    .early_out(ps_early_out),
726
    .ontime_out(ps_ontime_out),
727
    .ped_out(ps_ped_out),
728
    .prog_restart_sig(ps_restart_sig)
729
    );
730
 
731 21 eightycc
   store_select ss (
732
    .d0(d0),
733
    .d1_dx(d1_dx),
734
    .addr_no_800x(ar_addr_no_800x),
735
    .addr_8000(ar_addr_8000),
736
    .addr_8001(ar_addr_8001),
737
    .addr_8002_8003(ar_addr_8002_8003),
738 27 eightycc
    .addr_hot_8000(1'b0),                    // *** see cc 
739 21 eightycc
    .acc_ontime(ac_ontime_out),
740
    .dist_ontime(ds_ontime_out),
741
    .gs_out(tr_gs_out),
742
    .console_switches(oc_data_out),
743 23 eightycc
    .acc_plus(1'b0),                         // 
744
    .acc_minus(1'b0),                        // 
745 21 eightycc
    .selected_out(ss_selected_out)
746
    );
747
 
748 27 eightycc
   tlu tl (
749
    .rst(oc_hard_reset),
750
    .ap(ap),
751
    .bp(bp),
752
    .dx(dx),
753
    .d0(d0),
754
    .d4(d4),
755
    .d5(d5),
756
    .d10(d10),
757
    .dxl(dxl),
758
    .d0l(d0l),
759
    .d10u(d10u),
760
    .w0(w0),
761
    .w1(w1),
762
    .w2(w2),
763
    .w3(w3),
764
    .w4(w4),
765
    .w5(w5),
766
    .w6(w6),
767
    .w7(w7),
768
    .w8(w8),
769
    .w9(w9),
770
    .wl(wl),
771
    .wu(wu),
772
    .s0(s0),
773
    .s1(s1),
774
    .s2(s2),
775
    .s3(s3),
776
    .s4(s4),
777
    .tlu_sig(dc_tlu_sig),
778
    .upper_sig(dc_upper_sig),
779
    .lower_sig(dc_lower_sig),
780
    .divide_on(1'b0),                        //
781
    .mult_nozero_edxl(1'b0),                 //
782
    .carry_test_latch(ad_carry_test),
783
    .tlu_or_acc_zero_check(ca_check_latch),
784
    .man_acc_reset(oc_man_acc_reset),
785
    .reset_sig(dc_reset_sig),
786
    .no_reset_sig(dc_no_reset_sig),
787
    .acc_minus_sign(1'b0),                   // 
788
    .compl_adj(1'b0),                        //
789
    .quot_digit_on(1'b0),                    // 
790
    .dist_compl_add(1'b0),                   //
791
    .any_left_shift_on(1'b0),                // 
792
    .right_shift_on(1'b0),                   // 
793
    .left_shift_on(1'b0),                    // 
794
    .mult_div_left_shift(1'b0),              // 
795
    .sig_digit_on(1'b0),                     // 
796
    .hc_add_5(1'b0),                         // 
797
    .mult_on(1'b0),                          // 
798
    .acc_true_add_gate(1'b0),                // 
799
    .tlu_on(tl_tlu_on),
800
    .early_dist_zero_entry(tl_early_dist_zero_entry),
801
    .early_dist_zero_control(tl_early_dist_zero_control),
802
    .prog_to_acc_add(tl_prog_to_acc_add),
803
    .prog_add(tl_prog_add),
804
    .prog_add_d0(tl_prog_add_d0),
805
    .prog_ped_regen(tl_prog_ped_regen),
806
    .special_digit(tl_special_digit),
807
    .tlu_band_change(tl_tlu_band_change),
808
    .dist_blank_gate(tl_dist_blank_gate),
809
    .sel_stor_add_gate(tl_sel_stor_add_gate),
810
    .ontime_dist_add_gate(tl_ontime_dist_add_gate),
811
    .upper_lower_check(tl_upper_lower_check)
812
    );
813
 
814 13 eightycc
    translators tr (
815 12 eightycc
    .dist_early_out(`biq_blank),
816
    .bs_out(`biq_blank),
817
    .console_out(oc_console_out),
818 27 eightycc
    .ri_gs(cc_rigs),
819 23 eightycc
    .ri_bs(1'b0),                            //
820 12 eightycc
    .ri_console(oc_write_gs),
821 21 eightycc
    .n800x(ar_addr_no_800x),
822
    .console_read_gs(oc_read_gs),
823 12 eightycc
    .gs_out(gs_out),
824
    .gs_write(tr_gs_write),
825
    .gs_in(tr_gs_in),
826 21 eightycc
    .gs_biq_out(tr_gs_out)
827 12 eightycc
    );
828 23 eightycc
 
829
   zero_check zc (
830
    .rst(oc_hard_reset),
831
    .bp(bp),
832
    .d0(d0),
833
    .d1_dx(d1_dx),
834
    .wu(wu),
835
    .acc_no_zero(ca_acc_no_zero),
836
    .acc_no_zero_test(zc_acc_no_zero_test),
837
    .acc_zero_test(zc_acc_zero_test)
838
    );
839 12 eightycc
 
840
endmodule

powered by: WebSVN 2.1.0

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