【常见问题】NGC文件在ISE或XPS中带来的困扰解决办法


1   ISE 中如何添加NGC文件

在使用ISE时候,我们经常在translate阶段会碰到这种错误:

NgdBuild:604 - logical block 'U5/U0' with type 'DCM0' could not be resolved. A pin name misspelling can cause this, a missing edif or ngc file, or the misspelling of a type name. Symbol 'DCM0' is not supported in target 'spartan3e'.

这是因为我们在添加文件时候,忘记添加NGC文件到工程目录中。下面就演示如何添加NGC文件到工程目录中。NGC文件既要添加到Synthesize的目录下,也要添加到Implement目录下。

1.1  第一步:在Synthesize下添加NGC文件

如图1SynSynthesize中选择Process Properities

1.png

1:在Synthesize中添加ngc文件

Synthesis Options中可以看到-sd-vlgincdir。在-sd一栏中添加工程中所有的ngc或的edn文件的路径目录。在-vlgincdir中添加define.v文件的目录。

2.png

2:综合选项

 

1.2  第二步:在到Implement目录下添加NGC文件

如图在Implement Design中选择Process Properities

3.png

3Process Properties-Translate Properities

1、第一种方法在Translate Properties中的-sd一栏中添加添加工程中所有的ngc或的edn文件的路径目录否则translate的时候会出错。

4.png

图4:在实现中设置参数


2、遇到这个问题,第二种方法是如上在ISEimplememt中右键在Translate /process propreties"-sd: Macro search Path" 中加上EDK工程的implementation子目录的路径,也就是.V文件所在的路径。

3、按照官方给出的解决方法加上(* box_type = "user_black_box" *)就好了,我们调用的IP核的内部结构都是保密的,也就是BLACK BOX加了这一句,也就是指向了你导入的那些东西.不加的话,指向性就不明确了,所以报错说找不到.个人认为这算是软件的BUG,因为既然你已经导入了,就应该自动添加指向的.估计在更高的版本会修正吧。

2   XPS中自定义用户IP如何添加NGC文件

这一步如果纯粹是自己写的硬件语言(VHDLVerilog HDL,不需要添加什么文件,按步骤来添加即可,但是你的程序调用了部分模块,比如核生成器生成的核,就必须添加NGC文件,否则在implement就出现如下的错误:

NgdBuild:604 - logical block 'myip_0/myip_0/TesterMul_inst' with type 'TesterMul' could not be resolved. A pin name misspelling can cause this, a missing edif or ngc file, or the misspelling of a type name. Symbol 'TesterMul' is not supported in target 'spartan3a'.

仅仅修改pao文件是没有用的

I have tried to move the new .vhd file into vhdl folder of myip and modified the .pao file to include the new .vhd file, but no difference.

What am I missing?

方法1If you are working in XPS and creating a core that requires a coregen component. You need to add the ngc file created by coregen too.

When you import the core it asks you what types of files that you will be including. That is it has a radio box for HDL and below that box it also has other choices. The choice below also should be selected since you have to add the ngc for your component also.

If you use Core generator and create a coregen component, this component have to added as ngc file to bbd (Black-Box Definition) file. This problem is described in Platform Specification Format Reference Manual - psf_rm.pdf(官方可下载).

方法2:有人用这个方法做过,但是对于一个新的核,如果出现上面的错,产生不了bbd文件。这个文件就是列出网表文件(*.ngc

My problem is solved. What I had to do was to:

- Add a .bbd fil to the data folder. This needs to list my two .ngc files

- Copy my two .ngc files to a new directory with the name: netlist

- Modify my .mpd file to include

OPTION RUN_NGCBUILD = TRUE

OPTION STYLE = MIX

如何将SYSGEN中生成的NGC文件加到ISE工程中

1、在system generator中选择NGC files选项,点击generator便可生成NGC文件,该文件生成在[模块名称].mdl工程文件夹内,将生成的[模块名称].V文件和[模块名称].NGC文件拷贝到ISE工程中,这里注意只需要选择[模块名称].V文件中端口定义部分即可。还有一个就是要例化工程,这部分在[模块名称].cw_veo中,生成VERILOG代码对应_veo后缀,生成VHDL代码对应_vho.ngc文件复制到新项目的根文件夹下,并将一个只保留端口定义的HDL文件加入项目中,就可以在新的项目中使用原有的模块了

2、在使用FPGA验证时,我们经常会需要复用一些以前的项目模块,或者不希望我们的源代码被别人抄袭。我们也可以这样操作。具体的产生过程如下:
a)、在XST->Process property中设置不要插入IOBUF。否则最终文件将会带有IOBUF,无法再集成到其他模块中。
b)、按照正常程序综合并translate
c)、如果没有遇到错误,在ISE项目文件夹下,就会产生和顶层文件同名的.ngc文件。到此,ngc文件就产生完了。同样,在以后用到该模块时,我们可以将ngc文件复制到新项目的根文件夹下,并将一个只保留端口定义的HDL文件加入项目中。就可以在新的项目中使用原有的模块了。