CXD301:程序综合时IP核报错

ModelSim仿真时找不到IP核初始化文件

现象

环境:ISE14.7/ModelSim10/Win7_64

将以前编译仿真通过的ISE工程文件重新进行仿真时,出现下图所示的错误提示信息:

解决过程

提示信息的意思是说,Block Memory核在加载初始化数据(loading initial data)时,打开VHDL文件pn.mif时失败。工程中使用Block Memory核生成了一个名为pn的ROM存储器。

由于这个工程以前编译仿真都没有问题,初步怀疑电脑近期安装的杀毒软件对可能损坏了部分安装文件。

禁用杀毒软件,重新根据ModelSim破解说明对软件进行破解,并编译IP核的仿真库。再次运行仿真,仍然出现相同的错误。

求助于无所不能的网络,搜索“failed to open VHDLfile "pn.mif" in rb mode”,在搜索结果中查找靠谱的类似问题解答,找到一条Xilinx的官方回复,如下所示:

AR# 36107

ModelSim - Fatal: (vsim-7) Failed to open VHDL file"./fir_core_init.mif" in rb mode

Description

Running a simulation of a design that instantiates a core containinginitialization data (via COE or MIF files) results in the following error:

# Loading xilinxcorelib.fir_compiler_v5_0_mac_fir(behavioral)
# ** Fatal: (vsim-7) Failed to open VHDL file "./dor_ddc_fir_hb2.mif"in rb mode.
# No such file or directory. (errno = ENOENT)

 

Solution

Core Generator creates memory initialization files(.mif) that contain the memory initialization data specified in coefficientfiles (.COE) for certain cores (For example the Block Memory Generator and FIRCompiler cores).  
    The.mif file is referenced in the simulation wrappers with the expectation thatthe file will be located in the same location as that of the simulationdirectory. 
 
    If thecores are generated in a location other than the simulation working directory,the error above will occur.

To resolve this issue, identify the .mif file located inthe folder where the cores have been generated and either copy or move the fileto the simulation working directory.  
    If launching the simulation from ISE,this is the same folder as the folder where the .xise ISE project file resides.

又是一大篇英文,没办法,别指望Xilinx公司把所有问题都用中文描述出来。文中描述的问题是在仿真FIR核时,出现FIR核初始化数据文件打开失败的现象,与我们所遇到的问题类似,可以借鉴。

重点看看官方给出的解决方案:当需要仿真IP核的mif文件不在仿真工作目录时,仿真时需要参考mif文件,就会发生错误提示信息。找到了问题产生的原因,解决方法就很容易了,把mif文件存放在仿真工作目录下即可。

原以为找到了原因和解决办法,按照要求将mif文件复制到仿真工作目录下,重新仿真,仍然出现相同的错误提示!

还有没有别的办法?既然这个工程曾经正确编译仿真过,就一定有办法重新编译仿真通过。在分析解决问题时,坚定信心十分重要。

冷静分析一下原因,错误提示的内容是指ROM存储器核在仿真时出现了问题。我们重新生成一个功能相同的ROM核,程序中用这个重新生成的ROM核替换原来的IP核模块。再次编译,仿真,成功!

至此,我们虽然没有找到问题出现的根源,但我们找到了解决问题的有效办法。具体原因只能大概归结为ModelSim仿真工具与ISE环境之间的兼容问题了。毕竟,这种复杂的工具软件出现一些无法解释的bug是再正常不过的事了。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

杜勇老师

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值