`define and +define difference

Status
Not open for further replies.

mr_vasanth

Member level 5
Joined
Mar 12, 2007
Messages
86
Helped
5
Reputation
10
Reaction score
7
Trophy points
1,288
Location
Bangalore, India, India
Visit site
Activity points
1,906
Verilog has macro `define as well as provides option to pass +define during compilation.

When to use `define and when to use +define ?
Is there any guideline available ?
 

+define allows you to change a define during compilation.

Suppose you have a long timeout in your code and you place an `ifdef SIMULATION around it. You can use +define+SIMULATION to force the code to use the simulation value instead of the synthesis value.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…