modelsim 说:“靠近”)“:(vcom-1576) 期待标识符。” 编译时

use*_*001 2 hardware vhdl modelsim

我刚刚写了这个:

library ieee; 
use ieee.std_logic_1164.all; 

entity and_gate is
 port(
  input_1 : in std_logic; 
  input_2 : in std_logic;
  and_result  : out std_logic;
 );
end and_gate; 

architecture rtl of and_gate is
 signal and_gate : std_logic; 
 begin 
  and_gate <= input_1 and input_2; 
  and_result <= and_gate; 
 end rtl; 
Run Code Online (Sandbox Code Playgroud)

当我编译它时,modelsim编译器给我这个错误:

** Error: C:/modeltech64_10.5/examples/and_gate.vhd(8): near ")": (vcom-1576) expecting IDENTIFIER.
Run Code Online (Sandbox Code Playgroud)

我搜索并尝试了一些解决方案,但仍然出现错误。

Mat*_*lor 5

and_result  : out std_logic;
Run Code Online (Sandbox Code Playgroud)

应该是这个

and_result  : out std_logic
Run Code Online (Sandbox Code Playgroud)