The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines. Apr 24th, 2017, 3:52pm
  HomeHelpSearchLoginRegisterPM to admin  
 
Pages: 1
Send Topic Print
creating compile time define switch in .scs file (Read 67 times)
AMS_ei
Community Member
***
Offline



Posts: 48

creating compile time define switch in .scs file
Apr 17th, 2017, 11:50pm
 
Hi,

I am planning to have a switch in order to have control in specific netlist or in .scs file.

Is there any way to apply a compile time define switch in .scs file? (something like `ifdef in system verilog/verilog ams)?

Thank you.

Kind regards
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1568
Bracknell, UK
Re: creating compile time define switch in .scs file
Reply #1 - Apr 21st, 2017, 1:32pm
 
Yes. Use the cpp (C pre-processor) directives #ifdef, #ifndef etc, and then run "spectre -Dvar" or "spectre -Dvar=val" to define them on the command line. You can also just run "spectre -E" to invoke with the C preprocessor first, which happens if you pass -D too.  More on cpp can be found in "man cpp".

Andrew
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Trouble viewing this site? Copyright © 2002-2014 Designer's Guide Consulting. 'Designer's Guide' is a registered trademark of Designer's Guide LLC. All rights reserved.
Give back to the Designer's Guide Community by shopping at Amazon. Purchasing products through this link helps to fund our activities and does not increase your cost.

Our colleges are not as safe as they seem. Sexual assault is pervasive and the treatment of the victim by the adminstration is often as damaging as the assault: Campus Survivors, Campus Survivors Forum.