我的博客:QuartusII Modelsim使用教程 | Infinite journey (infinite-zh.com)
QuartusII中Modelsim是一个很好的仿真软件,相较于VWF,它的仿真时间更长、显示更具体、界面更友好,另外Modelsim还可以结合TestBench来进行仿真,省去了自己设置信号的过程。本文将从以下几个方面来介绍Modelsim的使用:
- 1、Modelsim联合TestBench进行仿真;
- 2、Modelsim仿真的几个小窍门;
- 3、Modelsim软件的bug
1、Modelsim联合TestBench进行仿真
我一开始的时候对TestBench很不习惯,因为一搜TestBench就有各样的语法,让人头大,但后来在我写了一两个之后,我就不禁发出感叹“我是**”,TestBench免去了我打开modelsim之后,手动配置输入信号、时钟等,大大提高了我的仿真效率。
在Verilog代码写好编译好之后,可以通过Processing->Start->Start Test Bench Template Writer来自动生成一个TestBench模板。我们可以看到他是长这个样子的
// Copyright (C) 2017 Intel Corporation. All rights reserved.
// Your use of Intel Corporation's design tools, logic functions
// and other software and tools, and its AMPP partner logic
// functions, and any output files from any of the foregoing
// (including device programming or simulation files), and any
// associated documentation or information are expressly subject
// to the terms and conditions of the Intel Program License
// Subscription Agreement, the Intel Quartus Prime License Agreement,
// the Intel FPGA IP License Agreement, or other applicable license
// agreement, including, without limitation, that your use is for
// the sole purpose of programming logic devices manufactured by
// Intel and sold by Intel or its authorized distributors. Please
// refer to the applicable ag