-
Notifications
You must be signed in to change notification settings - Fork 0
/
MEM_WB_tb.v
57 lines (47 loc) · 1000 Bytes
/
MEM_WB_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
`timescale 1ns / 1ps
module MEM_WB_tb;
// Inputs
reg clk;
reg hit;
reg [31:0] readData;
reg [31:0] ALUResult;
reg [4:0] writeReg;
reg RegWrite;
reg MemToReg;
// Outputs
wire hitOut;
wire [31:0] readDataOut;
wire [31:0] ALUResultOut;
wire [4:0] writeRegOut;
wire RegWriteOut;
wire MemToRegOut;
// Instantiate the Unit Under Test (UUT)
MEM_WB uut (
.clk(clk),
.hit(hit),
.readData(readData),
.ALUResult(ALUResult),
.writeReg(writeReg),
.RegWrite(RegWrite),
.MemToReg(MemToReg),
.hitOut(hitOut),
.readDataOut(readDataOut),
.ALUResultOut(ALUResultOut),
.writeRegOut(writeRegOut),
.RegWriteOut(RegWriteOut),
.MemToRegOut(MemToRegOut)
);
initial begin
// Initialize Inputs
clk = 0;
hit = 0;
readData = 0;
ALUResult = 0;
writeReg = 0;
RegWrite = 0;
MemToReg = 0;
// Wait 100 ns for global reset to finish
#100;
// Add stimulus here
end
endmodule