summaryrefslogtreecommitdiff
path: root/TEST_Detector.v
diff options
context:
space:
mode:
Diffstat (limited to 'TEST_Detector.v')
-rw-r--r--TEST_Detector.v66
1 files changed, 66 insertions, 0 deletions
diff --git a/TEST_Detector.v b/TEST_Detector.v
new file mode 100644
index 0000000..8f038f8
--- /dev/null
+++ b/TEST_Detector.v
@@ -0,0 +1,66 @@
+`timescale 1ns / 1ps
+
+////////////////////////////////////////////////////////////////////////////////
+// Company:
+// Engineer:
+//
+// Create Date: 15:01:00 04/05/2012
+// Design Name: Detector
+// Module Name: /home/michael/Documents/School/EC311/lab6/TEST_Detector.v
+// Project Name: lab6
+// Target Device:
+// Tool versions:
+// Description:
+//
+// Verilog Test Fixture created by ISE for module: Detector
+//
+// Dependencies:
+//
+// Revision:
+// Revision 0.01 - File Created
+// Additional Comments:
+//
+////////////////////////////////////////////////////////////////////////////////
+
+module TEST_Detector;
+
+ // Inputs
+ reg inp;
+ reg clk;
+ reg rst;
+
+ // Outputs
+ wire result;
+ wire [1:0] state;
+
+ // Instantiate the Unit Under Test (UUT)
+ Detector uut (
+ .inp(inp),
+ .clk(clk),
+ .rst(rst),
+ .result(result),
+ .state(state)
+ );
+
+ reg [19:0] pattern = 20'b11010111011111110110;
+ reg [15:0] i;
+ initial begin
+ // Initialize Inputs
+ inp = 0;
+ clk = 0;
+ rst = 0;
+ i = 0;
+
+ // Wait 100 ns for global reset to finish
+ #50;
+
+ // Add stimulus here
+ for (i = 0; i < 20; i = i + 1) begin
+ inp = pattern[19-i];
+ clk = ~clk; #5;
+ clk = ~clk; #5;
+ end
+ end
+
+endmodule
+