-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_pc.v
More file actions
54 lines (41 loc) · 877 Bytes
/
test_pc.v
File metadata and controls
54 lines (41 loc) · 877 Bytes
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
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Assignment 7
//
//Group No.42
//Members: Seemant Guruprasad Achari 19CS10055
// Chappidi Yoga Satwik 19CS30013
//
// This is the testbench for the Program Counter
//
//////////////////////////////////////////////////////////////////////////////////
module pc_test;
// Inputs
reg [31:0] inp;
reg clk;
reg rst;
// Outputs
wire [31:0] out, finout, old_val;
// Instantiate the Unit Under Test (UUT)
pc uut (
.inp(finout),
.out(out),
.clk(clk),
.rst(rst),
.old_val(old_val)
);
add4 ad(.inp(out), .out(finout));
initial begin
// Initialize Inputs
inp = 0;
clk = 0;
rst = 0;
// Wait 100 ns for global reset to finish
#100;
rst=1;
#10 rst=0;
// Add stimulus here
end
always
#10 clk=~clk;
endmodule