使用Xilinx CORE Generator
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 的高速图像串行传输系统设计张峰;任国强;吴钦章【摘要】针对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嵌入式应用模拟卷试卷职业技能鉴定国家题库

个。
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是一款强大的工具,它能够根据用户的需求自动生成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核——精选推荐

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工具建立一个新的工程-基础电子可以用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 用法摘要: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 工具的其他功能相结合,方便进行仿真和测试,确保设计质量。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 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"命令。