2

New with GHDL. This is my VHDL code:

/*
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;

Trying to compile this with ghdl -s test.vhd gives me this error: test.vhd:1:1:error: block comment are not allowed before vhdl 2008.

So I try this: ghdl --std=08 -s test.vhd and I get this: ghdl:error: unknown command '--std=08', try --help.

3
  • 1
    command (-s) first. Invoking GHDL — GHDL 2017-03-01 documentation Commented Aug 4, 2017 at 21:52
  • Yes, you are right. Commented Aug 4, 2017 at 21:55
  • myentity.vhdl:19:28:error: only one type of logical operators may be used to combine relation Use y <= not b and (c or a) and b; See IEEE Std 1076-2008 9. Expressions, 9.1 General. The BNF defines the syntax requirement for the parentheses in a relation - shift_expression - simple_expression - term - factor - primary production expansion involving different logical operators. Commented Aug 6, 2017 at 15:14

1 Answer 1

1

It should be compiled this way: ghdl -s --std=08 test.vhd. So, -s flag should go first. All credits go to user1155120.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.