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

Subversion Repositories i650

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

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
// Additional Comments: See US 2959351, Fig. 53, 54 and 55. Additional index
11
//  counters provided to address general storage and register RAMs.
12
//
13
// Copyright (c) 2015 Robert Abeles
14
//
15
// This source file is free software; you can redistribute it
16
// and/or modify it under the terms of the GNU Lesser General
17
// Public License as published by the Free Software Foundation;
18
// either version 2.1 of the License, or (at your option) any
19
// later version.
20
//
21
// This source is distributed in the hope that it will be
22
// useful, but WITHOUT ANY WARRANTY; without even the implied
23
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
24
// PURPOSE.  See the GNU Lesser General Public License for more
25
// details.
26
//
27
// You should have received a copy of the GNU Lesser General
28
// Public License along with this source; if not, download it
29
// from http://www.opencores.org/lgpl.shtml
30
//////////////////////////////////////////////////////////////////////////////////
31
`include "defines.v"
32
 
33
module toplev (
34
      input clk,
35
      input rst,
36
 
37 13 eightycc
      input [0:6] cmd_digit_in, io_buffer_in,
38
      input [0:5] command,
39 12 eightycc
 
40 13 eightycc
      output [0:6] cmd_digit_out,
41
      output busy, digit_ready, punch_card, read_card, card_digit_ready,
42 12 eightycc
      output synch
43
  );
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 12 eightycc
   assign synch = bp;
56 13 eightycc
 
57
   timing tm (
58 12 eightycc
    .clk(clk),
59
    .rst(rst),
60
    .ap(ap),
61
    .bp(bp),
62
    .cp(cp),
63
    .dp(dp),
64
    .dx(dx),
65
    .d0(d0),
66
    .d1(d1),
67
    .d2(d2),
68
    .d3(d3),
69
    .d4(d4),
70
    .d5(d5),
71
    .d6(d6),
72
    .d7(d7),
73
    .d8(d8),
74
    .d9(d9),
75
    .d10(d10),
76
    .d1_d5(d1_d5),
77
    .d5_dx(d5_dx),
78
    .d5_d10(d5_d10),
79
    .d1_dx(d1_dx),
80
    .d5_d9(d5_d9),
81
    .d10_d1_d5(d10_d1_d5),
82
    .dxl(dxl),
83
    .dxu(dxu),
84
    .d0l(d0l),
85
    .d0u(d0u),
86
    .d1l(d1l),
87
    .d1u(d1u),
88
    .d2l(d2l),
89
    .d10u(d10u),
90
    .w0(w0),
91
    .w1(w1),
92
    .w2(w2),
93
    .w3(w3),
94
    .w4(w4),
95
    .w5(w5),
96
    .w6(w6),
97
    .w7(w7),
98
    .w8(w8),
99
    .w9(w9),
100
    .wl(wl),
101
    .wu(wu),
102
    .ewl(ewl),
103
    .s0(s0),
104
    .s1(s1),
105
    .s2(s2),
106
    .s3(s3),
107
    .s4(s4),
108
    .hp(hp),
109
    .digit_idx(digit_idx),
110
    .early_idx(early_idx),
111
    .ontime_idx(ontime_idx)
112
   );
113 13 eightycc
 
114 12 eightycc
   //-----------------------------------------------------------------------------
115
   // General storage
116
   //-----------------------------------------------------------------------------
117 13 eightycc
   wire [0:4] gs_out;
118
   wire gs_double_write, gs_no_write;
119
 
120 12 eightycc
   //-----------------------------------------------------------------------------
121
   // Operator controls
122
   //-----------------------------------------------------------------------------
123 13 eightycc
   wire [0:6] oc_data_out, oc_addr_out, oc_console_out;
124
   wire oc_console_to_addr;
125
   wire [0:14] oc_gs_ram_addr;
126
   wire oc_read_gs, oc_write_gs;
127
   wire oc_pgm_start, oc_pgm_stop, oc_err_reset, oc_err_sense_reset;
128
   wire oc_run_control, oc_half_or_pgm_stop, oc_ri_storage, oc_ro_storage,
129
        oc_storage_control;
130
   wire oc_man_pgm_reset, oc_man_acc_reset, oc_set_8000, oc_reset_8000,
131 12 eightycc
        oc_hard_reset;
132
 
133
   //-----------------------------------------------------------------------------
134
   // Translators
135
   //-----------------------------------------------------------------------------
136 13 eightycc
   wire tr_gs_write;
137
   wire [0:4] tr_gs_in;
138
   wire [0:6] tr_select_out;
139 12 eightycc
 
140 13 eightycc
   gen_store gs (
141 12 eightycc
    .rst(oc_hard_reset),
142
    .ap(ap),
143
    .dp(dp),
144
    .write_gate(tr_gs_write),
145
    .addr_th(`biq_blank),
