如果重新定义宏,是否可以在Synopsys VCS编译器中生成警告或错误?
`define DATWIDTH_SZ `DAT_SZ
`define DATWIDTH_SZ 512
答案 0 :(得分:0)
适合我:
$ 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
更新:您是否使用+warn=none
停用了警告?