簡體   English   中英

VHDL IF語句不起作用

[英]VHDL IF statement does not work

我對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行。解析錯誤,意外的過程

第18行,解析錯誤,意外的TICK

第20行,解析錯誤,意外的TICK

第23行。解析錯誤,出現意外的TICK

第26行。解析錯誤,意外結束,期望使用SEMICOLON

第12行,沒有敏感度列表,也沒有等待過程(警告)

我是VHDL的新手,並對這些錯誤感到困惑。

好的,我找到了。

我必須在信號中使用“而不是”。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM