/* * Design: ECE 274 - Testbench for LED Sequencer (Design Challenge 3) * Author: Roman Lysecky * Copyright 2009, All Rights Reserved * * Date: November 2, 2009 * */ `timescale 1ns/1ns module Testbench(); reg Clk_s, Rst_s; reg [7:0] OffTime_s, OnTime_s; reg En_s; wire LED_s; LEDSequencer CompToTest(Clk_s, Rst_s, En_s, OnTime_s, OffTime_s, LED_s); // Clock Procedure always begin Clk_s <= 1; #5; Clk_s <= 0; #5; end // Test Vector Procedure initial begin // Reset and initialize signals Rst_s <= 1; OnTime_s <= 0; OffTime_s <= 0; En_s <= 0; @(posedge Clk_s); #1; // Start normal operation Rst_s <= 0; @(posedge Clk_s); #1; // Enable seqeuncer with specific on and off times OnTime_s <= 3; OffTime_s <= 4; En_s <= 1; @(posedge Clk_s); #1; end endmodule