-
Notifications
You must be signed in to change notification settings - Fork 0
/
Execute_tb.v
55 lines (44 loc) · 870 Bytes
/
Execute_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
`timescale 1ns / 1ps
module Execute_tb;
// Inputs
reg clk;
reg [31:0] AluReadData1;
reg [31:0] AluReadData2;
reg [31:0] Immediate;
reg [5:0] funct;
reg [2:0] ALUOp;
reg ALUSrc;
// Outputs
wire [31:0] ALUResult;
wire Zero;
// Instantiate the Unit Under Test (UUT)
Execute uut (
.clk(clk),
.AluReadData1(AluReadData1),
.AluReadData2(AluReadData2),
.Immediate(Immediate),
.funct(funct),
.ALUOp(ALUOp),
.ALUSrc(ALUSrc),
.ALUResult(ALUResult),
.Zero(Zero)
);
initial begin
// Initialize Inputs
clk = 0;
AluReadData1 = 3;
AluReadData2 = 4;
Immediate = -1;
funct = 0;
ALUOp = 0;
ALUSrc = 0;
// Wait 100 ns for global reset to finish
#100;
funct =1;
#100;
ALUSrc = 1;
#100;
ALUOp = 3;
// Add stimulus here
end
endmodule