|
VHDL Simili Documentation:
Compiler (vhdlp):
The vhdlp compiler performs the task of library creation as
well as compilation. A few VHDL tools perform these two tasks using separate commands.
The rest of this page contains three
sections -- some background information about VHDL
compilers, how to compile VHDL with vhdlp,
and the various options available with vhdlp.
For any VHDL model to be simulated, the first step is to compile the model.
In VHDL, a given VHDL model file does not have to be self-contained -- it may
contain external references. Examples of external references include things such
as library names, package names, etc. It is very important that all external
references be available when a VHDL file is being compiled -- there are some
exceptions but, this is the general rule. This same rule (define before use)
also applies to items within a given VHDL file.
The vhdlp program performs the task of library management as
well as compilation. The vhdlp program is a batch (command-line)
program. The vhdlp program offers several options. You can get a
synopsis of all the options by typing vhdlp without any arguments
(or with the -h option). The following is the syntax for vhdlp:
vhdlp [options] file1 [file2 file3
... fileN]
You can compile one or more files at a time using vhdlp. As
mentioned above, unless the files are unrelated to each other, the order of
compilation is important. The following demonstrates a typical usage of the
compiler:
vhdlp myfile.vhd
The following options are listed in the order or their relative importance.
-work library-name
You can use this option to override the default library (work). Using this
option, you can set the logical library name "work" to some other
library name. For example:
vhdlp -work mylib
myfile.vhd
The above command will compile the contents of myfile.vhd into the library
mylib. The compiler will also create the library if it does not already exist
(see Introduction).
-ini
initialization-file-name
You can use this option to override the default
INI file name used to setup library associations. When this option is
not specified, a search is done to find the file "symphony.ini"
in the current working directory first and then in the installation
directory. You can use this option to specify any file to be read as an
INI file (as long as the file has the expected format). See Introduction
for more information on the INI file. Hint: You can use the Sonata
project file (.sws file) as an INI file since it uses the same format as
the INI file. It is an error if this option is specified but file could
not be opened for reading.
-s
You can use this option to compile in silent mode. In the silent mode, very
few informative messages appear as output. The compiler only issues messages
about warnings, errors, etc.
-x
This option is intended for advanced users and is more than likely not
required for most users. This option enables strict conformance to the VHDL93
standard with regards to overload resolution. More precisely, when you
use the -x
option, an explicit subprogram declaration cannot hide an
implicit subprogram declaration if those declarations appear in
different declarative regions.
VHDL allows users to have user defined types as well as overloaded
operations. However, according to the VHDL rules, when a type is defined, a
set of default operations (such as "+", "=", etc.) of such
a type are also defined. The language also allows overriding such default
overloading-definitions within the same region (the region where the type is
defined). However, if such operators are overloaded in other packages, you
might run into problems with overload resolution when you use this
operator. For example, if a type "MYTYPE" is defined in package
"SOMEPACKAGE", and if you overload a default operation in another
package (or region), you might run into problems with overload resolution when
you use this operator. However, this is precisely what some popular
packages do and strict conformance with the VHDL 93 standard may cause
either those packages or your VHDL files referring to those packages to
fail to compile.
By default, vhdlp gives higher precedence to an explicit
override of a pre-defined operator regardless of where the over-riding
occurred. Use this option to disable this feature.
In certain obscure cases, it is
possible that default behavior may cause certain certain VHDL files to
not compile. The ModelSim std_developerskit library is an example of
this behavior. In such cases, you will have to use the -x
option (or -strict
option) to use the stricter rules of VHDL operator overloading.
-87
VHDL Simili is primarily a VHDL 93
compiler. This option enables certain amount of compatibility with VHDL
87. It is highly recommended that you do not use VHDL'87 constructs and
instead change your source code to comply with VHDL 93 standard. Where
this is not possible, this option may be of some help. It currently does
the following:
- This option allows VHDL'87 style FILE
declarations in addition to the VHDL'93 style FILE declarations. Use of
this option is not recommended since the semantics of FILE types are
much better dealt with in the VHDL'93 specification. We recommend that
you change your existing designs if possible instead of using this
option. Please note that this option does not compensate for other (non
FILE related) incompatibilities between VHDL'93 and VHDL'87. VHDL Simili
follows the VHDL'93 specification. Also note that this option merely
enables the VHDL'87 FILE compatibility mode which does not mean that the
compiler checks for FULL VHDL'87 compliance.
- Bit-string literals are treated strictly
as bit_vector types. In VHDL'93, Bit-string literals (for example
b"101", x"fe") are treated as ordinary strings
that can match any compatible array type (for example
std_logic_vector).
-h
This option provides a short synopsis of the various options provided by
the compiler.
-strict
This option forces the compiler into
strict VHDL compliance. Currently, this option simply implies -x
(see above).
-maxerrors number
By default, the compiler stops after
having encountered 10 errors. This option allows you to control this
threshold. Setting this value to zero implies inifinite limit.
The exit code is 0 if there were no errors and
non-zero otherwise. This might be helpful for scripts/makefiles checking for a
successful run.
Go to next chapter
|