du520xi

第一个工程,点灯测试一下硬件

0
阅读(2544)

也许最近太忙了,加上国庆又放了一个长假,任何一个FPGA工程师都只到拿到FPGA的板子,第一个是写一个点灯的......

module  LED_Test(
                                   clk_100M,
                                   rst_n,
                                   led
                                    );
 
input                           clk_100M;
input                            rst_n;
output                          led;
reg              [31:0]       cnt;

assign    led = cnt[31];
always@(posedge clk_100M or negedge rst_n)begin
  if(!rst_n)begin
         cnt <= 32'h0;end
  esle begin
         cnt <= cnt+1'b1;end 
end//end always
endmodule

上传一个测试工程