module traffic_light( output logic green_light, yellow_light, red_light, input sensor, input [15:0] green_downcnt, input [15:0] yellow_downcnt, input clock, input resetN );parameter R_BIT = 0, G_BIT = 1, Y_BIT = 2; enum logic [2:0] {RED = 3'd001<
State[G_BIT]: green_light = 1'b1; State[Y_BIT]: yellow_light = 1'b1; endcaseend: set_outputendmodule
posted on 2012-06-11 17:01 阅读( ...) 评论( ...) 收藏