-
Notifications
You must be signed in to change notification settings - Fork 23
Home
Project file has two available formats chosen by extension: prj
and conf
.
Both are detailed below, but notice that the conf
version is deprecated, consider
using the prj
version.
This format is inspired by Xilinx ISE prj format though it's not compatible with it.
There are 2 sections: build info and sources definition
This section tells hdlcc
how to build the project. Format is pretty
straightforward:
- Set option values with
option = value
- Comments start with
#
and are ignored until the end of the line - Use relative paths should respect how the front end side handles the working dir
- Selection of
target_dir
with relative path takes in account the current working dir Paths with~
work as well.
# Flags passed to the compiler when building the entire project
# This happens when you open a VHDL file with the variable g:vimhdl_conf_file set
batch_build_flags = -explicit -permissive
# Flags passed to the compiler when building a single file.
# This is triggered when Syntastic checks the file (on :w for instance)
single_build_flags = -explicit -check_synthesis -lint -rangecheck
# Compiler selection
# Available compilers are 'msim' and 'xvhdl'
builder = msim
# Location of the built files
target_dir = .build
This section tells hdlcc
what to needs to be built. Each line defines the
language (only VHDL is currently supported), the library, the path to the file
(the same rules of target_dir
for relative paths are applied here) and some
optionally file specific build flags, divided by whitespaces, in this order.
# A source to be compiled in library 'basic_library' with no specific build flags
vhdl basic_library basic_library/package_with_functions.vhd
# A source to be compiled in library 'another_library' with flag '-93'
vhdl another_library another_library/foo.vhd -93
This format uses Python ConfigParser notation.
The are two types of sections, akin to prj
:
global info and library definition
See the prj format build info for details on the meaning of each parameter.
[global]
# Use relaxed flags when building the whole project
batch_build_flags = -explicit -permissive
# Use stricter flags for building the file we're working on
single_build_flags = -explicit -check_synthesis -lint -rangecheck
# Compiler selection
builder = msim
# Location of the built files
target_dir = .build
See the prj format sources definition for details on the meaning of each parameter.
Notice that on the conf
format you can't set build flags per individual file,
only per library.
# The library name in enclosed in square brackets
[basic_library]
# Build flags applied only to this library
build_flags = -93
# Source file list. A line with leading whitespaces is considered a continuation
# of the previous line
sources = basic_library/clock_divider.vhd
basic_library/package_with_constants.vhd
basic_library/package_with_functions.vhd
basic_library/very_common_pkg.vhd
[another_library]
build_flags = -93 -explicit
# Source file list with two files on the same line
sources = another_library/foo.vhd another_library/bar.vhd