Discussion:
Error in `include statement
(too old to reply)
priya
2005-06-28 04:29:15 UTC
Permalink
Hi all,


Top verilog code is in Top.v file.
I include decoder.v file in top module


`include "C:\iverilog\decoder.v"

module top;
------------
-------
---------
endmodule



I got the following error while compiling top .v

top.v:1: Include file C:/iverilog/decoder.v not found
No top level modules, and no -s option.



I am using Icarus simulator...


how to include a verilog file into another verilog file..


Regards,
priya
Neo
2005-06-28 06:07:01 UTC
Permalink
use the -s option to specify the top module and also use the
-I<include_dir> option to specify the directory to search for when
compiling modules.
Andy Peters
2005-06-28 21:46:57 UTC
Permalink
Post by priya
Hi all,
Top verilog code is in Top.v file.
I include decoder.v file in top module
`include "C:\iverilog\decoder.v"
module top;
------------
-------
---------
endmodule
I got the following error while compiling top .v
top.v:1: Include file C:/iverilog/decoder.v not found
No top level modules, and no -s option.
I am using Icarus simulator...
how to include a verilog file into another verilog file..
Well, if the file to be included contains a module, then the answer is
quite simple: YOU DON'T. You wouldn't include a C source file into
another C source, now, would you?

I haven't looked at iverilog in quite a while, but if it's to be
remotely useful, it should support multiple source files, each
containing a module, and it will have a mechanism to put it all
together for simulation.

-a

Loading...