aboutsummaryrefslogtreecommitdiffstats
path: root/tb/complicated_test.v
diff options
context:
space:
mode:
Diffstat (limited to 'tb/complicated_test.v')
-rwxr-xr-xtb/complicated_test.v37
1 files changed, 37 insertions, 0 deletions
diff --git a/tb/complicated_test.v b/tb/complicated_test.v
new file mode 100755
index 0000000..731c0c7
--- /dev/null
+++ b/tb/complicated_test.v
@@ -0,0 +1,37 @@
+`timescale 1ps/1ps
+module complicated_test;
+
+ reg CLK100;
+always @(CLK100) begin
+ #4980.00 CLK100 <= ~CLK100;
+end
+
+initial begin
+ #0 CLK100 <= 1'b0; // the first event that sets the clock in motion
+end
+
+
+reg [3:0] Switch_input;
+wire [3:0] LED_output;
+wire FPGA_RESET;
+
+main main_i (
+ .PUSH_BUTTON_RESET_RAW(FPGA_RESET),
+ .SYSTEMCLOCK(CLK100),
+ .gpio_led(LED_output),
+ .gpio_switch(Switch_input)
+ );
+
+
+initial begin
+ #0 Switch_input <= 4'h00;
+ $display("FAIL");
+ $display("Switch set to zero");
+ #1000000 Switch_input <= 4'h01;
+ $display("Switch set to one");
+ #2000000
+ $display("PASS");
+ $finish();
+end
+
+endmodule