将库添加到VHDL项目中[英] Adding Library to VHDL Project

本文是小编为大家收集整理的关于将库添加到VHDL项目中的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我正在尝试在我的VHDL项目中使用固定点号,但是我一直难以实现库(在此处找到 http://www.eda-stds.org/fphdl/fixed_pkg_c.vhdl ).我试图模拟时收到的错误是此

<ufixed> is not declared

我的问题是如何确切地实现库以便使用它?到目前为止,我已经在IEEE_PROPOSED库中将其添加到项目中,但它不起作用.所有源代码都可以在此处找到 https://github.com/srohrer32/srohrer32//a>,在hdl文件夹和libraries文件夹下.

推荐答案

您是否正在使用modelsim?您正在使用项目吗?如果没有...我发现最好的方法是首先自行编译库.打开您的modelsim.ini文件,并通往库.这样:

lib_test = c:/test/source/lib_test

最后,编译您自己的代码,并确保使用-modelsimini Switch On vcom modelsim命令.

如果您使用的是一个项目(我不喜欢,它们不那么灵活),则可以将项目指向库.

关于模型的更多帮助,使用命令编译: 其他推荐答案

本人不是ISIM用户,通过 ISIM用户指南意味着您需要创建一个单独的项目以编译为库中,与从命令行定位库的方便相反.

大概您还需要将库作为项目中的资源添加.有趣的是,您还没有抱怨:

library ieee_proposed;

在delay_calculation.vhd中,指出图书馆声明简单地使该名称可用.需要在某个地方进行库名称的实现映射到库.默认情况下,这是在xilinxisim.ini中,但是我想您的项目管理接口允许您将库映射到您的项目中,ISIM应该知道在哪里寻找库.

在用户指南周围努力可能值得.

在模拟步骤中概述

用户库

根据您的启动方式,有不同的方法 可用于添加用户库:

  • 在启动项目导航器时,请在ISE工具中定义用户库.请参阅ISE帮助中的"与VHDL库一起工作" 细节.
  • 使用ISIM独立,交互式命令模式或非相互作用模式时,请设置库映射文件(请参阅附录A, 库映射文件(xilinxisim.ini)指向您的逻辑或 物理库.
  • 从PlanAhead工具启动ISIM时,请在该工具中定义用户库.有关更多信息,请参见Planahead用户指南(UG632) 信息.附录D,附加资源,包含指向 文档.

请参阅/a>,请参见 创建VHDL库 和 以将文件添加到VHDL库 . >

(最高级别链接

其他推荐答案

大概您正在尝试做的是在ISE GUI中设置综合模式的库映射,该 模式很简单,但它完全被ISIM忽略,因为它具有自己的系统管理图书馆映射.我不是ISIM用户,但是在查看文档并进行了一些测试之后,它看起来是设置库的最简单方法是从命令行:

# This creates an ieee_proposed directory with a partially compiled object.
vhpcomp --work ieee_proposed=ieee_proposed fixed_pkg_c.vhdl

# Add a mapping from the logical library to the physical path.
# *nix shown. Windows would be similar or just use a text editor.
#   <logical name>=<physical path>
echo ieee_proposed=`pwd`/ieee_proposed >> path/to/your/xilinxisim.ini

确保ISIM可见xilinxisim.ini文件,并应将映射捡起到您的编译库.您应该能够从ieee_proposed的父母中继续运行vhpcomp,以在库中添加更多文件.您可能必须手动复制系统默认版本才能维护标准库映射.

本文地址:https://www.itbaoku.cn/post/2090964.html

问题描述

I am trying to use fixed point numbers in my VHDL project, but I keep having trouble implementing the library (found here http://www.eda-stds.org/fphdl/fixed_pkg_c.vhdl). The error I receive when trying to simulate is this

<ufixed> is not declared

My question is how exactly should a library be implemented so it can be used? As of now I have added it to the project in the IEEE_PROPOSED library, but it is not working. All source code can be found here https://github.com/srohrer32/beamformer/tree/fixed_num, under the hdl folder and libraries folder.

推荐答案

Are you using modelsim? Are you using a project? If not... I find the best way is to first compile the library on its own. Open your modelsim.ini file and make a path to the library. Like this:

lib_test = c:/test/source/lib_test

Finally, compile your own code and make sure you use the -modelsimini switch on vcom modelsim command.

If you are using a project (which I don't like, they are not as flexible) then you can point the project to the library.

More help about modelsim compiling with commands: http://www.tkt.cs.tut.fi/tools/public/tutorials/mentor/modelsim/getting_started/gsms.html#compiling

其他推荐答案

Not being an isim user myself, a search through the ISim User Guide implies you need to create a separate project to compile into a library, contrasting with how easy it is to target a library from the command line.

Presumably you'd also need to add the library as a resource in your project. Funny there are no complaints about that yet you have:

library ieee_proposed;

in delay_calculation.vhd, noting that a library declaration simply makes the name available. Somewhere the implementation dependent mapping for the library name to library needs to be made. This by default is in xilinxisim.ini, but I imagine your project management interface allows you to map the library into your project, and isim should know where to look for the library.

Nosing around the user guide may be worthwhile.

In Simulation Steps Overview

User Libraries

Depending upon how you launch ISim, there are different methods available to add user libraries:

  • When launching Project Navigator, define the user libraries in the ISE tool. See “Working with VHDL Libraries” in ISE Help for details.
  • When using ISim standalone, interactive command mode, or non-interactive mode, set the library mapping file (see Appendix A, Library Mapping File (xilinxisim.ini) to point to your logical or physical libraries.
  • When launching ISim from the PlanAhead tool, define the user libraries in that tool. See the PlanAhead User Guide (UG632) for more information. Appendix D, Additional Resources, contains a link to the document.

See Working with VHDL Libraries, see To Create a VHDL Library and To Add Files to a VHDL Library.

(The top level link to ISE Help).

You'd think there'd be a FAQ for those of us apostate - speed reading 'religious' tomes sucks even using Google to find them. Notice the explanations are in terms of menu pull down actions, analogous to command line entry. We're being bitten by what's available on the top menu bar. And when you do manage to add and use a library successfully you'll remember how until someone changes the menus around, and you could of course wonder about documentation lagging.

其他推荐答案

Presumably what you've tried to do is set up the library mapping for synthesis mode in the ISE GUI, which is straightforward but completely ignored by iSim since it has its own system for managing library mappings. I'm not an iSim user but after looking at the documentation and a little testing it looks like the easiest way to set up a library is from the command line:

# This creates an ieee_proposed directory with a partially compiled object.
vhpcomp --work ieee_proposed=ieee_proposed fixed_pkg_c.vhdl

# Add a mapping from the logical library to the physical path.
# *nix shown. Windows would be similar or just use a text editor.
#   <logical name>=<physical path>
echo ieee_proposed=`pwd`/ieee_proposed >> path/to/your/xilinxisim.ini

Make sure the xilinxisim.ini file is visible to iSim and it should pick up the mapping to your compiled library. You should be able to keep running vhpcomp from the parent of ieee_proposed to add more files to the library. You may have to manually copy the system default version to maintain the standard library mappings.