-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ryan Berg
committed
Nov 28, 2015
1 parent
1fad918
commit 0fbfbf9
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
`timescale 1ns / 1ps | ||
|
||
module SC_buffer_serializer_tb; | ||
|
||
// Inputs | ||
reg clk; | ||
reg [15:0] song_time; | ||
reg [36:0] match_trigger; | ||
reg [37*16-1:0] match_time; | ||
|
||
// Outputs | ||
wire match_en; | ||
wire [15:0] match_dt; | ||
|
||
// Instantiate the Unit Under Test (UUT) | ||
SC_buffer_serializer uut ( | ||
.clk(clk), | ||
.song_time(song_time), | ||
.match_trigger(match_trigger), | ||
.match_time(match_time), | ||
.match_en(match_en), | ||
.match_dt(match_dt) | ||
); | ||
|
||
always #5 clk = !clk; | ||
always #10 song_time = song_time + 1; | ||
initial begin | ||
// Initialize Inputs | ||
clk = 0; | ||
song_time = 0; | ||
match_trigger = 0; | ||
match_time = 0; | ||
// Wait 100 ns for global reset to finish | ||
#100; | ||
|
||
//Stimulus | ||
|
||
match_trigger = 1; //match e2 | ||
match_time[15:0] = 7; | ||
#10 | ||
match_trigger = 0; | ||
|
||
|
||
|
||
end | ||
endmodule |