VHDL新增功能,不支持未受影响的波形

时间:2012-08-01 19:52:29

标签: concurrency signals vhdl xilinx

我正在使用VHDL,但我的模拟器不支持以下示例代码中的未受影响的波形,我需要在开始作业分配之前运行该代码。我在线阅读我可以传递相同的波形Z,但我不知道如何做到这一点,以便我得到与未受影响的关键字相同的结果...如何重写它以产生相同的结果?

PS:我需要在作业的下一部分使用if-then-else语句重写它,我知道在这种情况下我可以使用下一个关键字。这是我需要在作业之前运行的教科书中的代码。

感谢您的帮助。

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;

编辑:如果我注释掉这一行,我能达到预期效果吗?

0 个答案:

没有答案
相关问题