-
Notifications
You must be signed in to change notification settings - Fork 118
/
Copy pathtbmast.v
43 lines (36 loc) · 1.13 KB
/
tbmast.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
module tbmast;
// Inputs
reg [6:0] address;
reg [7:0] register;
reg [7:0] data;
reg [7:0] data_wr;
reg clk;
reg rw;
// Outputs
wire sda;
wire scl;
// Instantiate the Unit Under Test (UUT)
master uut (
.address(address),
.register(register),
.clk(clk),
.rw(rw),
.sda(sda),
.scl(scl),
.data(data),
.data_wr(data_wr)
);
initial begin
// Initialize Inputs
address = 105;
register = 7'b0100101;
clk = 0;
rw = 0;
data_wr = 20;
// Wait 100 ns for global reset to finish
#100;
// Add stimulus here
end
always
#1 clk = !clk;
endmodule