|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
大家好,小弟刚刚做FPGA不久,现在还在学习当中,最近在做一个收发模块时,用到了一个四位的计数器counter,在整个模块里综合后,显示警告:XST:1710-FF/latch<counter_1>(without init value)has a constant value of 0 in block <rpoh>,this FF/latch will be trimmed during the optization process.同样也有counter的第二位和第三位的这样的警告,仿真时看计数器也没有波形,其他信号由于用到这个计数器也没波形,如果把这个计数器拿出来单独综合仿真都没问题。
计数器Code(fp1为帧同步信号):
process(clk,rst,fp1)
begin
if rst='1' then
counter<="0000";
elsif fp1='1' then
counter<="0001";
elsif clk' event and clk='0' then
if counter="1000" then
counter<="0001";
else
counter<=counter+1;
end if;
end if;
end process;
这样写有什么问题,请高手指教,谢谢! |
|