减少modelsim仿真warning数量

来源:互联网 发布:软件测试策略是什么 编辑:程序博客网 时间:2024/04/30 15:45
在用 modelsim仿真时Warning太多,自己打印出来的仿真结果都没办看了,而且这些warning是可以忽略,网上查了查,这么解决:


solution 1 - editing MODELSIM initialisation file
----------
go to Modelsim installation, then you should find "modelsim.ini" under the
path . First, to edit this file, you need to make it write enable; turn remove the READ-only protection.

; Turn off warnings from the std_logic_arith, std_logic_unsigned
; and std_logic_signed packages.
StdArithNoWarnings = 1 [removing the semicolon]; Turn off warnings from the IEEE numeric_std and numeric_bit packages.
NumericStdNoWarnings = 1 [removing the semicolon]

Save the file and make it READ-only.


solution 2- using ModelSIM TCL variable
----------
Assuming that you are working the batch/TCL command driven in the GUI mode, after you execute the "vsim" command

type: (this is TCL command)

set StdArithNoWarnings 1
set NumericStdNoWarnings 1

then, type
run -all (or similar)

solution 3- using ModelSIM GUI menu
----------
Assuming that you are working the GUI interactive, after you execute the "vsim" command

halt the simulation using break command

Go to ModelSIM menu, click on Simulate -> SIMULATION options ->

Check on
StdArithNoWarnings Disable
NumericStdNoWarnings Disable

Continue to run your simulation

then, type
run -all (or similar) 


--------
还有一种方法是改modelsim.ini里的suspress参数,加上需要过滤的warning号,像这样
[msg_system]
; Change a message severity or suppress a message.
; The format is: = [,...]
; Examples:
;   note = 3009
;   warning = 3033
;   error = 3010,3016
;   fatal = 3016,3033
   suppress = 3009,3016,3043,8233,3017,3022
; The command verror can be used to get the complete
; description of a message.
这些都是从文档里知道的,其实最后的方法是把warning信息定位到一个文件中,想看什么就看什么,想怎么处理就怎么处理。

ref:
http://www.edaboard.com/ftopic80664.html
http://www.ht-lab.com/howto/modelsim/Modelsim_tips.html