If define.v
is not within the current directory you need to instruct Modelsim to use the directory containing define.v
when searching for files which are included.
The option to do this is +incdir+path
.
So, for example, if you have the following file structure:
project/src/alu.v
project/include/define.v
And you run from project
, then you need to include +incdir+include
as an argument to Modelsim.
As a side note, if you are including the same file more than once, you should use "include guards" to avoid warnings about macros being redefined.
`ifndef DEFINE_V
`define DEFINE_V
`define RSIZE 4
`define ISIZE 16
....
`endif