首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

我遇到一个综合问题,求助高手?

我遇到一个综合问题,求助高手?

这几天我遇到一个问题,请您帮忙分析一下:我写的定时器中定义了一个信号:

                  signal count : STD_LOGIC_VECTOR(15 downto 0);

在综合时发生错误:

             Analyzing Entity <component_38> (Architecture <behavioral>).
Entity <component_38> analyzed. Unit <component_38> generated.

Analyzing Entity <scq> (Architecture <behavioral>).
Entity <scq> analyzed. Unit <scq> generated.

Analyzing Entity <ymq> (Architecture <behavioral>).
Entity <ymq> analyzed. Unit <ymq> generated.

Analyzing Entity <fpq> (Architecture <behavioral>).
Entity <fpq> analyzed. Unit <fpq> generated.

Analyzing Entity <dsq> (Architecture <behavioral>).
ERROR:Xst:827 - "E:/dj_vhdl/dsq/dsq.vhd" line 42: Signal count cannot be synthesized, bad synchronous description.
-->

Total memory usage is 89604 kilobytes

Number of errors   :    1 (   0 filtered)
Number of warnings :    0 (   0 filtered)
Number of infos    :    0 (   0 filtered)

我仔细检查了一下,也没看出什么不对。下面是dsq代码:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity dsq is
    Port ( clk : in  STD_LOGIC;
           ce : in  STD_LOGIC;
           datain : in  STD_LOGIC_VECTOR (15 downto 0);
           stop : out  STD_LOGIC);
end dsq;

architecture Behavioral of dsq is

signal count : STD_LOGIC_VECTOR(15 downto 0);

begin
process(clk,ce)
   begin


  if (ce'event and ce = '1') then
   count <= datain;
  end if;
  
  if(ce = '1') then
   if(clk'event and clk = '1') then
    if(count /= "0000000000000000") then
     count <= count - '1';
    end if;
   end if;
  else count <= "0000000000000000";
  end if;  
  
   end process;

   stop <= '1' when count = "0000000000000000" else '0';


end Behavioral;

请帮我看看,谢谢!
我是工具也综合不了啊.想想看,如果ce和clk同时变的话,是 count <= datain;
还是 count <= count - '1';?
谢谢,我有点明白了!
专家回复:

敏感变量表里应该就只有一个时钟。你应该在时钟的时间下开始操作。 建议你做个仿真看看。 你的代码写的是有点问题的。
 
返回列表