verilogsynopsys-vcs

Synopsys VCS Warning for `define redefined


Is it possible to generate a warning or error in Synopsys VCS compiler if a `define macro is redefined?

 `define DATWIDTH_SZ  `DAT_SZ
 `define DATWIDTH_SZ  512

Solution

  • It works for me:

    $ cat tb.v
    `define DATWIDTH_SZ  `DAT_SZ
    `define DATWIDTH_SZ  512
    
    module tb;
    endmodule
    
    $ vcs tb.v
    
                             Chronologic VCS (TM)
              Version H-2013.06-SP1 -- Thu Feb  6 14:06:48 2014
                   Copyright (c) 1991-2013 by Synopsys Inc.
                             ALL RIGHTS RESERVED
    
    This program is proprietary and confidential information of Synopsys Inc.
    and may be used and disclosed only as authorized in a license agreement
    controlling such use and disclosure.
    
    Parsing design file 'tb.v'
    
    Warning-[TMR] Text macro redefined
    tb.v, 2
      Text macro (DATWIDTH_SZ) is redefined. The last definition will override 
      previous ones.
      In tb.v, 1, it was defined as `DAT_SZ
    

    Perhaps you disabled warnings using +warn=none. Refer to options in $VCS_HOME/doc/help_vcs.txt.