减少modelsim仿真warning数量

本文介绍了在使用Modelsim进行仿真过程中如何有效抑制过多警告信息的方法。提供了三种实用方案:编辑Modelsim初始化文件、利用TCL变量设置以及通过GUI菜单操作来关闭特定警告。此外,还介绍了如何通过修改modelsim.ini文件中的suppress参数来过滤指定警告编号。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在用 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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值