尝试在GHDL中指定VHDL标准时出错

时间:2017-08-04 21:39:44

标签: vhdl ghdl

GHDL的新功能。这是我的VHDL代码:

/*
Name: test.vhd
Description: Demonstrates basic design in VHDL code.
Date: 04. August 2017 AD
*/

--first part: libraries
library IEEE;
use IEEE.STD_LOGIC_1164.all;

--second part: entity declaration
entity myEntity is
    port(a, b, c: in STD_LOGIC; y: out STD_LOGIC);
end;

--third part: entity implementation
architecture aom of myEntity is
begin
    y <= not b and (c or a and b);
end;

尝试使用ghdl -s test.vhd进行编译时会出现此错误:test.vhd:1:1:error: block comment are not allowed before vhdl 2008

所以我试试这个:ghdl --std=08 -s test.vhd我得到了这个:ghdl:error: unknown command '--std=08', try --help

1 个答案:

答案 0 :(得分:0)

它应该以这种方式编译:{{1​​}}。 所以,ghdl -s --std=08 test.vhd标志应该先行。 所有积分都转到user1155120