ERROR:Xst:827 - file_name Line xx: Signal xx cannot be synthesized, bad
synchronous description.
'event错误
'event参数必须放在process的最顶层if语句中,而且在一个process中不应该存在嵌入式的'event语句
process (clk, reset) is begin
if clk'event and clk = '1' then -- topmost if statement
if reset = '1' then -- synchronous reset同步复位
q <= '0';
else
q <= d;
end if;
end if;
end process;
process (clk, reset) is begin
if reset = '1' then -- asynchronous reset异步复位
q <= '0'; -- you can have embedded if statements if you need to
elsif clk'event and clk = '1' then -- still the topmost if statement
q <= d; -- you can put your case statements here or
end if; -- embed more if statements but not
end process; -- any more 'event statements