Home > Community > Forums > Custom IC Design > how to set `ifdef switch`

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 how to set `ifdef switch` 

Last post Tue, Apr 2 2013 10:46 PM by Arslan. 2 replies.
Started by Arslan 28 Mar 2013 02:30 AM. Topic has 2 replies and 647 views
Page 1 of 1 (3 items)
Sort Posts:
  • Thu, Mar 28 2013 2:30 AM

    • Arslan
    • Top 500 Contributor
    • Joined on Mon, Dec 10 2012
    • Posts 36
    • Points 510
    how to set `ifdef switch` Reply

    Hi, I have a standard cell library in .v format. It contains different set of modules each defined under `ifdef. How can I import a specific set using verilogIn.? where can I set the value used for `ifdef?

    • Post Points: 20
  • Fri, Mar 29 2013 8:13 AM

    Re: how to set `ifdef switch` Reply

     Not sure if there's a better way (and I've not checked that even this will work), but one way could be to create a file, defines.v with:

    `define THIS that
    `define OTHER whatever

    i.e. `define the things you want found by the `ifdef. Then specify this file first in the list of Verilog files to import.

    I'd be interested to know if it works (I don't have time to try it myself).

    Regards,

    Andrew.

    • Post Points: 20
  • Tue, Apr 2 2013 10:46 PM

    • Arslan
    • Top 500 Contributor
    • Joined on Mon, Dec 10 2012
    • Posts 36
    • Points 510
    Re: how to set `ifdef switch` Reply

     Thanks Andrew, it works.

    -Arslan

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by Arslan at 28 Mar 2013 02:30 AM. Topic has 2 replies.