这是我的RTL8019AS复位程序:向复位引脚rtl_rst输送高电平使其完成复位
module RTL_RESET
(
sysclk,
rst_b,
rtl_rst,
//rst_done,
in_start,
rst_led //test
);
//===============================================
//input and output declaration
//===============================================
input sysclk;
input rst_b;
output rtl_rst;
//output rst_done;
output in_start;
output rst_led;//test
//===============================================
//wire and reg declaration
//===============================================
reg rst_done;
wire sysclk;
wire rst_b;
reg rtl_rst;
wire in_start;
wire rst_led;//test
//=================================================================================================
//wire and reg in the module
//=================================================================================================
reg [23:0] time_count;
reg [23:0] time_count_n;
//=================================================================================================
//Logic------------reset
//=================================================================================================
//count the time >800ns 100ms to reset the rtl8019as
always @ (posedge sysclk or negedge rst_b)
begin
if(!rst_b)
time_count <= 24'h0;
else
time_count <= time_count_n;
end
always @(posedge sysclk or negedge rst_b)
begin
if(!rst_b)
time_count_n = 24'h0;
else if(time_count_n==24'hff_ffff) //keep 100ms high
time_count_n = 0;
else
time_count_n = time_count + 1'b1;
end
//rtl_rst > 800ns,100ms to reset the rtl8019as
always @ (posedge sysclk or negedge rst_b)
begin
if(!rst_b)
begin
rtl_rst <= 1;
rst_done <= 0;
//rst_led <= 1;
end
else if(time_count == 24'h26_25a0)//about 100ms
rtl_rst <= 0;
else if(time_count == 24'h26_e8f0)//delay 2ms to wait reset done
rst_done <= 1;
else if(time_count == 24'hff_ffff)//delay 320ns rst_done == 1;for rtl8019as's initialization?
rst_done <= 0;
else
begin
rtl_rst <= 0;
rst_done <= 0;
end
end
assign in_start = rst_done;
assign rst_led = (in_start) ? 1'b0 : 1'b1;//test
endmodule
为什么会出现下面的警告:
Warning (13410): Pin "rtl_rst" is stuck at VCC
Warning (13410): Pin "rtl_rst" is stuck at VCC
这是RTL8019AS的复位程序,我想用LED检测一下是不是复位完成,结果总是不亮?求指点
此帖出自
小平头技术问答
一周热门 更多>