-
Notifications
You must be signed in to change notification settings - Fork 6
/
overflow_detection_test.v
64 lines (53 loc) · 1.03 KB
/
overflow_detection_test.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
`timescale 1ns / 1ps
// GroupID-73(15116003_15116066) - Abhimanyu Bambhaniya & Utkarsh Gupta
// Date: October 27, 2016
module overflow_detection_test;
// Inputs
reg a_last_bit;
reg b_last_bit;
reg sum_last_bit;
// Outputs
wire overflow;
// Instantiate the Unit Under Test (UUT)
overflow_detection uut (
.a_last_bit(a_last_bit),
.b_last_bit(b_last_bit),
.sum_last_bit(sum_last_bit),
.overflow(overflow)
);
initial begin
// Initialize Inputs
a_last_bit = 0;
b_last_bit = 0;
sum_last_bit = 1;
#100;
a_last_bit = 0;
b_last_bit = 1;
sum_last_bit = 1;
#100;
a_last_bit = 1;
b_last_bit = 0;
sum_last_bit = 1;
#100;
a_last_bit = 1;
b_last_bit = 1;
sum_last_bit = 1;
#100;
a_last_bit = 0;
b_last_bit = 0;
sum_last_bit = 0;
#100;
a_last_bit = 1;
b_last_bit = 0;
sum_last_bit = 0;
#100;
a_last_bit = 0;
b_last_bit = 1;
sum_last_bit = 0;
#100;
a_last_bit = 1;
b_last_bit = 1;
sum_last_bit = 0;
#100;
end
endmodule