Next: , Previous: GHDL implementation of VHDL, Up: GHDL implementation of VHDL


5.1 VHDL standards

This is very unfortunate, but there are many versions of the VHDL language.

The VHDL language was first standardized in 1987 by IEEE as IEEE 1076-1987, and is commonly referred as VHDL-87. This is certainly the most important version, since most of the VHDL tools are still based on this standard.

Various problems of this first standard have been analyzed by experts groups to give reasonable ways of interpreting the unclear portions of the standard.

VHDL was revised in 1993 by IEEE as IEEE 1076-1993. This revision is still well-known.

Unfortunately, VHDL-93 is not fully compatible with VHDL-87, i.e. some perfectly valid VHDL-87 programs are invalid VHDL-93 programs. Here are some of the reasons:

Shared variables were replaced by protected types in the 2000 revision of the VHDL standard. This modification is also known as 1076a. Note that this standard is not fully backward compatible with VHDL-93, since the type of a shared variable must now be a protected type (there was no such restriction before).

Minors corrections were added by the 2002 revision of the VHDL standard. This revision is not fully backward compatible with VHDL-00 since, for example, the value of the 'instance_name attribute has slightly changed.

You can select the VHDL standard expected by GHDL with the ‘--std=VER’ option, where VER is one of the left column of the table below:

87
Select VHDL-87 standard as defined by IEEE 1076-1987. LRM bugs corrected by later revisions are taken into account.
93
Select VHDL-93; VHDL-87 file declarations are not accepted.
93c
Select VHDL-93 standard with relaxed rules:
00
Select VHDL-2000 standard, which adds protected types.
02
Select VHDL-2002 standard (partially implemented).

You cannot mix VHDL-87 and VHDL-93 units. A design hierarchy must have been completely analyzed using either the 87 or the 93 version of the VHDL standard.