define include path in .v file?

The favorite HDL language in North America

define include path in .v file?

Postby NogginBoink » Fri Sep 17, 2010 6:43 pm

I'm trying to write generic, non-vendor-specific Verilog code.

I'd like to build a library of building blocks and put them in an include folder, then include them in my top level .v file.

I'd like to be able to specify the include path in Verilog. Is this possible?

I've tried something like:
Code: Select all
`define _INCLUDE_PATH_ c:\somefolder
`include _INCLUDE_PATH_\mymodule.v

I've tried various permutations of quotation marks around the path to no avail.

Can I accomplish my goal in Verilog?
Posts: 2
Joined: Fri Sep 17, 2010 5:03 am

Postby Yassen » Thu Sep 23, 2010 1:28 pm

Try this one - for me it works quite well:
`include "yourfile.v"
Posts: 70
Joined: Thu Jun 08, 2006 6:46 pm

Return to Verilog HDL