-
Notifications
You must be signed in to change notification settings - Fork 0
/
fariha-main_tb.v
421 lines (327 loc) · 18.9 KB
/
fariha-main_tb.v
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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
module TestBench;
reg clk, on, rst;
reg [2:0] in_sel; //persist, load, reset
//reg [7:0] previous;
reg [6:0] out_sel; //which operation to do, comes out of the last mux
reg [7:0] num1, num2;
wire [7:0] out, final1, final2; //output value
wire [1:0] currState, nextState;
main myMain(clk, on, in_sel, num1, num2, final1, final2, out_sel, out, currState, nextState);
initial begin
clk = 1; #10 clk = 0;
$display(" Num1 Num2 Operation Current State Output Next State");
$display("-------------------------------------------------------------------------------------------------------------------------------------------------");
forever
begin
#10 clk = 0;
#10 clk = 1;
#20
casex ({out_sel, currState, nextState})
11'b10000000000 : $display(" %b (%d)| %b (%d)| %b(Mult)| %b(Off) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b10000000001 : $display(" %b (%d)| %b (%d)| %b(Mult)| %b(Off) | %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b10000000100 : $display(" %b (%d)| %b (%d)| %b(Mult)| %b(Ready) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b10000000110 : $display(" %b (%d)| %b (%d)| %b(Mult)| %b(Ready) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b10000001010 : $display(" %b (%d)| %b (%d)| %b(Mult)| %b(Running) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b10000001011 : $display(" %b (%d)| %b (%d)| %b(Mult)| %b(Running) | %b (%d)| %b(Running w/ error)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b10000001101 : $display(" %b (%d)| %b (%d)| %b(Mult)| %b(Running w/ error)| %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
//end mult, start sub
11'b01000000000 : $display(" %b (%d)| %b (%d)| %b(Sub) | %b(Off) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b01000000001 : $display(" %b (%d)| %b (%d)| %b(Sub) | %b(Off) | %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b01000000100 : $display(" %b (%d)| %b (%d)| %b(Sub) | %b(Ready) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b01000000110 : $display(" %b (%d)| %b (%d)| %b(Sub) | %b(Ready) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b01000001010 : $display(" %b (%d)| %b (%d)| %b(Sub) | %b(Running) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b01000001011 : $display(" %b (%d)| %b (%d)| %b(Sub) | %b(Running) | %b (%d)| %b(Running w/ error)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b01000001101 : $display(" %b (%d)| %b (%d)| %b(Sub) | %b(Running w/ error)| %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
//end sub start add
11'b00100000000 : $display(" %b (%d)| %b (%d)| %b(Add) | %b(Off) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00100000001 : $display(" %b (%d)| %b (%d)| %b(Add) | %b(Off) | %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00100000100 : $display(" %b (%d)| %b (%d)| %b(Add) | %b(Ready) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00100000110 : $display(" %b (%d)| %b (%d)| %b(Add) | %b(Ready) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00100001010 : $display(" %b (%d)| %b (%d)| %b(Add) | %b(Running) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00100001011 : $display(" %b (%d)| %b (%d)| %b(Add) | %b(Running) | %b (%d)| %b(Running w/ error)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00100001101 : $display(" %b (%d)| %b (%d)| %b(Add) | %b(Running w/ error)| %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
//end add, start NOT
11'b00010000000 : $display(" %b (%d)| %b (%d)| %b(NOT) | %b(Off) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00010000001 : $display(" %b (%d)| %b (%d)| %b(NOT) | %b(Off) | %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00010000100 : $display(" %b (%d)| %b (%d)| %b(NOT) | %b(Ready) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00010000110 : $display(" %b (%d)| %b (%d)| %b(NOT) | %b(Ready) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00010001010 : $display(" %b (%d)| %b (%d)| %b(NOT) | %b(Running) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00010001011 : $display(" %b (%d)| %b (%d)| %b(NOT) | %b(Running) | %b (%d)| %b(Running w/ error)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00010001101 : $display(" %b (%d)| %b (%d)| %b(NOT) | %b(Running w/ error)| %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
//end NOT, start XOR
11'b00001000000 : $display(" %b (%d)| %b (%d)| %b(XOR) | %b(Off) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00001000001 : $display(" %b (%d)| %b (%d)| %b(XOR) | %b(Off) | %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00001000100 : $display(" %b (%d)| %b (%d)| %b(XOR) | %b(Ready) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00001000110 : $display(" %b (%d)| %b (%d)| %b(XOR) | %b(Ready) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00001001010 : $display(" %b (%d)| %b (%d)| %b(XOR) | %b(Running) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00001001011 : $display(" %b (%d)| %b (%d)| %b(XOR) | %b(Running) | %b (%d)| %b(Running w/ error)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00001001101 : $display(" %b (%d)| %b (%d)| %b(XOR) | %b(Running w/ error)| %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
//end XOR, start OR
11'b00000100000 : $display(" %b (%d)| %b (%d)| %b(OR) | %b(Off) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00000100001 : $display(" %b (%d)| %b (%d)| %b(OR) | %b(Off) | %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00000100100 : $display(" %b (%d)| %b (%d)| %b(OR) | %b(Ready) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00000100110 : $display(" %b (%d)| %b (%d)| %b(OR) | %b(Ready) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00000101010 : $display(" %b (%d)| %b (%d)| %b(OR) | %b(Running) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00000101011 : $display(" %b (%d)| %b (%d)| %b(OR) | %b(Running) | %b (%d)| %b(Running w/ error)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00000101101 : $display(" %b (%d)| %b (%d)| %b(OR) | %b(Running w/ error)| %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
//end OR, start AND
11'b00000010000 : $display(" %b (%d)| %b (%d)| %b(AND) | %b(Off) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00000010001 : $display(" %b (%d)| %b (%d)| %b(AND) | %b(Off) | %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00000010100 : $display(" %b (%d)| %b (%d)| %b(AND) | %b(Ready) | %b (%d)| %b(Off)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00000010110 : $display(" %b (%d)| %b (%d)| %b(AND) | %b(Ready) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00000011010 : $display(" %b (%d)| %b (%d)| %b(AND) | %b(Running) | %b (%d)| %b(Running)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00000011011 : $display(" %b (%d)| %b (%d)| %b(AND) | %b(Running) | %b (%d)| %b(Running w/ error)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
11'b00000011101 : $display(" %b (%d)| %b (%d)| %b(AND) | %b(Running w/ error)| %b (%d)| %b(Ready)",final1, final1, final2, final2, out_sel, currState, out, out, nextState);
endcase
end
end
initial begin //reset is part of in_selector
#20
/*rst=0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00000001; num2 = 8'b00000010; out_sel = 7'b1000000; //1 x 2
#20
#20;
/*rst =1;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00000011; num2 = 8'b00000010; out_sel = 7'b1000000; //3 x 2
#20;
#20;
/*rst =0*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b01010111; num2 = 8'b00011010; out_sel = 7'b1000000; //overflow
#20;
#20;
on = 1'b1; in_sel = 3'b010; num1 = 8'b00000001; num2 = 8'b00000011; out_sel = 7'b1000000; //1 x 3
#20;
#20;
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00000010; num2 = 8'b00000100; out_sel = 7'b1000000; //2 x 4
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00000010; num2 = 8'b00000100; out_sel = 7'b0100000; //2 - 4
#20
#20
/*rst = 1;*/
on = 1'b1; in_sel = 3'b100; num1 = 8'b00000010; num2 = 8'b00000100; out_sel = 7'b0100000; //2 - 4
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00000100; num2 = 8'b00001000; out_sel = 7'b0010000; //4 + 8
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00000100; num2 = 8'b00001000; out_sel = 7'b1000000; //4 * 8
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00001001; num2 = 8'b00001010; out_sel = 7'b0010000; //9 + 10
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b11000001; num2 = 8'b10000110; out_sel = 7'b0100000; //193 - 134
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00110010; num2 = 8'b00011001; out_sel = 7'b0010000; // 50 + 25
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00110010; num2 = 8'b00011001; out_sel = 7'b0001000; // 50 NOT 25
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b10000001; num2 = 8'b00000011; out_sel = 7'b0001000; // 129 NOT 3 = NOT 129 = 126
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00110010; num2 = 8'b00011001; out_sel = 7'b0000100; // 50 XOR 25
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00110010; num2 = 8'b00011001; out_sel = 7'b0000010; // 50 OR 25
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00110010; num2 = 8'b00011001; out_sel = 7'b0000001; // 50 AND 25
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00011110; num2 = 8'b00011110; out_sel = 7'b0000001; // 30 AND 30
#20
#20
/*rst = 1;*/
on = 1'b1; in_sel = 3'b100; num1 = 8'b00011110; num2 = 8'b10000000; out_sel = 7'b0010000; // 30 XOR 128 but reset is on
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b11100000; num2 = 8'b01111111; out_sel = 7'b0100000; // 224 - 127
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b01111000; num2 = 8'b00000001; out_sel = 7'b0000001; // 120 AND 1
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00001000; num2 = 8'b00001010; out_sel = 7'b0000100; // 8 XOR 10
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00001100; num2 = 8'b00000111; out_sel = 7'b0000001; // 12 AND 7
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00001011; num2 = 8'b00001010; out_sel = 7'b0000010; // 11 OR 10
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00011110; num2 = 8'b00000010; out_sel = 7'b0000001; // 30 AND 2
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00011110; num2 = 8'b00000010; out_sel = 7'b1000000; // 30 * 2
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b11010111; num2 = 8'b00001001; out_sel = 7'b0001000; // 215 NOT 9 = NOT 215
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00111100; num2 = 8'b00111100; out_sel = 7'b0010000; // 60 + 60
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00011011; num2 = 8'b00000000; out_sel = 7'b0000010; // 27 OR 0
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00001101; num2 = 8'b00000111; out_sel = 7'b0100000; // 13 - 7
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00101111; num2 = 8'b01110011; out_sel = 7'b0000010; // 47 OR 115
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b01111000; num2 = 8'b01111000; out_sel = 7'b0000100; // 120 XOR 120
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b01101110; num2 = 8'b00001010; out_sel = 7'b0010000; // 110 + 10
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b10000000; num2 = 8'b01100100; out_sel = 7'b0100000; // 128 - 100
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b11111110; num2 = 8'b00001010; out_sel = 7'b0001000; // 254 NOT 10
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00001011; num2 = 8'b00000011; out_sel = 7'b1000000; // 11 * 3
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b01111000; num2 = 8'b00000111; out_sel = 7'b0000100; // 144 XOR 7
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b11100110; num2 = 8'b10010001; out_sel = 7'b0000100; // 230 XOR 145
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b01110111; num2 = 8'b00010011; out_sel = 7'b0000001; // 119 AND 19
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b01000001; num2 = 8'b00001000; out_sel = 7'b0000100; // 65 XOR 8
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b11000111; num2 = 8'b01100100; out_sel = 7'b0100000; // 199 - 100
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b100; num1 = 8'b11110111; num2 = 8'b01100100; out_sel = 7'b0100000; // 247 - 100 but reset is on
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b10000010; num2 = 8'b00001010; out_sel = 7'b0000001; // 130 AND 10
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00001110; num2 = 8'b01111000; out_sel = 7'b0000100; // 14 XOR 120
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b11011101; num2 = 8'b01100100; out_sel = 7'b0000001; // 221 AND 100
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00010110; num2 = 8'b01100100; out_sel = 7'b0000010; // 22 OR 100
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00010110; num2 = 8'b01100100; out_sel = 7'b0000001; // 22 AND 100
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00010110; num2 = 8'b01100100; out_sel = 7'b0000100; // 22 XOR 100
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b10101111; num2 = 8'b00001000; out_sel = 7'b0001000; // 175 NOT 8
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b11000101; num2 = 8'b01011001; out_sel = 7'b0100000; // 197 - 89
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b10111011; num2 = 8'b01100011; out_sel = 7'b0001000; // 187 NOT 99
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00011011; num2 = 8'b00001110; out_sel = 7'b0010000; // 27 + 14
#20
//52 outputs
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b11111010; num2 = 8'b10010110; out_sel = 7'b0000100; // 250 XOR 150
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b01001000; num2 = 8'b00001101; out_sel = 7'b0000001; // 72 AND 13
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00000100; num2 = 8'b00001000; out_sel = 7'b1000000; // 4 * 8
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b10010001; num2 = 8'b11111010; out_sel = 7'b0001000; // 145 NOT 250
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b01000001; num2 = 8'b00100011; out_sel = 7'b0100000; // 65 - 35
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00110101; num2 = 8'b00001100; out_sel = 7'b0000100; // 53 XOR 12
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b10111110; num2 = 8'b01010111; out_sel = 7'b0000001; // 197 AND 87
#20
#20
/*rst = 0;*/
on = 1'b1; in_sel = 3'b010; num1 = 8'b00101011; num2 = 8'b00101001; out_sel = 7'b0000010; // 43 OR 41
#20
//60 outputs
#20 //ending time
$stop;
end
initial begin
#2420
$finish;
end
endmodule