2017-08-04 4 views
0

GHDLで新しくなりました。これは私のVHDLコードです:ghdl -s test.vhdでこれをコンパイルしようとすると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; 

は私に、このエラーを与える: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

コマンド(-s)を先に入力します。 [GHDLの呼び出し - GHDL 2017-03-01のドキュメント](https://ghdl.readthedocs.io/en/latest/Invoking_GHDL.html) – user1155120

+0

はい、そうです。 – Vuk

+0

** myentity.vhdl:19:28:エラー:論理演算子の1つのタイプだけを使用してリレーションを結合することができます** 'y <= not bと(c or a)およびb;'参照IEEE Std 1076-2008 9.表現、9.1一般。 BNFは、relation-shift_expression-simple_expression-term-factor - 異なる論理演算子を含む主要な生産拡張の括弧の構文要件を定義します。 – user1155120

答えて

0

このようにコンパイルする必要があります。ghdl -s --std=08 test.vhd。 したがって、最初に-sフラグを付ける必要があります。 すべてのクレジットはuser1155120になります。

関連する問題