Modelsim取消优化后报错# ** Error (suppressible): (vsim-12110) All optimizations are disabled because the -novopt option is in effect. This will cause your simulation to run very slowly. If you are using this switch to preserve visibility for Debug or PLI features, please see the User's Manual section on Preserving Object Visibility with vopt. -novopt option is now deprecated and will be removed in future releases.
![](https://img-blog.csdnimg.cn/img_convert/7aec8e216060e7e5126e6931491a54bb.png)
因此为了不报错,选择启用优化”Enable optimization”,但是直接选择优化是不会出来波形图的,点击红框内修改“优化选项”中的内容。
![](https://img-blog.csdnimg.cn/img_convert/84a44097f0858bd4e53a627bf6bd4233.png)
默认为“No design object visibility”,修改为“Apply full visibility to all modules(full debug mode)”后点击”OK“,自动跳转到下图界面。
![](https://img-blog.csdnimg.cn/img_convert/709c74c0049a446ccb3075867f0c8f7f.png)
![](https://img-blog.csdnimg.cn/img_convert/3e80f4eab7b0e13bcb22ce7cf81ba6c3.png)
然后右键点击例化函数“u_key_led”,选择“Add Wave”,由于Modelsim的特点,如果选择tb_key_led显示的变量是不完整的。
![](https://img-blog.csdnimg.cn/img_convert/fbddaf7237e5e1676de98d18f5ed6349.png)
然后点击“Run”,运行仿真函数。
![](https://img-blog.csdnimg.cn/img_convert/ed5877557178d1d0842456e9c24c2876.png)
最后点击“Zoom Full”,将波形全局显示。
![](https://img-blog.csdnimg.cn/img_convert/1d2f89baf3ede567bf10f86a2afced05.png)
出现上图波形,完美解决报错啦!