尝试在 GHDL 中指定 VHDL 标准时出错
Error when trying to specify VHDL standard in 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
.
应该这样编译:ghdl -s --std=08 test.vhd
。
所以,-s
标志应该放在第一位。
所有学分归于 user1155120.
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
.
应该这样编译:ghdl -s --std=08 test.vhd
。
所以,-s
标志应该放在第一位。
所有学分归于 user1155120.