|
马上注册,看完整文章,学更多FPGA知识。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我写了个激励文件,但是仿真的效果不理想,希望指点下,谢谢各位!
`timescale 1 ps/ 1 ps
module traf_light8_vlg_tst();
reg clk;
reg rst_n;
// wires
wire [1:0] led_east;
wire [1:0] led_north;
wire [1:0] led_south;
wire [1:0] led_west;
// assign statements (if any)
traf_light8 i1 (
// port map - connection between master ports and signals/registers
.clk(clk),
.led_east(led_east),
.led_north(led_north),
.led_south(led_south),
.led_west(led_west),
.rst_n(rst_n)
);
initial
begin
clk=0;
forever
#10 clk=~clk;
end
initial
begin
rst_n=1;
#1000 rst_n=0;
#1000 rst_n=1;
end
initial
begin
led_east=2'b0;
led_west=2'b0;
led_south=2'b0;
led_north=2'b0;
end
endmodule
|
|