Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem with `include in verilog

Status
Not open for further replies.

krishanu007

Member level 2
Joined
Apr 8, 2010
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Bangalore,India
Activity points
1,594
Hi all,
I am trying some to take out some `defines from a main.v file and put them in a seperate delay.v file.

Now there are 2 ways of doing this,
  1. if I dont `include that in main.v file,and give delay.v in filelist.f of compilation.
  2. If I include that file then I can not/ should not give that in filelist.f for compilation.
Now I I want to do it in the 1st way which is giving problem that definition not found..
please help !!
 

This should have worked in Verilog, but in SystemVerilog, definitions from `defines in one file don't necessarily carry over to the next file, depending on which tools you are using.
2nd way is preferred and you should write your delay.v file like this

Code:
`ifndef DELAY_V
`define DELAY_V

// body of delay file

`endif
That way your defines only happen if they have not been defined already.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top