我遇到了VHDL的if
语法问题。 代码看起来如下:VHDL IF语句不起作用
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Shifting_zero is
port (clk : in STD_LOGIC;
zeros : buffer STD_LOGIC_VECTOR (3 downto 0));
end Shifting_zero;
architecture Behavioral of Shifting_zero is
begin
process
begin
if (clk'event and clk='1') then
if (zeros='0111') then
zeros <= '1011';
elsif (zeros='1011') then
zeros <= '1101';
elsif (zeros-'1101') then
zeros <= '1110';
else
zeros <= '0111';
end if;
end if;
end process;
end Behavioral;
我收到以下错误:
线15解析错误,意想不到PROCESS
线18解析错误,意想不到的TICK
第20行。解析错误,意外TICK
第23行。解析错误,意外TICK
线26解析错误,意外的结束,SEMICOLON
期待12号线的敏感性列表和进程(警告)没有等待
我是新来的VHDL和很困惑由那些错误。
注意字符文字'’之间的差A''一个字串'” AAAA“'。 –
你张贴的正确的代码呢?因为行号不匹配,即使我们忽略这一点,在'process'行中也没有错误,也没有意外的'END'。 –