使用Xilinx CORE Generator

合集下载

spartan6_MCB使用详解

spartan6_MCB使用详解

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的时钟部分。

基于SRIO 的高速图像串行传输系统设计

基于SRIO 的高速图像串行传输系统设计

基于SRIO 的高速图像串行传输系统设计张峰;任国强;吴钦章【摘要】针对CCD 图像具有分辨率高、数据量大的特点,本文提出一种新的平台,可实时完成数据采集,并将采集的数据通过SRIO 接口以3.125 Gb/s 的速度进行传输与显示.该方法根据SRIO 接口协议,采用FPGA+DSP 的方式,利用FPGA 内的高速串行通信接口MGT,实现SRIO 通信协议,与DSP 之间的SRIO 接口模块进行高速传输,再通过DSP 的网络接口将接收到的数据实时传输到PC 机,进行显示.实验结果表明,这种新的平台能够实时传输所采集的CCD 相机数据,并具有可靠性高,可移植性强,升级简单,易于工程实现的优点.【期刊名称】《光电工程》【年(卷),期】2010(037)010【总页数】4页(P89-92)【关键词】CCD;SRIO;图像采集;图像传输【作者】张峰;任国强;吴钦章【作者单位】中国科学院光电技术研究所,成都610209;中国科学院研究生院,北京100039;中国科学院光电技术研究所,成都610209;中国科学院光电技术研究所,成都610209【正文语种】中文【中图分类】TP391;TN911.730 引言CCD(Charge Coupled Device)相机拍摄的图像具有分辨率高,数据量大的特点,因此,如何实时采集与传输成为研究的难点。

传统的方法是采用多台PC机并行,将采集的CCD相机数据存储到存储介质(如硬盘),事后再读取采集到的数据进行分析,然而这种方式具有非实时性的特点,不能实时对数据进行分析,并且这种方式空间体积大,不适合在空间受限的场合下使用。

另一种方式是采用嵌入式系统,如通过EMIF(External Memory Interface)进行传输,虽然这种方式占用体积小,但占用的资源却很多,如64位EMIF接口需要占用104个管脚,这对于资源有限的嵌入式系统处理器是不利的,并且,设备不易升级。

计算机程序设计员(FPGA嵌入式应用模拟卷试卷职业技能鉴定国家题库

计算机程序设计员(FPGA嵌入式应用模拟卷试卷职业技能鉴定国家题库

个。

16.()在V erilog HDL中repeat语句可以连续执行一条语句n次,格式为:repeat(表达式)语句;,表达式通常为常量表达式。

17.()函数可以没有输入变量,只能与主模块共用同一个仿真时间单位。

18.()系统任务$stop任务的作用是把EDK工具置成暂停模式,这个任务不可以带参数表达式。

19.()在V erilog HDL语句中,`include命令可以出现在源程序的任何地方,一个`include命令可以指定多个被包含的文件。

20.()多路选择器简称多路器,它是一个单输入,多输出的组合逻辑电路,在数字系统中有着广泛的应用。

21.()两段式状态机描述方法采用两个模块,采用同步时序描述状态转移,采用组合逻辑判断状态转移条件。

22.()桶型移位寄存器的移位是通过对数据字的指定位左移或右移实现的。

23.()定时验证利用器件的模型和电路互连关系来分析电路的时序,判断在实际设计中是否能达到硬件定时约束条件和输入输出定时特性的要求。

24.()引脚到引脚延时是指输入引脚处的信号经过时序逻辑进行传输,出现在外部引脚上时所需的时间。

25.()verilog和VHDL语言都是硬件描述语言,其中V erilog是IEEE标准。

26.()使用Core Generator配置的乘加器是是不需要许可证的。

27.()iMPACT可以支持并行电缆IV,平台电缆USB,但是不支持MultiPRO电缆。

28.()PicoBlaze 算术逻辑单元中,执行所有的操作都是用任意一个寄存器提供的操作数完成。

29.()只能用有条件的程序流控制指令控制程序的执行顺序。

30.()picoblaze的指令存储深度是1K,指令宽度是8位。

31.()PicoBlaze微控制器中有一个专门的空指令。

32.()在PicoBlaze中,只要有JUMP指令出现,就需要2个clk周期去执行。

33.()便签式存储器同样会受到复位信号的影响。

34.()PicoBlaze 中输入和输出端口的定义范围在0-256。

xilinx fifo generator 用法

xilinx fifo generator 用法

xilinx fifo generator 用法Xilinx FIFO Generator是一款强大的工具,它能够根据用户的需求自动生成FIFO(First-In-First-Out)数据缓冲器。

FIFO是一种常用的存储结构,用于在数据输入和输出之间提供缓冲,以解决数据同步和延迟问题。

本文将详细介绍Xilinx FIFO Generator的使用方法。

一、安装与配置首先,确保你已经正确安装了Xilinx Vivado工具,并且你的设计项目已经创建并配置好。

接下来,打开Vivado并进入你的设计项目。

二、使用FIFO Generator1. 打开Xilinx FIFO Generator对话框:在Vivado主界面,选择“Library”>“Generic Memory Block”>“FIFO Generator”。

2. 输入参数:在生成的对话框中,你需要输入一些参数,包括输入数据位宽、输出数据位宽、深度等。

确保根据你的设计需求设置这些参数。

3. 生成FIFO:点击“Generate”按钮,Xilinx FIFO Generator将根据你提供的参数生成相应的FIFO数据缓冲器。

三、在设计中使用FIFO1. 导入生成的文件:在Vivado主界面,选择“Project Navigator”>“导入”>“文件系统”,找到你生成的FIFO文件并导入。

2. 配置连接:根据你的设计需求,配置FIFO与输入和输出信号的连接。

通常,FIFO的输入和输出信号是通过引脚连接的。

3. 放置并连接:在设计中找到合适的位置放置FIFO,并使用适当的线缆将FIFO的输入和输出引脚连接到你的设计。

4. 验证连接:在完成布局后,使用仿真工具验证FIFO与你的设计之间的连接是否正确。

四、使用注意事项在使用Xilinx FIFO Generator时,有一些注意事项需要了解:1. 确保你的设计项目已经正确配置了Xilinx Vivado工具,并且已经安装了所需的Xilinx IP核。

IP核——精选推荐

IP核——精选推荐

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”完成配置。

翻译原文

翻译原文

编号:毕业设计(论文)外文翻译(原文)学院:计算机科学与工程学院专业:计算机科学与技术专业学生姓名:覃龙学号:0700720222指导教师单位:计算机科学与工程学院姓名:黄廷磊职称:教授2011年5月30 日Block RAM SummaryThe block RAM in Virtex-5 FPGAs stores up to 36K bits of data and can be configured aseither two independent 18 Kb RAMs, or one 36 Kb RAM. Each 36 Kb block RAM can beconfigured as a 64K x 1 (when cascaded with an adjacent 36 Kb block RAM), 32K x 1,16K x 2, 8K x 4, 4K x 9, 2K x 18, or 1K x 36 memory. Each 18 Kb block RAM can beconfigured as a 16K x 1, 8K x2 , 4K x 4, 2K x 9, or 1K x 18 memory.Similar to the Virtex-4 FPGA block RAMs, Write and Read are synchronous operations; thetwo ports are symmetrical and totally independent, sharing only the stored data. Each portcan beconfigured in one of the available widths, independent of the other port. Inaddition, the read port width can be different from the write port width for eac h port. Thememory content can be initialized or cleared by the configuration bitstream. During awrite operation the memory can be set to have the data output either remain unchanged,reflect the new data being written or the previous data now being overwritten.Virtex-5 FPGA block RAM enhancements include:I ncreased memory storage capability per block. Each block RAM can store up to 36Kbits of data.S upport of two independent 18K blocks, or a single 36K block RAM.E ach 36K block RAM can be set to simple dual-port mode, doubling data width of theblock RAM to 72 bits. The 18K block RAM can also be set to simple dual-port mode,doubling data width to 36 bits.Simple dual-port mode is defined as having one readonlyport and one write-only port with independent clocks.T wo adjacent block RAMs can be combined to one deeper 64K x 1 memory withoutany external logic.O ne 64-bit Error Correction Coding block is provided per 36 Kb block RAM or 36 KbFIFO. Separate encode/decode functionality is available.S ynchronous Set/Reset of the outputs to an initial value is available for both the latchand register modes of the block RAM output.A n attribute to configure the block RAM as a synchronous FIFO to eliminate flaglatency uncertainty.T he Virtex-5 FIFO does not have FULL flag assertion latency.Virtex-5 FPGA block RAM features:18, 36, or 72-bit wide ports can have an individual write enable per byte. This featureis popular for interfacing to an on-chip microprocessor.E ach block RAM contains optional address sequencing and control circuitry to operate as a built-in multirate FIFO memory. In Virtex-5 architecture, the block RAM can be configured as an18Kb or 36Kb FIFO.A ll inputs are registered with the port clock and have a setup-to-clock timing specification.A ll outputs have a read function or a read-during-write function, depending on the state of the write enable (WE) pin. The outputs are available after the clock-to-out timing interval. The read-during-write outputs have one of three operating modes:WRITE_FIRST, READ_FIRST, and NO_CHANGE.A write o peration requires one clock edge.A read operation requires one clock edge.A ll output ports are latched. The state of the output port does not change until the port executes another read or write operation. The default block RAM output is latch mode.T he output data path has an optional internal pipeline register. Using the regist ermode is strongly recommended. This allows a higher clock rate, however, it adds a clock cycle latency of one. Virtex-5 FPGA block RAM usage rules:T he Synchronous Set/R eset (SSR) port cannot be used when the ECC decoder is enabled (EN_ECC_READ = TRUE).T he setup time of the block RAM address and write enable pins must not be violated. Violating the address setup time (even if write enable is Low) will corrupt the datacontents of the block RAM.T he block RAM register mode SSR requires REGCE = 1 to reset the output DO register value. The block RAM array data output latch does not get reset in this mode. The block RAM latch mode SSR requires the block RAM enable, EN = 1, to reset the output DO latch value.A lthough RAMB18SDP (x36 18k block RAM) and RAMB36SDP (x72 36k block RAM)are simple dual-port primitives, the true dual-port primitives (RAMB18 and RAMB36) can be used with one read-only port and one write-only port. For example: a RAMB18s READ_WIDTH_A = 18, WRITE_WIDTH_B = 9, with WEA = 0 and WEB = 1 is effectively a simple dual-port block RAM with a smaller port width having been derived from the true dual-port primitive. Similarly, a ROM function can be built out of either the true dual-port (RAMB18 or RAMB36) or the simple dual-portblock RAM primitives (RAMB18SDP or RAMB36SDP).D ifferent read and write port width choices are available when using specific block RAM primitives. The parity bits are only available for the x9, x18, and x36 port widths. The parity bits should not be used when the read width is x1, x2, or x4. If the read width is x1, x2 or x4, the effective write width is x1, x2, x4, x8, x16, or x32. Similarly, when a write width is x1, x2, or x4, the actual available read width is x1, x2, x4, x8, x16, or x32 even though the primitive attribute isset to 1, 2, 4, 9, 18, or 36respectively. Table 4-1 shows some possible scenarios.Table 4-1: Parity Use SceneriesNotes:1. Do not use parity bits DIP/DOP when one port widths is less than nine and another port width is nineBlock RAM IntroductionIn addition to distributed RAM memory and high-speed SelectIO™ memory interfaces, Virtex-5devices feature a large number of 36 Kb block RAMs. Each 36 Kb block RAM contains two independently controlled 18 Kb RAMs. Block RAMs are placed in columns, and the total number of block RAM memory depends on the size of the Virtex-5 device. The 36 Kb blocks are cascadable to enable a deeper and wider memory implementation, with a minimal timing penalty. Embedded dual- or single-port RAM modules, ROM modules, synchronous FIFOs, and data width converters are easily implemented using the Xilinx CORE Generator™ block memory modules. Multirate FIFOs can be generated using the CORE Generator FIFO Generator module. The synchronous or asynchronous (multirate) FIFO implementation does not require additional CLB resources for the FIFO control logicsince it uses dedicated hardware resources.Synchronous Dual-Port and Single-Port RAMsData FlowThe true dual-port 36 Kb block RAM dual-port memories consist of a 36 Kb storage area and two completely independent access ports, A and B. Similarly, each 18 Kb b lock RAM dual-port memory consists of an 18 Kb storage area and two completely independent access ports, A and B. The structure is fully symmetrical, and both ports are interchangeable. Figure 4-1 illustrates the true dual-port data flow. Table 4-2 lists the port names and descriptions. Data can be written to either or both ports and can be read from either or both ports. Each write operation is synchronous, each port has its own address, data in, data out, clock, clock enable, and write enable. The read and write operations are synchronousand require a clock edge. There is no dedicated monitor to arbitrate the effect of identical addresses onboth ports. It is up to the user to time the two clocks appropriately. Conflicting simultaneous writes to the same location never cause any physical damage but can result in data uncertainty.Read OperationIn latch mode, the read operation uses one clock edge. The read address is registered on the read port, and the stored data is loaded into the output latches after the RAM access time. When using the outputregister, the read operation will take one extra latency cycle.Write OperationA write operation is a single clock-edge operation. The write address is registered on the write port, andthe data input is stored in memory.Write ModesThree settings of the write mode determines the behavior of the data available on the output latches after a write clock edge: W RITE_FIRST, REA D_FIRST, and NO_CHANGE. Write mode selection is set by configuration. The Write mode attribute can be individually selected for each port. The default mode is WRITE_FIRST. W RITE_FIRST outputs thenewly written data onto the output bus. REA D_FIRST outputs the previously stored data while new data is being written. NO_CHANGE maintains the output previously generated by a read operation. For the simple dual port block RAM, the Write mode is always READ_FIRST in ECC configuration,and therefore no collision can occur when used in synchronous mode.WRITE_FIRST or Transparent Mode (Default)In WRITE_FIRST mode, the input data is simultaneously written into memory an d stored in the data output (transparent write), as shown in Figure 4-2. These waveforms correspond to latch modewhetREAD_FIRST or Read-Before-Write ModeIn REA D_FIRST mode, data previously stored at the write address appears on the output latches, while the input data is being stored in memory (read before write). The waveforms in Figure 4-3 correspond to latch mode when the optional output pipeline register is not usdedNO_CHANGE ModeIn NO_CHANGE mode, the output latches remain unchanged during a write operation. As shown in Figure 4-4, data output remains the last read data and is unaffected by a write operation on the same port. These waveforms correspond to latch mode when the optional output pipeline register is not used.Conflict AvoidanceVirtex-5 FPGA block RAM memory is a true dual-port RAM where both ports can access any memory location at any time. When accessing the same memory location from both ports, the user must, however, observe certain restrictions. There are two fundamentally different situations: The two ports either have a common clock (synchronous clocking), or the clock frequency and phase is different for the two ports (asynchronous clocking).Asynchronous ClockingAsynchronous clocking is the more general case, where the active edges of both clocks do not occur simultaneously:T here are no timing constraints when both ports perform a read operation.W hen one port performs a write operation, the other port must not read- or writeaccess the same memory location. The simulation model will produce an error if this condition is violated. If this restriction is ignored, a read or write operation willproduce unpredictable results. There is, however, no risk of physical damage to the device. If a read and write operation is performed, then the write will store valid data at the write location. Synchronous ClockingSynchronous clocking is the special case, where the active edges of both port clocks occur simultaneously:T here are no timing constraints when both ports perform a read operation.W hen one port performs a write operation, the other port must not write into the same location, unless both ports write identical data.W hen one port performs a write operation, the write operation succeeds; the other port can reliably read data from the same location if the write port is in READ_FIRST mode. DATA_OUT on bothports will then reflect the previously stored data. If the write port is in either WRITE_FIRST or inNO_CHA NGE mode, then the DATAOUT on the read port would become invalid (unreliable). Themode setting of the read-port does not affect this operation.Additional Block RAM Features in Virtex-5 Devices Optional Output RegistersThe optional output registers improve design performance by eliminating routing delay to the CLB flip-flops for pipelined operation. An independent clock and clock enable input is provided for these output registers. As a result the output data registers hold the value independent of the input register operation. Figure 4-5 shows the optional output register.Independent Read and Write Port Width SelectionEach block RAM port has control over data width and address depth (aspect ratio). The true dual-portblock RAM in Virtex-5 FPGAs extends this flexibility to Read and Write where each individual portcan be configured with different data bit widths. For example, port A can have a 36-bit Read width anda 9-bit Write width, and port B can have a 18-bit Read width and a 36-bit Write width. See “BlockRAM Attributes,” page 126. If the Read port width differs from the Write port width, and is configuredin WRITE_FIRST mode, then DO shows valid new data for all the enabled write bytes. The DO portoutputs the original data stored in memory for all not enabled bytes. Independent Read and Write portwidth selection increases the efficiency of implementing a content addressable memory (CAM) inblock RAM. Th is option is available for all Virtex-5 FPGA true dual-port RAM port sizes and modes. Simple Dual-Port Block RAMEach 18 Kb block and 36 Kb block can also be configured in a simple dual-port RAM mode. In this mode, the block RAM port width doubles to 36 bits for the 18 Kb block RAM and 72 bits for the 36 Kb block RAM. In simple dual-port mode, independent Read and Write operations can occur simultaneously, where port A is designated as the Read port and port B as the Write port. When the Read and Write port access the same data location at the same time, it is treated as a collision, similar to the port collision in true dual-port mode. Readback through the configuration port is not supported in simple dual-port block RAM mode. Figure 4-6 shows the simple dual-port data flowCascadable Block RAMIn the Virtex-5 block RAM architecture, two 32K x 1 RAMs can be combined to form one 64K x 1 RAM without using local interconnect or additional CLB logic resources. Any two adjacent block RAMs can be cascaded to generate a 64K x 1 block RAM. Increasing the depth of the block RAM by cascading two block RAMs is available only in the 64K x 1 mode. Further information on cascadable block RAM is described in the “Additional RAMB18 and RAMB36 Primitive Design Considerations” section. For other wider and/or deeper sizes, consult the Creating Larger RAM Structures section. Figure 4-7 shows the block RAM with the appropriate ports connected in the Cascadable mode.Byte-wide Write EnableThe byte-wide write enable feature of the block RAM gives the capability to write eight bit (one byte) portions of incoming data. There are four independent byte-wide write enable inputs to the RAMB36 true dual-port RAM. There are eight independent byte-wide write enable inputs to block RAM in simple dual-port mode (RAMB36SDP). Table 4-4 summarizes the byte-wide write enables for the 36K and 18K block RAM. Each byte-wide write enable is associated with one byte of input data and one parity bit. A ll byte-wide write enable inputs must be driven in all data width configurations. This feature is useful when using block RAM to interface with a microprocessor. Byte-wide write enable is not available in the multirate FIFO or ECC mode. Byte-wide write enable is further described in the “Additional RAMB18 and RAMB36 Primitive Design Considerations” section.Figure 4-8 shows the byte-wide write-enable timing diagram for the RAMB36.When the RAMB36 is configured for a 36-bit or 18-bit wide data path, any port can restrict writing to specified byte locations within the data word. If configured in READ_FIRST mode, the DO bus shows the previous content of the whole addressed word. In WRITE_FIRST mode, DO shows a combination of the newly written enabled byte(s), and the initial memory contents of the unwritten bytes.Block RAM Error Correction CodeBoth block RAM and FIFO implementations of the 36 Kb block RAM support a 64-bit Error Correction Code (ECC) implementation. The code is used to detect single and double-bit errors inblock RAM data read out. Single-bit errors are then corrected in the output data.Block RAM Library PrimitivesThe Virtex-5 FPGA block RAM library primitives, RAMB18 and RAMB36, are the basic building blocks for all block RAM configurations. Other block RAM primitives and macros are based on these primitives. Some block RAM attributes can only be configured usingone of these primitives (e.g., pipeline register, cascade, etc.). See the “Block RAM Attributes” section. The input and output data buses are represented by two buses for 9-bit width (8 + 1), 18-bit width (16 + 2), and 36-bit width (32 + 4) configurations. The ninth bit associated with each byte can store parity/error correction bits or serve as additional data bits. No specific function is performed on the ninth bit. The separate bus for parity bits facilitates some designs. However, other designs safely use a 9-bit, 18-bit, or 36-bit bus by merging the regular data bus with the parity bus. Read/write and storage operations are identical for all bits, including the parity bits.Block RAM Port SignalsEach block RAM port operates independently of the other while accessing the same set of 36K-bit memory cells.Clock - CLK[A|B]Each port is fully synchronous with independent clock pins. All port input pins have setup time referenced to the port CLK pin. The output data bus has a clock-to-out time referenced to the CLK pin. Clock polarity is configurable (rising edge by default).Enable - EN[A|B]The enable pin affects the read, write, and set/reset functionality of the port. Ports with an inactive enable pin keep the output pins in the previous state and do not write data to the memory cells. Enable polarity is configurable (active High by default).Byte-wide Write Enable - WE[A|B]To write the content of the data input bus into the addressed memory location, both EN and WE must be active within a set-up time before the active clock edge. The output latches are loaded or not loaded according to the write configuration (W RITE_FIRST, READ_FIRST, NO_CHA NGE). When inactive, a read operation occurs, and the contents of the memory cells referenced by the address bus appear on the data-out bus, regardless of the write mode attribute. Write enable polarity is not configurable (active High).Register Enable - REGCE[A|B]The register enable pin (REGCE) controls the optional output register. When the RAM is in register mode, REGCE = 1 registers the output into a register at a clock edge. The polarity of REGCE is not configurable (active High).Set/Reset - SSR[A|B]In latch mode, the SSR pin forces the data output latches, to contain the value SRVA L. See“Block RAM Attributes,” pag e 126. When the optional output registers are enabled, the data output registers can also be forced by the SSR pin to contain the value SRVA L. SSR does not affect the latched value. The data output latches or output registers are synchronously asserted to 0 or 1, including the parity bit. Each port has an independent SRVA L[A|B] attribute of 36 bits. This operation does not affect RAM memory cells and does not disturb write operations on the other port. Similar to the read and write operation, the set/reset function is active only when the enable pin of the port is active. Set/reset polarity is configurable (active High by default).Address Bus - ADDR[A|B]<13:#><14:#><15:#>The address bus selects the memory cells for read or write. The data bit width of the port determinesthe required address bus width for a single RAMB18 or RAMB36, as shown in Table 4-6 and Table 4-7.For cascadable block RAM using the RAMB36, the data width is one bit, and the address bus is 16 bits <15:0>. The address bit 15 is only used in cascadable block RAM. For noncascading block RAM, connect High. Data and address pin mapping is further described in the “Additional RAMB18 and RAMB36 Prim itive Design Considerations”section.Data-In Buses - DI[A|B]<#:0> & DIP[A|B]<#:0>Data-in buses provide the new data value to be written into RAM. The regular data-in bus (DI), plus the parity data-in bus (DIP) when available, have a total width equal to the port width. For example the 36-bit port data width is represented by DI<31:0> and DIP<3:0>, as shown in Table 4-6 and Table 4-7. Data-Out Buses - DO[A|B]<#:0> and DOP[A|B]<#:0>Data-out buses reflect the contents of memory cells referenced by the address bus at the last active clock edge during a read operation. During a write operation (WRITE_FIRST or READ_FIRST configuration), the data-out buses reflect either the data being written or the stored value before write. During a write operation in NO_CHANGE mode, data-out buses are not changed. The regular data-out bus (DO) plus the parity data-out bus (DOP) (when available) have a total width equal to the port width, as shown in Table 4-6 and Table 4-7.Cascade In - CASCADEINLAT[A|B] and CASCADEINREG[A|B]The CASCA DEIN pins are used to connect two block RAMs to form the 64K x 1 mode (Figure 4-10.) This pin is used when the block RAM is the UPPER block RAM, and is connected to the CASCADEOUT pins of the LOW ER block RAM of the same port. When cascade mode is not used, this pin does not need to be connected. Refer to the “Cascadable Block RAM” for further information.CascadeOut - CASCADEOUTLAT[A|B] and CASCADEOUTREG[A|B]The CASCA DEOUT pins are used to connect two block RAMs to form the 64K x 1 mode. This pin is used when the block RAM is the LOW ER block RAM, and is connected to the CASCADEIN pins of the UPPER block RAM of the same port. When cascade mode is not used, this pin does not need to be connected. Refer to the “Cascadable Block RAM” for further information.Inverting Control PinsFor each port, the six control pins (CLK, EN, and SSR) each have an individual inversion option. EN and SSR control signals can be configured as active High or Low, and the clock can be active on a rising or falling edge (active High on rising edge by default), without requiring other logic resources. GSRThe global set/reset (GSR) signal of a Virtex-5 device is an asynchronous global signal that is active at the end of device configuration. The GSR can also restore the initial Virtex-5 device state at any time. The GSR signal initializes the output latches to the INIT (simple dual port), or to the INIT_A and INIT_B value (true dual port.) See “Block RAM Attributes.” A GSR signal has no impact on internal memory contents. Because it is a global signal, the GSR has no input pin at the functional level (block RAM primitive).Unused InputsUnused data and/or address inputs should be connected HighBlock RAM Address MappingEach port accesses the same set of 18,432 or 36,864 memory cells using an addressing scheme dependent on whether it is a RAMB18 or RAMB36. The physical RAM locations addressed for a particular width are determined using the following formula (of interest only when the two ports use different aspect ratios):END = ((A DDR + 1) Width) -1START = A DDR WidthTable 4-8 shows low-order address mapping for each port width.Block RAM AttributesAll attribute code examples are discussed in the “Block RAM Initialization in VHDL or Verilog Code” section. Further information on using these attributes is available in the“Additional RAMB18 and RAMB36 Primitive Design Considerations” section.Content Initialization - INIT_xxINIT_xx attributes define the initial memory contents. By default, block RAM memory is initialized with all zeros during the device configuration sequence. The 64 initialization attributes from INIT_00 through INIT_3F for the RAMB18, and the 128 initialization attributes from INIT_00 through INIT_7F for the RAMB36 represent the regular memory contents. Each INIT_xx is a 64-digit hex-encoded bit vector. The memory contents can be partially initialized and are automatically completed with zeros. The following formula is used for determining the bit positions for each INIT_xx attribute. Given yy = conversion hex-encoded to decimal (xx), INIT_xx corresponds to the memorycells as follows:f rom [(yy + 1) 256] – 1t o (yy) 256For example, for the attribute INIT_1F, the conversion is as follows:y y = conversion hex-encoded to decimal (xx) “1F” = 31f rom [(31+1) 256] – 1 = 8191t o 31 256 = 7936More examples are given in Table 4-9.Content Initialization - INITP_xxINITP_xx attributes define the initial contents of the memory cells corresponding to DIP/DOP buses (parity bits). By default these memory cells are also initialized to all zeros. The initialization attributes represent the memory contents of the parity bits. The eight initialization attributes are INITP_00 through INITP_07 for the RAMB18. The 16 initialization attributes are INITP_00 through INITP_0F for the RAMB36. Each INITP_xx is a 64-digit hex-encoded bit vector with a regular INIT_xx attribute behavior. The same formula can be used to calculate the bit positions initialized by a particular INITP_xx attribute.Output Latches Initialization - INIT (INIT_A or INIT_B)The INIT (single-port) or INIT_A and INIT_B (dual-port) attributes define the output latches or output register values after configuration. The width of the INIT (INIT_A andINIT_B) attribute is the port width, as shown in Table 4-10. These attributes are hexencoded bit vectors, and the default value is 0. In cascade mode, both the upper and lower block RAM should be initialized to the same value. Output Latches/Registers Synchronous Set/Reset (SRVAL_[A|B])The SRVA L (single-port) or SRVA L_A and SRVA L_B (dual-port) attributes define output latch values when the SSR input is asserted. The width of the SRVA L (SRVA L_A and SRVA L_B) attribute is the port width, as shown in Table 4-10. These attributes are hexencoded bit vectors and the default value is 0. This attribute sets the value of the output register when the optional output register attribute is set. When the register is not used, the latch gets set to the SRVA L instead. In the 36-bit mode, SRVA L[35:32] corresponds toDP[3:0].Output Latches/Registers Synchronous Set/Reset (SRVAL_[A|B])The SRVA L (single-port) or SRVA L_A and SRVA L_B (dual-port) attributes define output latch values when the SSR input is asserted. The width of the SRVA L (SRVA L_A and SRVA L_B) attribute is the port width, as shown in Table 4-10. These attributes are hexencoded bit vectors and the default value is 0. This attribute sets the value of the output register when the optional output register attribute is set. When the register is not used, the latch gets set to the SRVA L instead. In the 36-bit mode, SRVA L[35:32] corresponds toDP[3:0].Optional Output Register On/Off Switch - DO[A|B]_REGThis attribute sets the number of pipeline register at A/B output of the block RAM. The valid values are 0 (default) or 1.Extended Mode Address Determinant - RAM_EXTENSION_[A|B]This attribute determines whether the block RAM of interest has its A/B port as UPPER/LOW ER address when using the cascade mode. Refer to the “Cascadable Block RAM”section. When the block RAM is not used in cascade mode, the default value isNONE.Read Width - READ_WIDTH_[A|B]This attribute determines the A/B read port width of the block RAM. The valid values are:0 (default), 1, 2, 4, 9, 18, and 36.Write Width - WRITE_WIDTH_[A|B]This attribute determines the A/B write port width of the block RAM. The valid values are:0 (default), 1, 2, 4, 9, 18, and 36.Write Mode - WRITE_MODE_[A|B]This attribute determines the write mode of the A/B input ports. The possible values are WRITE_FIRST (default), READ_FIRST, and NO_CHANGE. Additional information on the write modes is in the “Write Modes” sectionBlock RAM Location ConstraintsBlock RAM instances can have LOC properties attached to them to constrain placement. Block RAM placement locations differ from the convention used for naming CLB locations, allowing LOC properties to transfer easily from array to array. The LOC properties use the following form:。

用Core Generator工具建立一个新的工程-基础电子

用Core Generator工具建立一个新的工程-基础电子

用Core Generator工具建立一个新的工程-基础电子可以用CoreGcncrator具来建立一个新的工程,用于在ISE集成开发工具中无法利ComGenerator工具的所有功能,如MemoryEditor 等.因此需要单独运行CoreGenerator工具,几乎所有的模块没计基本上都可以用其来完成,操作步骤如下.(l)选择【开始】-【程序】-【XiliMISE10.1】-=【Accessories】-【CoreGenerator】命令,出现图1所示界面.(2)打开-个已存在的设计工程,或单击【CreatcaNewProject】按钮建立一个新工程,出现如下3个选项卡来设置相应的参数.【Pan】选项卡如图2所示,用来建立个新工程的目标器件,器件封装形式和器件速度等级。

图1运行CoreGenerator生成工具图2【Part】选项卡【Generation】选项卡如图3所示。

图3【Generator】选项卡Flow(设计流程)选项组中的选项如下。

■DesignEntry:可选择VHDL、Verilog或Schematic(原理图)作为设计的蓝本。

■CustomOutputProducts:对于每一个COREGenerator所产生的模块有选择地输出。

FlowSettings(流程设置)选项组中的选项如下。

■Vendor:不同的综合工具具有不同编译和解释风格,如总线的书写格式等。

为了使COREGenerator输出文件和网表(EDIF)满足这些要求,可以通过该选项卡设置。

默认值为“Other”,相应的网表总线格式(NetlistBusFormat)为“B<n:m>”。

在ISE10.x工具中可选择Cadence、ISE、ePD、MentorGraphics(HDL)、Synopsys及Synplicity。

■NetlistBusFormat:网表中的总线风格,只有当Vendor选项为“Other”时,该选项才有效。

xilinx fifo generator 用法

xilinx fifo generator 用法

xilinx fifo generator 用法摘要:1.Xilinx FIFO Generator 简介2.Xilinx FIFO Generator 的使用方法3.Xilinx FIFO Generator 的优点正文:【1.Xilinx FIFO Generator 简介】Xilinx FIFO Generator 是Xilinx 公司提供的一种用于生成FIFO(First In First Out,先进先出)硬件模块的工具。

FIFO 是一种在数字电路和计算机系统中广泛应用的数据结构,用于在多个模块之间传输和存储数据。

通过使用Xilinx FIFO Generator,设计人员可以轻松创建和管理FIFO,从而简化硬件设计流程。

【2.Xilinx FIFO Generator 的使用方法】(1)打开Xilinx Vivado 工具,并在工具栏中选择“FIFO Generator”。

(2)在弹出的对话框中,设置FIFO 的基本参数,例如深度、宽度、读写时钟等。

这些参数将影响FIFO 的性能和存储能力。

(3)完成参数设置后,点击“生成”按钮。

Xilinx FIFO Generator 将自动生成相应的硬件模块,并将其添加到设计文件中。

(4)在设计文件中,可以为生成的FIFO 模块添加输入和输出信号,以及配置时钟和其他控制信号。

(5)最后,进行仿真和测试,以验证FIFO 模块的功能和性能是否满足设计要求。

【3.Xilinx FIFO Generator 的优点】(1)简化设计流程:Xilinx FIFO Generator 可以自动生成FIFO 硬件模块,节省了设计人员手动编写硬件代码的时间和精力。

(2)灵活性:通过调整参数,设计人员可以根据实际需求创建不同规格的FIFO 模块,满足多种应用场景的需求。

(3)易于验证:Xilinx FIFO Generator 生成的模块可以与Xilinx Vivado 工具的其他功能相结合,方便进行仿真和测试,确保设计质量。

赛灵思(Xilinx)Virtex-5和Virtex-6 FPGA系统监控器向导(LogiCORE

赛灵思(Xilinx)Virtex-5和Virtex-6 FPGA系统监控器向导(LogiCORE

© 2007, 2010 Xilinx, Inc. XILINX, the Xilinx logo, Virtex, Spartan, ISE and other designated brands included herein are trademarks of Xilinx in the United States and other countries. All other trademarks are the property of their respective owners.IntroductionThe LogiCORE™ IP System Monitor Wizard simplifies the instantiation of the System Monitor into the design in Virtex®-5 and Virtex-6 FPGAs. The Wizard creates an HDL file (Verilog or VHDL) that instantiates and configures the System Monitor to customer requirements. See the Virtex-5 FPGA System Monitor User Guide [Ref 1] and the Virtex-6 FPGA System Monitor User Gu ide [Ref 2] for detailed descriptions of the System Monitor (SYSMON) functionality.Features•Simple user interface•Easy configuration of various SYSMON modes and parameters•Simple interface for channel selection and configuration•Ability to select/deselect alarm outputs •Ability to set alarm limits•Calculates all the parameters and register valuesLogiCORE IP System MonitorWizard v2.1DS608 December 14, 2010Product SpecificationLogiCORE IP Facts TableCore SpecificsSupportedDevice Family (1)Virtex-5(2) LX/LXT/SXT/TXT/FXTVirtex-6(3) LXT/SXT/HXTSupported User InterfacesN/AResourcesFrequency Configuration LUTs FFs DSP Slices Block RAMs Max. Freq.Config1N/AN/AN/AN/AN/AProvided with CoreDocumentation Product Specification Getting Started GuideDesign Files Verilog and VHDL Example Design Verilog and VHDL Test Bench Verilog and VHDLConstraints File UCF Simulation ModelUNISIMTested Design ToolsDesign Entry ToolsISE 12.4 (4)SimulationISim 12.4Mentor Graphics ModelSim 6.5c Synopsys VCS and VCS MX 2009.12Cadence IES 9.2Synthesis T oolsXST 12.4Synopsys Synplify Pro 2010.09-1SupportProvided by Xilinx, Inc.Notes:1.For a complete listing of supported devices, see the release notes for this core.2.For more information on the Virtex-5 devices, see Virtex-5 Family Overview [Ref 3]3.For more information on the Virtex-6 devices, see Virtex-6 Family Overview [Ref 4]4.ISE Service Packs can be downloadedfrom /support/download.htmLogiCORE IP System Monitor Wizard v2.1Functional DescriptionThe System Monitor Wizard is an interactive graphical user interface (GUI) that instantiates a SYSMONbased design on specific needs. Using the wizard, users can explicitly configure the SYSMON tooperate in the desired mode. The GUI allows the user to select the channels, enable alarms, and set thealarm limits.SYSMON Functional FeaturesMajor functional SYSMON features can be used to determine an appropriate mode of operation. Thesefeatures include:•Analog to digital conversion•FPGA temperature and voltage monitoring•Generate alarms based on user set parametersI/O SignalsTable1 describes the input and output ports provided from the System Monitor Wizard. Availability ofports is controlled by user-selected parameters. For example, when Dynamic Reconfiguration isselected, these ports are exposed to the user. Any port that is not exposed is appropriately tied off orconnected to a signal labeled unused in the delivered source code.Table 1:System Monitor I/O SignalsPort Direction DescriptionDI_IN[15:0]Input Input data bus for the dynamic reconfiguration port (DRP).DO_OUT[15:0]Output Output data bus for the dynamic reconfiguration port.DADDR_IN[6:0]Input Address bus for the dynamic reconfiguration port.DEN_IN Input Enable signal for the dynamic reconfiguration port.DWE_IN Input Write enable for the dynamic reconfiguration port.DCLK_IN Input Clock input for the dynamic reconfiguration port.DRDY_OUT Output Data ready signal for the dynamic reconfiguration port.RESET_IN Input Reset signal for the System Monitor control logic and max / min registers.CONVST_IN Input Convert start input. This input is used to control the sampling instant on the ADC input and is only used in Event Mode Timing (see Event-Driven Sampling in the Virtex-5 and Virtex-6 FPGA System Monitor user guides, [Ref1] and [Ref2]).CONVSTCLK_IN Input Convert start input. This input is connected to a global clock input on the interconnect. Like CONVST, this input is used to control the sampling instant on the ADC inputs and is only used in Event Mode Timing.VP_IN VN_IN InputOne dedicated analog-input pair. The System Monitor has onepair of dedicated analog-input pins that provide a differentialanalog input.LogiCORE IP System Monitor Wizard v2.1VAUXP15[15:0]VAUXN15[15:0]Inputs16 auxiliary analog-input pairs. In addition to the dedicated differential analog-input, the System Monitor uses 16 differential digital-input pairs as low-bandwidth differential analog inputs. These inputs are configured as analog during FPGA configuration.USER_TEMP_ALARM_OUT Output System Monitor temperature-sensor alarm output.VCCINT_ALARM_OUT Output System Monitor V CCINT -sensor alarm output.VCCAUX_ALARM_OUT Output System Monitor V CCAUX -sensor alarm output.OT_OUTOutput Over-T emperature alarm output.CHANNEL_OUT[4:0]OutputsChannel selection outputs. The ADC input MUX channel selection for the current ADC conversion is placed on these outputs at the end of an ADC conversion.EOC_OUT OutputEnd of Conversion signal. This signal transitions to an active-High at the end of an ADC conversion when the measurement result is written to the status registers. For detailed information, see the System Monitor Timing section in the Virtex-5 and Virtex-6 FPGA System Monitor user guides ([Ref 1] and [Ref 2].)EOS_OUT OutputEnd of Sequence. This signal transitions to an active-High when the measurement data from the last channel in the Channel Sequencer is written to the status registers. For detailed information, see the System Monitor Timing section in the Virtex-5 and Virtex-6 FPGA System Monitor user guides ([Ref 1] and [Ref 2]).BUSY_OUT Output ADC busy signal. This signal transitions High during an ADC conversion. This signal transitions High for an extended period during calibration.JTAGLOCKED_OUT Output Used to indicated that DRP port has been locked by the JTAG interface.JTAGMODIFIED_OUT Output Used to indicate that a JTAG write to the DRP has occurred.JTAGBUSY_OUTOutputUsed to indicate that a JTAG DRP transaction is in progress.Table 1:System Monitor I/O Signals (Cont’d)PortDirection DescriptionLogiCORE IP System Monitor Wizard v2.1User AttributesThe System Monitor functionality is configured through the control registers (See the Register File Interface sections in the Virtex-5 and Virtex-6 FPGA System Monitor user guides: [Ref 1] and [Ref 2]).Table 2 lists the attributes associated with these control registers. These control registers can be initialized when the SYSMON primitive is instantiated in the HDL using the attributes listed in Table 2.The control registers can also be initialized through the DRP at run time. The System Monitor Wizard simplifies the initialization of these control registers in the HDL instantiation. The Wizard will generate the correct bit patterns based on user functionality selected through the Wizard GUI.SupportXilinx provides technical support for this LogiCORE product when used as described in the product documentation. Xilinx cannot guarantee timing, functionality, or support of product if implemented in devices that are not defined in the documentation, if customized beyond that allowed in the product documentation, or if changes are made to any section of the design labeled DO NOT MODIFY .Ordering InformationThe System Monitor™ Wizard LogiCORE IP core is provided free of charge under the terms of the Xilinx End User License Agreement . The core can be generated by the Xilinx ISE CORE Generator software, which is a standard component of the Xilinx ISE Design Suite. This version of the core can be generated using the ISE CORE Generator system v12.4. For more information, please visit the Architecture Wizards web page .Table 2:System Monitor AttributesAttribute Name Control Reg Address DescriptionINIT_40Configuration register 040h System Monitor configuration registers. For detailed information, see the Virtex-5 and Virtex-6 FPGA System Monitor user guides ([Ref 1] and [Ref 2])INIT_41Configuration register 141h INIT_42Configuration register 242hINIT_48 to INIT_4FSequence registers48h to 4Fh Sequence registers used to program the Channel Sequencer function in the System Monitor. Fordetailed information, see the Virtex-5 and Virtex-6FPGA System Monitor user guides ([Ref 1] and [Ref 2]).INIT_50 to INIT_57Alarm Limits registers50h to 57hAlarm threshold registers for the System Monitor alarm function. For detailed information, see theVirtex-5 and Virtex-6 FPGA System Monitor user guides ([Ref 1] and [Ref 2]).SIM_MON ITOR_FILE Simulation Analog Entry File -This is the text file that contains the analog input stimulus. This is used for simulation.SIM_DEVICEDevice family-This is used to identify the device family. This is used for simulation.LogiCORE IP System Monitor Wizard v2.1Information about additional Xilinx LogiCORE modules is available at the Xilinx IP Center . For pricing and availability of other Xilinx LogiCORE modules and software, please contact your local Xilinx sales representative .References1.UG192, Virtex-5 FPGA System Monitor User Guide2.UG370, Virtex-6 FPGA System Monitor User Guide3.DS100, Virtex-5 Family Overview4.DS150, Virtex-6 Family Overview5.UG741, System Monitor Wizard Getting Started GuideRevision HistoryThe following table shows the revision history for this document:Notice of DisclaimerXilinx is providing this product documentation, hereinafter “Information,” to you “AS IS” with no warranty of any kind, express or implied. Xilinx makes no representation that the Information, or any particular implementation thereof, is free from any claims of infringement. You are responsible for obtaining any rights you may require for any implementation based on the Information. All specifications are subject to change without notice. XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE INFORMATION OR ANY IMPLEMENTATION BASED THEREON, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF INFRINGEMENT AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Except as stated herein, none of the Information may be copied, reproduced,distributed, republished, downloaded, displayed, posted, or transmitted in any form or by any means including,but not limited to, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of Xilinx.Date Version Description of Revisions02/15/071.0Initial Xilinx release.04/19/10 2.0LogiCORE IP System Monitor Wizard v2.0 release. Updated tools and version numbers. Expanded supported Virtex-5 devices. Added support for Virtex-5 TXT and FXT sub-families. Added Virtex-6 FPGA support. Added Functional Description , SYSMON Functional Features , I/O Signals , Support , Ordering Information , and References .12/14/10 2.1Updates to the Wizard and tools versions.。

Chipscope教程

Chipscope教程

Xilinx的Chipscope类似于Altera的Signaltap。

下面记录一下Chipscope的使用方法。

1. 生成Chipscope文件第一步: 打开ISE Design Tools下的CORE Generator工具。

第二步: 在Xilinx CORE Generator的环境中选择菜单File->New Project,在弹出的对话框中选择存放的目录保存即可。

设置如下。

些,呵呵!选完后Apply一下OK关闭。

第五步: 双击IP Catalog窗口的Debug&Verification下的ICON(chipscope Pro –integrated Controller) 。

第六步: 在弹出的窗口中点击Generate就可以了。

第七步: ICON生成完成后,再双击IP Catalog窗口的Debug&Verification下的ILA(Chipscope Pro –Integrate Logic Analyzer)。

第八步: 在ILA的配置可以根据自己的需要来选择,我们这里不强求,我们这里选择一个触发Group,选择数据的采样深度为2048,就是一次采样2048个点,这个深度当然越大越好,但FPGA资源有限啊!设置完后点击Next。

也会用到Chipscope, 这样程序中基本上的信号都能观察了。

设置完后再Generate。

第十步: 这样我们所需的Chipscope文件都已经生成好了,我们可以在eeprom_test 的目录下看到生成的文件,特别要注意下图中我用红色圈出来的文件,如果在其它的工程中我们需要使用Chipscope的话,只要把这四个文件拷过去就好了,不要费老大力气的再重新生成一边。

接下来是Analyzer:点击Open cable按钮建立JTAG连接。

如果开发板和JTAG连接正常的话,Chipscope能找到开发板使用的FPGA芯片。

点击OK把Data Port里的CH0 ~CH7组合成一个组,方法是按Ctrl键,再选择Data port 里的CH0~CH7, 点击右键,选择Move to Bus->New Bus。

ise里用chipscope

ise里用chipscope

Chipscope的使用本来论文都差不多了,但是老师说缺少实验数据,没有办法,自己再加班加点补吧。

好在自己恰好有ChipScope的盘,于是赶快安装上,临阵磨枪,突击看了一晚上,有了一点点概念,这次记一下,下次就不用绞尽脑汁了。

还要感谢King帮忙查找资料。

逻辑分析仪的产生有两种方法:Core Generator(核产生器)和Core Inserter(核插入器),第一种方法产生内核,将这些内核例化后添加到原设计文件,最后综合,实现,下载。

第二种方法不需要修改原文件,它是将生成的内核添加到综合后的网表文件中,所以我们采用第二种方方法。

Core Inserter 的流程为:1)的RTL 综合成Netlist;2)调用Core Inserter 插入逻辑分析仪;3)布置和布局;4)产生bit 文件下载验证。

1. 首先用ISE对所设计的文件进行综合,然后再添加新建文件,选择ChipScope Definition 文件,选择完毕之后,添加到ISE工程。

2.对core Inserter进行配置,选择器件族,其它的默认即可,接下来是选择数据位宽,捕捉对比,进行信号连线等配置,可以根据自己的情况详细设置。

需要注意的是综合的设置需要保存Keep Hierarchy,防止优化过度。

3.按照以前运行ISE的步骤即可,知道最后下载到FPGA开发板,在ISE的最后会有ChipS cope Pro Analyze,然后点击,就运行逻辑分析仪。

然后点击JTAG连接方式,我的是用U SB的,然后选择[Device] configure 进行器件配置。

在window菜单下面可以选择触发设置窗口等选项,然后运行就可以观察你想要的波形了。

搭建Xilinx开发环境(3)…… 使用ChipScope进行调试Xilinx的ChipScope工具就相当于Altera的SignalTap II,能够捕捉FPGA内部的信号,方便了调试过程。

Xilinx ISE自带的除法器IP核数据手册

Xilinx ISE自带的除法器IP核数据手册

© 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。

Xilinx FPGA内DDR II IP生成指南

Xilinx FPGA内DDR II IP生成指南

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。

搭建Xilinx开发环境 (1)…… 编译Xilinx仿真库

搭建Xilinx开发环境 (1)…… 编译Xilinx仿真库

搭建Xilinx开发环境(1)……编译Xilinx仿真库首先介绍一下Xilinx几个主要的仿真库(路径:D:\Xilinx\11.1\ISE\verilog\src\)1.Unsim文件夹:Library of Unified component simulation models。

仅用来做功能仿真,包括了Xilinx公司全部的标准元件。

每个元件使用一个独立的文件,这样是为了方便一些特殊的编译向导指令,如`uselib等。

2.XilinxCoreLib: CORE Generator HDL Library model。

仅用来做功能仿真,包括了使用Xilinx Core Generator工具产生的IP仿真模型,例如FIFO等。

3.SIMPRIM: Library of generic simulation primitives。

用来做时序仿真或者门级功能仿真。

4.SmartModel:用来模拟非常复杂的一些FPGA设计,其中用到了Power PC或者RocketIO等。

我们一般只用其中的三个库:simprims,unisims,xilinxcorelib。

编译Xilinx仿真库有多种方法,比如,可以在ISE软件中编译xilinx仿真库,这样在ISE调用Modelsim进行仿真了。

但是利用ISE调用Modelsim仿真虽然操作方便,但是每次仿真前都要先进行综合,这样会很费时间,如果单独用Modelsim进行仿真,则可以不用进行综合而直接进行功能仿真。

不进行综合就仿真的结果是可能本来的设计就是不可综合的。

但是只要按照可综合的代码风格进行设计一般不会出现这中问题。

这样做的好处是节省了综合需要耗费的时间,所以下面主要介绍直接利用Modelsim编译Xilinx库,并进行仿真的流程。

Step1:在Modelsim的安装路径下建立一个文件夹,用来存储编译后的库文件。

Step2:打开Modelsim,更改路径为xilinx_libStep3:新建一个库,命名为xilinx_unisims,用来存放unisims库编译后的文件。

MIPS流水线CPU

MIPS流水线CPU

.本科实验报告课程名称:计算机组成与设计实验姓名:学院:信息与电子工程学院专业:电子科学与技术学号:314010指导教师:屈民军、唐奕2016年1 月7 日一、实验目的1.了解提高CPU性能的方法。

2.掌握流水线MIPS微处理器的工作原理。

3.理解数据冒险、控制冒险的概念以及流水线冲突的解决方法。

4.掌握流水线MIPS微处理器的测试方法。

二、实验任务设计一个32位流水线MIPS微处理器,具体要求如下:1.至少运行下列MIPS32指令。

(1)算术运算指令:ADD、ADDU、SUB、SUBU、ADDI、ADDIU。

(2)逻辑运算指令:AND、OR、NOR、XOR、ANDI、ORI、XORI、SLT、SLTU、SLTI、SLTIU。

(3)移位指令:SLL、SLLV、SRL、SRLV、SRA。

(4)条件分支指令:BEQ、BNE、BGEZ、BGTZ、BLEZ、BLTZ。

(5)无条件跳转指令:J、JR。

(6)数据传送指令:LW、SW。

(7)空指令:NOP。

2.采用5级流水线技术,对数据冒险实现转发或阻塞功能。

3.在XUP Virtex-Ⅱ Pro 开发系统中实现MIPS微处理器,要求CPU的运行速度大于25MHz。

三、实验原理1.总体设计流水线是数字系统中一种提高系统稳定性和工作速度的方法,广泛应用于高档CPU的架构中。

根据MIPS处理器的特点,将整体的处理过程分为取指令(IF)、指令译码(ID)、执行(EX)、存储器访问(MEM)和寄存器会写(WB)五级,对应多周期的五个处理阶段。

一个指令的执行需要5个时钟周期,每个时钟周期的上升沿来临时,此指令所代表的一系列数据和控制信息将转移到下一级处理。

由于在流水线中,数据和控制信息将在时钟周期的上升沿转移到下一级,所以规定流水线转移变量命名遵守如下格式:名称_流水线级名称例如:在ID级指令译码电路(Decode)产生的寄存器写允许信号RegWrite在ID级、EX级、MEM级和WB级上的命名分别为RegWrite_id、RegWrite_ex、RegWrite_mem和RegWrite_wb。

【SoCVista】Xilinx FPGA仿真与验证实例

【SoCVista】Xilinx FPGA仿真与验证实例

Digital IC Lab文件名稱:Simulation and Verification with Xilinx FPGA撰寫人員:林宜民(依姓氏筆劃)硬體要求:PC、Xilinx FPGA Spartan3 XC3S1500軟體要求:ModelSim SE 5.6、Synplify Pro 7.2、Xilinx ISE 6.3i文件版本:Version 1.2 (1/24/2006)工作內容:1.設計一個組合電路(解碼器)。

2.設計一個循序電路(移位暫存器)。

3.利用Xilinx ISE的CoreGenerator(以下簡稱CoreGen)產生RAM,ROM跟一個乘法器的IP,並藉以完成一個新的電路設計。

補充事項:1.一般硬體描述語言(Hardware Description Language,HDL)可分為VHDL與Verilog兩種,而Verilog是以類似C的語法來描述硬體電路,並擁有各種不同層次的表示方式。

2.模擬器(Simulator)是用來模擬電路的波形。

3.合成工具(Synthesizer)的功用是將HDL轉換成由電路所組成的Netlist。

4.一般而言,在電路設計的模擬上可分為Pre-Sim跟Post-Sim。

Pre-Sim是針對電路的function做模擬,此時只在意由HDL所撰寫的程式之function 是否正確,而Post-Sim則是針對合成過且做完APR(Auto Place and Route)的電路做模擬,以確保所設計的電路實現在FPGA上時,與Pre-Sim的function一樣。

組合電路二對四解碼器※名詞解釋:解碼器(Decoder)的功能是將編碼過的資料做解碼,以得到原始的資料。

※真值表:※示意圖:in0out0enablein1out1out2out3Pre-Sim步驟一:開啟ModelSim ,然後建立一個Project 。

※建立Project 的方式為點選File → New → Project …。

IP核应用

IP核应用

IP 复用
下面以一个10进制计数器为例,讲 解如何在ISE5.2中生成IP和使用IP,实现 设计。
PDF 文件使用 "pdfFactory Pro" 试用版本创建
1.设计要求
设计一个10进制计数器: (1)计数频率为1Hz (2)外部晶振为30MHz (3)使用7段LED显示计 数器的值。 其原理框图如右图所 示。
PDF 文件使用 "pdfFactory Pro" 试用版本创建
2.新建工程
PDF 文件使用 "pdfFactory Pro" 试用版本创建
3.新建VHDL(分频器)文件
PDF 文件使用 "pdfFactory Pro" 试用版本创建
6. IP参数设置
双击IP名 话框 Binary Counter参数设置对
PDF 文件使用 "pdfFactory Pro" 试用版本创建
6. IP参数设置
PDF 文件使用 "pdfFactory Pro" 试用版本创建
7.生成IP
发硬 件产品) IP Standard Bus interfaces(标准总线接口) IP
PDF 文件使用 "pdfFactory Pro" 试用版本创建
IP核生成器操作界面窗口中按 钮的含义
PDF 文件使用 "pdfFactory Pro" 试用版本创建
5.建立一个IP文件
PDF 文件使用 "pdfFactory Pro" 试用版本创建
IP 初始化窗口
PDF 文件使用 "pdfFactory Pro" 试用版本创建

vivado generate的用法

vivado generate的用法

vivado generate的用法【最新版】目录1.Vivado Generate 的介绍2.Vivado Generate 的基本用法3.Vivado Generate 的高级用法4.Vivado Generate 的优点与局限性正文1.Vivado Generate 的介绍Vivado Generate 是 Xilinx 公司提供的一款基于 Vivado 集成开发环境的代码生成工具,主要用于自动生成 FPGA(现场可编程门阵列)硬件描述语言(HDL)代码。

通过使用 Vivado Generate,开发人员可以大大简化和加速 FPGA 设计流程,从而提高工作效率。

2.Vivado Generate 的基本用法Vivado Generate 的基本用法主要包括以下几个步骤:(1)创建一个新的 Vivado 项目,并在项目中添加所需的 IP 模块。

(2)在“Project”窗口中,右键单击要生成代码的 IP 模块,并选择“Generate Code”选项。

此时,Vivado Generate 将自动生成对应的硬件描述语言代码,并将其添加到项目中。

(3)在“Project”窗口中,双击生成的代码模块,即可查看和编辑生成的代码。

3.Vivado Generate 的高级用法除了基本的代码生成功能外,Vivado Generate 还提供了许多高级用法,如:(1)通过脚本实现批量代码生成:开发人员可以通过编写脚本,实现对多个 IP 模块的批量代码生成。

(2)自定义代码生成规则:通过创建自定义的代码生成规则,开发人员可以根据不同的需求,生成符合特定规范的代码。

(3)使用 Vivado Generate API:Vivado Generate 提供了一套 API (应用程序编程接口),开发人员可以通过 API 实现对代码生成过程的编程控制。

4.Vivado Generate 的优点与局限性Vivado Generate 的优点包括:(1)提高开发效率:通过自动生成代码,大大减少了开发人员编写硬件描述语言代码的工作量。

仿真时要注意timescale

仿真时要注意timescale

仿真时要注意timescale今天在FPGA中加⼊模块dcm,⽤Xilinx的CORE Generator产⽣模块dcm_loc,然后把相应的vhd⽂件加⼊⼯程中,打算⽤modelsim仿真⼀下。

没想到在run时竟然会出现错误:# ** Fatal: (SIGFPE) Floating point exception.# Time: 0 ns Iteration: 0 Process: /tb_crk_oi2_1v/cr_oi2_knx1v_top_inst/dcm_loc_inst0/dcm_sp_inst/determine_phase_shift File: E:/Xilinx/12.3/ISE_DS/ISE/vhdl/src/unisims/primitive/DCM_SP.vhd # Fatal error in Process determine_phase_shift at E:/Xilinx/12.3/ISE_DS/ISE/vhdl/src/unisims/primitive/DCM_SP.vhd line1302## HDL call sequence:# Stopped at E:/Xilinx/12.3/ISE_DS/ISE/vhdl/src/unisims/primitive/DCM_SP.vhd 1302 Process determine_phase_shift⼀时不知道怎么回事。

请教公司的⾼⼿过来解决,结果他看了半天也不知道怎么回事。

然后就把他⾃⼰电脑⽤modelsim6.2i仿真成功的⼀个模块发给我,但是到我⾃⼰的电脑上,modelsim6.5仍然报这个错误。

以为是库的原因,把他的库拿过来仿了半天仍然错。

仔细检查modelsim给的提⽰,发现前⾯有个warning:** Warning: (vsim-3479) Time unit 'ps'is less than the simulator resolution (1ns).意思就是模块的时间精度为ps,⽽仿真器设置的1ns,有可能会有错误。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

使用Xilinx CORE Generator心得
初步使用Xilinx CORE Generator:
参考书籍:《Xilinx ISE 5.x 使用详解》EDA先锋工作室
P63-P72:IP核生成工具——CORE Generator
1. 对于如何在工程中加入IP核,是很简单的,我在未看书之前,就可根据提示挑选适当的核,对核进行参数设置,将核加入工程。

2. 接下来是如何使用,在这里,由于我主要使用VHDL语言,仿真工具用ModelSim6.0,综合工具主要使用Synplify7.7,我就只说在这样的环境下如何对该IP核进行元件例化,进行项目配置,并进行仿真与综合。

2.1 元件例化
可使用ISE的Laguage Template,也就是Xilinx 6.2 ISE中工具栏右上角的小灯泡,在COREGEN目录下,你会发现,你所用到的IP核的例化语句已经出现在模板里,拷过去就可以直接用了(当然你可能也要视情况进行必要的改动)。

3. 仿真
这里,最主要的问题是库,由于使用了IP核,所以要把XilinxCroeLib加入ModelSim库中。

我的经验是:先在当前工程的目录下创建一个xilinxcorelib库,然后把该库文件剪切到modelsim根目录下,最后在modelsim下,选中该库,点击右键选择Edit,将路径高到modelsim下。

然后将xilinx\vhdl\src\xilinxcorelib编译到该库中。

此时要注意,由于库文件的关联性,第一次不可能全部编译通过,连续三次后,大多数核就在库中,只有少数几个不能通过编译。

4. 综合
由于综合过程中,提示如下(下面是我在comp.arch.fpga上所发的问题):
In my project,there's a xilinx IP core. I want to use the synplify7.7 to synthesize it, but there's a warning when synthesize .
The warning is :
@W:
CD280 :"G:\project\itu656_dec\itu656_Decoder.vhd":29:10:29:19|Unbound component counter_11 mapped to black box
@W:
CD280 :"G:\project\itu656_dec\itu656_Decoder.vhd":37:10:37:18|Unbound component counter_4 mapped to black box
my project nane is itu656_dec : a decoder for itu 656 video
The following code has been used in my project:
component counter_11
port (
Q: OUT std_logic_VECTOR(10 downto 0);
CLK: IN std_logic;
CE: IN std_logic;
ACLR: IN std_logic);
end component;
component counter_4
port (
Q: OUT std_logic_VECTOR(3 downto 0);
CLK: IN std_logic;
CE: IN std_logic;
ACLR: IN std_logic);
end component;
新闻组上有人这样回复:
1. please refer to the "core generator guide" document. It explains how to do it. the document is located at
YOUR_XILINX_ISE_INSTALLTION_FOLDER \doc\usenglish\books\docs\cgn 2. "Xilinx-boxes" are synthesized within Xilinx-toolchain, as it seems.
Xilinx: XAPP409 might solve your problem.I'm not sure if that's really important when using synplify, butreading XILINX: xst.pdf might also make sense.
3. These warnings can be ignored. The netlist (edf, ngo, etc) for the core will be picked up when you run ngdbuild. "-sd" option of ngdbuild may be helpful.
根据第一个答复,我找到了cgn.pdf,在P99页上找到了答案:
VHDL Black Box
component myadder8
port (
A: IN std_logic_VECTOR(7 downto 0);
B: IN std_logic_VECTOR(7 downto 0);
C_IN: IN std_logic;
Q: OUT std_logic_VECTOR(8 downto 0);
CLK: IN std_logic
);
end component;
-- Synplicity black box declaration
attribute black_box : boolean;
attribute black_box of myadder8: component is true;
将attribute语句拷入我的工程,还有warning.根据提示,将black_box改成
syn_black_box,问题才得以解决,此时,不会再有上述warning存在了。

后来,在Xilinx ISE 5.x 使用详解》中翻到如下内容:P71
书上有云:
“IP核在综合时一般被认为是黑盒子(Black Box),综合器不对黑盒子做任何编译。

将IP核加入工程有两种方法,一为在工程中新建Coregen IP类型资源,另一种是针对第三方综合工具而言,同时避免了在新工程中需要重新加入IP核资源的麻烦。

也就是将IP核声明成黑盒子,具体操作时可以利用IP核生成时生成的仿真文件和IP核实例化文件(.veo,.vho),将仿真文件中的IP核的相关部分原封不动地拷贝到顶层文件中去,声明IP核模块,然后将实例化文件内容粘贴到模块的实例化部分。

然面,使用Synplify Pro等综合工具综合IP核等Xilinx硬件原语时,需要调用相应Xilinx 器件的硬件原语声明文件。

位于Synpliy\lib\Xilinx”子目录中的
virtex.v/vhd,virtexe.v/vhd,virtex2.v/vhd,virtex2p.v/vhd等文件就是硬件原语声明文件。

调用时用"include"命令。

相关文档
最新文档