文档详情

基于verilog的交通灯设计(状态机)资源.docx

发布:2025-04-16约1.34千字共3页下载文档
文本预览下载声明

code711.cn

基于verilog的交通灯设计(状态机)

实验课题:

一、Verilog程序(主程序+激励)

1)主程序

/*顶层模块*/

moduletraffic_light(clk,rst,out);

inputclk,rst;

output[5:0]out;

wire[4:0]x;

delayD(.clk(clk),.rst(rst),.cnt(x));

stateS(.in(x),.rst(rst),.clk(clk),.out(out));

endmodule

/*延时模块*/

moduledelay(clk,rst,cnt);

inputclk,

显示全部
相似文档