verilog代码集锦.rar
源代码在线查看: tb_traffic_light_controller2.v
//*************************************************** // File Name: tb_traffic_light_controller.v // Date: September 29,2008 // author: yilong.you // yilong.you@stu.xjtu.edu.cn //**************************************************/ `timescale 1ns/1ns module tb_traffic_light_controller2; reg clk,reset; wire[1:0] light_color; traffic_light_controller2 h1(.clk(clk),.reset(reset),.light_color(light_color)); always #1 clk=~clk; initial begin clk=0; reset=1; #2 reset=0; #100$stop; end always@(negedge clk)begin $display("At time %t:light_color=%b",$time,light_color); end endmodule