How do you do an incdir in Vivado

  • Thread starter General Schvantzkoph
  • Start date
G

General Schvantzkoph

Guest
How do you set up search paths in Vivado so that it will find `includes
files? XST supported incdir (in the form of the -vlgincdir switch). I
haven't found an incdir in the Vivado documentation, does anyone know what
the tcl command is for incdir?
 
On Thursday, August 23, 2012 10:01:07 PM UTC+2, General Schvantzkoph wrote:
How do you set up search paths in Vivado so that it will find `includes

files? XST supported incdir (in the form of the -vlgincdir switch). I

haven't found an incdir in the Vivado documentation, does anyone know what

the tcl command is for incdir?
Is it the 'add_files -scan_for_includes PATH' ?

In the TCL doc:
scan_for_includes: Scan and add any included files found in the fileset's RTL
sources
 
On Thu, 23 Aug 2012 20:01:07 +0000, General Schvantzkoph wrote:

How do you set up search paths in Vivado so that it will find `includes
files? XST supported incdir (in the form of the -vlgincdir switch). I
haven't found an incdir in the Vivado documentation, does anyone know
what the tcl command is for incdir?
I work around the problem by having my build script parse the project
file, identify all verilog files (we use mixed VHDL / Verilog for some
projects here), and for each verilog file, parse it, identify the include
files, and then copy the include files into the current directory of the
compiler.

This works with XST. I imagine it would work with just about any tool,
incuding Vivado.


Personally, I blame the original Verilog authors, who neglected to make
Verilog's `include work like C's #include.

Verilog: (AIUI) the LRM does not define how `include files are located,
and compilers will use locations relative to the cwd of the tool.

C: #include "file" will be relative to the location the file being
compiled.

Regards,
Allan
 
On Fri, 24 Aug 2012 00:22:59 -0700, jan wrote:

On Thursday, August 23, 2012 10:01:07 PM UTC+2, General Schvantzkoph
wrote:
How do you set up search paths in Vivado so that it will find `includes

files? XST supported incdir (in the form of the -vlgincdir switch). I

haven't found an incdir in the Vivado documentation, does anyone know
what

the tcl command is for incdir?

Is it the 'add_files -scan_for_includes PATH' ?

In the TCL doc:
scan_for_includes: Scan and add any included files found in the
fileset's RTL sources
I don't think that's it. The incdir command in Verilog sets up the search
path order. For example in an XST script,

-vlgincdir { "./in" "./v" "../v" "../../../../common/hdlmaker/v" }

The scan_for_includes looks like it tells Vivado to do something that it
should always do anyway which is read in the `includes.
 
Allan Herriman wrote:
On Thu, 23 Aug 2012 20:01:07 +0000, General Schvantzkoph wrote:

How do you set up search paths in Vivado so that it will find `includes
files? XST supported incdir (in the form of the -vlgincdir switch). I
haven't found an incdir in the Vivado documentation, does anyone know
what the tcl command is for incdir?

I work around the problem by having my build script parse the project
file, identify all verilog files (we use mixed VHDL / Verilog for some
projects here), and for each verilog file, parse it, identify the include
files, and then copy the include files into the current directory of the
compiler.

This works with XST. I imagine it would work with just about any tool,
incuding Vivado.


Personally, I blame the original Verilog authors, who neglected to make
Verilog's `include work like C's #include.

Verilog: (AIUI) the LRM does not define how `include files are located,
and compilers will use locations relative to the cwd of the tool.

C: #include "file" will be relative to the location the file being
compiled.

Regards,
Allan
When I use ISE, I generally have a project file structure where theres
a main folder, and under that I have a "synth" or "ise" folder
where the ISE project file resides, and where all the crap that ISE
leaves behind resides. My source is in a "source" or "src" folder,
cores are in a "cores" folder, etc. Then if I use `include, I use
a relative path like:

`include "../include/my_stuff.h"

And because of the structure, this relative path is the same whether
looking from the "synth" directory or the "source" directory. ISE
in fact looks in the directory where the project file (.xise) resides
but paths relative to that also work.

I haven't looked at how this works in Vivado, but it's probably similar.

-- Gabor
 
пятница, 24 августа 2012 г., 0:01:07 UTC+4 пользователь General Schvantzkoph написал:
How do you set up search paths in Vivado so that it will find `includes

files? XST supported incdir (in the form of the -vlgincdir switch). I

haven't found an incdir in the Vivado documentation, does anyone know what

the tcl command is for incdir?

I don't know how to do it as a TCL command, but know how to do it from Vivado GUI: you should press Project Settings, you will be at the General Settings group. At the bottom line "Language options" you should press "..." button from the right. Then press "..." button at the up-most line "Verilog options" and you will see the "Verilog include files search paths" field. That's it )
 

Welcome to EDABoard.com

Sponsor

Back
Top