欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標題:
基于verilog的流水燈程序
[打印本頁]
作者:
710149869
時間:
2018-5-4 22:44
標題:
基于verilog的流水燈程序
基于verilog的流水燈程序
//===========================================================================
// File Name : FLOW_LED
// Module Name : FLOW_LED
// Description : This is a led control module,which it control the led flow.
// Project :
// Belong to :
// Author :
// Date :
// Rev. :
//---------------------------------------------------------------------------
// Rev. Date Description
//---------------------------------------------------------------------------
//===========================================================================
`define UD #1
module FLOW_LED
(
//Input ports.
SYSCLK,
RST_B,
//Output ports.
LED
);
//===========================================================================
//Input and output declaration
//===========================================================================
input SYSCLK; //System clock, 50MHz.
input RST_B; //Global reset, low active.
output[7:0] LED;
//===========================================================================
//Wire and reg declaration
//===========================================================================
wire SYSCLK;
wire RST_B;
reg[7:0] LED;
//===========================================================================
//Wire and reg in the module
//===========================================================================
reg[7:0] LED_N;
reg[24:0] TIME_CNT;
reg[24:0] TIME_CNT_N;
//===========================================================================
//Logic
//===========================================================================
parameter T_NUM = 25'h17D7840;//25'h17D7840
always @ (posedge SYSCLK or negedge RST_B)
begin
if(!RST_B)
TIME_CNT <= 25'h0;
else
TIME_CNT <= TIME_CNT_N;
end
always @ ( * )
begin
if(TIME_CNT == T_NUM)
TIME_CNT_N = 25'h0;
else
TIME_CNT_N = TIME_CNT + 25'h1;
end
always @ (posedge SYSCLK or negedge RST_B)
begin
if(!RST_B)
LED <= 8'b1111_1110;
else
LED <= LED_N;
end
always @ (*)
begin 0000000
if((TIME_CNT == T_NUM)&&(LED == 8'b0))
LED_N = 8'b1111_1110;
else if(TIME_CNT == T_NUM)
LED_N = (LED << 1);
else
LED_N = LED;
end
endmodule
復制代碼
新建 Microsoft Word 97 - 2003 文檔.doc
2018-5-4 22:43 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
28.5 KB, 下載次數: 17, 下載積分: 黑幣 -5
歡迎光臨 (http://m.raoushi.com/bbs/)
Powered by Discuz! X3.1