Modelsim co-simulation with Quartus

I saw online a lot of people asking how to use modelsim simulation, studied how to build a lot of projects in modelsim, how to associate the library after they gave up, in fact, I have encountered such a problem, but fortunately there are great god guidance, know the joint the concept of emulation, less take a lot of detours, here I am to tell you about the co-simulation of FPGA development environment with modelsim.

The so-called FPGA development environment and in fact quartus ise / vivado, quartus now have integrated installation package, install it, ise / vivado or to external calls.

  1. Co-simulation of quartus and modelsim

First install quartus and modelsim integrated installation package, I installed quartus prime 16.0.

Then new construction, the new process can be set to Simulation in Modelsim-Altera EDA TOOL Settings time. As shown below

Or Assignments-> Settings-> EDA TOOL Settings Setting Simulation to Modelsim-Altera after the project created. As shown below

And then set about modelsim path, usually integrated environment is automatically configured to prevent a foreign or configure the look, Tools-> Options-> General-> EDA TOOL Options-> Modelsim-Altera modelsim click Browse to select the path back, I installed in the C drive. As shown below

Next step is to configure the associated testbench, you can write your own testbench, recommendations or automatically generated by quartus, provided that you complete comprehensive.

Processing-> Start-> Start Test Bench Template Write, click will automatically generate a simulation in your project directory folder, which has modelsim folder, there is an automatically generated following a top-level file name .vt the test bench file.

生成test bench后在Assignments->Settings->EDA TOOL Settings->Simulation配置关联信息。如下图

选中Compile test bench,点击Test Benches。

点击New。

系统自动生成的test bench 一般是顶层文件名_vlg_tst,例化名是i1,这些都可以改,我一般是将test bench 模块名改为顶层文件名_sim, 例化名改为uut。

仿真时间可以不填,我一般是填个10us,然后配置test bench路径,设置后点击add,然后一路ok,就设置完成了。

最后就是在quartus 调出modelsim了,Tools->Run Simulation Tool->RTL Simulation。等待一会,modelsim波形窗口就会弹出来了,如果没有反应,就返回去检查一下配置。

 

Guess you like

Origin blog.csdn.net/superyan0/article/details/90669366