Vivado与Modelsim联合仿真

笔者在学习FPGA过程中遇到了如何使用Vivado和Modelsim进行联合仿真的问题,特此记录。

确定版本

笔者Vivado用的是2018.3版本,先是随便下了个Modelsim10.1c的版本,到编译库文件时报错了,后来发现是俩款软件的版本不匹配。所以大家在进行联合仿真之前先核对两个软件的版本是否对应,不用到最后再卸载重装。

Vivado Design Suite 2018.3

Mentor Graphics ModelSim SE/DE/PE (10.6c)
Mentor Graphics Questa Advanced Simulator (10.6c)
Cadence Incisive Enterprise Simulator (IES) (15.20.053)
Cadence Xcelium Parallel Simulator (18.03.005)
Synopsys VCS and VCS MX (N-2017.12-SP2)
Aldec Active-HDL (10.5) Aldec Riviera-PRO (2018.02)

Vivado Design Suite 2018.2

Mentor Graphics ModelSim SE/DE/PE (10.6c)
Mentor Graphics Questa Advanced Simulator (10.6c)
Cadence Incisive Enterprise Simulator (IES) (15.20.042)
Cadence Xcelium Parallel Simulator (17.10.005)
Synopsys VCS and VCS MX (N-2017.12)
Aldec Active-HDL (10.4a) Aldec Riviera-PRO (2017.10)

Vivado Design Suite 2018.1

Mentor Graphics ModelSim SE/DE/PE (10.6c)
Mentor Graphics Questa Advanced Simulator (10.6c)
Cadence Incisive Enterprise Simulator (IES) (15.20.042)
Cadence Xcelium Parallel Simulator (17.10.005)
Synopsys VCS and VCS MX (N-2017.12)
Aldec Active-HDL (10.4a) Aldec Riviera-PRO (2017.10)

Vivado Design Suite 2017.4

Mentor Graphics ModelSim SE/DE/PE (10.6b)
Mentor Graphics Questa Advanced Simulator (10.6b)
Cadence Incisive Enterprise Simulator (IES) (15.20.028)
Synopsys VCS and VCS MX (M-2017.03-SP1)
Aldec Active-HDL (10.4a) Aldec Riviera-PRO (2017.02)

Vivado Design Suite 2017.3

Mentor Graphics ModelSim SE/DE/PE (10.6b)
Mentor Graphics Questa Advanced Simulator (10.6b)
Cadence Incisive Enterprise Simulator (IES) (15.20.028)
Synopsys VCS and VCS MX (M-2017.03-SP1)
Aldec Active-HDL (10.4a) Aldec Riviera-PRO (2017.02)

Vivado Design Suite 2017.2

Mentor Graphics ModelSim SE/DE/PE (10.5c)
Mentor Graphics Questa Advanced Simulator (10.5c)
Cadence Incisive Enterprise Simulator (IES) (15.20.014)
Synopsys VCS and VCS MX (L-2016.06-SP1)
Aldec Active-HDL (10.4) Aldec Riviera-PRO (2016.10)

Vivado Design Suite 2017.1

Mentor Graphics ModelSim SE/DE/PE (10.5c)
Mentor Graphics Questa Advanced Simulator (10.5c)
Cadence Incisive Enterprise Simulator (IES) (15.20.014)
Synopsys VCS and VCS MX (L-2016.06-SP1)
Aldec Active-HDL (10.4) Aldec Riviera-PRO (2016.10)

Vivado Design Suite 2016.4

Mentor Graphics ModelSim SE/DE/PE (10.5c)
Mentor Graphics Questa Advanced Simulator (10.5c)
Cadence Incisive Enterprise Simulator (IES) (15.20.005)
Synopsys VCS and VCS MX (L-2016.06)
Aldec Active-HDL (10.3) Aldec Riviera-PRO (2016.06)

Vivado Design Suite 2016.3

Mentor Graphics ModelSim SE/DE/PE (10.5c)
Mentor Graphics Questa Advanced Simulator (10.5c)
Cadence Incisive Enterprise Simulator (IES) (15.20.005)
Synopsys VCS and VCS MX (L-2016.06)
Aldec Active-HDL (10.3) Aldec Riviera-PRO (2016.06)

Vivado Design Suite 2016.2, 2016.1

Mentor Graphics ModelSim SE/DE/PE (10.4d)
Mentor Graphics Questa Advanced Simulator (10.4d)
Cadence Incisive Enterprise Simulator (IES) (15.10.013)
Synopsys VCS and VCS MX (K-2015.09)
Aldec Active-HDL (10.3) Aldec Riviera-PRO (2015.10)

Vivado Design Suite 2015.4, 2015.3

Mentor Graphics ModelSim SE/DE/PE (10.4b)
Mentor Graphics Questa Advanced Simulator (10.4b)
Cadence Incisive Enterprise Simulator (IES) (14.20.006)
Synopsys VCS and VCS MX (J-2014.12-SP2)
Aldec Active-HDL (10.2 SP2) Aldec Riviera-PRO (2015.06)

