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.

How to identify verilog compiler at compile-time?

Status
Not open for further replies.

echo47

Advanced Member level 6
Advanced Member level 6
Joined
Apr 7, 2002
Messages
3,933
Helped
638
Reputation
1,274
Reaction score
90
Trophy points
1,328
Location
USA
Activity points
33,176
`ifdef modelsim

Do Verilog compilers (ModelS!m, Synpl!fy Pro, and XST) provide any predefined values that can be tested at compile-time (perhaps by using `ifdef statements) to determine which compiler is being used?

C compilers usually provide a macro such as __MSVC__ or __GNUC__ that identifies the compiler, but I can't find anything like that in Verilog compilers.

As a workaround, I could probably set a value with a command line parameter, but I'd prefer to use a predefined value provided by the compiler.

Thanks.
 

Yes, you can do like this:

`ifdef MODELSIM
$Some_ModelSim_PLI();
`endif
 

That's what I thought too, but MODELSIM seems to be an undefined macro. Using SE 5.7g.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top