Skip to content

Instantly share code, notes, and snippets.

@Shashi18
Created March 6, 2019 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shashi18/86f56284f903f885d4e8a0b09989a0dd to your computer and use it in GitHub Desktop.
Save Shashi18/86f56284f903f885d4e8a0b09989a0dd to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment