Xilinx IP核及Core Generator
- 格式:pdf
- 大小:217.63 KB
- 文档页数:4
XILINX MCB使用详解说明:本文档将详细讲述赛灵思的DDR2 IP 核的使用流程,目标芯片为Sparten6系列芯片xc6slx25-2fgg484,ISE版本为12.4,MCB版本为3.5。
应用案例为FPGA芯片外带载两片DDR2芯片进行乒乓操作,目的是用一个PLL驱动两个MCB。
术语:ug382,Xilinx的User Guide,Sparten-6 FPGA Clocking ResourcesUG382(v1.4)August24,2010本人技术有限,不足之处请指正,请发到19861011lsf@,也欢迎讨论,QQ383997593,谢谢!一、核的生成1、打开Xilinx CORE Generator工具,找到MCB核(MIG),2、选择版本,这里以3.5为例(尽量选择最新版本),进入Xilinx Memory Interface Generator界面,单击Next,进入下一步;3、选择输出项,输入自定义模块名;单击Next,注意:如果你是修改一个核而不是第一次生成核,会出现如下对话框,单击Yes,这时会覆盖掉一些文件,因此无论你在接下来的步骤中有没有对核的选项进行修改,最后必须点击Generator;4、单击Next,选择Memory Type;注意到图中有个C1、C3,这是因为Xilinx的MCB有部分是属于硬核,引脚是固定的,分别存在于FPGA芯片的BANK1和BANK3,在代码中将看到很多的信号名是以C1_XXX和C3_XXX开头的,这很容易区分是哪个DDR芯片对应的信号名,注意与后面的端口(Port)混淆;5、单击Next,进入DDR2芯片选项模块,先选择存储器,再输入时钟;这里的Memory Part 选择的是自定义的芯片,单击,输入一个自定义的DDR2芯片名,尽量输入芯片的实名而不是自定义名,这样有利于重复使用,不至于将来使用时不知所云,下面的参数可以在你所选的DDR2芯片DATASHEET中找到,输入参数值,保存,这样就可以在找到自定义的存储器了,单击Next;6、选择同上,单击Next;7、Next;8、Next;9、进入端口配置,(1)选择配置模式,单向与双向的意思是指端口是可读、可写,还是既可读又可写,将端口配置成一个读一个写,其他不用;(2)选择存储器的地址映射方式,可根据自己程序设计方便选择,这里默认;10、Next,这里由于对两个DDR2的操作是相同的,配置同上;Next11、Next;12、Next;13、进入FPGA选项,这里注意系统时钟的方式,根据实际情况选择单端还是差分,这里选择单端其他默认;14、Next,同上;15、Next;16、选择Next;17、Next;18、二、IP核内部文件详解该部分主要尝试描述MCB的时钟部分。
FPGA开发全攻略——IP核5.7 FPGA设计的IP和算法应用基于IP的设计已成为目前FPGA设计的主流方法之一,本章首先给出IP的定义,然后以FFT IP核为例,介绍赛灵思IP核的应用。
5.7.1 IP核综述IP(Intelligent Property) 核是具有知识产权核的集成电路芯核总称,是经过反复验证过的、具有特定功能的宏模块,与芯片制造工艺无关,可以移植到不同的半导体工艺中。
到了SOC 阶段,IP核设计已成为ASIC电路设计公司和FPGA提供商的重要任务,也是其实力体现。
对于FPGA 开发软件,其提供的IP核越丰富,用户的设计就越方便,其市场占用率就越高。
目前,IP核已经变成系统设计的基本单元,并作为独立设计成果被交换、转让和销售。
从IP核的提供方式上,通常将其分为软核、硬核和固核这3类。
从完成IP核所花费的成本来讲,硬核代价最大;从使用灵活性来讲,软核的可复用使用性最高。
( 这部分内容前面已经阐述,这里再重申一下)软核(Soft IP Core)软核在EDA设计领域指的是综合之前的寄存器传输级(RTL) 模型;具体在FPGA设计中指的是对电路的硬件语言描述,包括逻辑描述、网表和帮助文档等。
软核只经过功能仿真,需要经过综合以及布局布线才能使用。
其优点是灵活性高、可移植性强,允许用户自配置;缺点是对模块的预测性较低,在后续设计中存在发生错误的可能性,有一定的设计风险。
软核是IP 核应用最广泛的形式。
固核(Firm IP Core)固核在EDA设计领域指的是带有平面规划信息的网表;具体在FPGA设计中可以看做带有布局规划的软核,通常以RTL 代码和对应具体工艺网表的混合形式提供。
将RTL描述结合具体标准单元库进行综合优化设计,形成门级网表,再通过布局布线工具即可使用。
和软核相比,固核的设计灵活性稍差,但在可靠性上有较大提高。
目前,固核也是IP核的主流形式之一。
硬核(Hard IP Core)硬核在EDA 设计领域指经过验证的设计版图;具体在FPGA 设计中指布局和工艺固定、经过前端和后端验证的设计,设计人员不能对其修改。
1.IP核的应用4.2.3 Xilinx IP Core的使用1. Xilinx IP core基本操作IP Core就是预先设计好、经过严格测试和优化过的电路功能模块,如乘法器、FIR滤波器、PCI接口等,并且一般采用参数可配置的结构,方便用户根据实际情况来调用这些模块。
随着FPGA规模的增加,使用IP core完成设计成为发展趋势。
IP Core生成器(Core Generator)是Xilinx FPGA设计中的一个重要设计工具,提供了大量成熟的、高效的IP Core为用户所用,涵盖了汽车工业、基本单元、通信和网络、数字信号处理、FPGA特点和设计、数学函数、记忆和存储单元、标准总线接口等8大类,从简单的基本设计模块到复杂的处理器一应俱全。
配合Xilinx网站的IP中心使用,能够大幅度减轻设计人员的工作量,提高设计可靠性。
Core Generator最重要的配置文件的后缀是.xco,既可以是输出文件又可以是输入文件,包含了当前工程的属性和IP Core的参数信息。
启动Core Generato有两种方法,一种是在ISE中新建IP类型的源文件,另一种是双击运行[开始] [程序] [Xilinx ISE 9.1i] [Accessories] [Core Generator]。
限于篇幅,本节只以调用加法器IP Core为例来介绍第一种方法。
在工程管理区单击鼠标右键,在弹出的菜单中选择New Source,选中IP类型,在File Name 文本框中输入adder(注意:该名字不能出现英文的大写字母),然后点击Next按键,进入IP Core目录分类页面,如图4-13所示。
图4-13 IP Core目录分类页面下面以加法器模块为例介绍详细操作。
首先选中“Math Funcation Adder & Subtracter Adder Subtracter v7.0”,点击“Next”进入下一页,选择“Finish”完成配置。
XilinxVivado的使⽤详细介绍(3):使⽤IP核IP核(IP Core)Vivado中有很多IP核可以直接使⽤,例如数学运算(乘法器、除法器、浮点运算器等)、信号处理(FFT、DFT、DDS等)。
IP核类似编程中的函数库(例如C语⾔中的printf()函数),可以直接调⽤,⾮常⽅便,⼤⼤加快了开发速度。
使⽤Verilog调⽤IP核这⾥简单举⼀个乘法器的IP核使⽤实例,使⽤Verilog调⽤。
⾸先新建⼯程,新建demo.v顶层模块。
添加IP核点击Flow Navigator中的IP Catalog。
选择Math Functions下的Multiplier,即乘法器,并双击。
将弹出IP核的参数设置对话框。
点击左上⾓的Documentation,可以打开这个IP核的使⽤⼿册查阅。
这⾥直接设置输⼊信号A和B均为4位⽆符号型数据,其他均为默认值,点击OK。
稍后弹出的窗⼝,点击Generate。
调⽤IP核选择IP Sources,展开并选择mult_gen_0 - Instantiation Template - mult_gen_0.veo,可以打开实例化模板⽂件。
如图,这段代码就是使⽤Verilog调⽤这个IP核的⽰例代码。
将⽰例代码复制到demo.v⽂件中,并进⾏修改,最终如下。
代码中声明了⽆符号型的4位变量a和b,分别赋初值7、8,作为乘数使⽤;⽆符号型的8位变量p,⽤于保存计算结果。
clk为Testbench编写的周期20ns的时钟信号;mult_gen_0 mul(...)语句实例化了mult_gen_0类型的模块对象mul,并将clk、a、b、p作为参数传⼊。
1. module demo(2. );3.4. reg clk = 0;5. always #10 clk = ~clk;6.7. wire [3:0] a = 7;8. wire [3:0] b = 8;9. wire [7:0] p;10.11. mult_gen_0 mul (12. .CLK(clk), // input wire CLK13. .A(a), // input wire [3 : 0] A14. .B(b), // input wire [3 : 0] B15. .P(p) // output wire [7 : 0] P16. );17.18. endmodule⾏为仿真验证以demo为顶层模块,启动⾏为仿真,即可输出波形。
XiIinX可编程逻辑器件设计与开发(基础篇)连载32:Spartan双击【Xi1inxCoreGenerator],打开现有的IP核工程项目或者创建一个新的IP 核工程。
【Viewbyfunction]—[Debug&Verification]一[ChipScopePro],双击VIO。
弹出VIO配置界面,如图9T0所示。
图9T0V1o参数设置界面(1)[ComponentName]:输入组件名称。
(2)VIO ParameterS选项组:VIO参数选项组。
[Enab1eAsynchronousInputPort]:使能异步输入信号,最多可以设貉256个异步输入信号,VIO的异步输入用来监测设计中丽⅛模块的输出信号,它与时钟无关。
[Enab1eAsynchronousOutputPort]:使能异步输出信号,最多可以设珞256个异步输出信号,V1O的异步输出用来为待测试逻辑模块提供输入激励,它与时钟无关。
[Enab1eSynchronousInputPort]:使能同步输入信号,最多可以设貉256个同步输入信号,VIO的同步输入信号用于监测设计中待测试模块的输出信号,要求待测试信号与V1O核的C1K同步。
[Enab1eSynchronousOutputPort]:使能同步输出信号,最多可以设络256个同步输出信号,VK)的同步输出信号为待测试模块的输入提供激励,要求待测试信号与VIO核的C1K同步。
[InvertC1ockInput]:VIO核可以选择时钟信号翻转,即选择采用时钟的上升沿或者下降沿作为触发条件。
注意:只有使用同步输入和/或输出的时候,时钟信号翻转才有效。
9. 2.4ATC2属性双击【Xi1inxCoreGenerator],打开现有的IP核工程项目或者创建一个新的IP 核工程。
【Viewbyfunction]->[Debug&Verification]f [ChipScopePro]。
IP核生成文件:(Xilinx/Altera 同)IP核生成器生成ip 后有两个文件对我们比较有用,假设生成了一个asyn_fifo 的核,则asyn_fifo.veo 给出了例化该核方式(或者在Edit->Language Template->COREGEN 中找到verilog/VHDL 的例化方式)。
asyn_fifo.v 是该核的行为模型,主要调用了xilinx 行为模型库的模块,仿真时该文件也要加入工程。
(在ISE中点中该核,在对应的processes 窗口中运行“ View Verilog Functional Model ”即可查看该 .v 文件)。
如下图所示。
1.在ISE 集成环境中仿真IP核IP 核应该在新建的工程中进行仿真与例化;在原工程中可以例化使用,但好像不能直接对它加testbench 后进行仿真。
如下两图所示。
图1:直接在工程中对ip核加testbench 仿真时出错图2:新建工程单独对ip核仿真2.在modelsim中仿真ip 核a.在modelsim中编译库(Xiliinx)(1)在$Modeltech_6.0d/Xilinx_lib_tt下新建文件夹Xilinx_lib($代表安装盘符)(2)打开Modelsim->File->Change Diriectory,将路径指向刚才新建的文件夹Xilinx_lib,这样Xilinx 编译的所有库都将会在该文件夹下。
(3)编译Xilinx 库。
在$Xilinx->verilog->src 下有三个库“simprims”,“unisims”和“xilinxcorelib”。
在modelsim 的workpace 窗口Library 属性中点右键->new->library(或在File 菜单下new->libary),输入库名(自定义)如Xilinx_lib_tt,这样在workpace library 属性下就可看到Xilinx_lib_tt 了。
Xilinx常⽤IP核配置ISE版本为14.71、时钟IP核(Clocking Wizard)第⼀页Clocking Features选项框中:(1)Frequency synthesis选项是允许输出与输⼊时钟不同频率的时钟。
(2)Phase alignment选项是相位锁定,也就是将输出始终的相位和⼀个参考时钟同步,⼤多是和输⼊时钟同步。
(3)Minimize power选项为降低功耗,也就是资源,取⽽代之的是相位、频率的偏差,对于对时钟要求不⾼、资源有限的情况下可以使⽤,⼀般不推荐选此选项。
(4)Dynamic Phase Shift该选项为提供动态相移功能,选上此选项之后,可以在输⼊端控制相移,并有相移完成之后的反馈,相移步进长度为固定的⼏个值。
Jitter Optimization选项框中:(1)Balanced就是在抖动优化时选择⽐较均衡的正确带宽。
(⼀般选这个)(2)Minimize output jitter:使输出时钟抖动最⼩,但是可能会增加功耗或资源,可能导致输出相位错误。
(3)Maximize input jitter filtering:该选项表⽰可使输⼊时钟抖动变⼤,但是可能会导致输出时钟抖动变⼤。
其他选项按照图中选择。
第⼆页选择输出CLK端⼝第三页可选端⼝,可根据实际应⽤选择,⼀般情况下reset,locked选上。
第四页第五页可对端⼝进⾏重命名。
2、FIFO IP核(FIFO Generator)fifo是⼀种先进先出的数据存储和缓冲器,其本质是RAM。
fifo的位宽就是每个数据的位宽,fifo 的深度简单来说是需要存多少个数据。
fifo有同步fifo和异步fifo两种,同步即读写时钟相同,异步fifo即读写时钟不同。
⼀般异步fifo⽤的较多,⽤来处理跨时钟域的问题。
第⼀页接⼝类型选择Native类型的,AXI4是与DMA或与其他有AXI4接⼝通信时使⽤的。
第⼆页(1)选择异步时钟,FIFO的主要功能就是⽤在异步时钟域作为缓存,所以选择独⽴时钟的模式使⽤范围更⼴。
PLL和DLL:都是锁相环,区别在哪里?一般在altera公司的产品上出现PLL的多,而xilinux 公司的产品则更多的是DLL,开始本人也以为是两个公司的不同说法而已,后来在论坛上见到有人在问两者的不同,细看下,原来真是两个不一样的家伙。
DLL是基于数字抽样方式,在输入时钟和反馈时钟之间插入延迟,使输入时钟和反馈时钟的上升沿一致来实现的。
又称数字锁相环。
PLL使用了电压控制延迟,用VCO来实现和DLL中类试的延迟功能。
又称模拟锁相环。
功能上都可以实现倍频、分频、占空比调整,但是PLL调节范围更大,比如说:XILINX 使用DLL,只能够2、4倍频;ALTERA的PLL可以实现的倍频范围就更大毕竟一个是模拟的、一个是数字的。
两者之间的对比:对于PLL,用的晶振存在不稳定性,而且会累加相位错误,而DLL在这点上做的好一些,抗噪声的能力强些;但PLL在时钟的综合方面做得更好些。
总的来说PLL的应用多,DLL则在jitter power precision等方面优于PLL。
目前大多数FPGA厂商都在FPGA内部集成了硬的DLL (Delay-Locked Loop)或者PLL(Phase-Locked Loop),用以完成时钟的高精度、低抖动的倍频、分频、占空比调整移相等。
目前高端FPGA产品集成的DLL和PLL资源越来越丰富,功能越来越复杂,精度越来越高(一般在ps的数量级)。
Xilinx芯片主要集成的是DLL,而Altera芯片集成的是PLL。
Xilinx芯片DLL的模块名称为CLKDLL,在高端FPGA中,CLKDLL的增强型模块为DCM(Digital Clock Manager)。
Altera芯片的PLL模块也分为增强型PLL(Enhanced PLL)和高速(Fast PLL)等。
这些时钟模块的生成和配置方法一般分为两种,一种是在HDL代码和原理图中直接实例化,另一种方法是在IP核生成器中配置相关参数,自动生成IP。
Xilinx IP核配置,一步一步验证Xilinx Serdes GTX最高8.0Gbps 之前用serdes一直都是跑的比较低速的应用,3.125Gbps,按照官方文档一步一步来都没出过什么问题,这次想验证一下K7系列GTX最高线速8Gbps,看看xilinx的FPGA是不是如官方文档所说。
GTX速度到底可以跑到多少关于器件速度的问题首先找到ds182-Kintex-7 FPGAs Data Sheet:DC and AC Switching CharacterisTIcs,可以自己对应的器件去找,不过这个在设计电路板器件选型的时候就应该考虑到,除非是买的开发部学习用。
这里面包括所有的FPGA 各个器件能跑到的最高频率和器件延时,建立时间,保持时间等,对高速设计有很大的参考价值。
找到GTX Transceiver Switching CharacterisTIcs可以看到,虽然K7系列GTX最高可以跑到12.5Gbps,但这跟速度等级和封装都有关系,是在-3的速度等级,FF封装下才有的最高速度12.5Gbps。
而现在手头的芯片型号是K7480TFFG901-1,所以最高支持8.0Gbps。
其实这在配置IP核的时候就会发现了,线速范围是(0.5-8.0)。
所以IP核都是严格和工程的器件相关联的,这点Vivado越做越好了。
一步一步配置IP核下面一步步配置IP核,可以作为初学者参考。
(第一次用的话,会被生成的一大堆文件和巨多的IO口吓到的。
)包括怎么查找手册和原理图,走一遍流程,发现其实xilinx的IP核都是一个套路。
1. 首先在IP核搜索GT,选择7 Series FPGAs TransceiversWizard,没得选的,取个名字。
顺便提一下,下面的shared logic选项,最好选include shared logic in example design。
在有些特殊资源需要共享时,曾经遇到过这里的问题。
XIlinx IP核的申请作者:关键字:Evaluation License介绍在这里先对大家问的IP做一个介绍:对于FPGA器件来说,IP(Intellectual Property)就是某些已经设计好的模块,ready for use的HDL代码或者网表级文件。
在Xilinx的官方网站上面的IP列表中,你可以查询到各种Xilinx自家提供的IP或者第三方(ThirdParty/Alliance)提供的IP,而且官网上列出的第三方的IP多半是介绍性的,如果你需要试用或者购买需要直接和这些设计商联系。
Xilinx提供的一部分IP也是采用的这种模式,比如MPEG4 Codec的IP。
而另外一部分IP则可以通过申请评估版的License来试用,这也就是本文的重点所在。
大家首先可以访问一下这个网址:/ipcenter/index.htm申请的方法有很多种,在这里我介绍一下自己使用的一种申请过程,已申请项目中要用到的TEMAC为例。
上图中我够花出了可以申请的入口。
我们采用顶部的这种方法,在文本框中输入要下载的IP核的关键字。
点击搜索,此时会进入搜索结果页面。
找到你自己要申请的IP核。
点击既可以计入相应的页面。
这里是有关TEMAC核的一些介绍信息,可以参考一下,在这里我们可通过点击Evaluate按钮(如图所示)进入ip核申请页面。
进入此页面后向下拉,你会看到如下图的选择:点击full system hardware Evaluation,展开后点击Generate a full system hadware Evaluation license key,如下图所示:当然你也可以直接点击页面上部的quick links中的Generate Soft TEMAC license key进入申请页面。
接着上一步,点击Generate a full system hadware Evaluation license key后,如果你没有登陆,会跳到登陆界面,如下图:如果你没有Xilinx的账号,可以点击又边的Create Account按钮进行申请,在这里我不在详述。
电子电路EDA技术自考笔记2020年《电子电路EDA》自考笔记文档概述:此文当时本人自考过程中总结写下的笔记文档,所有文字都是手动一个一个码出来的,研究的课本为《电子电路EDA》,练题为学校老师发的练题说一下我的备考步骤:第一步:把书全部看一遍,大概了解书里面的内容,为做题做准备第二步:做题,总结,做笔记,这一部是比较关键的一部,通过这一步几乎可以了解到所有知识点和考点,把所有考点都记录到word文档。
第三步:背。
通过第二部的有了所有知识点的word文档,那么第三部就只管背就可以了,坐公交的时候背,没事的时候背,睡前背,那么考试就完全ok了(这一科有程序题,程序题就看以往的考试题,程序题基本上都一样,有规律可循的,按着模子套就可以了),我参加的是2020年8月份的考试,下面是我考试结果:1.现代数字系统设计技术概述1,利用EDA技术进行电子系统设计的特点:1)软件硬化,硬件软化;软件硬化是指所有的软件设计最后转化成硬件来实现,用软件方式设计的系统到硬件系统的转换是由EDA开发软件自动完成的;硬件软化是指硬件的设计利用软件编程的方式进行,尽管目标系统是硬件,但整个设计和修改过程如同完成软件设计一样方便和高效。
2)自顶向下( top-down)的设计方法;特点:(1)基于可编程逻辑器件PLD和EDA开发工具支撑(2)采用系统级、电路级、门级的逐级仿真技术,以便及早发现问题,进而修改设计方案(3)现代的电子应用系统正向模块化发展,大概说向软硬核组合的偏向发展。
对于以往成功的设计成果稍作修改、组合就能投入再利用,从而产生全新的或派生的设计模块(4)由于接纳的是结构化开发手段,可实现多人多任务的并行工作方式,使庞大系统的设计规模和效率大幅度提高(1分)(5)在选择器件的类型、规模、硬件结构等方面具有更大的自由度(1分)3)集设计、仿真和测试于一体;4)在系统可现场编程,在线升级;5)设计工作标准化,模块可移置共享。
如何在赛灵思ISE中修改自己的IP?(转)2010-09-09 13:42如何在EDK中使用自己的 IP核呢?这是很多人梦寐以求的事情。
然而在EDK以及ISE的各种文档中对此却遮遮掩掩,欲语还休。
在以往的设计中,无论是简单的IPIF,还是要在EDK中开放的IP核中增加自己的一些修改。
曾经很是苦恼!最近却有意外的收获。
无论你加入一个EDK IP核还是一个 core generate 都会找到一个 data的文件夹例如:C:\Xilinx\12.1\ISE_DS\EDK\hw\XilinxProcessorIPLib\pcores\xps_central_dma_v2_01_ c\data在该文件夹中会有一个重要的文件。
xps_central_dma_v2_1_0.mpd,xps_central_dma_v2_1_0.pao.这两个文件的作用在于,对外部端口做了定义,其次对编译的文件,编译的顺序做了规定。
可是当你修改的时候需要嵌入一个FIFO,DSP时该怎么办呢?我们知道这些核的存在形式往往是ngc或者edn等。
这是后就要归功于一个bdd文件了。
例如plbv46_pcie_v2_1_0.bbd。
其内容如下:############################################################################### ##### Copyright (c) 1995-2002 Xilinx, Inc. All rights reserved.#### opb_pci.bbd#### Black Box Definition################################################################################# #Filesafifo_16x136.ngc, dpram_36_512.ngc, dpram_36_512_32.ngc, dpram_36_1024.ngc, dpram_136_512.ngc, dpram_70_512.ngc, fifo_37x512.ngc, fifo_37x512_32.ngc,fifo_136x16.ngc, fifo_136x512.ngc, fifo_70x16.ngc, fifo_70x512.ngc,fifo_72x512.ngc, fifo_70x32.ngc, fifo_71x512.ngc这就说明在PCIE中用了这么多的"核"。
术语词汇表术语表ABELABEL是在CPLD设计中曾被广泛使用的一种原始的硬件描述语言ABEL通常被认为在建立高级硬件描述方面不如VHDL或Verilog有效ADC模数转换器一个模拟信号在各个间隔采样并被建模为数字信号AGP高级图形接口关于图形的电压接口标准AllianceAlliance是Xilinx的与第三方供应商配合之协议的名称在此协议下相互共享信息以在Xilinx的工具和其它EDA工具之间建立无缝的接口Alliance软件包包含了Xilinx的实现工具但是这个包没有包括仿真综合和原理图抓取软件如果你在使用Xilinx 的Alliance系列软件这就假定了你在为这些应用使用了第三方EDA供应商的工具analyze分析是用来描述在综合中的语法检查过程的术语ASIC专用集成电路此器件是用户为特定的应用设计的而不是一个诸如微处理器的通用器件ASSP专用标准部件或产品ASIC的别称ATPG自动测试模式产生测试向量生成并在电路中运行以测试这个部件behavioral一个常用来描述HDL或仿真形式的术语行为级HDL是一种未必可综合的系统模型行为级仿真是对源代码RTL或行为级的一种仿真BGA球栅阵列一种非常流行的表贴器件封装它使用网格状的焊球作为它的连接器可以有塑封和陶封两种形式BGA封装以其紧凑的尺寸高的引线数目和较低的感抗使得可以应用在较低的电压场合而倍受关注BIST内建自测试存储器资源特别是RAM的测试功能BitgenBitgen是Xilinx实现工具执行配置这一步的命令行名称参见Configurationbitstream位流bitstream被用来对Xilinx器件进行编程它包含设计者建立的器件布线和逻辑资源内部配置的所有信息block SelectRAM通常是指分块 RAM.Xilinx的块RAM是基于Virtex架构器件中的专用的块RAMXilinx的块 RAM可以存储多达16 千位的数据数据宽度和深度可以变化块RAM是全同步的有适合双端口存取的不同端口每个块可以有独立的时钟使能复位数据输入数据输出和端口宽度BLVDS总线LVDS这个标准允许两个或多个器件之间双向LVDS通信此标准的外部终端电阻与标准LVDS中的是不同的BSCAN边界扫描边界扫描逻辑在生产中被用来测试PCB的互连BSDL边界扫描描述语言 BSDL是在一个IC中如何实现边界扫描逻辑的软件描述边界扫描测试软件接受BSDL描述BUFGCEBUFGCE是Xilinx的原语是Virtex-II时钟管理的一部分BUFGCE 被用来分布高扇出的带时钟使能的时钟信号时钟信号用时钟使能信号来选通无毛刺在当使能信号被禁止时时钟也被禁止BUFGMUXBUFGMUX 是Xilinx的原语是Virtex-II器件中时钟管理的一部分BUFGMUX被用来在两个时钟间实现无毛刺切换BUFTBUFT 是 Xilinx的原语表示一个三态缓冲器carry logic进位逻辑存在于每个slice中是主要用于实现算术逻辑功能的专用逻辑进位逻辑或称进位链在Xilinx器件中垂直分布ChipScope ILAChipScope 集成逻辑分析器ILA)是Xilinx的附加软件可以代替逻辑分析仪来测试和抓取Xilinx器件内部的数据ChipScope ILA 包括两个基本部件在计算机中的ChipScope软件和在芯片中的ChipScope核软件被用来建立触发事件和抓取数据在芯片中的核被用来连接到待测试设计的内部测试节点上器件和软件间信息交互是通过连接到PC和器件上的JTAG口的MultiLinx 电缆或并行电缆IIICLB可配置逻辑块Xilinx 的CLB 是在FPGA内实现大部分逻辑的地方CLB是由slice组成的CMOS互补MOS是实现数字处理器和存储器最为广泛使用的集成电路技术CMOS采用以某种方式连接在一起的PMOS和NMOS晶体管这使得它的功耗比单用PMOS或单用NMOS的电路的功耗要低combinational参见combinatorial Combinational是combinatorial 的另外一种措辞combinatorial组合逻辑用需要持续驱动的门来实现组合逻辑有别于不需要持续驱动的寄存逻辑如果激励信号不保持组合逻辑就不会保持它的值compile一个设计的编译可以出现在不同的位置当你综合HDL时你是将代码编译为硬件网表编译表示代码或一个文件到一个不同格式的转换configuration配置是Xilinx实现过程中的一步在配置这一步将生成用于对器件编程的位流core核通常是指知识产权IP核的功能事先经过了测试可以被很快使用而无需花费太多的工程时间和代价核也可被认为是即插即用的设计CORE Generator system核生成器CORE Generator 系统是Xilinx的软件用于为你的设计生成核这些已经制作好的功能块可以直接例化到你的设计中去它们也可进行功能仿真这些核按照复杂性和价格排列大部分的简单的功能块是免费的也可以进行用户配置块RAM FIR滤波器等等而其它的一些核PCI USB等等需要一定的费用CPLD复杂可编程逻辑器件是一种包含了在逻辑块之间可编程互连的可编程器件一个CPLD通常是由多个互连的PAL构成CPU中央处理单元.CS芯片比例封装CTT中央抽头终端电压接口标准 3.3伏的存储器总线标准DAC数模转换器将数字信号转换为模拟信号daisy chain菊花链是多个Xilinx部件的串接以便通过串行配置方式按次序对每个器件进行编程DCI数字可控阻抗Xilinx的Virtex -II中的 DCI为单端I/O提供了可控阻抗驱动器和片上终端这就可以省去片外的电阻并能提高信号的完整性DCM数字时钟管理器 Xilinx的DCM有四个时钟管理功能块时钟数字延时锁定环CLKDLL数字频率合成器 (DFS)数字移相器DPS和数字扩谱DSSDDR双数据速率使用时钟的两个沿来抓取数据Design Manager设计管理器是一个管理某个Xilinx器件实现的软件在设计管理器中你可以设置实现选项使用其它各种工具管理你的设计实现的版本和子版本.die小片硅晶元以相邻的垂直方向上和水平方向上的划线为边界它包含了制造好了的完整的芯片也称为芯片和微芯片DFT测试设计设计中用于测试内部电路功能和/或集成的电路目的是使器件可以进行自测DLL延时锁定环PLL的数字版本数字式时钟锁定电路比较两个时钟信号并使它们相对齐.DSM深亚微米也被称做二阶效应或三阶效应一个电路中在时延和噪声方面的布线效应EA嵌入阵列ASIC是一种由门阵列和标准胞元组合而成的ASIC晶片包括已部分制作部分门阵列和空白部分与标准的胞元ASIC一样嵌入阵列也允许有用户定制的宏和存储器ECO工程更改定单一旦ASIC被掩膜对掩膜进行修改需要重整re-spin”这需要付一定的费用EDA电子设计自动化就是利用计算机来设计和仿真芯片上的电子线路的性能EDIFEDIF 是工业标准的网表格式equivalency checking一致性检查也被称为形式验证形式验证被用来检查一个电路综合前后的一致性FG微间距球栅阵列封装FIFO先进先出器FIFO通常用一个RAM块来实现一个FIFO被用来以一个速率时钟速率存储数据而以另外一个不同的速率来读数据flash memory一种存储器件可以重新写入数据而且掉电后内容仍被保留Flow Engine流程机制是Xilinx的软件被用来实现通常指布局布线设计和生成配置Xilinx器件的位流文件FoundationFoundation 是Xilinx的软件包它包含了原理图抓取仿真和针对Xilinx器件实现的一整套解决方案footprintfootprint表示封装布局footprint也可指用作IO以及用作电源和地线的引脚的数目FPGA现场可编程门阵列-现场可重编程ICFPGA Compiler IIFPGA Compiler II是由Synopsys公司制作的一个综合工具FPGA ExpressFPGA Express是Synopsys公司制作的一个综合工具FSM有限状态机一个使用需要解决特定问题的操作状态来设计的计算部件这些电路对应用而言是最小化的特定的和优化的状态机控制电路的操作它提供了在合适的时间产生的输出以控制其它的逻辑function generatorXilinx查找表LUT Xilinx的查找表由SRAM制成但它的功能像一个16x1的ROM Xilinx的查找表使用四个输入查找表被置入了基于来自四输入逻辑函数的16个可能的输出的可能的逻辑值查找表也被称为函数发生器gate array门阵列一种使用已部分制作好的圆片的ASIC它只使用布线层的掩膜来定制它的作门阵列的特点是初期成本低开发时间短密度低性能有限在量少的情况下价格便宜这种形式的ASIC正逐步被废弃因为其它的技术在规模和低成本方面已超过它gating门控通常是指门控一个时钟当你门控一个时钟时时钟信号与另外一个信号组合起来产生一个新的时钟信号这是一个不好的设计实践门控时钟会产生毛刺会使你的设计不可靠Xilinx 的Virtex -II器件有无毛刺时钟管理资源可以用它们来产生一个门控时钟参见BUFGMUX和BUFGCEGDSII图形设计系统II在ASIC设计过程中使用的Polygon布局格式global clock buffer全局时钟缓冲器被用来驱动Xilinx器件内部的专用时钟树这些时钟网络被优化以传播贯穿整个芯片的低偏差的高频时钟信号每个部件有四到十六个全局时钟缓冲器全局时钟缓冲器也被称为BUFGgray code格雷编码是指这样的逻辑当它的状态变化时只有一位会变化这可以被用来降低二进制序列引起的毛刺它通常也比二进制编码逻辑更快这是因为它需要更多的寄存器来表示状态但需要解码一个状态的逻辑时仅需要看较少的位就可对所在的状态进行解码GSR全局置位复位全局置位复位是一个专用的布线网络在配置的最后的启动序列期间使用它给出了器件上电时的状态寄存器处于置位或复位状态下这取决于代码全局置位复位可以被用户用来在配置后置位/复位芯片内所有的同步元件在基于Virtex 的器件中不建议采用因为它很慢GTL注射收发逻辑终端电压接口标准GTS全局三态全局三态网络是一个专用的布线网络在配置期间被用来使器件所有的IO引脚在配置期间未被使用的所有的IO处于三态在配置的启动序列期间这个网络被释放然后它可以被用来对处于工作状态下的器件的所有的输出进行三态控制GUI图形用户界面在这个界面中用户可以设定选项以控制如何来优化或实现一个设计HDL硬件描述语言一种用来建模设计和仿真硬件的语言最常用的两种形式是VHDL和VerilogHQ高散热方型扁平封装HSTL高速收发器逻辑电压接口标准是一种1.5伏的总线接口标准IBM国际商用机器公司世界上最大的计算机公司标准胞元ASIC的供应商IBIS输入输出缓冲器信息规范IBIS 是通过V/I数据而无需揭示任何电路/工艺信息就可提供器件的输入/输出特性的一种方法它可以被看作是一个适合数字系统传输线仿真的行为模型规范并且它可应用于大部分的数字元件Xilinx之所以提供IBIS模型而不是SPICE模型是因为SPICE模型含有专利信息IC集成电路计算机芯片的正式名称制作电路的硅片ICE集成电路工程implementation实现是Xilinx所指的包括布局布线进程在内的许多步骤这些步骤包括转换映射布局布线静态时序分析和位流产生用于编程instantiate例化是HDL中的一个术语它表示在代码中放置一个层次块的行为它与在一个原理图中放置一个逻辑符号是同义的Intellectual Property参见IPIO输入和输出是指器件的端口I/O输入和输出是指器件的端口IOB输入输出块Xilinx的IOB被用来与外部信号接口Xilinx的 IOB有一个引脚输入输出缓冲器和寄存器IP知识产权是一大类被法律认定为属于某个组织的专利的无形材料在计算机领域硬件电路软件和文本都是有版权的在一些情况下硬件电路和软件中所使用的算法也可以受专利保护而且大部分的商标名称可以受商标权保护ISE集成综合环境 ISE是Xilinx公司提供的一个软件包它包括了仿真综合和针对Xilinx器件实现的一整套解决方案ISE常常被读成iceJTAG联合测试行动组一种边界扫描技术的IEEE标准latency延迟是处理信息所需要的时钟周期数目Leonard SpectrumLeonardo Spectrum是由Exemplar制作的一种综合工具LFSR线性反馈移位寄存器LFSR使用了一个伪随机计数序列 LFSR非常有用因为它能在比二进制序列更高的时钟频率下运行而且可以重复这个序列LFSR也可被称为伪随机位流生成器或PRBS生成器Libraries Guide库指南是一个软件手册它包含了关于所有的Xilinx宏和原语的一个列表它按照字母顺序排列对于每一个宏/原语都有一个原理图用来显示用于HDL例化的端口名称一个功能描述和一个根据输入而产生期望输出的真值表LM分层金属在集成电路中用于提供布线线路的金属层的数目LOC位置约束位置约束被用来锁定管脚位置或将逻辑放置在芯片的特定位置LogiBLOXLogiBLOX 软件可以用来生成XC4000和Spartan系列器件的一些小规模的核LUT查找表Xilinx的查找表由SRAM制成但它的功能通常像一个16x1的ROM Xilinx的查找表使用四个输入查找表被置入了基于四输入逻辑函数的16个可能的输出的可能的逻辑值查找表也被称为函数发生器LVCMOS低电压CMOSLVDS低电压差分信号 LVDS 是一种差分输入输出标准它需要两个信号线来荷载一个数据位与所有的差分信号标准一样LVDS具有优于单端I/O标准的固有的抗噪能力两个信号线间的电压的摆率约为350毫伏它不需要使用参考电压V REF 或板级终端电压V TT对每一个输入或输出LVDS需要两个管脚LVDS也需要外部的电阻终端LVPECL低电压正射极耦合逻辑LVTTL低电压TTL电压接口标准macro术语宏常可以与核互用参见coremapmap是Xilinx器件实现过程中的一个步骤特别地在映射这一步将网表中的逻辑如果输入网表来自于原理图工具优化成Xilinx 器件资源如LUT寄存器三态缓冲器等等然后将LUT寄存器等打包到slice和IOB中MP微处理器MHz百万赫兹ModelSimModelSim是Model Technology公司制作的一个行为仿真工具MTIModel Technology公司参见ModelSimNCF网表约束文件 NCF是由综合工具产生的用来在综合工具和Xilinx的实现工具间传递约束Netlist网表是组成电路的逻辑门及其互连的一个列表通常是文本形式 Xilinx使用的大部分网表采用 EDIF 或 XNF格式NGDBuildNGDBuild是转换的命令行名称参见 translateNRE非重复性工程成本开发ASIC时付给ASIC供应商的最开始的费用nW纳瓦OFFSET IN是一个覆盖从输入管脚到同步元件之间的路径的时序约束OFFSET OUT是一个覆盖从同步元件到输出管脚之间的路径的时序约束one-hot一位有效编码逻辑是指这样的逻辑其中有一位有效或为高电平而所有的其它位无效或为低电平optimize硬件优化是优化逻辑布尔的行为使得可以有效地利用硬件资源pad-to-pad是一个时序规范覆盖从输入引脚经过组合逻辑到达输出引脚的路径管脚-到-管脚约束不会穿过任何寄存的边界PAL可编程阵列逻辑它是一类包含可编程的与门阵列和预先定义的或门阵列只有与门连接可以被编程的可编程逻辑器件PLD PAL通常被排列好以提供乘积和sum-of-products (SOP)逻辑的表达P&R布局和布线是将逻辑放到硅片中并对逻辑间的信号进行布线以满足时序要求的行为PAR布局和布线是将逻辑放到硅片中并对逻辑间的信号进行布线以满足时序要求的行为PCI外设部件互连是一个通常用于PC机Macintosh计算机和工作站中的外设总线PCI 为CPU和外设部件如视频磁盘网络等等之间提供一个高速的数据通路period同步元件到同步元件的时序规范pipeline流水化一个设计是将寄存器置于组合逻辑间的行为它可以通过牺牲延迟来提高一个设计的吞吐量时钟频率PECL正射极耦合逻辑发送每个数据位需要两个信号线对于每一个输入或输出这个标准指定两个引脚在这两个信号线间的电压摆率约为850毫伏它不需要使用参考电压V REF 或板级终端电压V TT LVPECL需要外部的电阻终端pin locking管脚锁定是将输入输出信号放在部件中特定管脚上的行为因为FPGA是完全可编程的设计者可以将信号放在器件中的任意特定的管脚上注意通常建议在器件中建立水平方向分布上的数据流总线的最低位被放在芯片左右两侧较下部分这常常是因为进位逻辑进位链在芯片中在垂直方向上自下而上分布PLA可编程逻辑阵列它是一类包含可编程的与门和或门阵列与门和或门连接都可以被编程的可编程逻辑器件PLD PLA通常被排列好以提供乘积和sum-of-products(SOP)逻辑的表达Place and Route是将逻辑放到硅片中并对逻辑间的信号进行布线以满足时序要求的行为是Xilinx实现进程中的一步pipelining在组合逻辑间插入寄存器以提高电路的吞吐量性能或时钟频率但是以牺牲延迟为代价的PLD可编程逻辑器件包括FPGA和CPLDPLL锁相环模拟式时钟锁定电路比较两个时钟信号并将它们对齐PQ塑料方型扁平封装PRBS generator参见LFSRpriority encoded是指一种逻辑结构在这种结构中逻辑被级联起来以实现一定逻辑功能通常级联的逻辑并不像用并行结构实现的逻辑那样有效Project Navigator项目导航器是软件程序ISE的图形用户界面GUI在这个图形用户界面GUI中你能够指定综合仿真和实现选项另外在图形用户界面中GUI你可以执行综合仿真和实现的每一项功能RAM随机存取存储器可读写的存储器um微米 (micron)用来度量晶体管和布线线路的几何尺寸regression是指两个或更多相关变量之间的功能关系它常常从一些数据中来经验地确定当其它变量的值被给定时这个关系可以用来预测一个变量的值在硬件系统中回归测试被使用使得不需利用所有可能的测试向量例如对一个两输入的与门有四个可能的可以被应用的逻辑向量回归测试可以只测试这些向量中的一个或两个如果它能正常工作就可以认为这个与门能正确工作revisionXilinx工具的一个子版本代表Xilinx实现选项的一个变化子版本的建立由用户所控制RLOC相对位置约束 RLOC被用来将一些逻辑元件成组放在一起以降低设计中的布线时延通过将逻辑放得靠近在一起将不允许布局布线这一步将属于一起的任何逻辑分开这样就建立起了RPM也就是一片逻辑被放置在与另一片逻辑相对的位置上它不是被硬放置在芯片上的RPM相对放置的宏相对放置的宏利用RLOC约束来将相关的逻辑成组放在一起以便降低与布线相关的数量和时延RTL寄存器传输级是一个通常被用来描述可综合的HDL代码的术语SC标准胞元ASIC ASIC使用标准的逻辑胞元以实现紧凑的封装一个标准胞元ASIC 使用空白的圆片而不是已部分制作好的一个标准胞元ASIC的特点是初期成本高开发时间长可以提供尽可能的最大的密度和最高的性能在量大的时候是最便宜和最有效的scan内部扫描链建立用于测试部件功能的内部移位寄存器SDF标准时延格式 SDF文件被用来传递用于时序仿真的在硬件电路中与逻辑和布线相关的时延信息SDF文件通常与一个用来提供逻辑功能和连接的结构化的HDL文件一起使用.SelectI/OSelectI/O 是Xilinx的专有术语它可以支持与外部器件接口的许多电压阈值电平目前Virtex-II支持19种不同的I/O标准SelectRAMSelectRAM 是指将内部的查找表用做RAM而不是函数发生器SelectRAM也被称作分布式RAM或查找表式RAM每个查找表可以被配置成一个深度为16宽度为1的RAM这个RAM的特点是可以同步写和异步读SelectRAM也可指双端口RAMSelectROMSelectROM是指将内部的查找表用做ROM而不是函数发生器SelectROM也被称作分布式ROM或查找表式ROM每个查找表可以被配置成一个深度为16宽度为1的ROM 这个ROM可以异步读Silicon芯片中使用的基本材料它的原子结构和易获性使得它可以作为一个理想的半导体材料在芯片制作的时候首先从白石英石中提取然后在高温下通过一个化学过程来提纯为了改变它的电学特性在融化状态下将其与其它的化学物质相混合搀杂simulation就是在计算机上执行一个概念设计来模拟实际的功能在硬件系统中在实现硬件之前仿真通过用软件来建模和验证硬件概念的方法来实现simprims仿真原语这些仿真原语被用来为用Xilinx器件实现的一个设计进行时序仿真skew偏差表示信号到达不同终点的时间上的差异slicesSlice存在于CLB中每个slice包含两个查找表和两个寄存器在每个slice中还存在其它的逻辑如多路选择器F5F6F7和F8多路选择器布线和进位逻辑SRAM静态RAM是一种需要电源才能保持其内容的存储器静态RAM不像动态RAM一样需要刷新电路SRL移位寄存器查找表SRL将查找表用做移位寄存器SRL16 是一个SRL宏这个移位寄存器可以实现多达16个时钟周期的串行移位对每个查找表而言SRL 可以实现不带任何复位功能的串行入串行出的单纯的移位寄存器功能然而SRL可以在上电时用数据来初始化在ucf文件中使用INIT属性而且在SRL中的每一个寄存器可以被动态地读取在Virtex-II中宏SRLC16有两个输出可用一个动态可寻址输出和一个最终输出SSTL短线串行收发器逻辑电压接口标准存储器总线接口标准ST以前称为 SGS汤姆生STA静态时序分析时序分析被用来确定一个电路的最差情况下的延时或性能通常这些时延被用来与以时序约束格式提供的时序目标相比较stampStamp模型是板级时序验证的工业标准格式startup启动块在配置阶段被用来控制内部的复位全局写使能和全局三态网络启动块在Virtex 器件中被称作STARTUP_VIRTEX 而在Virtex -II 器件中被称为STARTUP_VIRTEX2Static Timing Analysis参见上面的STAsynchronous同步设计是指这样一种设计它只使用一个时钟时钟的一个沿D触发器和层次的合适应用SynplifySynplify是Synplicity公司制作的一个综合工具synthesis将HDL代码Verilog 或 VHDL编译为电路的硬件描述综合工具通常会生成edif格式的网表synthesizesynthesis的动词形式TI德州仪器公司最大的DSP处理器制造商也是标准胞元和嵌入式阵列ASIC的供应商timing constraints时序约束被设计者用来向Xilinx 实现工具传递一个设计的设计性能目标Xilinx的实现工具是时序驱动的所以在实现过程中实现工具试图对逻辑进行布局布线以满足时序约束translate转换是Xilinx器件实现进程中的一个步骤特别地在转换这一步将所有的输入网表进行合并检查约束以及查找输入网表中的常见问题TTL晶体管传输逻辑它是一个含有以一定方式连接的双极晶体管的数字电路TTL逻辑从数字电路的早期就被广泛使用TTL标识可以出现在不同器件的输入或输出端口上它用来表明是数字电路而不是模拟电路TTM上市时间TWRTWR 文件是由Xilinx的静态时序时序分析工具时序分析器生成的这个文件包含了与加到设计中的时延约束有关的时序时延信息versionXilinx工具中的一个版本代表了输入网表的一个变化这通常代表HDL源代码一个变化或网表的重新综合Verilog一种硬件描述语言 (HDL)VHDL超高速集成电路HDLVITAL通向 ASIC库的VHDL初始库VITAL是用来建立与VHDL语言一起使用的时序仿真模型的工业标准UCF用户约束文件 UCF文件被用来与Xilinx的实现工具交互约束UCF文件是Xilinx所特有的UI用户界面参见GUIUnisim统一的仿真原语这些仿真文件被用来仿真在HDL代码中例化的Xilinx原语uP微处理器Xilinx CoreLib由核生成系统为IP生成的Xilinx的仿真文件。
© 2006 Xilinx, Inc. All rights reserved. XILINX, the Xilinx logo, and other designated brands included herein are trademarks of Xilinx, Inc. All other trademarks are the property of their respective owners. Xilinx is providing this design, code, or information "as is." By providing the design, code, or information as one possible implementation of this feature, application, or standard, Xilinx makes no representation that this implementation is free from any claims of infringement. Y ou are responsible for obtaining any rights you may require for your implementation. Xilinx expressly disclaims any warranty whatsoever with respect to the adequacy of the implementation, including but not limited to any warranties or representations that this implementation is free from claimsof infringement and any implied warranties of merchantability or fitness for a particular purpose.IntroductionThe LogiCORE™ Divider core creates a circuit for fixed-point or floating-point division based on radix-2non-restoring division, or division by repeated multi-plications, respectively. The Divider core supersedes the Serial Divider core version 3.0, which has been incorporated into this core and now forms the fixed-point solution.Features•Generates an arithmetic division algorithms for fixed-point or floating-point division with operands of up to 32 or 64 bits wide, respectively •Performs radix-2 integer division or division by repeated multiplications for floating-point numbers •Supports IEEE-754 format for floating-point numbers •Optional operand widths, synchronous controls, and selectable latency •For use with Xilinx CORE Generator™ tool v8.1i. •Incorporates Xilinx Smart-IP™ technology for maximum parameterization and optimum implementationDivider v1.0DS530 January 18, 2006Product SpecificationLogiCORE™ Facts Core SpecificsSupported Device FamilyVirtex™, Virtex-E, Virtex-II,Virtex-II Pro, Virtex-4, Spartan™-II,Spartan-IIE, Spartan-3, andSpartan-3E FPGAsResources UsedI/OLUTsFFsBlock RAMsFixed point See Table 5,Fixed-point Performance Characteristics Floating pointSee T able 9,Floating-point Performance CharacteristicsProvided with CoreDocumentation Data SheetDesign File Formats VHDL Constraints File noneVerificationVHDL Behavioral ModelVHDL Structural (UniSim)Model Verilog Structural (UniSim)ModelInstantiation TemplateVHDL Wrapper Verilog WrapperDesign Tool RequirementsXilinx Implementation Tools ISE 8.1i or later Verification ModelSim®PE 6.1a Simulation ModelSim PE 6.1a SynthesisXST v8.1i or higherSupportProvided by Xilinx, Inc. @ /support .OverviewThe Divider core selects an implementation depending on the algorithm_type parameter. Currently,the following two division implementations are supported:•Fixed-point. Radix-2, non-restoring integer division using fixed-point operands, allowing a remainder to be generated.•Floating-point. Division by repeated multiplications. Works on normalized operands; in effect, a floating-point implementation.A detailed explanation of each implementation is provided in a later section of this data sheet.ApplicationsDivision is the most complex of the four basic arithmetic operations. Because hardware solutions arecorrespondingly larger and more complex than the solutions for the other operations, it is best to min-imize the number of divisions in any algorithm. There are many forms of division implementation,which can be separated into two broad categories: fixed-point algorithms and floating-point algo-rithms. This core provides one example of each category.The radix-2 non-restoring algorithm solves one bit of the quotient per cycle using addition and subtrac-tion. For this reason, it can achieve very high clock speeds at the expense of relatively high latency.However, the design is fully pipelined, so can achieve a throughput of one division per clock cycle. Theresulting circuit is relatively large, however, so if the throughput is smaller, the divisions per clockparameter allows compromises of throughput and resource use. This algorithm naturally generates aremainder, so is the choice for applications requiring remainders or modulus results.The repeated multiplications algorithm is an iterative method using successive approximations to thereciprocal of the denominator. The number of bits of the quotient solved doubles per iteration, so thisalgorithm is well suited to applications requiring precise results. Also, because this core makes use ofembedded multipliers, the overall resource use is less than that for the radix-2 algorithm. Again, thedesign is fully pipelined to allow a throughput of one division per clock cycle. This algorithm does notnaturally yield a remainder.2DS530 January 18, 2006Generic XCO and VHDL ParametersThe descriptions below refer to generic VHDL parameters. Table2 defines the parameters, legal values,and meaning of the XCO parameters and VHDL generics, which are broadly equivalent.•c_family (string) and c_xdevicefamily (string): Together, these generics identify the specific FPGA device family the core is targeting. Table1 the values for each of the supported families.T able 1: Relationship between Target FPGA Family, c_family and c_xdevicefamilyTarget FPGA Family c_family c_xdevicefamily Virtex/Virtex-E"virtex""virtex"Spartan-II/Spartan-II E"virtex""spartan2"Virtex-II"virtex2""virtex2"Virtex-II Pro"virtex2p""virtex2p"Spartan-3"spartan3""spartan3"Spartan-3E"spartan3""spartan3e"Virtex-4"virtex4""virtex4"•algorithm_type (integer): Specifies the division algorithm to use. The choice is 1 for radix-2(fixed-point notation) or 2 for division by repeated multiplications (floating-point notation).•signed_b (integer): 0 for unsigned operands, 1 for signed (2’s complement) operands. Applies to fixed-point notation only.•fractional_b (integer): 0 (no remainder) or 1 (has remainder). Applies to fixed-point only.•dividend_width (integer): 2 to 32 (fixed). Specifies the width of both dividend and quotient.•fractional_width (integer): 2 to 32 (fixed-point only).•c_has_ce (integer): 0 (no ce), or 1 (has ce).•c_has_aclr (integer): 0 (no ce), or 1 (has ce).•c_has_sclr (integer): 0 (no ce), or 1 (has ce).•divclk_sel (integer): 1, 2, 4, or 8. Specifies the number of clocks between division results for the fixed-point case only. A higher number results in lower-circuit area at the cost of lower throughput.•latency (integer): 1 to 99(float only). Specifies the circuit latency in terms of enabled clock (ce) cycles.•divisor_width (integer):2 to 32 (fixed)•bias (integer): Specifies the bias on the exponent, according to IEEE-754 format. A value of -1 results in a bias value in the mid-point of the exponent range.•mantissa_width (integer): 2 to 64. Specifies the width of the mantissae of all operands (floating-point only).•exponent_width (integer): 2 to 16. Specifies the width of the exponents of all operands (floating-point only).4DS530 January 18, 2006T able 2: Common Generic Parameters XCO ParameterXCO ValuesGeneric VHDL Parameter Generic ValuesDescriptionCommon GenericsAlgorithm T ype Fixed, Float algorithm_type (1),21 = fixed-point division (radix-2)2 = floating-point division CE false, true c_has_ce (0),10 = no CE 1 = has CE ACLR false, true c_has_aclr (0),10 = no ACLR 1 = has ACLR SCLRfalse, true c_has_sclr(0),10 = no SCLR 1 = has SCLRSCLR/CE Priority SCLR_overrides _CE, CE_overrides_SCLRc_sync_enable (0),10 = SCLR overrides CE 1 = CE overrides SCLRSerial-divider Generics (Fixed-point)Dividend and Quotient width 2 to 32 (16)dividend_width 2 to 32(16)Width of dividend and quotient (fixed only)Divisor width 2 to 32 (16)divisor_width 2 to 32 (16)Width of divisor (fixed only)Remainder type remainder, fractional fractional_b 0,10 = remainder,1 = fractional Fractional width 2 to 32 (16)fractional_width 2 to 32 (16)Width of fraction (fractional only)Operand signunsigned, signedsigned_b0,10 = unsigned 1 = signedClocks per division 1,2,4,8divclk_sel (1),2,4,8Throughput (interval between input opportunities)Low-latency Generics (Floating-point)Mantissa width 2 to 64mantissa_width 2 to 64 (16)Width of mantissa Exponent width2 to 16exponent_width2 to 16 (8)Width of exponent Latency 1 to 99latency 1 to 99(1)Latency of division Bias-1 to 2^Exponent_width -1bias-1 to 2^exponent_width -1Exponent biasFeature Summary Fixed-point Solution•Divides dividend by divisor to provide the quotient with integer or fractional remainder •Pipelined architecture for increased throughput •Pipeline reduction for size versus throughput selections •Dividend width from 1 to 32 bits •Divisor width from 3 to 32 bits•Fractional remainder width from 3 to 32 bits•Independent dividend, divisor and fractional bit widths •Fully synchronous design using a single clock•Supports unsigned or two’s complement signed numbers •Can implement 1/X (reciprocal) function •Fully registered outputsOverview Fixed-point SolutionThis parameterized module divides an M-bit-wide variable dividend by an N-bit-wide variable divi-sor. The output consists of the quotient and either the integer remainder or the fractional result (quo-tient continued past the binary point). In the integer remainder case, the result of the division is an M-bit-wide quotient with an N-bit-wide integer remainder (Equation 1). In the fractional case, the result is an M-bit-wide quotient with an F-bit-wide fractional remainder (Equation 2). When both frac-tional and signed are selected, the top bit of the fractional result is a two’s complement sign bit, result-ing in one less bit of magnitude result (Equation 3). It is an efficient, high-speed, parallel implementation. The core can be configured for unsigned or signed data.Equation 1: Integer remainder case.Equation 2: F-bit-wide fractional remainder in the unsigned caseEquation 3: F-bit-wide fractional remainder in the signed caseNote that for signed mode with integer remainder, the sign of the quotient and remainder correspond exactly to Equation 1.Dividend = quotient * divisor + remainderFractRmd=IntRmd *2FDivisorFractRmd=IntRmd *2( F-1)DivisorThus6/-4 = -1 REMD 2whereas-6/4 = -1 REMD –2For signed mode with fractional remainder, the sign bit is present both in the quotient and the remain-der. For example, for a four-bit dividend, divisor and fractional remainder we have:-9/4 = 9/-4 = -(2 1/4)This corresponds to:(1)0111 / 0100 or 1001/1100Giving the result:Quotient = 1110 (= -2)Remainder = 1110 (= -1/4)For division by zero, the quotient, remainder, and fractional results are undefined.The design is highly pipelined. The amount of pipelining can be reduced to decrease the area of thedesign at the expense of throughput. In the fully pipelined mode the design outputs the result of onedivision operation per clock cycle after an initial latency. The design also supports the options of 2, 4,and 8 clock cycles per division after an initial latency, as shown in Table4.The dividend and divisor bit widths can be set independently. The bit width of the quotient is equal tothe bit width of the dividend. The bit width of the integer remainder is equal to the width of the divisor.For fractional output, the remainder bit width is also independent of the dividend and divisor. The corewill handle data ranges of 3 to 32 bits for the dividend, divisor and fractional output.The divider can be used to implement the 1/X function; that is, the reciprocal of the variable X. To dothis, the dividend bit width is set to 1 for unsigned or 2 for signed data and fractional mode is selected.The dividend input is tied high within the user’s design.6DS530 January 18, 2006Pinout of Fixed-point SolutionThe fixed-point core pinout and signal names are shown in Figure 1 and defined in Table 3.Figure 1: Core Pinout DiagramTable 3: Fixed-point Signal PinoutSignalDirectionDescriptionDIVIDEND[Dividend Width-1:0]Input Dividend (parallel data in). Data bit width determined by the Dividend width generic or XCO parameter.DIVISOR[Divisor Width -1:0]InputDivisor (parallel data in). Data bit width determined by the Divisor width generic or XCO parameter.CLK InputClock . With the exception of ACLR, control and data inputs are captured and new output data formed on rising clock transitions.ACLRInput (optional)Asynchronous Clear (ACLR). Optional input pin. All control signals are synchronous to the rising edge of CLK except ACLR. When ACLR is asserted (High), all the core flip-flops are asynchronously initialized. The core remain in this state until ACLR is negated.SCLRInput (optional)Synchronous Clear (SCLR). Optional input pin. When asserted (high), all the core flip-flops are synchronously initialized (synchronous to the clock). The core remains in this state until SCLR is deasserted. When both SCLR and CE exist, the sync_enable parameter determines whether SCLR is qualified by CE or whether SCLR overrides CE (that is, will clear the module on the clock edge even if CE is deasserted).CEInput (optional)Clock Enable (CE). Optional input pin. When deasserted (low), all the synchronous inputs are ignored and the core remains in its current state.8DS530 January 18, 2006Following a power-on reset, SCLR , or ACLR , the outputs QUOTIENT and REMAINDER output all zeroes until new results appear.Waveforms of Fixed-point SolutionThe total latency (number of clocks required to get the first output) is a function of the bit width of the dividend. If fractional output is required, the latency is also a function of the fractional bit width. If clock enable is selected, latency is in terms of enabled clock cycles.When ‘clocks per division’ is set to 2, 4, or 8, the RFD output indicates the cycle in which input data is sampled (Figure 2), and therefore from when latency is measured. Ready for data should be qualified by clock enable if used externally.In general:Latency is of the order M for integer remainder dividers Latency is of the order M + F for fractional remainder dividersRFDOutputReady for Data (RFD). An output that indicates the cycle in which input data is sampled by the core. This is only applicable to cores where divclk_sel is not 1. For the case of divclk_sel = 1 the core is fully pipelined and samples the inputs on every enabled clock rising edge; hence, RFD will always be high.When divclk_sel = 2, 4 or 8, the core only samples data on every 2nd, 4th or 8th enabled clock rising edge respectively. The cycle on which data is sampled isimportant for the definition of latency, as shown in figure3. RFD will only change on enabled (CE input) clock rising edges for a core that has CE input (has_ce = True).QUOTIENT[Dividend width-1:0]OutputQuotient . The result of the integer division of dividend by divisor (dividend DIV divisor). The bit width of the quotient is equal to the dividend. For signed operation, the quotient is in two’s complement form. Parallel data out. Data bit width determined by the dividend width generic or XCO parameter.REMAINDER[n:0]REMAINDER[f:0]OutputRemainder . The integer remainder of the integer division of dividend by divisor (dividend MOD divisor) when the core is not fractional. For a fractional core, this output is the fractional part of the division result.For either case, if the core is signed, the output is in two’s complement form.• Integer Remainder. Result data bit width determined by divisor width generic or XCO parameter.• Fractional Remainder. Result data bit width determined by Fractional Width generic or XCO parameter.Table 3: Fixed-point Signal Pinout (Continued)SignalDirectionDescriptionTable 4 provides a list of the latency formula for divider selections and Figure 2 illustrates how latency is defined. Latency is expressed in clock cycles for dividers with no clock enable input and otherwise in enabled clock cycles.The divclk_sel parameter allows a range of choices of throughput versus area. With divclk_sel = 1, the core is fully pipelined, so it will have maximal throughput of one division per clock cycle, but will occupy the most area. The divclk_sel selections of 2, 4 and 8 reduce the throughput by those respective factors for smaller core sizes.Figure 2: Latency Example (Clocks per Division = 4)T able 4: Latency of Fixed-point Solution Based on Divider ParametersSignedFractionalClks/DivLatencyFalse False 1M+2False False >1M+3False True 1M+F+2False True >1M+F+3True False 1M+4True False >1M+5True True 1M+F+4TrueTrue>1M+F+5Note: M=dividend width, F=fractional remainder width.clk dividend divisorrfd quot remda ba divb a rem blatencyce c div d c rem dc de f10DS530 January 18, 2006Performance Characteristics of Fixed-point SolutionTable 5 defines performance characteristics for cases run on a Virtex-4, speed grade 10 device, and are intended to provide an indication of resources used and achievable clock speed. Generics not specified are at their default values.T able 5: Fixed-point Performance CharacteristicsDivisor WidthDividend WidthDivclk_selSlices usedSpeed (MHz)DSP48s usedBlock Memories881129385008821002850088475322008886233000323211666203Feature Summary Floating-point Solution•Performs division by repeated multiplications for floating-point numbers•Supports IEEE-754 format for floating-point numbers•Optional operand widths, synchronous controls, selectable latencyOverview Floating-point SolutionThe floating-point implementation performs division by repeated multiplications. The design is fully pipelined for maximal throughput. The two operands, divisor and dividend, are entered in sign-man-tissa-exponent form. A single sign bit per operand determines the sign of the mantissa. The mantissa width is configurable, as is the exponent width. The bias of the exponent is also configurable. Following IEEE754, certain combinations of exponent and mantissa are interpreted as zero, infinity and NaN (not a number). The result is expressed in the same form as the inputs. Overflow and underflow outputs are given for those results whose magnitudes lie above or below (respectively) the range which can be expressed with the specified mantissa and exponent widths.The format of number representation follows IEEE754. The mantissas, both on input and output have an implicit leading ’1.’ The mantissa describes a number in the range 0.5(inclusive) to 1.0(not inclusive). For example, the number 0.75 is 0.11000... in binary. The mantissa to describe this would be 10000... (to the specified width). The leading 1 indicates the number is in the range 0.5 to just less than 1.0. Since the number representation requires this normalization the leading 1 is not required as an input since it car-ries no information.The underflow and overflow outputs are provided to show if the result of a calculation resulted in and exponent outside the range allowed by the width of the exponent, that is, <0 or >2^exponent_width. Table6 defines special values recognized by the core.T able 6: Special ValuesExponent Mantissa Special ValueAll ’1’s Not all ’0’s Not a Number (NaN)All ’1’s All ’0’s InfinityAll ’0’s All ’0’s ZeroTable7 defines division results involving any of the special values described in Table6.T able 7: Division Results Involving Special ValuesDividend Divisor QuotientNaN Any Value NaNAny Value NaN NaNInfinity Infinity NaNZero Zero NaNAny value Infinity Zero12DS530 January 18, 2006Pinout of Floating-point SolutionThe floating-point core pinout and signal names are displayed in Figure 3 and defined in Table 8.Any Value Zero Infinity Zero Any Value Zero InfinityAny ValueInfinityFigure 3: Floating-point Schematic SymbolTable 8: Pinout of Floating-point SolutionSignalDirectionDescriptionCLK Input Clock. Rising edge clock signal CE Input (optional)Clock Enable ACLR Input (optional)Asynchronous Clear SCLRInput (optional)Synchronous Clear DIVIDEND _MANTISSA [Mantissa Width-1:0]Input Dividend mantissa DIVISOR _MANTISSA [Mantissa Width-1:0]Input Divisor mantissaDIVISOR_SIGNInputSign of Divisor mantissa (0 for +ve, 1 for -ve)T able 7: Division Results Involving Special Values (Continued)DividendDivisorQuotientWaveforms of Floating-point SolutionThe functional timing characteristics of the floating-point solution are very simple. Because the design has a throughput of one division per clock cycle, no handshaking signals (Ready for Data, New Data,output Ready) are required. Latency is selectable and is defined in the same manner as for the fixed-point solution. For this reason, outputs occur following the n th enabled rising clock edge after the inputs, where n is the latency value.Performance Characteristics of Floating-point SolutionTable 9 defines performance characteristics for cases run on a Virtex-4, speed grade 10 device and are intended to provide an indication of resources used and achievable clock speed. Generics not specified are at their default values.Note that when the core does not have asynchronous clear nor synchronous clear, use can be made of SRL16 primitives, leading to a substantial reduction in circuit size. For this reason, the use of SCLR or ACLR is not recommended.DIVIDEND_SIGNInput Sign of Dividend mantissa (0 for +ve, 1 for -ve)DIVISOR _EXPONENT [Exponent Width-1:0]Input Exponent of Divisor DIVIDEND _EXPONENT [Exponent Width-1:0]Input Exponent of Dividend QUOTIENT _MANTISSA [Mantissa Width-1:0]Output Quotient mantissa QUOTIENT_SIGNOutput Sign of Quotient QUOTIENT _EXPONENT [Exponent Width-1:0]Output Exponent of Quotient OVERFLOW Output Float overflow indication UNDERFLOWOutputFloat underflow indicationNoteAll control inputs are Active High. If an Active Low input is required for a particular control pin, an inverter must be placed in the path to the pin. The inverter will be absorbed appropriately during synthesis and/or mapping.T able 9: Floating-point Performance CharacteristicsMantissa WidthExponent WidthLatencySlices usedSpeed (MHz)DSP48s usedBlock Memories1581842510115810231941011583027227610124826(no SCLR)399283101Table 8: Pinout of Floating-point Solution (Continued)SignalDirectionDescription14DS530 January 18, 2006Generating the CoreThe Divider core can be included in your design in two ways: Using the CORE Generator graphical user interface (GUI), or using direct instantiation.Method 1: GUIThe CORE Generator system produces several files when a core is generated. Instructions about how to instantiate a core using this method are automatically produced in the .vho file. An example of a section of a .vho file is provided below:-- The following code must appear in the VHDL architecture header:------------- Begin Cut here for COMPONENT Declaration ------ COMP_TAG component div_gen_v1_0 port (clk: IN std_logic;...(other ports));end component;-- COMP_TAG_END ------ End COMPONENT Declaration -- The following code must appear in the VHDL architecture -- body. Substitute your own instance name and net names.------------- Begin Cut here for INSTANTIATION Template ----- INST_TAG your_instance_name : div_gen_v1_0 port map ( clk => clk, q => q);-- INST_TAG_END ------ End INSTANTIATION Template -- You must compile the wrapper file counter.vhd when simulating24826(with SCLR)720310101428157388821142845937211211T able 9: Floating-point Performance Characteristics (Continued)Mantissa WidthExponent WidthLatencySlices usedSpeed (MHz)DSP48s usedBlock Memories-- the core, counter. When compiling the wrapper file, be-- sure to reference the XilinxCoreLib VHDL simulation-- library. For detailed-- instructions, please see the CORE Generator User Guide.Method 2: Direct InstantiationThe CORE Generator now allows cores to be directly instantiated into user code. To do this, add the fol-lowing lines to the head of your VHDL file:Library Xilinxcorelib;Use Xilinxcorelib.div_gen_v1_0_comp.all;and instantiate the Divider core with appropriate values for the generics and your local signals:i_instance: div_gen_v1_0generic map(c_dividend_width => 16,c_has_ce => 1etc.);port map(clk => clk ,sclr => sclr ,quotient => output);Note that generics do not need to be specified if the default value suits your application.CORE Generator Parameter ScreensThe Divider core GUI provides three screens for selecting core parameters.•Main screen. Describes parameters common to both implementations, such as SCLR and CE, and allows the selection of the divider implementation.•Fixed-point implementation options. Provides configuration options for the fixed-point divider configuration. Note that this screen is displayed only if Fixed-point is selected on the main screen. •Floating-point implementation options. Provides configuration options for the floating-point divider configuration. Note that this screen is displayed only if Floating-point is selected on the main screen.16DS530 January 18, 2006Main Screen•Component Name. The base name of the output files generated for the core. Names must begin with a letter and be composed of any of the following characters: a to z, 0 to 9 and “_”.Figure 4: Main ScreenFixed-point Implementation OptionsFloating-point Implementation OptionsFigure 5: Fixed-point Implementation OptionsFigure 6: Floating-Point Implementation OptionsVerificationThe Divider core is supplied with a VHDL functional behavioral model, and the CORE Generator canalso produce a UniSim-based Verilog model if desired.SimulationWhen the Divider core is generated using the CORE Generator, a VHDL functional behavioral model is alsogenerated. The VHDL behavioral model is a pre-defined, parameterized model of the core, which is copiedto the project directory. A Verilog wrapper is also provided for the VHDL model for mixed-language simu-lation. If a Verilog model is selected, the CORE Generator produces a UniSim-based model of the core.Important Note: The VHDL Behavioral model provided for the floating-point solution does not exactlyreproduce the behavior of the synthesized core. The models quotients may differ by the least significant bitof the mantissa. For an exact match, the structural (UniSim) behavioral model must be used.References"Computer Arithmetic Algorithms and Hardware Designs," Behrooz Parhami. Oxford Press © 2000.LicensingThe Divider core does not require a license.Ordering InformationThis core may be downloaded from the Xilinx IP Center for use with the Xilinx CORE Generator systemv8.1i and higher. The Xilinx CORE Generator system is bundled with the ISE Foundation software at noadditional charge. To inquire about other Xilinx products, contact your local Xilinx sales representative.SupportXilinx provides technical support for this LogiCORE product when used as described in the productdocumentation. Xilinx cannot guarantee timing, functionality, or support of product if implemented indevices not listed in the documentation, or if customized beyond that allowed in the productdocumentation, or if any changes are made in sections of design marked as DO NOT MODIFY.Related InformationXilinx products are not intended for use in life-support appliances, devices, or systems. Use of a Xilinxproduct in such application without the written consent of the appropriate Xilinx officer is prohibited.Revision HistoryDate Version Revision1/18/06 1.0Initial Xilinx release.18DS530 January 18, 2006。
1.DDRII IP功能简介与层次说明DDR2的IP模块提供了FPGA与内存之间的接口设计,方便产生控制信号和物理层接口,IP核的结构如图1所示:图1模块主要由三层构成:用户实现层、控制层、物理层。
实现层是与用户的逻辑对接,包括了地址、命令处理、读写数据操作;控制层是DDR2的时序处理,主要是处理存储器初始化和延时校准的操作,并基于用户的接口产生读、写、充电、刷新等命令;物理层直接与存储器对接,处理存储器的初始化操作,并使用Xilinx源同步技术对DQ和DQS进行75ps为单位的延时校准。
2.DDRII IP生成方式根据Core Generator的MIG图形向导可以,生成所需的存储器控制器(DDR II)IP核,同时生成相应的约束文件(管脚和时序约束UCF文件),因此在硬件原理图时就需要完成存储器控制器IP的生成工作,从而按照UCF文件管脚约束设计原理图。
如果PCB设计时走线困难需要调整管脚顺序,必须使用修改后的UCF文件在ISE中实现来进行验证,确认可以正常工作后方可调整管脚顺序。
下面我们以ISE11.2为开发环境,V5SX240T为平台,采用截图方式演示IP核通过MIG生成过程。
首先启动CORE Generator:图2新建工程才能产生IP核。
注意:新建工程的路径中不能有中文字符。
图3新建工程的过程中需要在Part菜单中设置FPGA的器件类型。
本例采用了V5SX240T,封装FF1738,速度等级-1的设置(实际设置按照所使用的器件型号确定)。
在Generation菜单中选择产生IP的语言种类(VHDL/Verilog/Schematic),本设计中选择了Verilog。
图4新建工程之后是产生IP核,在核目录菜单中找到MIG。
图5确定产生核的参数设定正确点击下一步。
图6选择Creat Design产生IP核,Component Name中设置核的名称,Num of Controllers中设定控制器的个数,本例以产生DDR2控制器为例选择产生的控制器个数为1。
FPGA管脚分配时需注意的一些事项(以xilinx xc4vsx55为例)FPGA管脚分配时需注意的一些事项(以xilinx xc4vsx55为例)平台:XC4VSX55 ISE10.1设计过FPGA的原理图,看FPGA的手册,说管脚的分配问题,如时钟管脚要用GC类管脚,而且单端时钟输入时要用P类型的管脚,不能用N类型管脚等等。
一直以来都没有试验过,今天试验一把,以求各种验证。
1)GC类全局时钟管脚是否可用作普通IO使用?所谓GC类管脚,就是在管脚的称是诸如IO_L1P_GC_LC等带有GC的管脚。
其实手册中说的是GC类管脚可以用作IO的,但在《Xilinx FPGA开发实用教程》(清华出版社)574页倒数第八行提到:“所有从全局时钟管脚输入的信号必须经过IBUF元,否则在布局布线时会报错”,于是今天我试了一下,将某一GC 类管脚分配给一个普通的输入口(也试验了分配给一个普通的输出口),经布局布线后,未出错。
因此得出结论:GC类全局时钟管脚可以作为普通IO使用。
(不知道是不是我对书中提到的全局时钟管脚理解有误,如果是,请网友别拍我,敬请留言指正)2)非GC类全局时钟管脚是否可以作时钟使用?其实至于说能否作为时钟使用,这里有另一层函义。
当然,如果你把一个普通IO口配置成输入口,就把它的输入信号作为时钟,那是没问题的。
但我们一般不这么做,因为时钟信号对于我们来说是一个很重要的信号,因此FPGA在内部会有特殊照顾,如果你使用FPGA传门为时钟预留的管脚,并作一些处理,那么你的时钟对于各种模块的时延是可以忽略的,因为时钟在布线时是单独走的一层,而如果你就仅用普通IO 的话,经过FPGA内部布局布线后,从它的输到,再到各个使用时钟的地方,有的线长,有的线短,它的时延将是不一样的。
这些东西还是看一些FPGA结构的内容吧。
在xilinx里有专门的DCM IP核可供调用,在ISE中执行project——>New Source——>IP(CORE Generator & Architecture Wizard)——>FPGA Features andDesign——>Clocking——>Virtex-4——>Single DCM ADV v9.1i,可得如下界面:需要特别注意的是CLKIN Source需要选择是External还是Internal,各自生成的源文件如下:==========================选择External=========================`timescale 1ns / 1psmodule clk_test(CLKIN_IN,CLKIN_IBUFG_OUT,CLK0_OUT,LOCKED_OUT);input CLKIN_IN;output CLKIN_IBUFG_OUT;output CLK0_OUT;output LOCKED_OUT;wire CLKFB_IN;wire CLKIN_IBUFG;wire CLK0_BUF;wire GND_BIT;wire [6:0] GND_BUS_7;wire [15:0] GND_BUS_16;assign GND_BIT = 0;assign GND_BUS_7 = 7'b0000000;assign GND_BUS_16 = 16'b0000000000000000;assign CLKIN_IBUFG_OUT = CLKIN_IBUFG;assign CLK0_OUT = CLKFB_IN;IBUFG CLKIN_IBUFG_INST (.I(CLKIN_IN),.O(CLKIN_IBUFG));BUFG CLK0_BUFG_INST (.I(CLK0_BUF),.O(CLKFB_IN));DCM_ADV DCM_ADV_INST (.CLKFB(CLKFB_IN), .CLKIN(CLKIN_IBUFG),.DADDR(GND_BUS_7[6:0]),.DCLK(GND_BIT),.DEN(GND_BIT),.DI(GND_BUS_16[15:0]),.DWE(GND_BIT),.PSCLK(GND_BIT),.PSEN(GND_BIT),.PSINCDEC(GND_BIT),.RST(GND_BIT),.CLKDV(),.CLKFX(),.CLKFX180(),.CLK0(CLK0_BUF),.CLK2X(),.CLK2X180(),.CLK90(),.CLK180(),.CLK270(),.DO(),.DRDY(),.LOCKED(LOCKED_OUT),.PSDONE());defparam DCM_ADV_INST.CLK_FEEDBACK = "1X";defparam DCM_ADV_INST.CLKDV_DIVIDE = 2.0;defparam DCM_ADV_INST.CLKFX_DIVIDE = 1;defparam DCM_ADV_INST.CLKFX_MULTIPLY = 4;defparam DCM_ADV_INST.CLKIN_DIVIDE_BY_2 = "FALSE";defparam DCM_ADV_INST.CLKIN_PERIOD = 16.129;defparam DCM_ADV_INST.CLKOUT_PHASE_SHIFT = "NONE";defparam DCM_ADV_INST.DCM_AUTOCALIBRATION = "TRUE";defparam DCM_ADV_INST.DCM_PERFORMANCE_MODE = "MAX_SPEED";defparam DCM_ADV_INST.DESKEW_ADJUST = "SYSTEM_SYNCHRONOUS";defparam DCM_ADV_INST.DFS_FREQUENCY_MODE = "LOW";defparam DCM_ADV_INST.DLL_FREQUENCY_MODE = "LOW";defparam DCM_ADV_INST.DUTY_CYCLE_CORRECTION = "TRUE";defparam DCM_ADV_INST.FACTORY_JF = 16'hF0F0;defparam DCM_ADV_INST.PHASE_SHIFT = 0;defparam DCM_ADV_INST.STARTUP_WAIT = "FALSE";endmodule==========================选择Internal=========================`timescale 1ns / 1psmodule clk1_test(CLKIN_IN,CLK0_OUT,LOCKED_OUT);input CLKIN_IN;output CLK0_OUT;output LOCKED_OUT;wire CLKFB_IN;wire CLK0_BUF;wire GND_BIT;wire [6:0] GND_BUS_7;wire [15:0] GND_BUS_16;assign GND_BIT = 0;assign GND_BUS_7 = 7'b0000000;assign GND_BUS_16 = 16'b0000000000000000;assign CLK0_OUT = CLKFB_IN;BUFG CLK0_BUFG_INST (.I(CLK0_BUF),.O(CLKFB_IN));DCM_ADV DCM_ADV_INST (.CLKFB(CLKFB_IN),.CLKIN(CLKIN_IN),.DADDR(GND_BUS_7[6:0]),.DCLK(GND_BIT),.DEN(GND_BIT),.DI(GND_BUS_16[15:0]),.DWE(GND_BIT),.PSCLK(GND_BIT),.PSEN(GND_BIT),.PSINCDEC(GND_BIT),.RST(GND_BIT),.CLKDV(),.CLKFX(),.CLKFX180(),.CLK0(CLK0_BUF),.CLK2X(),.CLK2X180(),.CLK90(),.CLK180(),.CLK270(),.DO(),.DRDY(),.LOCKED(LOCKED_OUT),.PSDONE());defparam DCM_ADV_INST.CLK_FEEDBACK = "1X";defparam DCM_ADV_INST.CLKDV_DIVIDE = 2.0;defparam DCM_ADV_INST.CLKFX_DIVIDE = 1;defparam DCM_ADV_INST.CLKFX_MULTIPLY = 4;defparam DCM_ADV_INST.CLKIN_DIVIDE_BY_2 = "FALSE";defparam DCM_ADV_INST.CLKIN_PERIOD = 16.129;defparam DCM_ADV_INST.CLKOUT_PHASE_SHIFT = "NONE";defparam DCM_ADV_INST.DCM_AUTOCALIBRATION = "TRUE";defparam DCM_ADV_INST.DCM_PERFORMANCE_MODE = "MAX_SPEED";defparam DCM_ADV_INST.DESKEW_ADJUST = "SYSTEM_SYNCHRONOUS";defparam DCM_ADV_INST.DFS_FREQUENCY_MODE = "LOW";defparam DCM_ADV_INST.DLL_FREQUENCY_MODE = "LOW";defparam DCM_ADV_INST.DUTY_CYCLE_CORRECTION = "TRUE";defparam DCM_ADV_INST.FACTORY_JF = 16'hF0F0;defparam DCM_ADV_INST.PHASE_SHIFT = 0;defparam DCM_ADV_INST.STARTUP_WAIT = "FALSE";endmodule比较以上两段代码,区别在于选择是External时CLKIN经过了IBUFG才到的DCM_ADV,而选择Internal 的CLKIN则直接到了DCM_AV,而IBUFG就是原语“全局时钟缓冲”单元,我们使用时要选择External,只有当我们的级联两个DCM模块时,直接与外面相连的选External,而另一个选择Internal。
结构化设计向导(Architecture Wizard)和IP核生成工具(Core Generator)分别是两个独立的模块,可以单独运行,也可以在ISE集成化开发平台中作为一个整体的模块来调用。
由于这两个工具的功能和输出文件基本上相同,所以可以将二者合而为一,作为一个工具来使用。
当单独运行结构化设计向导时,所创建工程文件的后缀为.XAW,如图1所示。
这两个工具都采用了非常友好的GUI界面,使用起来简单、方便并直观。
有一点需注意,由于ArchitectureWizard和Core Generator工具可能会涉及某些器件的“硬核”,所以当选择不同的目标器件时,涵盖的“模块”内容会不同。
IP核生成工具是Xilinx ISE设计工具中的一个重要设计输入工具,它提供了大量成熟且高效的IP核为用户所用。
IP核生成工具及结构化设计向导可以用来创建和生成器件中使用的各种类型及功能的模块,这些模块从简单的基本设计模块到复杂的信号处理器等一应俱全。
如果设计者能够掌握该工具的使用,将会极大地缩短设计的进度,减少开发和调试的时间并避免重复设计,同时对设计的性能和质量带来较大的提升。
由于Core Generator和Architecture Wizard根据Xilinx的FPGA器件特点和结构雨设计,直接使用Xilinx FPGA 底层硬件原语描述,所以可充分地将FPGA的性能发挥出来,其实现结果在面积和速度上都能达到令人满意的效果。
Core Generator可生成的IP核在功能上分为基本模块、通信与网络模块、数字信号处理模块、数学运算功能模块、存储器模块、微处理器、控制器与外设模块、标准与协议处理模块、语音处理模块、标准总线模块,以及视频与图像处理模块等。
这些功能涵盖了从基本设计单元到复杂功能样机的众多成熟设计,而且每次ISE设计工具升级都会对IP核进行相应的升级。
此外,Xilinx的IP设计服务中心还可提供更多的IP信息,特别是对复杂且付费的IP核使用者通过网站提供face to face的服务。
Xilinx IP核的调用
By HYB,7.7.2013 调用IP核,有两种,一种是从ISE中为工程添加,另一种是使用Core Generator直接生成。
两种方法本质上是一样的。
一、ISE工程中添加IP核
建好一个test工程,并添加一个main.v文件。
图1ISE工程
利用IP CORE Generator & Architecture Wizard 添加一个FIFO的CORE:
图2添加IP Core
其保存路径在工程test\ipcore_dir目录下。
这个目下的文件如下图2所示:
图3ipcore_dir目录下的文件
此时,生成的IP核还需要例化才能添加到工程中:
图4例化IP Core
二、Core Generator生成IP核
利用Core Generator生成一个IP核,生成的目录和文件如下:
图5Core Generator生成的文件
这里终于得到验证:core generator生成的东西和ISE工程\ipcore_dir目录下是一样的。
三、总结
可见,两种方法实际上都是有Core Generator生成的,且生成的东西一样,本质上没有差别。
不过也有几点说明:
1,在ISE工程中添加IP Core很简洁,实际上最主要的就是使用了core generator生成的.xco文件,见图四。
2,Core Generator还生成了一个IP Core sub-project类型的子工程,可以直接打开子工程以便详细了解语言级的实现,不过有的IP核生成的这个子工程直接打开会有错
误。
关于这个子工程找到了比较好的解释:
When you add the .xco file, you are adding an IP core sub-project.
Project Navigator automatically accesses files from the core sub-project during the various flows according to project settings, the flow that is being run, and the designation of files in the IP core sub-project. That is, .xco can be replaced by .v 、.ngc file(其实就是说可用真正的源文件来替换,真正的源文件可以在sub-project中看到).
Typically, a re-declaration error is caused when a second declaration of a module is inadvertently sent to synthesis.
Recently, we've seen an issue with a few IP (including the Fifo) where a XXX_synth.v file was incorrectly generated and added for synthesis and simulation flows. If the file is deleted, the flows complete successfully.
按照第一句的说法,.xco也是通过sub-project来真正添加IP的,这就可以解释使用PCIe 的IP核时的情况了。
通过ISE添加IP核时,暂未例化的情况如下:
图6ISE添加PCIe核暂未例化
而这个核例化的模板如下,可见需要PCIe模块中的四大类接口(截图只是一部分):
图7PCIe核的例化模板
为了证明.xco例化时确实是IP Core sub-project,为此,打开ISE工程目录下的\ipcore_dir 子目录中的ipcore_pcie这个sub-project:
图8.xco等价于sub-project中的默认模块
从这里可以看出,.xco例化模板中使用的就是ipcore_pcie这个模块,正是sub-project 默认的这个模块。
.xco确实等价于sub-project。
总结就是最好就直接ISE中添加.xco形式的IP Core。
当然如果为了看IP核对应的例子,可以自行打开core generator生成的IP Core sub-project。
最后,有的硬核会在sub-project生成.ucf文件,但是作为一个ISE工程,顶层的.ucf文件会屏蔽掉这个IP core专用的ucf。
解决办法是拷贝:A UCF file may be generated along with some cores when the core is elaborated. The constraints in the file can be copied and pasted into the UCF file of an ISE® project.
更多内容,参考Xilinx ISE Help关于IP and Cores的描述。