我正在使用VHDL,但我的模擬器不支持以下示例代碼中的未受影響的波形,我需要在開始作業分配之前運行該代碼。我在線閱讀,我可以通過相同的波形Z,但我不知道如何做到這一點,以便我可以得到與未受影響的關鍵字相同的結果......它如何被重寫,以便產生相同的結果?VHDL新手,不支持不受影響的波形
PS:我需要在作業的下一部分使用if-then-else語句重寫它,並且我知道在這種情況下我可以使用next關鍵字。這是我在作業之前需要運行的一本教科書的代碼。
感謝您的幫助。
library IEEE;
use IEEE.std_logic_1164.all;
entity pr_encoder is
port ( S0, S1,S2,S3: in std_logic;
Z : out std_logic_vector (1 downto 0));
end entity pr_encoder;
architecture behavioral of pr_encoder is
begin
Z <= "00" after 5 ns when S0 = '1' else
"01" after 5 ns when S1 = '1' else
unaffected when S2 = '1' else
"11" after 5 ns when S3 = '1' else
"00" after 5 ns;
end architecture behavioral;
編輯:如果我註釋掉行了,我會實現我想要的結果?