summaryrefslogtreecommitdiffstats
path: root/sw-old/cpld/address_decoder.vm
blob: d4ee62b22294b7013d82330c2f55f0babe4c7282 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
//
// Written by Synplify
// Thu Nov 23 11:54:35 2017
//
// Source file index table:
// Object locations will have the form <file>:<line>
// file 0 "noname"
// file 1 "\c:\isptools\synpbase\lib\vhd\std.vhd "
// file 2 "\c:\_prossn\cpld.nao\address_decoder.vhd "
// file 3 "\c:\isptools\synpbase\lib\vhd\std1164.vhd "
// file 4 "\c:\isptools\synpbase\lib\vhd\arith.vhd "
// file 5 "\c:\isptools\synpbase\lib\vhd\unsigned.vhd "

`timescale 100 ps/100 ps
module IBUF (
  O,
  I0
);
output O;
input I0;
wire O ;
wire I0 ;
wire true ;
wire false ;
  assign #(1)  O = I0;
  assign true = 1'b1;
  assign false = 1'b0;
endmodule /* IBUF */

module OBUF (
  O,
  I0
);
output O;
input I0;
wire O ;
wire I0 ;
wire true ;
wire false ;
  assign #(1)  O = I0;
  assign true = 1'b1;
  assign false = 1'b0;
endmodule /* OBUF */

module AND2 (
  O,
  I0,
  I1
);
output O;
input I0;
input I1;
wire O ;
wire I0 ;
wire I1 ;
wire true ;
wire false ;
  assign true = 1'b1;
  assign false = 1'b0;
  assign #(1)  O = I0  & I1 ;
endmodule /* AND2 */

module INV (
  O,
  I0
);
output O;
input I0;
wire O ;
wire I0 ;
wire true ;
wire false ;
  assign #(1)  O = ~ I0;
  assign true = 1'b1;
  assign false = 1'b0;
endmodule /* INV */

module ADDRESS_DECODER (
  MMU_IN,
  MMU_OUT,
  IORQ,
  RD,
  CSROML,
  CSROMH,
  CSRAM,
  CSUART,
  CSCTC,
  CSPIO
);
input [15:0] MMU_IN;
output [15:12] MMU_OUT;
input IORQ;
input RD;
output CSROML;
output CSROMH;
output CSRAM;
output CSUART;
output CSCTC;
output CSPIO;
wire [15:0] MMU_IN;
wire [15:12] MMU_OUT;
wire IORQ ;
wire RD ;
wire CSROML ;
wire CSROMH ;
wire CSRAM ;
wire CSUART ;
wire CSCTC ;
wire CSPIO ;
wire [14:2] MMU_IN_i_0;
wire [7:2] MMU_IN_c;
wire [15:12] MMU_IN_c_c;
wire [15:15] MMU_IN_i_c;
wire op_ge_un24_csromh ;
wire op_lt_un11_csromh ;
wire un12_csromh ;
wire N_117 ;
wire N_181 ;
wire op_lt_un11_cspio ;
wire N_56 ;
wire N_54 ;
wire N_51 ;
wire IORQ_i ;
wire IORQ_c ;
wire op_ge_un24_csromh_i_c ;
wire un12_csromh_i_c ;
wire N_181_i_0_c ;
wire GND ;
wire N_184 ;
wire VCC ;
//@1:1
  assign GND = 1'b0;
  IBUF \MMU_IN_Z[2]  (
	.O(MMU_IN_c[2]),
	.I0(MMU_IN[2])
);
  IBUF \MMU_IN_Z[3]  (
	.O(MMU_IN_c[3]),
	.I0(MMU_IN[3])
);
  IBUF \MMU_IN_Z[4]  (
	.O(MMU_IN_c[4]),
	.I0(MMU_IN[4])
);
  IBUF \MMU_IN_Z[5]  (
	.O(MMU_IN_c[5]),
	.I0(MMU_IN[5])
);
  IBUF \MMU_IN_Z[6]  (
	.O(MMU_IN_c[6]),
	.I0(MMU_IN[6])
);
  IBUF \MMU_IN_Z[7]  (
	.O(MMU_IN_c[7]),
	.I0(MMU_IN[7])
);
  IBUF \MMU_IN_Z[12]  (
	.O(MMU_IN_c_c[12]),
	.I0(MMU_IN[12])
);
  IBUF \MMU_IN_Z[13]  (
	.O(MMU_IN_c_c[13]),
	.I0(MMU_IN[13])
);
  IBUF \MMU_IN_Z[14]  (
	.O(MMU_IN_c_c[14]),
	.I0(MMU_IN[14])
);
  IBUF \MMU_IN_Z[15]  (
	.O(MMU_IN_c_c[15]),
	.I0(MMU_IN[15])
);
  OBUF \MMU_OUT_Z[12]  (
	.O(MMU_OUT[12]),
	.I0(MMU_IN_c_c[12])
);
  OBUF \MMU_OUT_Z[13]  (
	.O(MMU_OUT[13]),
	.I0(MMU_IN_c_c[13])
);
  OBUF \MMU_OUT_Z[14]  (
	.O(MMU_OUT[14]),
	.I0(MMU_IN_c_c[14])
);
  OBUF \MMU_OUT_Z[15]  (
	.O(MMU_OUT[15]),
	.I0(MMU_IN_c_c[15])
);
  IBUF IORQ_Z (
	.O(IORQ_c),
	.I0(IORQ)
);
  OBUF CSROML_Z (
	.O(CSROML),
	.I0(op_ge_un24_csromh_i_c)
);
  OBUF CSROMH_Z (
	.O(CSROMH),
	.I0(un12_csromh_i_c)
);
  OBUF CSRAM_Z (
	.O(CSRAM),
	.I0(MMU_IN_i_c[15])
);
  OBUF CSUART_Z (
	.O(CSUART),
	.I0(GND)
);
  OBUF CSCTC_Z (
	.O(CSCTC),
	.I0(GND)
);
  OBUF CSPIO_Z (
	.O(CSPIO),
	.I0(N_181_i_0_c)
);
  AND2 un26_cspio (
	.O(N_181),
	.I0(op_lt_un11_cspio),
	.I1(N_184)
);
  AND2 \un26_cspio.G_184  (
	.O(N_184),
	.I0(MMU_IN_c[4]),
	.I1(IORQ_i)
);
  INV \MMU_IN_i[6]  (
	.O(MMU_IN_i_0[6]),
	.I0(MMU_IN_c[6])
);
  INV \MMU_IN_i[5]  (
	.O(MMU_IN_i_0[5]),
	.I0(MMU_IN_c[5])
);
  INV \MMU_IN_i[3]  (
	.O(MMU_IN_i_0[3]),
	.I0(MMU_IN_c[3])
);
  INV \MMU_IN_i[2]  (
	.O(MMU_IN_i_0[2]),
	.I0(MMU_IN_c[2])
);
  INV \MMU_IN_i[14]  (
	.O(MMU_IN_i_0[14]),
	.I0(MMU_IN_c_c[14])
);
  INV \MMU_IN_i[13]  (
	.O(MMU_IN_i_0[13]),
	.I0(MMU_IN_c_c[13])
);
  AND2 un12_csromh_Z (
	.O(un12_csromh),
	.I0(op_lt_un11_csromh),
	.I1(op_ge_un24_csromh_i_c)
);
  AND2 G_116 (
	.O(N_117),
	.I0(MMU_IN_i_0[14]),
	.I1(MMU_IN_i_0[13])
);
  AND2 G_118 (
	.O(op_ge_un24_csromh),
	.I0(MMU_IN_i_c[15]),
	.I1(N_117)
);
  AND2 G_179 (
	.O(op_lt_un11_csromh),
	.I0(MMU_IN_i_c[15]),
	.I1(MMU_IN_i_0[14])
);
  AND2 G_49 (
	.O(N_51),
	.I0(MMU_IN_i_0[3]),
	.I1(MMU_IN_i_0[2])
);
  AND2 G_53 (
	.O(N_54),
	.I0(N_51),
	.I1(MMU_IN_i_0[5])
);
  AND2 G_55 (
	.O(N_56),
	.I0(N_54),
	.I1(MMU_IN_i_0[6])
);
  AND2 G_57 (
	.O(op_lt_un11_cspio),
	.I0(N_56),
	.I1(MMU_IN_i_0[7])
);
  INV N_181_i (
	.O(N_181_i_0_c),
	.I0(N_181)
);
  INV \MMU_IN_i[15]  (
	.O(MMU_IN_i_c[15]),
	.I0(MMU_IN_c_c[15])
);
  INV un12_csromh_i (
	.O(un12_csromh_i_c),
	.I0(un12_csromh)
);
  INV op_ge_un24_csromh_i (
	.O(op_ge_un24_csromh_i_c),
	.I0(op_ge_un24_csromh)
);
  INV IORQ_i_Z (
	.O(IORQ_i),
	.I0(IORQ_c)
);
  INV \MMU_IN_i[7]  (
	.O(MMU_IN_i_0[7]),
	.I0(MMU_IN_c[7])
);
  assign VCC = 1'b1;
endmodule /* ADDRESS_DECODER */