菜鸟求助:有关CPLD/FPGA的复位问题
学CPLD已有一周时间了,有一问题一直没搞明白:究竟CPLD上电后会像单片机一样,自动复位吗?比如:
module led_sh_liush(clk,rst_n,
led1,
led_liush);
input clk,rst_n;
output led1;
outputled_liush;
//---------------------------------------
//led1以40毫秒为周期闪烁
regcnt_sh;
reg led1;
always@(posedge clk or negedge rst_n)
begin
if(!rst_n) cnt_sh<=22'd0;
else if(cnt_sh==22'd4_000_000)
begin
cnt_sh<=22'd0;
led1<=~led1;
end
else cnt_sh<=cnt_sh+1'b1;
end
上电后,cnt_sh的值会是什么?(不按复位按扭)。请各位发表下意见,谢谢!! 上电后,cnt_sh的值会是什么?(不按复位按扭)。
不复位,那肯定是一个不确定的值,具体的值可能跟不同的芯片和平台有关系,
但这个问题我们没有必要去深究。 敢问楼上,为什么没有必要深究呢?你不觉得这个初值对电路的功能是有影响和决定的呢?
页:
[1]