Search code examples
verilogquartus

How to determine that synthesis is done in Quartus?


My design is done in Verilog and I need to select specific solution for synthesis in Altera Quartus II. I know that many tools have predefined macros, for example Icarus Verilog has built-in macro __ICARUS__. But I was unable to find such macro for Quartus. Is it a simple way to detect it?


Solution

  • Yes, Altera/Intel Quartus II Integrated Synthesis (QIS) has predefined macro that is used extensively by QIS in their demos and IPs. This macro is actually undocumented but it works in all known versions of Quartus II. Here is it:

    `ifdef ALTERA_RESERVED_QIS
      // The code that is used for Quartus Synthesis
    `else
      // The code that is used for other software
    `endif