Vivado Design Suite 2015.2, 2015.1

Mentor Graphics ModelSim SE/DE/PE (10.3d)
Mentor Graphics Questa Advanced Simulator (10.3d)
Cadence Incisive Enterprise Simulator (IES) (14.10.011)
Synopsys VCS and VCS MX (I-2014.03-SP1)
Aldec Active-HDL (10.1 SP1) Aldec Riviera-PRO (2015.02)

Vivado Design Suite 2014.4

Mentor Graphics ModelSim SE/DE/PE (10.3b)
Mentor Graphics Questa Advanced Simulator (10.3b)
Cadence Incisive Enterprise Simulator (IES) (13.20.005)
Synopsys VCS and VCS MX (I-2014.03)
Aldec Active-HDL (9.3 SP1) Aldec Riviera-PRO (2014.02)

Vivado Design Suite 2014.3

Mentor Graphics ModelSim SE/DE/PE (10.3b)
Mentor Graphics Questa Advanced Simulator (10.3b)
Cadence Incisive Enterprise Simulator (IES) (13.20.005)
Synopsys VCS and VCS MX (I-2014.03)
Aldec Active-HDL (9.2 SP1) Aldec Riviera-PRO (2014.02)

Vivado Design Suite 2014.2, 2014.1

Mentor Graphics ModelSim SE/DE/PE (10.2a)
Mentor Graphics Questa Advanced Simulator (10.2a)
Cadence Incisive Enterprise Simulator (IES) (12.2-016)
Synopsys VCS and VCS MX (H-2013.06-SP1)
Aldec Active-HDL (9.3 SP1) Aldec Riviera-PRO (2014.02)

Vivado Design Suite 2013.4

Mentor Graphics ModelSim SE/DE/PE (10.2a)
Mentor Graphics Questa Advanced Simulator (10.2a)
Cadence Incisive Enterprise Simulator (IES) (12.2-016)
Synopsys VCS and VCS MX (H-2013.06)
Aldec Active-HDL (9.2 SP1) Aldec Riviera-PRO (2013.06)

Vivado Design Suite 2013.3

Mentor Graphics ModelSim SE/DE/PE (10.2a)
Mentor Graphics Questa Advanced Simulator (10.2a)
Cadence Incisive Enterprise Simulator (IES) (12.2-016)
Synopsys VCS and VCS MX (H-2013.06-3)
Aldec Active-HDL (9.2) Aldec Riviera-PRO (2013.02)

Vivado Design Suite 2013.1, 2013.2

Mentor Graphics ModelSim SE/DE/PE (10.1b)
Mentor Graphics Questa Advanced Simulator (10.1b)
Cadence Incisive Enterprise Simulator (IES) (12.2)
Synopsys VCS and VCS MX (G-2012.09)
Aldec Active-HDL (9.2) Aldec Riviera-PRO (2012.10)

reference

笔者用的是Vivado2018.3,查询的对应的Modelsim版本为10.6c。


Modelsim破解

准备Modelsim10.6c的安装包

下载链接

步骤如下:

(1)、安装软件,注意安装路径中不要出现中文或空格,安装过程中一直点击YES即可。

1

(2)、把crack.batMentorKG.exe一起拷贝到modelsim安装目录的win64文件夹下,例如D:\modelsim_dlx64_10.6c\win64pe

(3)、双击crack.bat,若出现下图所示问题,则将mgls64.dll重命名为mgls.dll再次重新运行crack.bat即可。

2

(4)、将生成的LICENSE.TXT放在modelsim的安装路径下,如D:\modelsim_dlx64_10.6c,若前面修改了mgls64.dll文件的名称,则生成完LICENSE文件后应当把名字改回去。

(5)、新建环境变量MGLS_LICENSE_FILE,变量值为LICENSE放置的路径,如D:\modelsim_dlx64_10.6c\LICENSE.TXT。在win10中,右键此电脑->属性->高级系统设置->环境变量,进行环境变量的添加。

3

4

(6)、打开Modelsim软件,安装破解结束。

5


联合仿真

(1)、打开任意一个vivado工程,再按下图所示点击编译Xilinx的仿真库。

6

注意:Simulator选Modelsim Simulator,编译库Compiled library location放入新建的文件夹D:\Xilinx\Xlib中(可自己指定),Simulator executable path选择modelsim安装路径下的win64pe。注意Compile Xilinx IP选项不勾选。

7

编译结果从Vivado中的Tcl Console中可知,无Errors,芜湖起飞!

8

(2)查看编译库Compiled library location路径下,应该出现modelsim.ini文件。

9

我们将其设置为用户的全局变量,这样下次就不需要再编译库文件了,步骤如下图所示:

10

11

(3)、设置第三方仿真软件的安装路径与编译库的路径,具体步骤如下图所示

12

13

14

(4)、全部准备就绪后,点击Run Simulation中的Run Behavioral Simulation。

15

自动弹出Modelsim,并显示波形,游戏结束。

16