高分求消除简单的警告

[复制链接]
 楼主| entepino 发表于 2012-12-11 16:56 | 显示全部楼层 |阅读模式
ic, ST, logic, ck, TE
本帖最后由 entepino 于 2012-12-11 16:58 编辑

   很简单的一个程序,7位串转并,连复位信号都没有。为何就会出现这么多警告阿?
端口:
             SDI_IN    : in         std_logic;
             CS_IN     : in         std_logic;
             SCK_IN    : in         std_logic;  
             CLK64M    : in         std_logic;   

             PData_OUT : out        std_logic_vector(7 downto 0);

信号:
          signal q_temp             : std_logic_vector(7 downto 0);
         

RecProcess: process(SCK_IN,CS_IN,SDI_IN,sdi_cnt,q_temp)  
  begin
      if CS_IN = '0' then
         if (SCK_IN'event and SCK_IN = '0') then        --receive data   
            for i in 7 downto 1 loop            
             q_temp(i)<=q_temp(i-1);         
             end loop;
             q_temp(0) <= SDI_IN;
         else
             null;
         end if;
           
         if (sdi_cnt = 8) then             --after receiving  data , send data to signal q1_temp;
            PData_OUT  <= q_temp;            
            sdi_cnt <= 0;  
         else           
            sdi_cnt <= sdi_cnt+1;   
         end if;
         
       end if;
            
  end process RecProcess;

   简单程序高分求消除警告。
  
   
简单程序高分求消除警告。
  
  1 Warning (10631): VHDL Process Statement warning at SPI001.vhd(85): inferring latch(es) for signal or variable "PData_OUT", which holds its previous value in one or more paths through the process
2Warning (10631): VHDL Process Statement warning at SPI001.vhd(85): inferring latch(es) for signal or variable "sdi_cnt", which holds its previous value in one or more paths through the process
3Warning: Feature LogicLock is not available with your current license
4Warning: Timing Analysis is analyzing one or more combinational loops as latches
       Warning: Node "sdi_cnt[0]" is a latch
       Warning: Node "sdi_cnt[2]" is a latch
       Warning: Node "sdi_cnt[4]" is a latch
       Warning: Node "sdi_cnt[1]" is a latch
       Warning: Node "sdi_cnt[3]" is a latch
       Warning: Node "sdi_cnt[6]" is a latch
       Warning: Node "sdi_cnt[5]" is a latch
       Warning: Node "PData_OUT[0]$latch" is a latch
       Warning: Node "PData_OUT[1]$latch" is a latch
       Warning: Node "PData_OUT[2]$latch" is a latch
       Warning: Node "PData_OUT[3]$latch" is a latch
       Warning: Node "PData_OUT[4]$latch" is a latch
       Warning: Node "PData_OUT[5]$latch" is a latch
       Warning: Node "PData_OUT[6]$latch" is a latch
       Warning: Node "PData_OUT[7]$latch" is a latch
5Warning: Found pins functioning as undefined clocks and/or memory enables
       Info: Assuming node "SCK_IN" is an undefined clock
       Info: Assuming node "CS_IN" is a latch enable and/or memory write/read enable. Will not compute fmax for this pin.
6Warning: Found 10 node(s) in clock paths which may be acting as ripple and/or gated clocks -- node(s) analyzed as buffer(s) resulting in clock skew
       Info: Detected ripple clock "sdi_cnt[5]" as buffer
       Info: Detected ripple clock "sdi_cnt[6]" as buffer
       Info: Detected ripple clock "sdi_cnt[3]" as buffer
       Info: Detected ripple clock "sdi_cnt[1]" as buffer
       Info: Detected ripple clock "sdi_cnt[4]" as buffer
       Info: Detected ripple clock "sdi_cnt[2]" as buffer
       Info: Detected ripple clock "sdi_cnt[0]" as buffer
       Info: Detected gated clock "PData_OUT[7]~0" as buffer
       Info: Detected gated clock "Equal3~1" as buffer
       Info: Detected gated clock "Equal3~0" as buffer
 楼主| entepino 发表于 2012-12-11 16:59 | 显示全部楼层
警告3不用 管它,是 license问题。
 楼主| entepino 发表于 2012-12-11 17:00 | 显示全部楼层
本帖最后由 entepino 于 2012-12-11 17:01 编辑

好几年没用VHDL了,以前用的就搞的就不是太明白,请大家指点一二,多谢了。
GoldSunMonkey 发表于 2012-12-11 20:51 | 显示全部楼层
是因为你写的代码信号的分支很不全。所以造成了。
请把所有条件不全。
另外时序逻辑写的也不是推荐的写法。
 楼主| entepino 发表于 2012-12-11 22:52 | 显示全部楼层
  哪位高手帮忙改一下,谢谢了!
GoldSunMonkey 发表于 2012-12-12 20:53 | 显示全部楼层
:)我已经把原因说的这么明白,难道必须写出来才行么?
GoldSunMonkey 发表于 2012-12-14 22:25 | 显示全部楼层
解决了么??
您需要登录后才可以回帖 登录 | 注册

本版积分规则

213

主题

651

帖子

2

粉丝
快速回复 在线客服 返回列表 返回顶部

213

主题

651

帖子

2

粉丝
快速回复 在线客服 返回列表 返回顶部