vivado2016.2下系统自带DDR3 ip例程仿真运行

背景:从ISE14.7迁移到vivado2016.2. xilinx的软件改的真是不一般的大。两个软件操作差距真是让人想骂人。由于项目需要,准备调试DDR3。对于新手来说,例化一个DDR3 ip.如果有个例程,可以参考。那就非常好了。xilinx贴心的给我们准备了这个例程。那如何去运行这个例程,给我们作为参考用呢。本文档就简单介绍一下具体方法。本方法纯属个人方法。如有问题,自行解决!!!
开始正题:

第一步,在你自己的project下例化一个DDR3的ip。例化完成之后,如下图:

DDR3例化核

第二步,右击这个核,显示open ip example
open_ip_example_design

第三步,就是点击这个open_ip_example_design .vivado会开始新建一个project .过程不表~。结果如图
example
第四步,简单的操作是,运行tb仿真就行了
tb
run
运行结果:就是漫长的等待!!!!!!!!!系统自带的vivado simulate
run1
实际项目,仿真测试,还是用利器modelsim吧!速度甩了vivado自带的好几条街~
运行结果:
这里写图片描述

到此,整个流程都结束了。
BUT,总感觉怪怪的是不是,系统自带的仿真时如何操作的呢!!!
其实vivado对应的project里有相关的文档解释的很清楚了。
关于modelsim的操作如下:
1. How to run simulations in Modelsim/QuestaSim simulator

A) sim.do File :

  a) The 'sim.do' file has commands to compile and simulate memory
     interface design and run the simulation for specified period of time.

  b) It has the syntax to Map the required libraries (unisims_ver,
     unisim and secureip). The libraries should be mapped using
     the following command
     vmap unisims_ver <unisims_ver lib path>
     vmap unisim <unisim lib path>
     vmap secureip  <secureip lib path>

     Also, $XILINX_VIVADO environment variable must be set in order to compile glbl.v file

  c) Displays the waveforms that are listed with "add wave" command.

B) Steps to run the Modelsim/QuestaSim simulation:

  a) The user should invoke the Modelsim/QuestaSim simulator GUI.

  b) Change the present working directory path to the sim folder.
     In Transcript window, at Modelsim/QuestaSim prompt, type the following
     command to change directory path.
        cd <sim directory path>

  c) Run the simulation using sim.do file.
     At Modelsim/QuestaSim prompt, type the following command:
        do sim.do

  d) To exit simulation, type the following command at Modelsim/QuestaSim
     prompt:
        quit -f

  e) Verify the transcript file for the memory transactions.

大家看懂了有没有?看起了很简单。是不是!!!!BUT,你自己操作一遍,发现不知道怎么弄!!!

此处分割线———————————————————————-
为了找到流程,第一步在project里面找到sim.do文件。
sim.do
第二步,打开文件,查看相关内容
这里写图片描述

vlib work

Map the required libraries here

vmap unisims_ver

vmap unisim

vmap secureip

Compile all modules

vlog ../../../sources_1/imports/rtl/*.v
vlog -incr ../../../sources_1/imports/rtl/traffic_gen/*.v
vlog ../../../sources_1/ip/mig_7series_0/mig_7series_0/user_design/rtl/mig_7series_0.v
vlog ../../../sources_1/ip/mig_7series_0/mig_7series_0/user_design/rtl/mig_7series_0_mig_sim.v
vlog -incr ../../../sources_1/ip/mig_7series_0/mig_7series_0/user_design/rtl/clocking/*.v
vlog -incr ../../../sources_1/ip/mig_7series_0/mig_7series_0/user_design/rtl/controller/*.v
vlog -incr ../../../sources_1/ip/mig_7series_0/mig_7series_0/user_design/rtl/ecc/*.v
vlog -incr ../../../sources_1/ip/mig_7series_0/mig_7series_0/user_design/rtl/ip_top/*.v
vlog -incr ../../../sources_1/ip/mig_7series_0/mig_7series_0/user_design/rtl/phy/*.v
vlog -incr ../../../sources_1/ip/mig_7series_0/mig_7series_0/user_design/rtl/ui/*.v
这段代码干什么用的呢?

vlib work ,刚才截图里说了,是用来在当前目录下建一个work文件夹
至于为毛能建立?大伙百度一下。

vlog ….
vlog….
vlog….
这几行的是编译对应目录下的.v文件
剩下的基本上就是一样的。编译

Compile files in sim folder (excluding model parameter file)

$XILINX variable must be set

vlog -incr $env(XILINX_VIVADO)/data/verilog/src/glbl.v
vlog wiredly.v
vlog sim_tb_top.v

这里的glbl.v文件是哪里的呢?这个文件是在vivado安装路径里面。我们需要copy过来。然后把语句改一下。不然你就要去设置XILINX_VIVADO 的环境变量。我一开始是报错了。所以还是改了吧
改成如下的
vlog ./glbl.v

do 文件需要修改的就这么多。没什么修改的。

是不是到此就可以了呢!too native too simple
这里我们需要一个modelsim.ini文件。这个文件是干啥的呢?

是vivado仿真库里的环境变量!!!
这个文件必须要,不然找不到相应的编译库。根本就无法编译。
我们把这个文件copy过来。基本上就可以了。

这次就直接在modelsim里面,change directory到当前目录。然后直接输入do sim.do。就等着运行结束,出结果吧。

第一篇认真写的博客。谢绝无引用转载。写的有点粗略。后期再慢慢修改吧!

  • 9
    点赞
  • 59
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值