兩個程序驅動相同型別的位訊號

以下 VHDL 模型從兩個不同的程序驅動訊號 s。由於 s 的型別是 bit,一個未解析的型別,這是不允許的。

-- File md.vhd
entity md is
end entity md;

architecture arc of md is

  signal s: bit;

begin

  p1: process
  begin
    s <= '0';
    wait;
  end process p1;

  p2: process
  begin
    s <= '0';
    wait;
  end process p2;

end architecture arc;

編譯,詳細說明和嘗試模擬,例如使用 GHDL,會引發錯誤:

ghdl -a md.vhd
ghdl -e md
./md
for signal: .md(arc).s
./md:error: several sources for unresolved signal
./md:error: error during elaboration

請注意,即使在我們的示例中,所有駕駛員都同意駕駛價值,也會引發錯誤。