Author Topic: verilog conditional compilation with several flags in condition  (Read 3089 times)

0 Members and 1 Guest are viewing this topic.

Offline radiolistenerTopic starter

  • Super Contributor
  • ***
  • Posts: 4054
  • Country: ua
I want to use several flags in condition for conditional compilation directive, something like this:
Code: [Select]
`ifdef FLAG1 or FLAG2
// stuff1
`else
// stuff2
`endif

but it seems that `ifdef doesn't support several flags and I don't want to duplicate code for several directives. So, what is the best way to write such condition in verilog?
 

Online Someone

  • Super Contributor
  • ***
  • Posts: 4991
  • Country: au
    • send complaints here
Re: verilog conditional compilation with several flags in condition
« Reply #1 on: May 30, 2022, 10:32:01 am »
its a define, one of the few situations where Veirlog has some form of typing:

https://verificationacademy.com/forums/systemverilog/oring-ifdef
 
The following users thanked this post: radiolistener


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf