【发布时间】:2017-01-05 18:21:22
【问题描述】:
entity timer is
Port ( click : in STD_LOGIC;
clear : out STD_LOGIC;
t_unlock : out STD_LOGIC);
end timer;
architecture Behavioral of timer is
signal temp2 : integer range 0 to 20 := 0;
begin
process
begin
if rising_edge(click) then
temp2<=0;
clear<='0';
t_unlock<='0';
else
temp2<=temp2+1 after 15 ns;
end if;
if temp2=6 then
clear<='1';
elsif temp2=20 then
t_unlock<='1';
end if;
end process;
end Behavioral;
我写了这段代码。编译器说:
Signal temp2 cannot be synthesized, bad synchronous description. The description style you are using to describe a synchronous element (register, memory, etc.) is not supported in the current software release.
我在stackoverflow上搜索过。他们说The error 'bad synchronous description' usually means that you have described a register (clocked element) that does not exist in the hardware.但我不知道如何解决我的问题。
【问题讨论】:
-
将信号 click & temp2 添加到敏感列表中,并在 15 ns 后删除
。你用什么合成的?
标签: vhdl