146
    .addr_h(`biq_blank),
147
    .addr_t(`biq_blank),
148
    .dynamic_addr(digit_idx),
149
    .gs_in(tr_gs_in),
150
    .console_ram_addr(oc_gs_ram_addr),
151
    .console_read_gs(oc_read_gs),
152 13 eightycc
    .console_write_gs(oc_write_gs),
153 12 eightycc
    .gs_out(gs_out),
154
    .double_write(gs_double_write),
155
    .no_write(gs_no_write)
156
    );
157
 
158 13 eightycc
   operator_ctl oc (
159 12 eightycc
    .rst(rst),
160
    .clk(clk),
161
    .ap(ap),
162
    .dp(dp),
163
    .dx(dx),
164
    .d0(d0),
165
    .d1(d1),
166
    .d2(d2),
167
    .d3(d3),
168
    .d4(d4),
169
    .d5(d5),
170
    .d6(d6),
171
    .d10(d10),
172
    .wu(wu),
173
    .hp(hp),
174
    .early_idx(early_idx),
175
    .ontime_idx(ontime_idx),
176
    .cmd_digit_in(cmd_digit_in),
177
    .io_buffer_in(io_buffer_in),
178
    .gs_in(tr_select_out),
179
    .command(command),
180
    .data_out(oc_data_out),
181
    .addr_out(oc_addr_out),
182
    .console_out(oc_console_out),
183
    .console_to_addr(oc_console_to_addr),
184
    .gs_ram_addr(oc_gs_ram_addr),
185 13 eightycc
    .read_gs(oc_read_gs),
186
    .write_gs(oc_write_gs),
187 12 eightycc
    .pgm_start(oc_pgm_start),
188
    .pgm_stop(oc_pgm_stop),
189
    .err_reset(oc_err_reset),
190
    .err_sense_reset(oc_err_sense_reset),
191
    .run_control(oc_run_control),
192
    .half_or_pgm_stop(oc_half_or_pgm_stop),
193
    .ri_storage(oc_ri_storage),
194
    .ro_storage(oc_ro_storage),
195
    .storage_control(oc_storage_control),
196
    .man_pgm_reset(oc_man_pgm_reset),
197
    .man_acc_reset(oc_man_acc_reset),
198
    .set_8000(oc_set_8000),
199
    .reset_8000(oc_reset_8000),
200
    .hard_reset(oc_hard_reset),
201
    .cmd_digit_out(cmd_digit_out),
202
    .busy(busy),
203
    .digit_ready(digit_ready),
204
    .punch_card(punch_card),
205
    .read_card(read_card),
206
    .card_digit_ready(card_digit_ready)
207
    );
208
 
209 13 eightycc
    translators tr (
210 12 eightycc
    .dist_early_out(`biq_blank),
211
    .bs_out(`biq_blank),
212
    .console_out(oc_console_out),
213
    .ri_gs(1'b0),
214
    .ri_bs(1'b0),
215
    .ri_console(oc_write_gs),
216
    .n800x(1'b1),
217
    .gs_out(gs_out),
218
    .gs_write(tr_gs_write),
219
    .gs_in(tr_gs_in),
220
    .select_out(tr_select_out)
221
    );
222
 
223
endmodule

powered by: WebSVN 2.1.0

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