我正在用 VHDL 制作状态机。我的案例在错误时引发了意外
case state IS
--state 1 A
WHEN s0=>
--Half step
if(FULL = '0' AND RIGHT = '1') then
state <= s1;
else if (RIGHT = '0') then
state <= s7;
end if;
--Full step
if (FULL = '1' AND RIGHT = '1') then
state <= s2;
else if (RIGHT = '0') then
state <= s6;
end if;
--State 2 A&B
WHEN s1=>
if(RIGHT = '0') then
state <= s0;
else if (RIGHT = '1') then
state <= s2;
end if;
但是,当使用 xilinx ISE 运行语法检查时,我会收到一个
ERROR:HDLParsers:164 Line 72. parse error, unexpected WHEN, expecting END
这种情况总共发生了 8 次。我究竟做错了什么?