我在用 ModelSim 编译这个 VHDL 代码时遇到这个错误:
** Error: testVHDL_5.vhd(14): Cannot read output "z".
# VHDL 2008 allows reading outputs.
# This facility is enabled by compiling with -2008.
VHDL代码:
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity gate_1 is
port(
a, b, c : in std_logic;
x, z : out std_logic
);
end gate_1;
architecture arch1 of gate_1 is
begin -- rt1
z <= b or c;
x <= a and b and z;
end arch1;
testVHDL_5 是我的文件名。我知道问题是z不能在x中使用。有人可以解释原因并提出解决方案。谢谢。