【问题标题】:modelsim says : "near ")": (vcom-1576) expecting IDENTIFIER." while compilingmodelsim 说:“附近”)“:(vcom-1576)期待标识符。”在编译时
【发布时间】:2017-09-30 08:49:10
【问题描述】:

我刚刚写了这个:

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; 

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

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

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

【问题讨论】:

  • @downvoters:来吧,这是一个编程问题,对于初学者来说答案并不明显。为什么要投反对票??

标签: vhdl hardware modelsim


【解决方案1】:

这个

and_result  : out std_logic;

应该是这样的

and_result  : out std_logic

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多