首页资源分类FPGA/CPLDXilinx > 分享xilinx的IP核质料

分享xilinx的IP核质料

已有 445148个资源

下载专区

上传者其他资源

    文档信息举报收藏

    标    签:ip核

    分    享:

    文档简介

    非常全的文档质料,大家可以下载啊啊啊啊  

    文档预览

    Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 Notice of Disclaimer The information disclosed to you hereunder (the "Materials") is provided solely for the selection and use of Xilinx products. To the maximum extent permitted by applicable law: (1) Materials are made available "AS IS" and with all faults, Xilinx hereby DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and (2) Xilinx shall not be liable (whether in contract or tort, including negligence, or under any other theory of liability) for any loss or damage of any kind or nature related to, arising under, or in connection with, the Materials (including your use of the Materials), including for any direct, indirect, special, incidental, or consequential loss or damage (including loss of data, profits, goodwill, or any type of loss or damage suffered as a result of any action brought by a third party) even if such damage or loss was reasonably foreseeable or Xilinx had been advised of the possibility of the same. Xilinx assumes no obligation to correct any errors contained in the Materials or to notify you of updates to the Materials or to product specifications. You may not reproduce, modify, distribute, or publicly display the Materials without prior written consent. Certain products are subject to the terms and conditions of the Limited Warranties which can be viewed at http://www.xilinx.com/warranty.htm; IP cores may be subject to warranty and support terms contained in a license issued to you by Xilinx. Xilinx products are not designed or intended to be fail-safe or for use in any application requiring fail-safe performance; you assume sole risk and liability for use of Xilinx products in Critical Applications: http://www.xilinx.com/warranty.htm#critapps. © Copyright 2002-2013 Xilinx Inc. All rights reserved. Xilinx, the Xilinx logo, Artix, ISE, Kintex, Spartan, Virtex, Vivado, Zynq, 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. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs 2 www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 1 Introduction This HDL guide is part of the ISE® documentation collection. A separate version of this guide is available if you prefer to work with schematics. This guide contains the following: • Introduction. • A list of design elements supported in this architecture, organized by functional categories. • Descriptions of each available primitive. About Design Elements This version of the Libraries Guide describes the valid design elements for 7 series FPGAs and Zynq™-7000 All Programmable SoC devices, and includes examples of instantiation code for each element. Instantiation templates are also supplied in a separate ZIP file, which you can find in your installation directory under ISE/doc/usenglish/isehelp. Design elements are divided into three main categories: • Macros - These elements are in the UniMacro library in the Xilinx tool, and are used to instantiate primitives that are complex to instantiate by just using the primitives. The synthesis tools will automatically expand the unimacros to their underlying primitives. • Primitives - Xilinx components that are native to the FPGA you are targeting. If you instantiate a primitive in your design, after the translation process (ngdbuild) you will end up with the exact same component in the back end. For example, if you instantiate the Virtex®-5 element known as ISERDES_NODELAY as a user primitive, after you run translate (ngdbuild) you will end up with an ISERDES_NODELAY in the back end as well. If you were using ISERDES in a Virtex-5 device, then this will automatically retarget to an ISERDES_NODELAY for Virtex-5 in the back end. Hence, this concept of a “primitive” differs from other uses of that term in this technology. CORE Generator maintains software libraries with hundreds of functional design elements (UniMacros and primitives) for different device architectures. New functional elements are assembled with each release of development system software. In addition to a comprehensive Unified Library containing all design elements, this guide is one in a series of architecture-specific libraries. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 3 Chapter 1: Introduction Design Entry Methods For each design element in this guide, Xilinx evaluates four options for using the design element, and recommends what we believe is the best solution for you. The four options are: • Instantiation - This component can be instantiated directly into the design. This method is useful if you want to control the exact placement of the individual blocks. • Inference - This component can be inferred by most supported synthesis tools. You should use this method if you want to have complete flexibility and portability of the code to multiple architectures. Inference also gives the tools the ability to optimize for performance, area, or power, as specified by the user to the synthesis tool. • Coregen & Wizards - This component can be used through CORE Generator or other Wizards. You should use this method if you want to build large blocks of any FPGA primitive that cannot be inferred. When using this flow, you will have to re-generate your cores for each architecture that you are targeting. • Macro Support - This component has a UniMacro that can be used. These components are in the UniMacro library in the Xilinx tool, and are used to instantiate primitives that are too complex to instantiate by just using the primitives. The synthesis tools will automatically expand UniMacros to their underlying primitives. Send Feedback 4 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2 About Unimacros This section describes the unimacros that can be used with 7 series FPGAs and Zynq™-7000 All Programmable SoC devices. The unimacros are organized alphabetically. The following information is provided for each unimacro, where applicable: • Name of element • Brief description • Schematic symbol • Logic table (if any) • Port descriptions • Design Entry Method • Available attributes • Example instantiation code • For more information Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 5 Chapter 2: About Unimacros BRAM_SDP_MACRO Macro: Simple Dual Port RAM Introduction 7 series FPGA devices contain several block RAM memories that can be configured as general-purpose 36Kb or 18Kb RAM/ROM memories. These block RAM memories offer fast and flexible storage of large amounts of on-chip data. Both read and write operations are fully synchronous to the supplied clock(s) of the component. However, READ and WRITE ports can operate fully independently and asynchronously to each other, accessing the same memory array. Byte-enable write operations are possible, and an optional output register can be used to reduce the clock-to-out times of the RAM. Note This element must be configured so that read and write ports have the same width. Port Description Name DO DI WRADDR, RDADDR WE WREN, RDEN SSR Direction Output Input Input Width (Bits) See Configuration Table See Configuration Table See Configuration Table Input Input See Configuration Table 1 Input 1 Function Data output bus addressed by RDADDR. Data input bus addressed by WRADDR. Write/Read address input buses. Byte-Wide Write enable. Write/Read enable Output registers synchronous reset. Send Feedback 6 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros Name REGCE WRCLK, RDCLK Direction Width (Bits) Input 1 Input 1 Function Output register clock enable input (valid only when DO_REG=1). Write/Read clock input. Port Configuration This unimacro is a parameterizable version of the primitive, and can be instantiated only. Use this table to correctly configure the unimacro to meet design needs. DATA_WIDTH BRAM_SIZE ADDR WE 72 - 37 36Kb 9 8 36 - 19 36Kb 10 4 18Kb 9 18 - 10 36Kb 11 2 18Kb 10 9-5 36Kb 12 1 18Kb 11 4-3 36Kb 13 1 18Kb 12 2 36Kb 14 1 18Kb 13 1 36Kb 15 1 18Kb 14 Design Entry Method This unimacro is a parameterizable version of the primitive, and can be instantiated only. Consult the Port Configuration section to correctly configure this element to meet your design needs. Instantiation Inference CORE Generator™ and wizards Macro support Yes No No Recommended Available Attributes Attribute BRAM_SIZE Data Type String Allowed Values "36Kb", "18Kb" Default "18Kb" DEVICE String "7SERIES" "7SERIES" Description Configures RAM as "36Kb" or "18Kb" memory. Target hardware architecture. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 7 Chapter 2: About Unimacros Attribute DO_REG Data Type Integer Allowed Values Default 0, 1 0 INIT READ_WIDTH, WRITE_WIDTH Hexadecimal Any 72-Bit Value Integer 1-72 All zeros 36 INIT_FILE String SIM_COLLISION_ CHECK String String representing file name and location. "ALL", "WARNING_ ONLY", "GENERATE_X_ ONLY", "NONE" NONE "ALL" SRVAL Hexadecimal Any 72-Bit Value All zeroes Description A value of 1 enables to the output registers to the RAM enabling quicker clock-to-out from the RAM at the expense of an added clock cycle of read latency. A value of 0 allows a read in one clock cycle but will have slower clock to out timing. Specifies the initial value on the output after configuration. Specifies the size of the DI and DO buses. The following combinations are allowed: • READ_WIDTH = WRITE_WIDTH • If asymmetric, READ_WIDTH and WRITE_WIDTH must be in the ratio of 2, or must be values allowed by the unisim (1, 2, 4, 8, 9, 16, 18, 32, 36, 64, 72) Name of the file containing initial values. Allows modification of the simulation behavior if a memory collision occurs. The output is affected as follows: • "ALL" - Warning produced and affected outputs/memory location go unknown (X). • "WARNING_ONLY" - Warning produced and affected outputs/memory retain last value. • "GENERATE_X_ONLY" - No warning. However, affected outputs/memory go unknown (X). • "NONE" - No warning and affected outputs/memory retain last value. Note Setting this to a value other than "ALL" can allow problems in the design go unnoticed during simulation. Care should be taken when changing the value of this attribute. Please see the Synthesis and Simulation Design Guide for more information. Specifies the output value of on the DO port upon the assertion of the synchronous reset (RST) signal. Send Feedback 8 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros Attribute INIT_00 to INIT_7F INITP_00 to INITP_0F Data Type Hexadecimal Allowed Values Any 256-Bit Value Default All zeroes Hexadecimal Any 256-Bit Value All zeroes Description Allows specification of the initial contents of the 16Kb or 32Kb data memory array. Allows specification of the initial contents of the 2Kb or 4Kb parity data memory array. VHDL Instantiation Template Unless they already exist, copy the following four statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; library UNIMACRO; use unimacro.Vcomponents.all; -- BRAM_SDP_MACRO: Simple Dual Port RAM -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 -- Note - This Unimacro model assumes the port directions to be "downto". -- Simulation of this model with "to" in the port directions could lead to erroneous results. ----------------------------------------------------------------------- -- READ_WIDTH | BRAM_SIZE | READ Depth | RDADDR Width | -- -- WRITE_WIDTH | | WRITE Depth | WRADDR Width | WE Width -- -- ============|===========|=============|==============|============-- -- 37-72 | "36Kb" | 512 | 9-bit | 8-bit -- -- 19-36 | "36Kb" | 1024 | 10-bit | 4-bit -- -- 19-36 | "18Kb" | 512 | 9-bit | 4-bit -- -- 10-18 | "36Kb" | 2048 | 11-bit | 2-bit -- -- 10-18 | "18Kb" | 1024 | 10-bit | 2-bit -- -- 5-9 | "36Kb" | 4096 | 12-bit | 1-bit -- -- 5-9 | "18Kb" | 2048 | 11-bit | 1-bit -- -- 3-4 | "36Kb" | 8192 | 13-bit | 1-bit -- -- 3-4 | "18Kb" | 4096 | 12-bit | 1-bit -- -- 2 | "36Kb" | 16384 | 14-bit | 1-bit -- -- 2 | "18Kb" | 8192 | 13-bit | 1-bit -- -- 1 | "36Kb" | 32768 | 15-bit | 1-bit -- -- 1 | "18Kb" | 16384 | 14-bit | 1-bit -- ----------------------------------------------------------------------- BRAM_SDP_MACRO_inst : BRAM_SDP_MACRO generic map ( BRAM_SIZE => "18Kb", -- Target BRAM, "18Kb" or "36Kb" DEVICE => "7SERIES", -- Target device: "VIRTEX5", "VIRTEX6", "7SERIES", "SPARTAN6" WRITE_WIDTH => 0, -- Valid values are 1-72 (37-72 only valid when BRAM_SIZE="36Kb") READ_WIDTH => 0, -- Valid values are 1-72 (37-72 only valid when BRAM_SIZE="36Kb") DO_REG => 0, -- Optional output register (0 or 1) INIT_FILE => "NONE", SIM_COLLISION_CHECK => "ALL", -- Collision check enable "ALL", "WARNING_ONLY", -- "GENERATE_X_ONLY" or "NONE" SRVAL => X"000000000000000000", -- Set/Reset value for port output WRITE_MODE => "WRITE_FIRST", -- Specify "READ_FIRST" for same clock or synchronous clocks -- Specify "WRITE_FIRST for asynchrononous clocks on ports INIT => X"000000000000000000", -- Initial values on output port -- The following INIT_xx declarations specify the initial contents of the RAM INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 9 Chapter 2: About Unimacros INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000", -- The next set of INIT_xx are valid when configured as 36Kb INIT_40 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_41 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_42 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_43 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_44 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_45 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_46 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_47 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_48 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_49 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4E => X"0000000000000000000000000000000000000000000000000000000000000000", Send Feedback 10 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros INIT_4F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_50 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_51 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_52 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_53 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_54 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_55 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_56 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_57 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_58 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_59 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_60 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_61 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_62 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_63 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_64 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_65 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_66 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_67 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_68 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_69 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_70 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_71 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_72 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_73 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_74 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_75 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_76 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_77 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_78 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_79 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7F => X"0000000000000000000000000000000000000000000000000000000000000000", -- The next set of INITP_xx are for the parity bits INITP_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_07 => X"0000000000000000000000000000000000000000000000000000000000000000", -- The next set of INIT_xx are valid when configured as 36Kb INITP_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0F => X"0000000000000000000000000000000000000000000000000000000000000000") port map ( DO => DO, -- Output read data port, width defined by READ_WIDTH parameter DI => DI, -- Input write data port, width defined by WRITE_WIDTH parameter RDADDR => RDADDR, -- Input read address, width defined by read port depth Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 11 Chapter 2: About Unimacros RDCLK => RDCLK, -- 1-bit input read clock RDEN => RDEN, -- 1-bit input read port enable REGCE => REGCE, -- 1-bit input read output register enable RST => RST, -- 1-bit input reset WE => WE, -- Input write enable, width defined by write port depth WRADDR => WRADDR, -- Input write address, width defined by write port depth WRCLK => WRCLK, -- 1-bit input write clock WREN => WREN -- 1-bit input write port enable ); -- End of BRAM_SDP_MACRO_inst instantiation Verilog Instantiation Template // BRAM_SDP_MACRO: Simple Dual Port RAM // 7 Series // Xilinx HDL Libraries Guide, version 14.7 /////////////////////////////////////////////////////////////////////// // READ_WIDTH | BRAM_SIZE | READ Depth | RDADDR Width | // // WRITE_WIDTH | | WRITE Depth | WRADDR Width | WE Width // // ============|===========|=============|==============|============// // 37-72 | "36Kb" | 512 | 9-bit | 8-bit // // 19-36 | "36Kb" | 1024 | 10-bit | 4-bit // // 19-36 | "18Kb" | 512 | 9-bit | 4-bit // // 10-18 | "36Kb" | 2048 | 11-bit | 2-bit // // 10-18 | "18Kb" | 1024 | 10-bit | 2-bit // // 5-9 | "36Kb" | 4096 | 12-bit | 1-bit // // 5-9 | "18Kb" | 2048 | 11-bit | 1-bit // // 3-4 | "36Kb" | 8192 | 13-bit | 1-bit // // 3-4 | "18Kb" | 4096 | 12-bit | 1-bit // // 2 | "36Kb" | 16384 | 14-bit | 1-bit // // 2 | "18Kb" | 8192 | 13-bit | 1-bit // // 1 | "36Kb" | 32768 | 15-bit | 1-bit // // 1 | "18Kb" | 16384 | 14-bit | 1-bit // /////////////////////////////////////////////////////////////////////// BRAM_SDP_MACRO #( .BRAM_SIZE("18Kb"), // Target BRAM, "18Kb" or "36Kb" .DEVICE("7SERIES"), // Target device: "VIRTEX5", "VIRTEX6", "SPARTAN6", "7SERIES" .WRITE_WIDTH(0), // Valid values are 1-72 (37-72 only valid when BRAM_SIZE="36Kb") .READ_WIDTH(0), // Valid values are 1-72 (37-72 only valid when BRAM_SIZE="36Kb") .DO_REG(0), // Optional output register (0 or 1) .INIT_FILE ("NONE"), .SIM_COLLISION_CHECK ("ALL"), // Collision check enable "ALL", "WARNING_ONLY", // "GENERATE_X_ONLY" or "NONE" .SRVAL(72'h000000000000000000), // Set/Reset value for port output .INIT(72'h000000000000000000), // Initial values on output port .WRITE_MODE("WRITE_FIRST"), // Specify "READ_FIRST" for same clock or synchronous clocks // Specify "WRITE_FIRST for asynchronous clocks on ports .INIT_00(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_01(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_02(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_03(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_04(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_05(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_06(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_07(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_08(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_09(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_10(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_11(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_12(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_13(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_14(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_15(256'h0000000000000000000000000000000000000000000000000000000000000000), Send Feedback 12 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros .INIT_16(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_17(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_18(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_19(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_20(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_21(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_22(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_23(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_24(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_25(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_26(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_27(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_28(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_29(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_30(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_31(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_32(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_33(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_34(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_35(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_36(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_37(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_38(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_39(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3F(256'h0000000000000000000000000000000000000000000000000000000000000000), // The next set of INIT_xx are valid when configured as 36Kb .INIT_40(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_41(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_42(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_43(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_44(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_45(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_46(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_47(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_48(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_49(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_50(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_51(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_52(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_53(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_54(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_55(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_56(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_57(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_58(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_59(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5C(256'h0000000000000000000000000000000000000000000000000000000000000000), Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 13 Chapter 2: About Unimacros .INIT_5D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_60(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_61(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_62(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_63(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_64(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_65(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_66(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_67(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_68(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_69(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_70(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_71(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_72(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_73(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_74(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_75(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_76(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_77(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_78(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_79(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7F(256'h0000000000000000000000000000000000000000000000000000000000000000), // The next set of INITP_xx are for the parity bits .INITP_00(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_01(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_02(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_03(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_04(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_05(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_06(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_07(256'h0000000000000000000000000000000000000000000000000000000000000000), // The next set of INITP_xx are valid when configured as 36Kb .INITP_08(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_09(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0F(256'h0000000000000000000000000000000000000000000000000000000000000000) ) BRAM_SDP_MACRO_inst ( .DO(DO), // Output read data port, width defined by READ_WIDTH parameter .DI(DI), // Input write data port, width defined by WRITE_WIDTH parameter .RDADDR(RDADDR), // Input read address, width defined by read port depth .RDCLK(RDCLK), // 1-bit input read clock .RDEN(RDEN), // 1-bit input read port enable .REGCE(REGCE), // 1-bit input read output register enable .RST(RST), // 1-bit input reset .WE(WE), // Input write enable, width defined by write port depth .WRADDR(WRADDR), // Input write address, width defined by write port depth .WRCLK(WRCLK), // 1-bit input write clock .WREN(WREN) // 1-bit input write port enable ); // End of BRAM_SDP_MACRO_inst instantiation Send Feedback 14 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Chapter 2: About Unimacros Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 15 Chapter 2: About Unimacros BRAM_SINGLE_MACRO Macro: Single Port RAM Introduction 7 series FPGA devices contain several block RAM memories that can be configured as general-purpose 36Kb or 18Kb RAM/ROM memories. These single-port, block RAM memories offer fast and flexible storage of large amounts of on-chip data. Byte-enable write operations are possible, and an optional output register can be used to reduce the clock-to-out times of the RAM. Port Description Name DO DI ADDR WE EN RST REGCE Direction Output Input Input Input Input Input Input Width See Configuration Table below. See Configuration Table below. See Configuration Table below. See Configuration Table below. 1 1 1 CLK Input 1 Function Data output bus addressed by ADDR. Data input bus addressed by ADDR. Address input bus. Byte-Wide Write enable. Write/Read enables. Output registers synchronous reset. Output register clock enable input (valid only when DO_REG=1). Clock input. Send Feedback 16 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros Port Configuration This unimacro is a parameterizable version of the primitive, and can be instantiated only. Use this table to correctly configure the unimacro to meet design needs. WRITE_WIDTH READ_WIDTH BRAM_SIZE ADDR WE 72 - 37 72 - 37 36Kb 9 8 36 - 19 10 18 - 10 11 9-5 12 4-3 13 2 14 1 15 36 - 19 36 - 19 36Kb 10 4 18-10 11 9-5 12 4-3 13 2 14 1 15 18 - 10 36 - 19 36Kb 11 2 18-10 11 9-5 12 4-3 13 2 14 1 15 9-5 36-19 36Kb 12 1 18-10 12 9-5 12 4-3 13 2 14 1 15 4-3 36-19 36Kb 13 1 18-10 13 9-5 13 4-3 13 2 14 1 15 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 17 Chapter 2: About Unimacros WRITE_WIDTH READ_WIDTH BRAM_SIZE ADDR WE 2 36-19 36Kb 14 1 18-10 14 9-5 14 4-3 14 2 14 1 15 1 36 - 19 36Kb 15 1 18 - 10 15 9-5 15 3-4 15 2 15 1 15 18-10 18-10 18Kb 10 2 9-5 11 4-3 12 2 13 1 14 9-5 18-10 18Kb 11 1 9-5 11 4-3 12 2 13 1 14 4-3 18-10 18Kb 12 1 9-5 12 4-3 12 2 13 1 14 2 18-10 18Kb 13 1 9-5 13 4-3 13 2 13 1 14 Send Feedback 18 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros WRITE_WIDTH READ_WIDTH BRAM_SIZE ADDR WE 1 18-10 18Kb 14 1 9-5 14 4-3 14 2 14 1 14 Design Entry Method This unimacro is a parameterizable version of the primitive, and can be instantiated only. Consult the Port Configuration section to correctly configure this element to meet your design needs. Instantiation Inference CORE Generator™ and wizards Macro support Yes No No Recommended Available Attributes Attribute BRAM_SIZE DEVICE DO_REG READ_WIDTH, WRITE_WIDTH INIT_FILE WRITE_MODE INIT SRVAL Data Type String String Integer Integer String String Hexadecimal Hexadecimal Allowed Values Default "36Kb", "18Kb" "18Kb" "7SERIES" 0, 1 "7SERIES" 0 1 - 36 1 String representing file name and location. "READ_FIRST", "WRITE_FIRST", "NO_CHANGE" Any 72-Bit Value None "WRITE_FIRST" All zeros Any 72-Bit Value All zeroes Description Configures RAM as "36Kb" or "18Kb" memory. Target hardware architecture. A value of 1 enables to the output registers to the RAM enabling quicker clock-to-out from the RAM at the expense of an added clock cycle of read latency. A value of 0 allows a read in one clock cycle but will have slower clock to out timing. Specifies the size of the DI and DO buses. The following combinations are allowed: • READ_WIDTH = WRITE_WIDTH • If asymmetric, READ_WIDTH and WRITE_WIDTH must be in the ratio of 2, or must be values allowed by the unisim (1, 2, 4, 8, 9, 16, 18, 32, 36, 64, 72) Name of the file containing initial values. Specifies write mode to the memory. Specifies the initial value on the output after configuration. Specifies the output value of on the DO port upon the assertion of the synchronous reset (RST) signal. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 19 Chapter 2: About Unimacros Attribute INIT_00 to INIT_FF INITP_00 to INITP_0F Data Type Allowed Values Default Hexadecimal Any 256-Bit Value All zeroes Hexadecimal Any 256-Bit Value All zeroes Description Allows specification of the initial contents of the 16Kb or 32Kb data memory array. Allows specification of the initial contents of the 2Kb or 4Kb parity data memory array. VHDL Instantiation Template Unless they already exist, copy the following four statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; library UNIMACRO; use unimacro.Vcomponents.all; -- BRAM_SINGLE_MACRO: Single Port RAM -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 -- Note - This Unimacro model assumes the port directions to be "downto". -- Simulation of this model with "to" in the port directions could lead to erroneous results. --------------------------------------------------------------------- -- READ_WIDTH | BRAM_SIZE | READ Depth | ADDR Width | -- -- WRITE_WIDTH | | WRITE Depth | | WE Width -- -- ============|===========|=============|============|============-- -- 37-72 | "36Kb" | 512 | 9-bit | 8-bit -- -- 19-36 | "36Kb" | 1024 | 10-bit | 4-bit -- -- 19-36 | "18Kb" | 512 | 9-bit | 4-bit -- -- 10-18 | "36Kb" | 2048 | 11-bit | 2-bit -- -- 10-18 | "18Kb" | 1024 | 10-bit | 2-bit -- -- 5-9 | "36Kb" | 4096 | 12-bit | 1-bit -- -- 5-9 | "18Kb" | 2048 | 11-bit | 1-bit -- -- 3-4 | "36Kb" | 8192 | 13-bit | 1-bit -- -- 3-4 | "18Kb" | 4096 | 12-bit | 1-bit -- -- 2 | "36Kb" | 16384 | 14-bit | 1-bit -- -- 2 | "18Kb" | 8192 | 13-bit | 1-bit -- -- 1 | "36Kb" | 32768 | 15-bit | 1-bit -- -- 1 | "18Kb" | 16384 | 14-bit | 1-bit -- --------------------------------------------------------------------- BRAM_SINGLE_MACRO_inst : BRAM_SINGLE_MACRO generic map ( BRAM_SIZE => "18Kb", -- Target BRAM, "18Kb" or "36Kb" DEVICE => "7SERIES", -- Target Device: "VIRTEX5", "7SERIES", "VIRTEX6, "SPARTAN6" DO_REG => 0, -- Optional output register (0 or 1) INIT => X"000000000", -- Initial values on output port INIT_FILE => "NONE", WRITE_WIDTH => 0, -- Valid values are 1-72 (37-72 only valid when BRAM_SIZE="36Kb") READ_WIDTH => 0, -- Valid values are 1-72 (37-72 only valid when BRAM_SIZE="36Kb") SRVAL => X"000000000", -- Set/Reset value for port output WRITE_MODE => "WRITE_FIRST", -- "WRITE_FIRST", "READ_FIRST" or "NO_CHANGE" -- The following INIT_xx declarations specify the initial contents of the RAM INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", Send Feedback 20 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000", -- The next set of INIT_xx are valid when configured as 36Kb INIT_40 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_41 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_42 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_43 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_44 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_45 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_46 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_47 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_48 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_49 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_50 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_51 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_52 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_53 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_54 => X"0000000000000000000000000000000000000000000000000000000000000000", Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 21 Chapter 2: About Unimacros INIT_55 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_56 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_57 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_58 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_59 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_60 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_61 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_62 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_63 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_64 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_65 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_66 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_67 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_68 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_69 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_70 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_71 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_72 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_73 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_74 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_75 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_76 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_77 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_78 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_79 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7F => X"0000000000000000000000000000000000000000000000000000000000000000", -- The next set of INITP_xx are for the parity bits INITP_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_07 => X"0000000000000000000000000000000000000000000000000000000000000000", -- The next set of INIT_xx are valid when configured as 36Kb INITP_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0F => X"0000000000000000000000000000000000000000000000000000000000000000") port map ( DO => DO, -- Output data, width defined by READ_WIDTH parameter ADDR => ADDR, -- Input address, width defined by read/write port depth CLK => CLK, -- 1-bit input clock DI => DI, -- Input data port, width defined by WRITE_WIDTH parameter EN => EN, -- 1-bit input RAM enable REGCE => REGCE, -- 1-bit input output register enable RST => RST, -- 1-bit input reset WE => WE -- Input write enable, width defined by write port depth ); Send Feedback 22 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros -- End of BRAM_SINGLE_MACRO_inst instantiation Verilog Instantiation Template // BRAM_SINGLE_MACRO: Single Port RAM // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ///////////////////////////////////////////////////////////////////// // READ_WIDTH | BRAM_SIZE | READ Depth | ADDR Width | // // WRITE_WIDTH | | WRITE Depth | | WE Width // // ============|===========|=============|============|============// // 37-72 | "36Kb" | 512 | 9-bit | 8-bit // // 19-36 | "36Kb" | 1024 | 10-bit | 4-bit // // 19-36 | "18Kb" | 512 | 9-bit | 4-bit // // 10-18 | "36Kb" | 2048 | 11-bit | 2-bit // // 10-18 | "18Kb" | 1024 | 10-bit | 2-bit // // 5-9 | "36Kb" | 4096 | 12-bit | 1-bit // // 5-9 | "18Kb" | 2048 | 11-bit | 1-bit // // 3-4 | "36Kb" | 8192 | 13-bit | 1-bit // // 3-4 | "18Kb" | 4096 | 12-bit | 1-bit // // 2 | "36Kb" | 16384 | 14-bit | 1-bit // // 2 | "18Kb" | 8192 | 13-bit | 1-bit // // 1 | "36Kb" | 32768 | 15-bit | 1-bit // // 1 | "18Kb" | 16384 | 14-bit | 1-bit // ///////////////////////////////////////////////////////////////////// BRAM_SINGLE_MACRO #( .BRAM_SIZE("18Kb"), // Target BRAM, "18Kb" or "36Kb" .DEVICE("7SERIES"), // Target Device: "VIRTEX5", "VIRTEX6", "SPARTAN6", "7SERIES" .DO_REG(0), // Optional output register (0 or 1) .INIT(36'h000000000), // Initial values on output port .INIT_FILE ("NONE"), .WRITE_WIDTH(0), // Valid values are 1-72 (37-72 only valid when BRAM_SIZE="36Kb") .READ_WIDTH(0), // Valid values are 1-72 (37-72 only valid when BRAM_SIZE="36Kb") .SRVAL(36'h000000000), // Set/Reset value for port output .WRITE_MODE("WRITE_FIRST"), // "WRITE_FIRST", "READ_FIRST", or "NO_CHANGE" .INIT_00(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_01(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_02(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_03(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_04(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_05(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_06(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_07(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_08(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_09(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_10(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_11(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_12(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_13(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_14(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_15(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_16(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_17(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_18(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_19(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_20(256'h0000000000000000000000000000000000000000000000000000000000000000), Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 23 Chapter 2: About Unimacros .INIT_21(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_22(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_23(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_24(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_25(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_26(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_27(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_28(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_29(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_30(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_31(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_32(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_33(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_34(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_35(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_36(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_37(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_38(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_39(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3F(256'h0000000000000000000000000000000000000000000000000000000000000000), // The next set of INIT_xx are valid when configured as 36Kb .INIT_40(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_41(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_42(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_43(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_44(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_45(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_46(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_47(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_48(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_49(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_50(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_51(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_52(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_53(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_54(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_55(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_56(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_57(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_58(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_59(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_60(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_61(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_62(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_63(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_64(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_65(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_66(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_67(256'h0000000000000000000000000000000000000000000000000000000000000000), Send Feedback 24 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros .INIT_68(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_69(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_70(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_71(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_72(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_73(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_74(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_75(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_76(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_77(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_78(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_79(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7F(256'h0000000000000000000000000000000000000000000000000000000000000000), // The next set of INITP_xx are for the parity bits .INITP_00(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_01(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_02(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_03(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_04(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_05(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_06(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_07(256'h0000000000000000000000000000000000000000000000000000000000000000), // The next set of INIT_xx are valid when configured as 36Kb .INITP_08(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_09(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0F(256'h0000000000000000000000000000000000000000000000000000000000000000) ) BRAM_SINGLE_MACRO_inst ( .DO(DO), // Output data, width defined by READ_WIDTH parameter .ADDR(ADDR), // Input address, width defined by read/write port depth .CLK(CLK), // 1-bit input clock .DI(DI), // Input data port, width defined by WRITE_WIDTH parameter .EN(EN), // 1-bit input RAM enable .REGCE(REGCE), // 1-bit input output register enable .RST(RST), // 1-bit input reset .WE(WE) // Input write enable, width defined by write port depth ); // End of BRAM_SINGLE_MACRO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 25 Chapter 2: About Unimacros BRAM_TDP_MACRO Macro: True Dual Port RAM Introduction 7 series FPGA devices contain several block RAM memories that can be configured as general-purpose 36kb or 18kb RAM/ROM memories. These block RAM memories offer fast and flexible storage of large amounts of on-chip data. Both read and write operations are fully synchronous to the supplied clock(s) of the component. However, READ and WRITE ports can operate fully independently and asynchronous to each other, accessing the same memory array. Byte-enable write operations are possible, and an optional output register can be used to reduce the clock-to-out times of the RAM. Port Description Name DOA DOB DIA DIB Direction Output Output Input Input Width See Configuration Table below. See Configuration Table below. See Configuration Table below. See Configuration Table below. Function Data output bus addressed by ADDRA. Data output bus addressed by ADDRB. Data input bus addressed by ADDRA. Data input bus addressed by ADDRB. Send Feedback 26 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros Name ADDRA, ADDRB WEA, WEB ENA, ENB RSTA, RSTB REGCEA, REGCEB CLKA, CLKB Direction Input Input Input Input Input Width See Configuration Table below. See Configuration Table below. 1 1 1 Input 1 Function Address input buses for Port A, B. Write enable for Port A, B. Write/Read enables for Port A, B. Output registers synchronous reset for Port A, B. Output register clock enable input for Port A, B (valid only when DO_REG=1). Write/Read clock input for Port A, B. Port Configuration This unimacro is a parameterizable version of the primitive, and can be instantiated only. Use this table to correctly configure the unimacro to meet design needs. WRITE_WIDTH_A/BDIA/DIB 36 - 19 18 - 10 9-5 4-3 READ_WIDTH_A/BDOA/DOB 36 - 19 18-10 9-5 4-3 2 1 36 - 19 18-10 9-5 4-3 2 1 36-19 18-10 9-5 4-3 2 1 36-19 18-10 9-5 4-3 2 1 BRAM_SIZE 36Kb 36Kb 36Kb 36Kb ADDRA/B 10 11 12 13 14 15 11 11 12 13 14 15 12 12 12 13 14 15 13 13 13 13 14 15 WEA/B 4 2 1 1 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 27 Chapter 2: About Unimacros WRITE_WIDTH_A/BDIA/DIB 2 1 18-10 9-5 4-3 2 1 READ_WIDTH_A/BDOA/DOB 36-19 18-10 9-5 4-3 2 1 36-19 18-10 9-5 4-3 2 1 18-10 9-5 4-3 2 1 18-10 9-5 4-3 2 1 18-10 9-5 4-3 2 1 18-10 9-5 4-3 2 1 18-10 9-5 4-3 2 1 BRAM_SIZE 36Kb 36Kb 18Kb 18Kb 18Kb 18Kb 18Kb ADDRA/B 14 14 14 14 14 15 15 15 15 15 15 15 10 11 12 13 14 11 11 12 13 14 12 12 12 13 14 13 13 13 13 14 14 14 14 14 14 WEA/B 1 1 2 1 1 1 1 Send Feedback 28 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros Design Entry Method This unimacro is a parameterizable version of the primitive, and can be instantiated only. Consult the Port Configuration section to correctly configure this element to meet your design needs. Instantiation Inference CORE Generator™ and wizards Macro support Yes No No Recommended Available Attributes Attribute(s) BRAM_SIZE DEVICE DO_REG Data Type String String Integer Allowed Values "36Kb", "18Kb" "7SERIES" 0, 1 Default "18Kb" "7SERIES" 0 INIT INIT_FILE READ_WIDTH, WRITE_WIDTH Hexadecimal String Integer Any 72-Bit Value All zeros String representing file name and location. 1 - 72 NONE 36 Description Configures RAM as "36Kb" or "18Kb" memory. Target hardware architecture. A value of 1 enables to the output registers to the RAM enabling quicker clock-to-out from the RAM at the expense of an added clock cycle of read latency. A value of 0 allows a read in one clock cycle but will have slower clock to out timing. Specifies the initial value on the output after configuration. Name of file containing initial values. Specifies the size of the DI and DO buses. The following combinations are allowed: • READ_WIDTH = WRITE_WIDTH • If asymmetric, READ_WIDTH and WRITE_WIDTH must be in the ratio of 2, or must be values allowed by the unisim (1, 2, 4, 8, 9, 16, 18, 32, 36) SIM_COLLISION_ CHECK String "ALL", "WARNING_ ONLY", "GENERATE_X_ ONLY", "NONE" "ALL" Allows modification of the simulation behavior if a memory collision occurs. The output is affected as follows: • "ALL" - Warning produced and affected outputs/memory location go unknown (X). • "WARNING_ONLY" - Warning produced and affected outputs/memory retain last value. • "GENERATE_X_ONLY" - No warning. However, affected outputs/memory go unknown (X). • "NONE" - No warning and affected outputs/memory retain last value. Note Setting this to a value other than "ALL" can allow problems in the design go unnoticed during simulation. Care should be taken when changing the value of this attribute. Please see Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 29 Chapter 2: About Unimacros Attribute(s) Data Type Allowed Values Default SRVAL A, SRVAL_B Hexadecimal INIT_00 to INIT_FF INITP_00 to INITP_0F Hexadecimal Hexadecimal Any 72-Bit Value All zeroes Any 256-Bit Value All zeroes Any 256-Bit Value All zeroes Description the Synthesis and Simulation Design Guide for more information. Specifies the output value of on the DO port upon the assertion of the synchronous reset (RST) signal. Allows specification of the initial contents of the 16Kb or 32Kb data memory array. Allows specification of the initial contents of the 2Kb or 4Kb parity data memory array. VHDL Instantiation Template Unless they already exist, copy the following four statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; library UNIMACRO; use unimacro.Vcomponents.all; -- BRAM_TDP_MACRO: True Dual Port RAM -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 -- Note - This Unimacro model assumes the port directions to be "downto". -- Simulation of this model with "to" in the port directions could lead to erroneous results. -------------------------------------------------------------------------- -- DATA_WIDTH_A/B | BRAM_SIZE | RAM Depth | ADDRA/B Width | WEA/B Width -- -- ===============|===========|===========|===============|=============-- -- 19-36 | "36Kb" | 1024 | 10-bit | 4-bit -- -- 10-18 | "36Kb" | 2048 | 11-bit | 2-bit -- -- 10-18 | "18Kb" | 1024 | 10-bit | 2-bit -- -- 5-9 | "36Kb" | 4096 | 12-bit | 1-bit -- -- 5-9 | "18Kb" | 2048 | 11-bit | 1-bit -- -- 3-4 | "36Kb" | 8192 | 13-bit | 1-bit -- -- 3-4 | "18Kb" | 4096 | 12-bit | 1-bit -- -- 2 | "36Kb" | 16384 | 14-bit | 1-bit -- -- 2 | "18Kb" | 8192 | 13-bit | 1-bit -- -- 1 | "36Kb" | 32768 | 15-bit | 1-bit -- -- 1 | "18Kb" | 16384 | 14-bit | 1-bit -- -------------------------------------------------------------------------- BRAM_TDP_MACRO_inst : BRAM_TDP_MACRO generic map ( BRAM_SIZE => "18Kb", -- Target BRAM, "18Kb" or "36Kb" DEVICE => "7SERIES", -- Target Device: "VIRTEX5", "VIRTEX6", "7SERIES", "SPARTAN6" DOA_REG => 0, -- Optional port A output register (0 or 1) DOB_REG => 0, -- Optional port B output register (0 or 1) INIT_A => X"000000000", -- Initial values on A output port INIT_B => X"000000000", -- Initial values on B output port INIT_FILE => "NONE", READ_WIDTH_A => 0, -- Valid values are 1-36 (19-36 only valid when BRAM_SIZE="36Kb") READ_WIDTH_B => 0, -- Valid values are 1-36 (19-36 only valid when BRAM_SIZE="36Kb") SIM_COLLISION_CHECK => "ALL", -- Collision check enable "ALL", "WARNING_ONLY", -- "GENERATE_X_ONLY" or "NONE" SRVAL_A => X"000000000", -- Set/Reset value for A port output SRVAL_B => X"000000000", -- Set/Reset value for B port output WRITE_MODE_A => "WRITE_FIRST", -- "WRITE_FIRST", "READ_FIRST" or "NO_CHANGE" WRITE_MODE_B => "WRITE_FIRST", -- "WRITE_FIRST", "READ_FIRST" or "NO_CHANGE" WRITE_WIDTH_A => 0, -- Valid values are 1-36 (19-36 only valid when BRAM_SIZE="36Kb") WRITE_WIDTH_B => 0, -- Valid values are 1-36 (19-36 only valid when BRAM_SIZE="36Kb") -- The following INIT_xx declarations specify the initial contents of the RAM INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", Send Feedback 30 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000", -- The next set of INIT_xx are valid when configured as 36Kb INIT_40 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_41 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_42 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_43 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_44 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_45 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_46 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_47 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_48 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_49 => X"0000000000000000000000000000000000000000000000000000000000000000", Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 31 Chapter 2: About Unimacros INIT_4A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_50 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_51 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_52 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_53 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_54 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_55 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_56 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_57 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_58 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_59 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_60 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_61 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_62 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_63 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_64 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_65 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_66 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_67 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_68 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_69 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_70 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_71 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_72 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_73 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_74 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_75 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_76 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_77 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_78 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_79 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7F => X"0000000000000000000000000000000000000000000000000000000000000000", -- The next set of INITP_xx are for the parity bits INITP_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_07 => X"0000000000000000000000000000000000000000000000000000000000000000", -- The next set of INIT_xx are valid when configured as 36Kb INITP_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0E => X"0000000000000000000000000000000000000000000000000000000000000000", Send Feedback 32 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros INITP_0F => X"0000000000000000000000000000000000000000000000000000000000000000") port map ( DOA => DOA, -- Output port-A data, width defined by READ_WIDTH_A parameter DOB => DOB, -- Output port-B data, width defined by READ_WIDTH_B parameter ADDRA => ADDRA, -- Input port-A address, width defined by Port A depth ADDRB => ADDRB, -- Input port-B address, width defined by Port B depth CLKA => CLKA, -- 1-bit input port-A clock CLKB => CLKB, -- 1-bit input port-B clock DIA => DIA, -- Input port-A data, width defined by WRITE_WIDTH_A parameter DIB => DIB, -- Input port-B data, width defined by WRITE_WIDTH_B parameter ENA => ENA, -- 1-bit input port-A enable ENB => ENB, -- 1-bit input port-B enable REGCEA => REGCEA, -- 1-bit input port-A output register enable REGCEB => REGCEB, -- 1-bit input port-B output register enable RSTA => RSTA, -- 1-bit input port-A reset RSTB => RSTB, -- 1-bit input port-B reset WEA => WEA, -- Input port-A write enable, width defined by Port A depth WEB => WEB -- Input port-B write enable, width defined by Port B depth ); -- End of BRAM_TDP_MACRO_inst instantiation Verilog Instantiation Template // BRAM_TDP_MACRO: True Dual Port RAM // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ////////////////////////////////////////////////////////////////////////// // DATA_WIDTH_A/B | BRAM_SIZE | RAM Depth | ADDRA/B Width | WEA/B Width // // ===============|===========|===========|===============|=============// // 19-36 | "36Kb" | 1024 | 10-bit | 4-bit // // 10-18 | "36Kb" | 2048 | 11-bit | 2-bit // // 10-18 | "18Kb" | 1024 | 10-bit | 2-bit // // 5-9 | "36Kb" | 4096 | 12-bit | 1-bit // // 5-9 | "18Kb" | 2048 | 11-bit | 1-bit // // 3-4 | "36Kb" | 8192 | 13-bit | 1-bit // // 3-4 | "18Kb" | 4096 | 12-bit | 1-bit // // 2 | "36Kb" | 16384 | 14-bit | 1-bit // // 2 | "18Kb" | 8192 | 13-bit | 1-bit // // 1 | "36Kb" | 32768 | 15-bit | 1-bit // // 1 | "18Kb" | 16384 | 14-bit | 1-bit // ////////////////////////////////////////////////////////////////////////// BRAM_TDP_MACRO #( .BRAM_SIZE("18Kb"), // Target BRAM: "18Kb" or "36Kb" .DEVICE("7SERIES"), // Target device: "VIRTEX5", "VIRTEX6", "SPARTAN6", "7SERIES" .DOA_REG(0), // Optional port A output register (0 or 1) .DOB_REG(0), // Optional port B output register (0 or 1) .INIT_A(36'h0000000), // Initial values on port A output port .INIT_B(36'h00000000), // Initial values on port B output port .INIT_FILE ("NONE"), .READ_WIDTH_A (0), // Valid values are 1-36 (19-36 only valid when BRAM_SIZE="36Kb") .READ_WIDTH_B (0), // Valid values are 1-36 (19-36 only valid when BRAM_SIZE="36Kb") .SIM_COLLISION_CHECK ("ALL"), // Collision check enable "ALL", "WARNING_ONLY", // "GENERATE_X_ONLY" or "NONE" .SRVAL_A(36'h00000000), // Set/Reset value for port A output .SRVAL_B(36'h00000000), // Set/Reset value for port B output .WRITE_MODE_A("WRITE_FIRST"), // "WRITE_FIRST", "READ_FIRST", or "NO_CHANGE" .WRITE_MODE_B("WRITE_FIRST"), // "WRITE_FIRST", "READ_FIRST", or "NO_CHANGE" .WRITE_WIDTH_A(0), // Valid values are 1-36 (19-36 only valid when BRAM_SIZE="36Kb") .WRITE_WIDTH_B(0), // Valid values are 1-36 (19-36 only valid when BRAM_SIZE="36Kb") .INIT_00(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_01(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_02(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_03(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_04(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_05(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_06(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_07(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_08(256'h0000000000000000000000000000000000000000000000000000000000000000), Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 33 Chapter 2: About Unimacros .INIT_09(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_10(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_11(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_12(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_13(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_14(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_15(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_16(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_17(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_18(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_19(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_20(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_21(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_22(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_23(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_24(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_25(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_26(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_27(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_28(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_29(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_30(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_31(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_32(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_33(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_34(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_35(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_36(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_37(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_38(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_39(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3F(256'h0000000000000000000000000000000000000000000000000000000000000000), // The next set of INIT_xx are valid when configured as 36Kb .INIT_40(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_41(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_42(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_43(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_44(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_45(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_46(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_47(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_48(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_49(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4F(256'h0000000000000000000000000000000000000000000000000000000000000000), Send Feedback 34 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros .INIT_50(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_51(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_52(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_53(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_54(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_55(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_56(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_57(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_58(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_59(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_60(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_61(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_62(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_63(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_64(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_65(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_66(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_67(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_68(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_69(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_70(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_71(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_72(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_73(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_74(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_75(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_76(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_77(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_78(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_79(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7F(256'h0000000000000000000000000000000000000000000000000000000000000000), // The next set of INITP_xx are for the parity bits .INIT_FF(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_00(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_01(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_02(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_03(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_04(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_05(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_06(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_07(256'h0000000000000000000000000000000000000000000000000000000000000000), // The next set of INITP_xx are valid when configured as 36Kb .INITP_08(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_09(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0F(256'h0000000000000000000000000000000000000000000000000000000000000000) ) BRAM_TDP_MACRO_inst ( .DOA(DOA), // Output port-A data, width defined by READ_WIDTH_A parameter .DOB(DOB), // Output port-B data, width defined by READ_WIDTH_B parameter .ADDRA(ADDRA), // Input port-A address, width defined by Port A depth Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 35 Chapter 2: About Unimacros .ADDRB(ADDRB), // Input port-B address, width defined by Port B depth .CLKA(CLKA), // 1-bit input port-A clock .CLKB(CLKB), // 1-bit input port-B clock .DIA(DIA), // Input port-A data, width defined by WRITE_WIDTH_A parameter .DIB(DIB), // Input port-B data, width defined by WRITE_WIDTH_B parameter .ENA(ENA), // 1-bit input port-A enable .ENB(ENB), // 1-bit input port-B enable .REGCEA(REGCEA), // 1-bit input port-A output register enable .REGCEB(REGCEB), // 1-bit input port-B output register enable .RSTA(RSTA), // 1-bit input port-A reset .RSTB(RSTB), // 1-bit input port-B reset .WEA(WEA), // Input port-A write enable, width defined by Port A depth .WEB(WEB) // Input port-B write enable, width defined by Port B depth ); // End of BRAM_TDP_MACRO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 36 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 ADDMACC_MACRO Macro: Adder/Multiplier/Accumulator Chapter 2: About Unimacros Introduction ADDMACC_MACRO simplifies the instantiation of the DSP48 block when used as a pre-add, multiply accumulate function. It features parameterizable input and output widths and latency that ease the integration of DSP48 block into HDL. Port Description Name PRODUCT PREADD1 PREADD2 MULTIPLIER CARRYIN CLK CE LOAD LOAD_DATA RST Direction Output Input Input Input Input Input Inupt Input Input Input Width Function Variable width, equals the value Primary data output. of the WIDTH_A attibute plus the value of the WIDTH_B attribute. Variable, see WIDTH_PREADD Preadder data input. attribute. Variable, see WIDTH_PREADD Preadder data input attribute. Variable, see Multiplier data input WIDTH_MULTIPLIER attribute. 1 Carry input 1 Clock 1 Clock enable 1 Load Variable, see WIDTH_PRODUCT In a DSP slice, when LOAD is asserted, loads P attribute. with A*B+LOAD_DATA. 1 Synchronous Reset Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 37 Chapter 2: About Unimacros Design Entry Method This unimacro is a parameterizable version of the primitive, and can be instantiated only. Instantiation Inference CORE Generator™ and wizards Macro support Yes No No Recommended Available Attributes Attribute WIDTH_PREADD Data Type Allowed Values Default Integer 1 to 24 24 WIDTH_MULTIPLIER Integer 1 to 18 18 WIDTH_PRODUCT Integer 1 to 48 48 LATENCY Integer 0, 1, 2, 3, 4 3 DEVICE String "7SERIES" "7SERIES" Description Controls the width of PREADD1 and PREADD2 inputs. Controls the width of MULTIPLIER input. Controls the width of MULTIPLIER output. Number of pipeline registers • 1 - MREG == 1 • 2 - AREG == BREG == 1 and MREG == 1 or MREG == 1 and PREG == 1 • 3 - AREG == BREG == 1 and MREG == 1 and PREG == 1 • 4 - AREG == BREG == 2 and MREG == 1 and PREG == 1 Target hardware architecture. VHDL Instantiation Template Unless they already exist, copy the following four statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; library UNIMACRO; use unimacro.Vcomponents.all; -- ADDMACC_MACRO: Add and Multiple Accumulate Function implemented in a DSP48E -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 ADDMACC_MACRO_inst : ADDMACC_MACRO generic map ( DEVICE => "7SERIES", -- Target Device: "7SERIES", "VIRTEX6", "SPARTAN6" LATENCY => 4, -- Desired clock cycle latency, 1-4 WIDTH_PREADD => 25, -- Pre-Adder input bus width, 1-25 WIDTH_MULTIPLIER => 18, -- Multiplier input bus width, 1-18 WIDTH_PRODUCT => 48) -- MACC output width, 1-48 port map ( PRODUCT => PRODUCT, -- MACC result output, width defined by WIDTH_PRODUCT generic MULTIPLIER => MULTIPLIER, -- Multiplier data input, width determined by WIDTH_MULTIPLIER generic PREADDER1 => PREADDER1, -- Preadder data input, width determined by WIDTH_PREADDER generic PREADDER2 => PREADDER2, -- Preadder data input, width determined by WIDTH_PREADDER generic CARRYIN => CARRYIN, -- 1-bit carry-in input CE => CE, -- 1-bit input clock enable Send Feedback 38 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros CLK => CLK, -- 1-bit clock input LOAD => LOAD, -- 1-bit accumulator load input LOAD_DATA => LOAD_DATA, -- Accumulator load data input, width defined by WIDTH_PRODUCT generic RST => RST -- 1-bit input active high synchronous reset ); -- End of ADDMACC_MACRO_inst instantiation Verilog Instantiation Template // ADDMACC_MACRO: Variable width & latency - Pre-Add -> Multiplier -> Accumulate // function implemented in a DSP48E // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ADDMACC_MACRO #( .DEVICE("7SERIES"), // Target Device: "VIRTEX6", "SPARTAN6", "7SERIES" .LATENCY(4), // Desired clock cycle latency, 0-4 .WIDTH_PREADD(25), // Pre-adder input width, 1-25 .WIDTH_MULTIPLIER(18), // Multiplier input width, 1-18 .WIDTH_PRODUCT(48) // MACC output width, 1-48 ) ADDMACC_MACRO_inst ( .PRODUCT(PRODUCT), // MACC result output, width defined by WIDTH_PRODUCT parameter .CARRYIN(CARRYIN), // 1-bit carry-in input .CLK(CLK), // 1-bit clock input .CE(CE), // 1-bit clock enable input .LOAD(LOAD), // 1-bit accumulator load input .LOAD_DATA(LOAD_DATA), // Accumulator load data input, width defined by WIDTH_PRODUCT parameter .MULTIPLIER(MULTIPLIER), // Multiplier data input, width defined by WIDTH_MULTIPLIER parameter .PREADD2(PREADD2), // Preadder data input, width defined by WIDTH_PREADD parameter .PREADD1(PREADD1), // Preadder data input, width defined by WIDTH_PREADD parameter .RST(RST) // 1-bit active high synchronous reset ); // End of ADDMACC_MACRO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 39 Chapter 2: About Unimacros ADDSUB_MACRO Macro: Adder/Subtractor Introduction ADDSUB_MACRO simplifies the instantiation of the DSP48 block when used as a simple adder/subtractor. It features parameterizable input and output widths and latency that ease the integration of the DSP48 block into HDL. Port Description Name CARRYOUT RESULT ADDSUB Direction Output Output Input Width (Bits) 1 Variable, see WIDTH attrribute. 1 A B CE CARRYIN CLK RST Input Input Input Input Input Input Variable, see WIDTH attribute. Variable, see WIDTH attribute. 1 1 1 1 Function Carry Out Data output bus addressed by RDADDR. When high, RESULT is an addition. When low, RESULT is a subtraction. Data input to add/sub. Data input to add/sub Clock Enable Carry In Clock Synchronous Reset Send Feedback 40 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros Design Entry Method This unimacro is a parameterizable version of the primitive, and can be instantiated only. Instantiation Inference CORE Generator™ and wizards Macro support Yes No No Recommended Available Attributes Attribute DEVICE LATENCY Data Type String Integer Allowed Values "7SERIES" 0, 1, 2 Default "7SERIES" 2 WIDTH Integer 1-48 48 WIDTH_RESULT Integer 1-48 48 Description Target hardware architecture. Number of pipeline registers. • 1 - PREG == 1 • 2 - AREG == BREG == CREG == PREG A, B, and RESULT port width; internal customers can override B and RESULT port widths using other parameters Result port width override. VHDL Instantiation Template Unless they already exist, copy the following four statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; library UNIMACRO; use unimacro.Vcomponents.all; -- ADDSUB_MACRO: Variable width & latency - Adder / Subtractor implemented in a DSP48E -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 ADDSUB_MACRO_inst : ADDSUB_MACRO generic map ( DEVICE => "7SERIES", -- Target Device: "VIRTEX5", "7SERIES", "SPARTAN6" LATENCY => 2, -- Desired clock cycle latency, 0-2 WIDTH => 48) -- Input / Output bus width, 1-48 port map ( CARRYOUT => CARRYOUT, -- 1-bit carry-out output signal RESULT => RESULT, -- Add/sub result output, width defined by WIDTH generic A => A, -- Input A bus, width defined by WIDTH generic ADD_SUB => ADD_SUB, -- 1-bit add/sub input, high selects add, low selects subtract B => B, -- Input B bus, width defined by WIDTH generic CARRYIN => CARRYIN, -- 1-bit carry-in input CE => CE, -- 1-bit clock enable input CLK =>CLK, -- 1-bit clock input RST => RST -- 1-bit active high synchronous reset ); -- End of ADDSUB_MACRO_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 41 Chapter 2: About Unimacros Verilog Instantiation Template // ADDSUB_MACRO: Variable width & latency - Adder / Subtracter implemented in a DSP48E // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ADDSUB_MACRO #( .DEVICE("7SERIES"), // Target Device: "VIRTEX5", "VIRTEX6", "SPARTAN6", "7SERIES" .LATENCY(2), // Desired clock cycle latency, 0-2 .WIDTH(48) // Input / output bus width, 1-48 ) ADDSUB_MACRO_inst ( .CARRYOUT(CARRYOUT), // 1-bit carry-out output signal .RESULT(RESULT), // Add/sub result output, width defined by WIDTH parameter .A(A), // Input A bus, width defined by WIDTH parameter .ADD_SUB(ADD_SUB), // 1-bit add/sub input, high selects add, low selects subtract .B(B), // Input B bus, width defined by WIDTH parameter .CARRYIN(CARRYIN), // 1-bit carry-in input .CE(CE), // 1-bit clock enable input .CLK(CLK), // 1-bit clock input .RST(RST) // 1-bit active high synchronous reset ); // End of ADDSUB_MACRO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 42 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 COUNTER_LOAD_MACRO Macro: Loadable Counter Chapter 2: About Unimacros Introduction COUNTER_LOAD_MACRO simplifies the instantiation of the DSP48 block when used as dynamic loading up/down counter. It features parameterizable output width and count by values that ease the integration of the DSP48 block into HDL. Port Description Name Q CE CLK LOAD LOAD_DATA Direction Output Input Input Input Input Width Variable, see WIDTH_DATA attribute. 1 1 Variable, see WIDTH_DATA attribute. Variable, see WIDTH_DATA attribute. DIRECTION Input 1 RST Input 1 Function Counter output. Clock Enable. Clock. When asserted, loads the counter from LOAD_DATA (two-clock latency). In a DSP slice, asserting the LOAD pin will force this data into the P register with a latency of 2 clocks. High for Up and Low for Down (two-clock latency) Synchronous Reset Design Entry Method This unimacro is a parameterizable version of the primitive, and can be instantiated only. Instantiation Inference CORE Generator™ and wizards Macro support Yes No No Recommended Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 43 Chapter 2: About Unimacros Available Attributes Attribute DEVICE COUNT_BY WIDTH_DATA Data Type String Hexadecimal Integer Allowed Values "7SERIES" Any 48 bit value. 1-48 Default "7SERIES" 000000000001 48 Description Target hardware architecture. Count by n; takes precedence over WIDTH_DATA. Specifies counter width. VHDL Instantiation Template Unless they already exist, copy the following four statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; library UNIMACRO; use unimacro.Vcomponents.all; -- COUNTER_LOAD_MACRO: Loadable variable counter implemented in a DSP48E -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 COUNTER_LOAD_MACRO_inst : COUNTER_LOAD_MACRO generic map ( COUNT_BY => X"000000000001", -- Count by value DEVICE => "7SERIES", -- Target Device: "VIRTEX5", "7SERIES", "SPARTAN6" WIDTH_DATA => 48) -- Counter output bus width, 1-48 port map ( Q => Q, -- Counter output, width determined by WIDTH_DATA generic CLK => CLK, -- 1-bit clock input CE => CE, -- 1-bit clock enable input DIRECTION => DIRECTION, -- 1-bit up/down count direction input, high is count up LOAD => LOAD, -- 1-bit active high load input LOAD_DATA => LOAD_DATA, -- Counter load data, width determined by WIDTH_DATA generic RST => RST -- 1-bit active high synchronous reset ); -- End of COUNTER_LOAD_MACRO_inst instantiation Verilog Instantiation Template // COUNTER_LOAD_MACRO: Loadable variable counter implemented in a DSP48E // 7 Series // Xilinx HDL Libraries Guide, version 14.7 COUNTER_LOAD_MACRO #( .COUNT_BY(48'h000000000001), // Count by value .DEVICE("7SERIES"), // Target Device: "VIRTEX5", "VIRTEX6", "SPARTAN6", "7SERIES" .WIDTH_DATA(48) // Counter output bus width, 1-48 ) COUNTER_LOAD_MACRO_inst ( .Q(Q), // Counter output, width determined by WIDTH_DATA parameter .CLK(CLK), // 1-bit clock input .CE(CE), // 1-bit clock enable input .DIRECTION(DIRECTION), // 1-bit up/down count direction input, high is count up .LOAD(LOAD), // 1-bit active high load input .LOAD_DATA(LOAD_DATA), // Counter load data, width determined by WIDTH_DATA parameter .RST(RST) // 1-bit active high synchronous reset ); // End of COUNTER_LOAD_MACRO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 44 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 COUNTER_TC_MACRO Macro: Counter with Terminal Count Chapter 2: About Unimacros Introduction COUNTER_TC_MACRO simplifies the instantiation of the DSP48 block when used as a terminal count, up/down counter. It features parameterizable output width, terminal count values, count by and count direction in order to ease the integration of DSP48 block into HDL. Port Description Name TC Direction Width (Bits) Output 1 Q CE CLK RST Output Input Input Input Variable, see WIDTH_DATA attribute. 1 1 1 Function Terminal count goes high when TC_VALUE is reached Counter output Clock Enable Clock Synchronous Reset Design Entry Method This unimacro is a parameterizable version of the primitive, and can be instantiated only. Instantiation Inference CORE Generator™ and wizards Macro support Yes No No Recommended Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 45 Chapter 2: About Unimacros Available Attributes Attribute RESET_UPON_TC Data Type Allowed Values Boolean True, False DEVICE DIRECTION COUNT_BY TC_VALUE WIDTH_DATA String String Hexadecimal Hexadecima Integer "7SERIES" "UP", "DOWN" Any 48 bit value Any 48 bit value 1-48 Default False "7SERIES" "UP" 000000000001 All zeros 48 Description Specifies whether to reset the counter upon reaching terminal count Target hardware architecture. Count up versus count down. Count by n; takes precedence over WIDTH_DATA Terminal count value. Specifies counter width. VHDL Instantiation Template Unless they already exist, copy the following four statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; library UNIMACRO; use unimacro.Vcomponents.all; -- COUNTER_TC_MACRO: Counter with terminal count implemented in a DSP48E -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 COUNTER_TC_MACRO_inst : COUNTER_TC_MACRO generic map ( COUNT_BY => X"000000000001", -- Count by value DEVICE => "7SERIES", -- Target Device: "VIRTEX5", "7SERIES" DIRECTION => "UP", -- Counter direction "UP" or "DOWN" RESET_UPON_TC => "FALSE", -- Reset counter upon terminal count, TRUE or FALSE TC_VALUE => X"000000000000", -- Terminal count value WIDTH_DATA => 48) -- Counter output bus width, 1-48 port map ( Q => Q, -- Counter output, width determined by WIDTH_DATA generic TC => TC, -- 1-bit terminal count output, high = terminal count is reached CLK => CLK, -- 1-bit clock input CE => CE, -- 1-bit clock enable input RST => RST -- 1-bit active high synchronous reset ); -- End of COUNTER_TC_MACRO_inst instantiation Verilog Instantiation Template // COUNTER_TC_MACRO: Counter with terminal count implemented in a DSP48E // 7 Series // Xilinx HDL Libraries Guide, version 14.7 COUNTER_TC_MACRO #( .COUNT_BY(48'h000000000001), // Count by value .DEVICE("7SERIES"), // Target Device: "VIRTEX5", "VIRTEX6", "7SERIES" .DIRECTION("UP"), // Counter direction, "UP" or "DOWN" .RESET_UPON_TC("FALSE"), // Reset counter upon terminal count, "TRUE" or "FALSE" .TC_VALUE(48'h000000000000), // Terminal count value .WIDTH_DATA(48) // Counter output bus width, 1-48 ) COUNTER_TC_MACRO_inst ( .Q(Q), // Counter output bus, width determined by WIDTH_DATA parameter .TC(TC), // 1-bit terminal count output, high = terminal count is reached .CLK(CLK), // 1-bit positive edge clock input .CE(CE), // 1-bit active high clock enable input Send Feedback 46 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 .RST(RST) // 1-bit active high synchronous reset ); // End of COUNTER_TC_MACRO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Chapter 2: About Unimacros Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 47 Chapter 2: About Unimacros EQ_COMPARE_MACRO Macro: Equality Comparator Introduction EQ_COMPARE_MACRO simplifies the instantiation of the DSP48 block when used as an equality comparator. It features parameterizable input and output widths, latencies, mask, and input sources that ease the integration of the DSP48 block into HDL. Port Description Name Q DATA_IN DYNAMIC_PATTERN CLK CE RST Direction Output Input Input Input Inupt Input Width 1 Variable width, equals the value of the WIDTH attribute. Variable width, equals the value of the WIDTH attribute. 1 1 1 Function Active High pattern detection. Detects match of DATA_IN and the selected DYNAMIC_PATTERN gated by the MASK. Result arrives on the same cycle as P. Input data to be compared. Dynamic data to be compared to DATA_IN. Clock. Clock enable. Synchronous Reset. Send Feedback 48 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros Design Entry Method This unimacro is a parameterizable version of the primitive, and can be instantiated only. Instantiation Inference CORE Generator™ and wizards Macro support Yes No No Recommended Available Attributes Attribute DEVICE SEL_PATTERN Data Type Allowed Values String "7SERIES" Integer 1 to 24 Default "7SERIES" 24 MASK STATIC_PATTERN SEL_MASK WIDTH Hexadecimal Hexadecimal String Integer 48 hex 48 hex "MASK", "DYNAMIC_ PATTERN" 1 to 48 all zeros all zeros "MASK" 48 LATENCY Integer 0, 1, 2, 3 2 Description Target hardware architecture. Controls the width of PREADD1 and PREADD2 inputs. Mask to be used for pattern detector. Pattern to be used for pattern detector. Selects whether to use the static MASK or the C input for the mask of the pattern detector. Width of DATA_IN and DYNAMIC_PATTERN. Number of pipeline registers. • 1: QREG == 1 • 2: AREG == BREG == CREG == QREG == 1 • 3: AREG == BREG == 2 and CREG == QREG == 1 VHDL Instantiation Template Unless they already exist, copy the following four statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; library UNIMACRO; use unimacro.Vcomponents.all; -- EQ_COMPARE_MACRO: Equality Comparator implemented in a DSP48E -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 EQ_COMPARE_MACRO_inst : EQ_COMPARE_MACRO generic map ( DEVICE => "7SERIES", -- Target Device: "VIRTEX5", "7SERIES" LATENCY => 2, -- Desired clock cycle latency, 0-2 MASK => X"000000000000", -- Select bits to be masked, must set -- SEL_MASK = "MASK" SEL_MASK => "MASK", -- "MASK" = use MASK generic, -- "DYNAMIC_PATTERN = use DYNAMIC_PATTERN input bus SEL_PATTERN => "DYNAMIC_PATTERN", -- "DYNAMIC_PATTERN" = use DYNAMIC_PATTERN input bus -- "STATIC_PATTERN" = use STATIC_PATTERN generic STATIC_PATTERN => X"000000000000", -- Specify static pattern, Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 49 Chapter 2: About Unimacros -- must set SEL_PATTERN = "STATIC_PATTERN WIDTH => 48) -- Comparator output bus width, 1-48 port map ( Q => Q, -- 1-bit output indicating a match CE => CE, -- 1-bit active high input clock enable input CLK => CLK, -- 1-bit positive edge clock input DATA_IN => DATA_IN, -- Input Data Bus, width determined by WIDTH generic DYNAMIC_PATTERN, => DYNAMIC_PATTERN, -- Input Dynamic Match/Mask Bus, width determined by WIDTH generic RST => RST -- 1-bit input active high reset ); -- End of EQ_COMPARE_MACRO_inst instantiation Verilog Instantiation Template // EQ_COMPARE_MACRO: Equality Comparator implemented in a DSP48E // 7 Series // Xilinx HDL Libraries Guide, version 14.7 EQ_COMPARE_MACRO #( .DEVICE("7SERIES"), // Target Device: "VIRTEX5", "VIRTEX6","7SERIES" .LATENCY(2), // Desired clock cycle latency, 0-2 .MASK(48'h000000000000), // Select bits to be masked, must set SEL_MASK="MASK" .SEL_MASK("MASK"), // "MASK" = use MASK parameter, // "DYNAMIC_PATTERN" = use DYNAMIC_PATTERN input bus .SEL_PATTERN("STATIC_PATTERN"), // "STATIC_PATTERN" = use STATIC_PATTERN parameter, // "DYNAMIC_PATTERN = use DYNAMIC_PATTERN input bus .STATIC_PATTERN(48'h000000000000), // Specify static pattern, must set SEL_PATTERN = "STATIC_PATTERN" .WIDTH(48) // Comparator output bus width, 1-48 ) EQ_COMPARE_MACRO_inst ( .Q(Q), // 1-bit output indicating a match .CE(CE), // 1-bit active high input clock enable .CLK(CLK), // 1-bit positive edge clock input .DATA_IN(DATA_IN), // Input Data Bus, width determined by WIDTH parameter .DYNAMIC_PATTERN(DYNAMIC_PATTERN), // Input Dynamic Match/Mask Bus, width determined by WIDTH parameter .RST(RST) // 1-bit input active high reset ); // End of EQ_COMPARE_MACRO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 50 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 MACC_MACRO Macro: Multiplier/Accumulator Chapter 2: About Unimacros Introduction MACC_MACRO simplifies the instantiation of the DSP48 block when used in simple signed multiplier/accumulator mode. It features parameterizable input and output widths and latencies that ease the integration of the DSP48 block into HDL. Port Description Name P A Direction Output Input Width Function Variable width, equals the value of the WIDTH_A attribute plus the value of the WIDTH_B attribute. Primary data output. Variable, see WIDTH_A attribute. Multiplier data input. B CARRYIN CE CLK LOAD LOAD_DATA Input Input Input Input Inupt Input Variable, see WIDTH_B attribute. 1 1 1 1 Variable width, equals the value of the WIDTH_A attribute plus the value of the WIDTH_B attribute. Multiplier data input. Carry input. Clock enable. Clock. Load. In a DSP slice, when LOAD is asserted, loads P with A*B+LOAD_DATA. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 51 Chapter 2: About Unimacros Name RST ADDSUB Direction Input Input Width 1 1 Function Synchronous Reset. High sets accumulator in addition mode; low sets accumulator in subtraction mode. Design Entry Method This unimacro is a parameterizable version of the primitive, and can be instantiated only. Instantiation Inference CORE Generator™ and wizards Macro support Yes No No Recommended Available Attributes Attribute DEVICE WIDTH_A WIDTH_B LATENCY Data Type String Integer Integer Integer Allowed Values "7SERIES" 1 to 25 1 to 18 0, 1, 2, 3, 4 Default "7SERIES" 25 18 3 Description Target hardware architecture. Controls the width of A input. Controls the width of B input. Number of pipeline registers. • 1 - MREG == 1 • 2 - AREG == BREG == 1 and MREG == 1 or MREG == 1 and PREG == 1 • 3 - AREG == BREG == 1 and MREG == 1 and PREG == 1 • 4 - AREG == BREG == 2 and MREG == 1 and PREG == 1 VHDL Instantiation Template Unless they already exist, copy the following four statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; library UNIMACRO; use unimacro.Vcomponents.all; -- MACC_MACRO: Multiple Accumulate Function implemented in a DSP48E -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 MACC_MACRO_inst : MACC_MACRO generic map ( DEVICE => "7SERIES", -- Target Device: "VIRTEX5", "7SERIES", "SPARTAN6" LATENCY => 3, -- Desired clock cycle latency, 1-4 WIDTH_A => 25, -- Multiplier A-input bus width, 1-25 WIDTH_B => 18, -- Multiplier B-input bus width, 1-18 WIDTH_P => 48) -- Accumulator output bus width, 1-48 port map ( P => P, -- MACC output bus, width determined by WIDTH_P generic A => A, -- MACC input A bus, width determined by WIDTH_A generic ADDSUB => ADDSUB, -- 1-bit add/sub input, high selects add, low selects subtract Send Feedback 52 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros B => B, -- MACC input B bus, width determined by WIDTH_B generic CARRYIN => CARRYIN, -- 1-bit carry-in input to accumulator CE => CE, -- 1-bit active high input clock enable CLK => CLK, -- 1-bit positive edge clock input LOAD => LOAD, -- 1-bit active high input load accumulator enable LOAD_DATA => LOAD_DATA, -- Load accumulator input data, -- width determined by WIDTH_P generic RST => RST -- 1-bit input active high reset ); -- End of MACC_MACRO_inst instantiation Verilog Instantiation Template // MACC_MACRO: Multiply Accumulate Function implemented in a DSP48E // 7 Series // Xilinx HDL Libraries Guide, version 14.7 MACC_MACRO #( .DEVICE("7SERIES"), // Target Device: "VIRTEX5", "VIRTEX6", "SPARTAN6", "7SERIES" .LATENCY(3), // Desired clock cycle latency, 1-4 .WIDTH_A(25), // Multiplier A-input bus width, 1-25 .WIDTH_B(18), // Multiplier B-input bus width, 1-18 .WIDTH_P(48) // Accumulator output bus width, 1-48 ) MACC_MACRO_inst ( .P(P), // MACC output bus, width determined by WIDTH_P parameter .A(A), // MACC input A bus, width determined by WIDTH_A parameter .ADDSUB(ADDSUB), // 1-bit add/sub input, high selects add, low selects subtract .B(B), // MACC input B bus, width determined by WIDTH_B parameter .CARRYIN(CARRYIN), // 1-bit carry-in input to accumulator .CE(CE), // 1-bit active high input clock enable .CLK(CLK), // 1-bit positive edge clock input .LOAD(LOAD), // 1-bit active high input load accumulator enable .LOAD_DATA(LOAD_DATA), // Load accumulator input data, width determined by WIDTH_P parameter .RST(RST) // 1-bit input active high reset ); // End of MACC_MACRO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 53 Chapter 2: About Unimacros MULT_MACRO Macro: Multiplier Introduction MULT_MACRO simplifies the instantiation of the DSP48 block when used as a simple signed multiplier. It features parameterizable input and output widths and latencies that ease the integration of the DSP48 block into HDL. Port Description Name P A Direction Output Input Width Function Variable width, equals the value Primary data output. of the WIDTH_A attibute plus the value of the WIDTH_B attribute. Variable, see WIDTH_A attribute. Multiplier data input. B CE CLK RST Input Input Input Input Variable, see WIDTH_B attribute. 1 1 1 Multiplier data input. Clock Enable. Clock. Synchronous Reset. Design Entry Method This unimacro is a parameterizable version of the primitive, and can be instantiated only. Instantiation Inference CORE Generator™ and wizards Macro support Yes No No Recommended Send Feedback 54 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros Available Attributes Attribute DEVICE WIDTH_A WIDTH_B LATENCY Data Type String Integer Integer Integer Allowed Values "7SERIES" 1 to 25 1 to 18 0, 1, 2, 3, 4 Default "7SERIES" 25 18 3 Description Target hardware architecture. Controls the width of A input. Controls the width of B input. Number of pipeline registers. • 1 - MREG == 1 • 2 - AREG == BREG == 1 and MREG == 1 or MREG == 1 and PREG == 1 • 3 - AREG == BREG == 1 and MREG == 1 and PREG == 1 • 4 - AREG == BREG == 2 and MREG == 1 and PREG == 1 VHDL Instantiation Template Unless they already exist, copy the following four statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; library UNIMACRO; use unimacro.Vcomponents.all; -- MULT_MACRO: Multiply Function implemented in a DSP48E -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 MULT_MACRO_inst : MULT_MACRO generic map ( DEVICE => "7SERIES", -- Target Device: "VIRTEX5", "7SERIES", "SPARTAN6" LATENCY => 3, -- Desired clock cycle latency, 0-4 WIDTH_A => 18, -- Multiplier A-input bus width, 1-25 WIDTH_B => 18) -- Multiplier B-input bus width, 1-18 port map ( P => P, -- Multiplier output bus, width determined by WIDTH_P generic A => A, -- Multiplier input A bus, width determined by WIDTH_A generic B => B, -- Multiplier input B bus, width determined by WIDTH_B generic CE => CE, -- 1-bit active high input clock enable CLK => CLK, -- 1-bit positive edge clock input RST => RST -- 1-bit input active high reset ); -- End of MULT_MACRO_inst instantiation Verilog Instantiation Template // MULT_MACRO: Multiply Function implemented in a DSP48E // 7 Series // Xilinx HDL Libraries Guide, version 14.7 MULT_MACRO #( .DEVICE("7SERIES"), // Target Device: "VIRTEX5", "VIRTEX6", "SPARTAN6","7SERIES" .LATENCY(3), // Desired clock cycle latency, 0-4 .WIDTH_A(18), // Multiplier A-input bus width, 1-25 .WIDTH_B(18) // Multiplier B-input bus width, 1-18 ) MULT_MACRO_inst ( .P(P), // Multiplier output bus, width determined by WIDTH_P parameter .A(A), // Multiplier input A bus, width determined by WIDTH_A parameter .B(B), // Multiplier input B bus, width determined by WIDTH_B parameter .CE(CE), // 1-bit active high input clock enable Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 55 Chapter 2: About Unimacros .CLK(CLK), // 1-bit positive edge clock input .RST(RST) // 1-bit input active high reset ); // End of MULT_MACRO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 56 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 FIFO_DUALCLOCK_MACRO Macro: Dual Clock First-In, First-Out (FIFO) RAM Buffer Chapter 2: About Unimacros Introduction FPGA devices contain several block RAM memories that can be configured as general-purpose 36 Kb or 18 Kb RAM/ROM memories. Dedicated logic in the block RAM enables you to easily implement FIFOs. The FIFO can be configured as an 18 Kb or 36 Kb memory. This unimacro configures the FIFO for using independent read and writes clocks. Data is read from the FIFO on the rising edge of read clock and written to the FIFO on the rising edge of write clock. Depending on the offset between read and write clock edges, the Empty, Almost Empty, Full and Almost Full flags can deassert one cycle later. Due to the asynchronous nature of the clocks, the simulation model only reflects the deassertion latency cycles listed in the User Guide. Port Description Name ALMOSTEMPTY ALMOSTFULL DO Direction Output Output Output EMPTY FULL RDCOUNT Output Output Output RDERR Output Width 1 1 See Configuration Table below. 1 1 See Configuration Table below. 1 Function Almost all valid entries in FIFO have been read. Almost all entries in FIFO memory have been filled. Data output bus addressed by ADDR. FIFO is empty. All entries in FIFO memory are filled. FIFO data read pointer. When the FIFO is empty, any additional read operation generates an error flag. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 57 Chapter 2: About Unimacros Name WRCOUNT WRERR DI RDCLK RDEN RST WRCLK WREN Direction Output Output Input Input Input Input Input Input Width See Configuration Table below. 1 See Configuration Table below. 1 1 1 1 1 Function FIFO data write pointer. When the FIFO is full, any additional write operation generates an error flag. Data input bus addressed by ADDR. Clock for Read domain operation. Read Enable. Asynchronous reset. Clock for Write domain operation. Write Enable. Port Configuration This unimacro is a parameterizable version of the primitive, and can be instantiated only. Use this table to correctly configure the unimacro to meet design needs. DATA_WIDTH 72 - 37 36 - 19 18 - 10 9-5 1-4 FIFO_SIZE 36 Kb 36 Kb 18 Kb 36 Kb 18 Kb 36 Kb 18 Kb 36 Kb 18 Kb WRCOUNT 9 10 9 11 10 12 11 13 12 RDCOUNT 9 10 9 11 10 12 11 13 12 Design Entry Method This unimacro is a parameterizable version of the primitive, and can be instantiated only. Consult the Port Configuration section to correctly configure this element to meet your design needs. Instantiation Inference CORE Generator™ and wizards Macro support Yes No No Recommended Send Feedback 58 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros Available Attributes Attribute ALMOST_EMPTY_ OFFSET ALMOST_FULL_ OFFSET DATA_WIDTH DEVICE FIFO_SIZE FIRST_WORD_ FALL_THROUGH Data Type Hexadecimal Hexadecimal Integer String String Boolean Allowed Values 13-bit value Default 13'h0080 13-bit value 13'h0080 1 - 72 4 "7SERIES" "7SERIES" "18Kb", "36Kb" "18Kb" FALSE, TRUE FALSE Description Setting determines the difference between EMPTY and ALMOSTEMPTY conditions. Must be set using hexadecimal notation. Setting determines the difference between FULL and ALMOSTFULL conditions. Must be set using hexadecimal notation. Width of DI/DO bus. Target hardware architecture. Configures the FIFO as 18 Kb or 36 Kb memory. If TRUE, the first word written into the empty FIFO appears at the FIFO output without RDEN asserted. VHDL Instantiation Template Unless they already exist, copy the following four statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; library UNIMACRO; use unimacro.Vcomponents.all; -- FIFO_DUALCLOCK_MACRO: Dual-Clock First-In, First-Out (FIFO) RAM Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 -- Note - This Unimacro model assumes the port directions to be "downto". -- Simulation of this model with "to" in the port directions could lead to erroneous results. ----------------------------------------------------------------- -- DATA_WIDTH | FIFO_SIZE | FIFO Depth | RDCOUNT/WRCOUNT Width -- -- ===========|===========|============|=======================-- -- 37-72 | "36Kb" | 512 | 9-bit -- -- 19-36 | "36Kb" | 1024 | 10-bit -- -- 19-36 | "18Kb" | 512 | 9-bit -- -- 10-18 | "36Kb" | 2048 | 11-bit -- -- 10-18 | "18Kb" | 1024 | 10-bit -- -- 5-9 | "36Kb" | 4096 | 12-bit -- -- 5-9 | "18Kb" | 2048 | 11-bit -- -- 1-4 | "36Kb" | 8192 | 13-bit -- -- 1-4 | "18Kb" | 4096 | 12-bit -- ----------------------------------------------------------------- FIFO_DUALCLOCK_MACRO_inst : FIFO_DUALCLOCK_MACRO generic map ( DEVICE => "7SERIES", -- Target Device: "VIRTEX5", "VIRTEX6", "7SERIES" ALMOST_FULL_OFFSET => X"0080", -- Sets almost full threshold ALMOST_EMPTY_OFFSET => X"0080", -- Sets the almost empty threshold DATA_WIDTH => 0, -- Valid values are 1-72 (37-72 only valid when FIFO_SIZE="36Kb") FIFO_SIZE => "18Kb", -- Target BRAM, "18Kb" or "36Kb" FIRST_WORD_FALL_THROUGH => FALSE) -- Sets the FIFO FWFT to TRUE or FALSE port map ( ALMOSTEMPTY => ALMOSTEMPTY, -- 1-bit output almost empty ALMOSTFULL => ALMOSTFULL, -- 1-bit output almost full DO => DO, -- Output data, width defined by DATA_WIDTH parameter EMPTY => EMPTY, -- 1-bit output empty FULL => FULL, -- 1-bit output full RDCOUNT => RDCOUNT, -- Output read count, width determined by FIFO depth Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 59 Chapter 2: About Unimacros RDERR => RDERR, -- 1-bit output read error WRCOUNT => WRCOUNT, -- Output write count, width determined by FIFO depth WRERR => WRERR, -- 1-bit output write error DI => DI, -- Input data, width defined by DATA_WIDTH parameter RDCLK => RDCLK, -- 1-bit input read clock RDEN => RDEN, -- 1-bit input read enable RST => RST, -- 1-bit input reset WRCLK => WRCLK, -- 1-bit input write clock WREN => WREN -- 1-bit input write enable ); -- End of FIFO_DUALCLOCK_MACRO_inst instantiation Verilog Instantiation Template // FIFO_DUALCLOCK_MACRO: Dual Clock First-In, First-Out (FIfor) RAM Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ///////////////////////////////////////////////////////////////// // DATA_WIDTH | FIFO_SIZE | FIfor Depth | RDCOUNT/WRCOUNT Width // // ===========|===========|============|=======================// // 37-72 | "36Kb" | 512 | 9-bit // // 19-36 | "36Kb" | 1024 | 10-bit // // 19-36 | "18Kb" | 512 | 9-bit // // 10-18 | "36Kb" | 2048 | 11-bit // // 10-18 | "18Kb" | 1024 | 10-bit // // 5-9 | "36Kb" | 4096 | 12-bit // // 5-9 | "18Kb" | 2048 | 11-bit // // 1-4 | "36Kb" | 8192 | 13-bit // // 1-4 | "18Kb" | 4096 | 12-bit // ///////////////////////////////////////////////////////////////// FIFO_DUALCLOCK_MACRO #( .ALMOST_EMPTY_OFFSET(9'h080), // Sets the almost empty threshold .ALMOST_FULL_OFFSET(9'h080), // Sets almost full threshold .DATA_WIDTH(0), // Valid values are 1-72 (37-72 only valid when FIFO_SIZE="36Kb") .DEVICE("7SERIES"), // Target device: "VIRTEX5", "VIRTEX6", "7SERIES" .FIFO_SIZE ("18Kb"), // Target BRAM: "18Kb" or "36Kb" .FIRST_WORD_FALL_THROUGH ("FALSE") // Sets the FIfor FWFT to "TRUE" or "FALSE" ) FIFO_DUALCLOCK_MACRO_inst ( .ALMOSTEMPTY(ALMOSTEMPTY), // 1-bit output almost empty .ALMOSTFULL(ALMOSTFULL), // 1-bit output almost full .DO(DO), // Output data, width defined by DATA_WIDTH parameter .EMPTY(EMPTY), // 1-bit output empty .FULL(FULL), // 1-bit output full .RDCOUNT(RDCOUNT), // Output read count, width determined by FIfor depth .RDERR(RDERR), // 1-bit output read error .WRCOUNT(WRCOUNT), // Output write count, width determined by FIfor depth .WRERR(WRERR), // 1-bit output write error .DI(DI), // Input data, width defined by DATA_WIDTH parameter .RDCLK(RDCLK), // 1-bit input read clock .RDEN(RDEN), // 1-bit input read enable .RST(RST), // 1-bit input reset .WRCLK(WRCLK), // 1-bit input write clock .WREN(WREN) // 1-bit input write enable ); // End of FIFO_DUALCLOCK_MACRO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 60 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 FIFO_SYNC_MACRO Macro: Synchronous First-In, First-Out (FIFO) RAM Buffer Chapter 2: About Unimacros Introduction FPGA devices contain several block RAM memories that can be configured as general-purpose 36Kb or 18Kb RAM/ROM memories. Dedicated logic in the block RAM enables you to easily implement FIFOs. The FIFO can be configured as an 18 Kb or 36 Kb memory. This unimacro configures the FIFO such that it uses one clock for reading as well as writing. Port Description Name ALMOSTEMPTY ALMOSTFULL Direction Output Output DO Output EMPTY FULL RDCOUNT Output Output Output RDERR Output WRCOUNT Output WRERR Output CLK Input Width 1 1 See Configuration Table. 1 1 See Configuration Table below. 1 See Configuration Table. 1 1 Function Almost all valid entries in FIFO have been read. Almost all entries in FIFO memory have been filled. Data output bus addressed by ADDR. FIFO is empty. All entries in FIFO memory are filled. FIFO data read pointer. When the FIFO is empty, any additional read operation generates an error flag. FIFO data write pointer. When the FIFO is full, any additional write operation generates an error flag. Clock for Read/Write domain operation. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 61 Chapter 2: About Unimacros Name DI RDEN RST WREN Direction Input Input Input Input Width See Configuration Table. 1 1 1 Function Data input bus addressed by ADDR. Read Enable Asynchronous reset. Write Enable Port Configuration This unimacro is a parameterizable version of the primitive, and can be instantiated only. Use this table to correctly configure the unimacro to meet design needs. DATA_WIDTH 72 - 37 36 - 19 18 - 10 9-5 1-4 FIFO_SIZE 36Kb 36Kb 18Kb 36Kb 18Kb 36Kb 18Kb 36Kb 18Kb WRCOUNT 9 10 9 11 10 12 11 13 12 RDCOUNT 9 10 9 11 10 12 11 13 12 Design Entry Method This unimacro is a parameterizable version of the primitive, and can be instantiated only. Consult the Port Configuration section to correctly configure this element to meet your design needs. Instantiation Inference CORE Generator™ and wizards Macro support Yes No No Recommended Available Attributes Attribute ALMOST_EMPTY_ OFFSET Data Type Hexadecimal Allowed Values 13 bit HEX ALMOST_FULL_ OFFSET Hexadecimal 13 bit HEX DATA_WIDTH DEVICE DO_REG Integer String Binary 1 - 72 "7SERIES" 0,1 Default Description All zeros Setting determines the difference between EMPTY and ALMOSTEMPTY conditions. Must be set using hexadecimal notation. All zeros Setting determines the difference between FULL and ALMOSTFULL conditions. Must be set using hexadecimal notation. 4 Width of DI/DO bus. "7SERIES" Target hardware architecture. 1 DO_REG must be set to 0 for flags and data to follow a standard synchronous FIFO operation. Send Feedback 62 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 2: About Unimacros Attribute FIFO_SIZE Data Type Allowed Values String "18Kb", "36Kb" Default "18Kb" Description When DO_REG is set to 1, effectively a pipeline register is added to the output of the synchronous FIFO. Data then has a one clock cycle latency. However, the clock-to-out timing is improved. Configures FIFO as "18Kb" or "36Kb" memory. VHDL Instantiation Template Unless they already exist, copy the following four statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; library UNIMACRO; use unimacro.Vcomponents.all; -- FIFO_SYNC_MACRO: Synchronous First-In, First-Out (FIFO) RAM Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 -- Note - This Unimacro model assumes the port directions to be "downto". -- Simulation of this model with "to" in the port directions could lead to erroneous results. ----------------------------------------------------------------- -- DATA_WIDTH | FIFO_SIZE | FIFO Depth | RDCOUNT/WRCOUNT Width -- -- ===========|===========|============|=======================-- -- 37-72 | "36Kb" | 512 | 9-bit -- -- 19-36 | "36Kb" | 1024 | 10-bit -- -- 19-36 | "18Kb" | 512 | 9-bit -- -- 10-18 | "36Kb" | 2048 | 11-bit -- -- 10-18 | "18Kb" | 1024 | 10-bit -- -- 5-9 | "36Kb" | 4096 | 12-bit -- -- 5-9 | "18Kb" | 2048 | 11-bit -- -- 1-4 | "36Kb" | 8192 | 13-bit -- -- 1-4 | "18Kb" | 4096 | 12-bit -- ----------------------------------------------------------------- FIFO_SYNC_MACRO_inst : FIFO_SYNC_MACRO generic map ( DEVICE => "7SERIES", -- Target Device: "VIRTEX5, "VIRTEX6", "7SERIES" ALMOST_FULL_OFFSET => X"0080", -- Sets almost full threshold ALMOST_EMPTY_OFFSET => X"0080", -- Sets the almost empty threshold DATA_WIDTH => 0, -- Valid values are 1-72 (37-72 only valid when FIFO_SIZE="36Kb") FIFO_SIZE => "18Kb") -- Target BRAM, "18Kb" or "36Kb" port map ( ALMOSTEMPTY => ALMOSTEMPTY, -- 1-bit output almost empty ALMOSTFULL => ALMOSTFULL, -- 1-bit output almost full DO => DO, -- Output data, width defined by DATA_WIDTH parameter EMPTY => EMPTY, -- 1-bit output empty FULL => FULL, -- 1-bit output full RDCOUNT => RDCOUNT, -- Output read count, width determined by FIFO depth RDERR => RDERR, -- 1-bit output read error WRCOUNT => WRCOUNT, -- Output write count, width determined by FIFO depth WRERR => WRERR, -- 1-bit output write error CLK => CLK, -- 1-bit input clock DI => DI, -- Input data, width defined by DATA_WIDTH parameter RDEN => RDEN, -- 1-bit input read enable RST => RST, -- 1-bit input reset WREN => WREN -- 1-bit input write enable ); -- End of FIFO_SYNC_MACRO_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 63 Chapter 2: About Unimacros Verilog Instantiation Template // FIFO_SYNC_MACRO: Synchronous First-In, First-Out (FIfor) RAM Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ///////////////////////////////////////////////////////////////// // DATA_WIDTH | FIFO_SIZE | FIfor Depth | RDCOUNT/WRCOUNT Width // // ===========|===========|============|=======================// // 37-72 | "36Kb" | 512 | 9-bit // // 19-36 | "36Kb" | 1024 | 10-bit // // 19-36 | "18Kb" | 512 | 9-bit // // 10-18 | "36Kb" | 2048 | 11-bit // // 10-18 | "18Kb" | 1024 | 10-bit // // 5-9 | "36Kb" | 4096 | 12-bit // // 5-9 | "18Kb" | 2048 | 11-bit // // 1-4 | "36Kb" | 8192 | 13-bit // // 1-4 | "18Kb" | 4096 | 12-bit // ///////////////////////////////////////////////////////////////// FIFO_SYNC_MACRO #( .DEVICE("7SERIES"), // Target Device: "VIRTEX5", "VIRTEX6", "7SERIES" .ALMOST_EMPTY_OFFSET(9'h080), // Sets the almost empty threshold .ALMOST_FULL_OFFSET(9'h080), // Sets almost full threshold .DATA_WIDTH(0), // Valid values are 1-72 (37-72 only valid when FIFO_SIZE="36Kb") .DO_REG(0), // Optional output register (0 or 1) .FIFO_SIZE ("18Kb") // Target BRAM: "18Kb" or "36Kb" ) FIFO_SYNC_MACRO_inst ( .ALMOSTEMPTY(ALMOSTEMPTY), // 1-bit output almost empty .ALMOSTFULL(ALMOSTFULL), // 1-bit output almost full .DO(DO), // Output data, width defined by DATA_WIDTH parameter .EMPTY(EMPTY), // 1-bit output empty .FULL(FULL), // 1-bit output full .RDCOUNT(RDCOUNT), // Output read count, width determined by FIfor depth .RDERR(RDERR), // 1-bit output read error .WRCOUNT(WRCOUNT), // Output write count, width determined by FIfor depth .WRERR(WRERR), // 1-bit output write error .CLK(CLK), // 1-bit input clock .DI(DI), // Input data, width defined by DATA_WIDTH parameter .RDEN(RDEN), // 1-bit input read enable .RST(RST), // 1-bit input reset .WREN(WREN) // 1-bit input write enable ); // End of FIFO_SYNC_MACRO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 64 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 3 Functional Categories This section categorizes, by function, the circuit design elements described in detail later in this guide. The elements ( primitives and macros) are listed in alphanumeric order under each functional category. Advanced Arithmetic Functions Clock Components Config/BSCAN Components I/O Components RAM/ROM Registers/Latches Slice/CLB Primitives Design Element GTPE2_CHANNEL GTPE2_COMMON GTHE2_CHANNEL GTHE2_COMMON GTXE2_CHANNEL GTXE2_COMMON PCIE_2_1 PCIE_3_0 XADC Design Element DSP48E1 Advanced Description Primitive: Gigabit Transceiver for 7 series Devices Primitive: Gigabit Transceiver for 7 series Devices Primitive: Gigabit Transceiver for 7 Series Devices Primitive: Gigabit Transceiver for 7 Series Devices Primitive: Gigabit Transceiver for 7 series Devices Primitive: Gigabit Transceiver for 7 series Devices Primitive: PCI Express Version 2.1 Model Primitive: PCI Express Version 3.0 Model Primitive: Dual 12-Bit 1MSPS Analog-to-Digital Converter Arithmetic Functions Description Primitive: 48-bit Multi-Functional Arithmetic Block Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 65 Chapter 3: Functional Categories Design Element BUFG BUFGCE BUFGCE_1 BUFGCTRL BUFGMUX BUFGMUX_1 BUFGMUX_CTRL BUFH BUFHCE BUFIO BUFMR BUFMRCE BUFR MMCME2_ADV MMCME2_BASE PLLE2_ADV PLLE2_BASE Clock Components Description Primitive: Global Clock Simple Buffer Primitive: Global Clock Buffer with Clock Enable Primitive: Global Clock Buffer with Clock Enable and Output State 1 Primitive: Global Clock Control Buffer Primitive: Global Clock Mux Buffer Primitive: Global Clock Mux Buffer with Output State 1 Primitive: 2-to-1 Global Clock MUX Buffer Primitive: HROW Clock Buffer for a Single Clocking Region Primitive: HROW Clock Buffer for a Single Clocking Region with Clock Enable Primitive: Local Clock Buffer for I/O Primitive: Multi-Region Clock Buffer Primitive: Multi-Region Clock Buffer with Clock Enable Primitive: Regional Clock Buffer for I/O and Logic Resources within a Clock Region Primitive: Advanced Mixed Mode Clock Manager Primitive: Base Mixed Mode Clock Manager Primitive: Advanced Phase Locked Loop (PLL) Primitive: Base Phase Locked Loop (PLL) Design Element BSCANE2 CAPTUREE2 DNA_PORT EFUSE_USR FRAME_ECCE2 ICAPE2 STARTUPE2 USR_ACCESSE2 Config/BSCAN Components Description Primitive: Boundary-Scan User Instruction Primitive: Register Capture Primitive: Device DNA Access Port Primitive: 32-bit non-volatile design ID Primitive: Configuration Frame Error Correction Primitive: Internal Configuration Access Port Primitive: STARTUP Block Primitive: Configuration Data Access Design Element DCIRESET IBUF IBUF_IBUFDISABLE I/O Components Description Primitive: Digitally Controlled Impedance Reset Component Primitive: Input Buffer Primitive: Single-ended Input Buffer with Input Disable Send Feedback 66 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 3: Functional Categories Design Element IBUF_INTERMDISABLE IBUFDS IBUFDS_DIFF_OUT IBUFDS_DIFF_OUT _IBUFDISABLE IBUFDS_DIFF_OUT _INTERMDISABLE IBUFDS_GTE2 IBUFDS_IBUFDISABLE IBUFDS_INTERMDISABLE IBUFG IBUFGDS IBUFGDS_DIFF_OUT IDELAYCTRL IDELAYE2 IN_FIFO IOBUF IOBUF_DCIEN IOBUF_INTERMDISABLE IOBUFDS IOBUFDS_DCIEN IOBUFDS_DIFF_OUT IOBUFDS_DIFF_OUT_DCIEN IOBUFDS_DIFF_OUT _INTERMDISABLE IOBUFDS_INTERMDISABLE ISERDESE2 KEEPER OBUF OBUFDS OBUFT Description Primitive: Single-ended Input Buffer with Input Termination Disable and Input Disable Primitive: Differential Signaling Input Buffer Primitive: Differential Signaling Input Buffer With Differential Output Primitive: Input Differential Buffer with Input Disable and Differential Output Primitive: Input Differential Buffer with Input Termination Disable, Input Disable, and Differential Output Primitive: Gigabit Transceiver Buffer Primitive: Input Differential Buffer with Input Path Disable Primitive: Input Differential Buffer with Input Termination Disable and Input Disable Primitive: Dedicated Input Clock Buffer Primitive: Differential Signaling Dedicated Input Clock Buffer Primitive: Differential Signaling Dedicated Input Clock Buffer with Differential Output Primitive: IDELAYE2/ODELAYE2 Tap Delay Value Control Primitive: Input Fixed or Variable Delay Element Primitive: Input First-In, First-Out (FIFO) Primitive: Bi-Directional Buffer Primitive: Bi-Directional Single-ended Buffer with DCI and Input Disable. Primitive: Bi-Directional Single-ended Buffer with Input Termination Disable and Input Path Disable Primitive: 3-State Differential Signaling I/O Buffer with Active Low Output Enable Primitive: Bi-Directional Differential Buffer with DCI Enable/Disable and Input Disable Primitive: Differential Bi-directional Buffer with Differential Output Primitive: Bi-Directional Differential Buffer with DCI Disable, Input Disable, and Differential Output Primitive: Bi-Directional Differential Buffer with Input Termination Disable, Input Disable, and Differential Output Primitive: Bi-Directional Differential Buffer with Input Termination Disable and Input Disable Primitive: Input SERial/DESerializer with Bitslip Primitive: KEEPER Symbol Primitive: Output Buffer Primitive: Differential Signaling Output Buffer Primitive: 3-State Output Buffer with Active Low Output Enable Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 67 Chapter 3: Functional Categories Design Element OBUFTDS ODELAYE2 OSERDESE2 OUT_FIFO PHASER_IN PHASER_IN_PHY PHASER_OUT PHASER_OUT_PHY PHASER_REF PHY_CONTROL PULLDOWN PULLUP Design Element FIFO18E1 FIFO36E1 RAM128X1D RAM128X1S RAM256X1S RAM32M RAM32X1D RAM32X1S RAM32X1S_1 RAM32X2S RAM64M RAM64X1D RAM64X1S RAM64X1S_1 Description Primitive: 3-State Output Buffer with Differential Signaling, Active-Low Output Enable Primitive: Output Fixed or Variable Delay Element Primitive: Output SERial/DESerializer with bitslip Primitive: Output First-In, First-Out (FIFO) Buffer Primitive: MIG Data Alignment and Capture Component Primitive: MIG Data Alignment and Capture Component Primitive: MIG Data Alignment and Capture Component Primitive: MIG Data Alignment and Capture Component Primitive: MIG Data Alignment and Capture Component Primitive: MIG Data Alignment and Capture Component Primitive: Resistor to GND for Input Pads, Open-Drain, and 3-State Outputs Primitive: Resistor to VCC for Input PADs, Open-Drain, and 3-State Outputs RAM/ROM Description Primitive: 18Kb FIFO (First-In-First-Out) Block RAM Memory Primitive: 36Kb FIFO (First-In-First-Out) Block RAM Memory Primitive: 128-Deep by 1-Wide Dual Port Random Access Memory (Select RAM) Primitive: 128-Deep by 1-Wide Random Access Memory (Select RAM) Primitive: 256-Deep by 1-Wide Random Access Memory (Select RAM) Primitive: 32-Deep by 8-bit Wide Multi Port Random Access Memory (Select RAM) Primitive: 32-Deep by 1-Wide Static Dual Port Synchronous RAM Primitive: 32-Deep by 1-Wide Static Synchronous RAM Primitive: 32-Deep by 1-Wide Static Synchronous RAM with Negative-Edge Clock Primitive: 32-Deep by 2-Wide Static Synchronous RAM Primitive: 64-Deep by 4-bit Wide Multi Port Random Access Memory (Select RAM) Primitive: 64-Deep by 1-Wide Dual Port Static Synchronous RAM Primitive: 64-Deep by 1-Wide Static Synchronous RAM Primitive: 64-Deep by 1-Wide Static Synchronous RAM with Negative-Edge Clock Send Feedback 68 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 3: Functional Categories Design Element RAMB18E1 RAMB36E1 ROM128X1 ROM256X1 ROM32X1 ROM64X1 Design Element FDCE FDPE FDRE FDSE IDDR IDDR_2CLK LDCE LDPE ODDR Design Element CARRY4 CFGLUT5 LUT1 LUT1_D LUT1_L LUT2 LUT2_D LUT2_L LUT3 LUT3_D LUT3_L Description Primitive: 18K-bit Configurable Synchronous Block RAM Primitive: 36K-bit Configurable Synchronous Block RAM Primitive: 128-Deep by 1-Wide ROM Primitive: 256-Deep by 1-Wide ROM Primitive: 32-Deep by 1-Wide ROM Primitive: 64-Deep by 1-Wide ROM Registers/Latches Description Primitive: D Flip-Flop with Clock Enable and Asynchronous Clear Primitive: D Flip-Flop with Clock Enable and Asynchronous Preset Primitive: D Flip-Flop with Clock Enable and Synchronous Reset Primitive: D Flip-Flop with Clock Enable and Synchronous Set Primitive: Input Dual Data-Rate Register Primitive: Input Dual Data-Rate Register with Dual Clock Inputs Primitive: Transparent Data Latch with Asynchronous Clear and Gate Enable Primitive: Transparent Data Latch with Asynchronous Preset and Gate Enable Primitive: Dedicated Dual Data Rate (DDR) Output Register Slice/CLB Primitives Description Primitive: Fast Carry Logic with Look Ahead Primitive: 5-input Dynamically Reconfigurable Look-Up Table (LUT) Primitive: 1-Bit Look-Up Table with General Output Primitive: 1-Bit Look-Up Table with Dual Output Primitive: 1-Bit Look-Up Table with Local Output Primitive: 2-Bit Look-Up Table with General Output Primitive: 2-Bit Look-Up Table with Dual Output Primitive: 2-Bit Look-Up Table with Local Output Primitive: 3-Bit Look-Up Table with General Output Primitive: 3-Bit Look-Up Table with Dual Output Primitive: 3-Bit Look-Up Table with Local Output Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 69 Chapter 3: Functional Categories Design Element LUT4 LUT4_D LUT4_L LUT5 LUT5_D LUT5_L LUT6 LUT6_2 LUT6_D LUT6_L MUXF7 MUXF7_D MUXF7_L MUXF8 MUXF8_D MUXF8_L SRL16E SRLC32E Description Primitive: 4-Bit Look-Up-Table with General Output Primitive: 4-Bit Look-Up Table with Dual Output Primitive: 4-Bit Look-Up Table with Local Output Primitive: 5-Input Lookup Table with General Output Primitive: 5-Input Lookup Table with General and Local Outputs Primitive: 5-Input Lookup Table with Local Output Primitive: 6-Input Lookup Table with General Output Primitive: Six-input, 2-output, Look-Up Table Primitive: 6-Input Lookup Table with General and Local Outputs Primitive: 6-Input Lookup Table with Local Output Primitive: 2-to-1 Look-Up Table Multiplexer with General Output Primitive: 2-to-1 Look-Up Table Multiplexer with Dual Output Primitive: 2-to-1 look-up table Multiplexer with Local Output Primitive: 2-to-1 Look-Up Table Multiplexer with General Output Primitive: 2-to-1 Look-Up Table Multiplexer with Dual Output Primitive: 2-to-1 Look-Up Table Multiplexer with Local Output Primitive: 16-Bit Shift Register Look-Up Table (LUT) with Clock Enable Primitive: 32 Clock Cycle, Variable Length Shift Register Look-Up Table (LUT) with Clock Enable Send Feedback 70 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4 About Design Elements This section describes the design elements that can be used with 7 series FPGAs and Zynq™-7000 All Programmable SoC devices. The design elements are organized alphabetically. The following information is provided for each design element, where applicable: • Name of element • Brief description • Schematic symbol (if any) • Logic table (if any) • Port descriptions • Design Entry Method • Available attributes (if any) • Example instantiation code • For more information Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 71 Chapter 4: About Design Elements BSCANE2 Primitive: Boundary-Scan User Instruction Introduction This design element allows access to and from internal logic by the JTAG Boundary Scan logic controller. This allows for communication between the internal running design and the dedicated JTAG pins of the FPGA. Each instance of this design element will handle one JTAG USER instruction (USER1 through USER4) as set with the JTAG_CHAIN attribute. To handle all four USER instuctions, instantiate four of these elements and set the JTAG_CHAIN attribute appropriately. For specific information on boundary scan for an architecture, see the Configuration User Guide for the specific device. Port Descriptions Port CAPTURE DRCK Type Output Output RESET RUNTEST SEL SHIFT TCK TDI TDO TMS UPDATE Output Output Output Output Output Output Input Output Output Width 1 1 1 1 1 1 1 1 1 1 1 Function CAPTURE output from TAP controller. Gated TCK output. When SEL is asserted, DRCK toggles when CAPTURE or SHIFT are asserted. Reset output for TAP controller. Output asserted when TAP controller is in Run Test/Idle state. USER instruction active output. SHIFT output from TAP controller. Test Clock output. Fabric connection to TAP Clock pin. Test Data Input (TDI) output from TAP controller. Test Data Output (TDO) input for USER function. Test Mode Select output. Fabric connection to TAP. UPDATE output from TAP controller Send Feedback 72 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Available Attributes Attribute JTAG_CHAIN Type DECIMAL Allowed Values 1, 2, 3, 4 Default 1 Description Value for USER command. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BSCANE2: Boundary-Scan User Instruction -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BSCANE2_inst : BSCANE2 generic map ( JTAG_CHAIN => 1 -- Value for USER command. ) port map ( CAPTURE => CAPTURE, -- 1-bit output: CAPTURE output from TAP controller. DRCK => DRCK, -- 1-bit output: Gated TCK output. When SEL is asserted, DRCK toggles when CAPTURE or -- SHIFT are asserted. RESET => RESET, -- 1-bit output: Reset output for TAP controller. RUNTEST => RUNTEST, -- 1-bit output: Output asserted when TAP controller is in Run Test/Idle state. SEL => SEL, -- 1-bit output: USER instruction active output. SHIFT => SHIFT, -- 1-bit output: SHIFT output from TAP controller. TCK => TCK, -- 1-bit output: Test Clock output. Fabric connection to TAP Clock pin. TDI => TDI, -- 1-bit output: Test Data Input (TDI) output from TAP controller. TMS => TMS, -- 1-bit output: Test Mode Select output. Fabric connection to TAP. UPDATE => UPDATE, -- 1-bit output: UPDATE output from TAP controller TDO => TDO -- 1-bit input: Test Data Output (TDO) input for USER function. ); -- End of BSCANE2_inst instantiation Verilog Instantiation Template // BSCANE2: Boundary-Scan User Instruction // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BSCANE2 #( .JTAG_CHAIN(1) // Value for USER command. ) BSCANE2_inst ( .CAPTURE(CAPTURE), // 1-bit output: CAPTURE output from TAP controller. .DRCK(DRCK), // 1-bit output: Gated TCK output. When SEL is asserted, DRCK toggles when CAPTURE or // SHIFT are asserted. .RESET(RESET), // 1-bit output: Reset output for TAP controller. .RUNTEST(RUNTEST), // 1-bit output: Output asserted when TAP controller is in Run Test/Idle state. .SEL(SEL), // 1-bit output: USER instruction active output. .SHIFT(SHIFT), // 1-bit output: SHIFT output from TAP controller. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 73 Chapter 4: About Design Elements .TCK(TCK), .TDI(TDI), .TMS(TMS), .UPDATE(UPDATE), .TDO(TDO) ); // 1-bit output: Test Clock output. Fabric connection to TAP Clock pin. // 1-bit output: Test Data Input (TDI) output from TAP controller. // 1-bit output: Test Mode Select output. Fabric connection to TAP. // 1-bit output: UPDATE output from TAP controller // 1-bit input: Test Data Output (TDO) input for USER function. // End of BSCANE2_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 74 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 BUFG Primitive: Global Clock Simple Buffer Chapter 4: About Design Elements Introduction This design element is a high-fanout buffer that connects signals to the global routing resources for low skew distribution of the signal. BUFGs are typically used on clock nets as well other high fanout nets like sets/resets and clock enables. Port Descriptions Port I O Type Input Output Width 1 1 Function Clock input Clock output Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFG: Global Clock Simple Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFG_inst : BUFG port map ( O => O, -- 1-bit output: Clock output I => I -- 1-bit input: Clock input ); -- End of BUFG_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 75 Chapter 4: About Design Elements Verilog Instantiation Template // BUFG: Global Clock Simple Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFG BUFG_inst ( .O(O), // 1-bit output: Clock output .I(I) // 1-bit input: Clock input ); // End of BUFG_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 76 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 BUFGCE Primitive: Global Clock Buffer with Clock Enable Chapter 4: About Design Elements Introduction This design element is a global clock buffer with a single gated input. Its O output is "0" when clock enable (CE) is Low (inactive). When clock enable (CE) is High, the I input is transferred to the O output. Logic Table Inputs I CE X 0 I 1 Outputs O 0 I Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFGCE: Global Clock Buffer with Clock Enable -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFGCE_inst : BUFGCE port map ( O => O, -- 1-bit output: Clock output CE => CE, -- 1-bit input: Clock enable input for I0 I => I -- 1-bit input: Primary clock ); -- End of BUFGCE_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 77 Chapter 4: About Design Elements Verilog Instantiation Template // BUFGCE: Global Clock Buffer with Clock Enable // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFGCE BUFGCE_inst ( .O(O), // 1-bit output: Clock output .CE(CE), // 1-bit input: Clock enable input for I0 .I(I) // 1-bit input: Primary clock ); // End of BUFGCE_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 78 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements BUFGCE_1 Primitive: Global Clock Buffer with Clock Enable and Output State 1 Introduction This design element is a global clock buffer with a single gated input. Its O output is "1" when clock enable (CE) is Low (inactive). When clock enable (CE) is High, the I input is transferred to the O output. Logic Table Inputs I CE X 0 I 1 Outputs O 1 I Port Descriptions Port CE Direction Input I Input O Output Width 1 1 1 Function Clock buffer active high enable Clock input Clock output Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 79 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFGCE_1: Global Clock Buffer with Clock Enable and Output State 1 -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFGCE_1_inst : BUFGCE_1 port map ( O => O, -- 1-bit output: Clock output CE => CE, -- 1-bit input: Clock enable input for I0 I => I -- 1-bit input: Primary clock ); -- End of BUFGCE_1_inst instantiation Verilog Instantiation Template // BUFGCE_1: Global Clock Buffer with Clock Enable and Output State 1 // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFGCE_1 BUFGCE_1_inst ( .O(O), // 1-bit output: Clock output .CE(CE), // 1-bit input: Clock enable input for I0 .I(I) // 1-bit input: Primary clock ); // End of BUFGCE_1_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 80 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 BUFGCTRL Primitive: Global Clock Control Buffer Chapter 4: About Design Elements Introduction BUFGCTRL primitive is a 7 series global clock buffer that is designed as a synchronous/asynchronous "glitch free" 2:1 multiplexer with two clock inputs. Unlike global clock buffers that are found in previous generations of FPGAs, these clock buffers are designed with more control pins to provide a wider range of functionality and more robust input switching. BUFGCTRL is not limited to clocking applications. Port Descriptions Port Type CE0 Input CE1 Input IGNORE0 Input IGNORE1 Input I0 Input I1 Input O Output S0 Input Width 1 1 1 1 1 1 1 1 Function Clock enable input for the I0 clock input. A setup/hold time must be guarenteed when you are using the CE0 pin to enable this input. Failure to meet this requirement could result in a clock glitch. Clock enable input for the I1 clock input. A setup/hold time must be guarenteed when you are using the CE1 pin to enable this input. Failure to meet this requirement could result in a clock glitch. Clock ignore input for I0 input. Asserting the IGNORE pin will bypass the BUFGCTRL from detecting the conditions for switching between two clock inputs. In other words, asserting IGNORE causes the MUX to switch the inputs at the instant the select pin changes. IGNORE0 causes the output to switch away from the I0 input immediately when the select pin changes, while IGNORE1 causes the output to switch away from the I1 input immediately when the select pin changes. Clock ignore input for I1 input. Asserting the IGNORE pin will bypass the BUFGCTRL from detecting the conditions for switching between two clock inputs. In other words, asserting IGNORE causes the MUX to switch the inputs at the instant the select pin changes. IGNORE0 causes the output to switch away from the I0 input immediately when the select pin changes, while IGNORE1 causes the output to switch away from the I1 input immediately when the select pin changes. Primary clock input into the BUFGCTRL enabled by the CE0 input and selected by the S0 input. Secondary clock input into the BUFGCTRL enabled by the CE1 input and selected by the S1 input. Clock output Clock select input for I0. The S pins represent the clock select pin for each clock input. When using the S pin as input select, there is Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 81 Chapter 4: About Design Elements Port S1 Type Input Width 1 Function a setup/hold time requirement. Unlike CE pins, failure to meet this requirement will not result in a clock glitch. However, it can cause the output clock to appear one clock cycle later. Clock select input for I1. The S pins represent the clock select pin for each clock input. When using the S pin as input select, there is a setup/hold time requirement. Unlike CE pins, failure to meet this requirement will not result in a clock glitch. However, it can cause the output clock to appear one clock cycle later. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Available Attributes Attribute INIT_OUT PRESELECT_I0 PRESELECT_I1 Type DECIMAL Allowed Values 0, 1 BOOLEAN FALSE, TRUE BOOLEAN FALSE, TRUE Default 0 FALSE FALSE Description Initializes the BUFGCTRL output to the specified value after configuration. If TRUE, BUFGCTRL output uses I0 input after configuration. If TRUE, BUFGCTRL output uses I1 input after configuration. Note Both PRESELECT attributes might not be TRUE at the same time. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFGCTRL: Global Clock Control Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFGCTRL_inst : BUFGCTRL generic map ( INIT_OUT => 0, -- Initial value of BUFGCTRL output ($VALUES;) PRESELECT_I0 => FALSE, -- BUFGCTRL output uses I0 input ($VALUES;) PRESELECT_I1 => FALSE -- BUFGCTRL output uses I1 input ($VALUES;) ) port map ( O => O, -- 1-bit output: Clock output CE0 => CE0, -- 1-bit input: Clock enable input for I0 CE1 => CE1, -- 1-bit input: Clock enable input for I1 I0 => I0, -- 1-bit input: Primary clock I1 => I1, -- 1-bit input: Secondary clock IGNORE0 => IGNORE0, -- 1-bit input: Clock ignore input for I0 IGNORE1 => IGNORE1, -- 1-bit input: Clock ignore input for I1 S0 => S0, -- 1-bit input: Clock select for I0 S1 => S1 -- 1-bit input: Clock select for I1 ); Send Feedback 82 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements -- End of BUFGCTRL_inst instantiation Verilog Instantiation Template // BUFGCTRL: Global Clock Control Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFGCTRL #( .INIT_OUT(0), // Initial value of BUFGCTRL output ($VALUES;) .PRESELECT_I0("FALSE"), // BUFGCTRL output uses I0 input ($VALUES;) .PRESELECT_I1("FALSE") // BUFGCTRL output uses I1 input ($VALUES;) ) BUFGCTRL_inst ( .O(O), // 1-bit output: Clock output .CE0(CE0), // 1-bit input: Clock enable input for I0 .CE1(CE1), // 1-bit input: Clock enable input for I1 .I0(I0), // 1-bit input: Primary clock .I1(I1), // 1-bit input: Secondary clock .IGNORE0(IGNORE0), // 1-bit input: Clock ignore input for I0 .IGNORE1(IGNORE1), // 1-bit input: Clock ignore input for I1 .S0(S0), // 1-bit input: Clock select for I0 .S1(S1) // 1-bit input: Clock select for I1 ); // End of BUFGCTRL_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 83 Chapter 4: About Design Elements BUFGMUX Primitive: Global Clock Mux Buffer Introduction This design element is a global clock buffer, based off of the BUFGCTRL, that can select betweeen two input clocks: I0 and I1. When the select input (S) is Low, the signal on I0 is selected for output (O). When the select input (S) is High, the signal on I1 is selected for output. BUFGMUX BUFGMUX_1 are distinguished by the state the output assumes when that output switches between clocks in response to a change in its select input. BUFGMUX assumes output state 0 and BUFGMUX_1 assumes output state 1. Logic Table Inputs Outputs I0 I1 S O I0 X 0 I0 X I1 1 I1 X X ↑ 0 X X ↓ 0 Port Descriptions Port I0 Direction Input I1 Input O Output S Input Width 1 1 1 1 Function Clock buffer input. This input is reflected on the output O when the S input is zero. Clock buffer input. This input is reflected on the output O when the S input is one. Clock buffer output. Clock buffer select input. When low, selects I0 input and when high, the I1 input is slected Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Send Feedback 84 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFGMUX: Global Clock Mux Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFGMUX_inst : BUFGMUX port map ( O => O, -- 1-bit output: Clock output I0 => I0, -- 1-bit input: Clock input (S=0) I1 => I1, -- 1-bit input: Clock input (S=1) S => S -- 1-bit input: Clock select ); -- End of BUFGMUX_inst instantiation Verilog Instantiation Template // BUFGMUX: Global Clock Mux Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFGMUX #( ) BUFGMUX_inst ( .O(O), // 1-bit output: Clock output .I0(I0), // 1-bit input: Clock input (S=0) .I1(I1), // 1-bit input: Clock input (S=1) .S(S) // 1-bit input: Clock select ); // End of BUFGMUX_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 85 Chapter 4: About Design Elements BUFGMUX_1 Primitive: Global Clock Mux Buffer with Output State 1 Introduction This design element is a global clock buffer, based off of the BUFGCTRL, that can select betweeen two input clocks: I0 and I1. When the select input (S) is Low, the signal on I0 is selected for output (O). When the select input (S) is High, the signal on I1 is selected for output. BUFGMUX BUFGMUX_1 are distinguished by the state the output assumes when that output switches between clocks in response to a change in its select input. BUFGMUX assumes output state0 and BUFGMUX_1 assumes output state 1. Logic Table Inputs Outputs I0 I1 S O I0 X 0 I0 X I1 1 I1 X X ↑ 1 X X ↓ 1 Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFGMUX_1: Global Clock Mux Buffer with Output State 1 -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFGMUX_1_inst : BUFGMUX_1 port map ( O => O, -- 1-bit output: Clock output I0 => I0, -- 1-bit input: Clock input (S=0) I1 => I1, -- 1-bit input: Clock input (S=1) S => S -- 1-bit input: Clock select ); -- End of BUFGMUX_1_inst instantiation Send Feedback 86 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // BUFGMUX_1: Global Clock Mux Buffer with Output State 1 // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFGMUX_1 #( ) BUFGMUX_1_inst ( .O(O), // 1-bit output: Clock output .I0(I0), // 1-bit input: Clock input (S=0) .I1(I1), // 1-bit input: Clock input (S=1) .S(S) // 1-bit input: Clock select ); // End of BUFGMUX_1_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 87 Chapter 4: About Design Elements BUFGMUX_CTRL Primitive: 2-to-1 Global Clock MUX Buffer Introduction This design element is a global clock buffer with two clock inputs, one clock output, and a select line used to cleanly select between one of two clocks driving the global clocking resource. This component is based on BUFGCTRL, with some pins connected to logic High or Low. This element uses the S pin as the select pin for the 2-to-1 MUX. S can switch anytime without causing a glitch on the output clock of the buffer. Port Descriptions Port I0 Direction Input I1 Input O Output S Input Width 1 1 1 1 Function Clock buffer input. This input is reflected on the output O when the S input is zero. Clock buffer input. This input is reflected on the output O when the S input is one. Clock buffer output. Clock buffer select input. When low, selects I0 input and when high, the I1 input is slected Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Send Feedback 88 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFGMUX_CTRL: 2-to-1 Global Clock MUX Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFGMUX_CTRL_inst : BUFGMUX_CTRL port map ( O => O, -- 1-bit output: Clock output I0 => I0, -- 1-bit input: Clock input (S=0) I1 => I1, -- 1-bit input: Clock input (S=1) S => S -- 1-bit input: Clock select ); -- End of BUFGMUX_CTRL_inst instantiation Verilog Instantiation Template // BUFGMUX_CTRL: 2-to-1 Global Clock MUX Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFGMUX_CTRL BUFGMUX_CTRL_inst ( .O(O), // 1-bit output: Clock output .I0(I0), // 1-bit input: Clock input (S=0) .I1(I1), // 1-bit input: Clock input (S=1) .S(S) // 1-bit input: Clock select ); // End of BUFGMUX_CTRL_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 89 Chapter 4: About Design Elements BUFH Primitive: HROW Clock Buffer for a Single Clocking Region Introduction The BUFH primitive allows direct access to the clock region entry point of the global buffer (BUFG) resource. This allows access to unused portions of the global clocking network to be used as high-speed, low skew local (single clock region) routing resources. Please refer to the 7 series FPGA Clocking Resources User Guide for details for using this component. Port Descriptions Port I O Type Input Output Width 1 1 Function Clock input Clock output Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards No Macro support No VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFH: HROW Clock Buffer for a Single Clocking Region -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFH_inst : BUFH port map ( O => O, -- 1-bit output: Clock output I => I -- 1-bit input: Clock input ); -- End of BUFH_inst instantiation Send Feedback 90 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // BUFH: HROW Clock Buffer for a Single Clocking Region // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFH BUFH_inst ( .O(O), // 1-bit output: Clock output .I(I) // 1-bit input: Clock input ); // End of BUFH_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 91 Chapter 4: About Design Elements BUFHCE Primitive: HROW Clock Buffer for a Single Clocking Region with Clock Enable Introduction The BUFHCE primitive allows direct access to the clock region entry point of the global buffer (BUFG) resource. This allows access to unused portions of the global clocking network to be used as high-speed, low skew local (single clock region) routing resources. Addtionaly, the CE or clock enable input allows for finer-grained control of clock enabling or gating to allow for power reduction for circuitry or portions of the design not constantly used. Please refer to the 7 series FPGA Clocking Resources User Guide for details for using this component. Port Descriptions Port CE Type Input I Input O Output Width 1 1 1 Function Enables propagation of signal from I to O. When low, performs a glitchless transition of the output to INIT_OUT value. Clock input Clock output Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards No Macro support No Available Attributes Attribute CE_TYPE Type STRING Allowed Values Default "SYNC", "ASYNC" "SYNC" INIT_OUT DECIMAL 0, 1 0 Description Sets clock enable behavior where "SYNC" allows for a glitchless transition to and from the INIT_OUT value. "ASYNC" is generally used to create a more immediate transition such as when you can expect the clock to be stopped or when using the BUFHCE for a high fanout control or data path routing instead of a clock buffer. Initial output value, also indicates stop low vs stop high behavior Send Feedback 92 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFHCE: HROW Clock Buffer for a Single Clocking Region with Clock Enable -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFHCE_inst : BUFHCE generic map ( CE_TYPE => "SYNC", -- "SYNC" (glitchless switching) or "ASYNC" (immediate switch) INIT_OUT => 0 -- Initial output value (0-1) ) port map ( O => O, -- 1-bit output: Clock output CE => CE, -- 1-bit input: Active high enable I => I -- 1-bit input: Clock input ); -- End of BUFHCE_inst instantiation Verilog Instantiation Template // BUFHCE: HROW Clock Buffer for a Single Clocking Region with Clock Enable // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFHCE #( .CE_TYPE("SYNC"), // "SYNC" (glitchless switching) or "ASYNC" (immediate switch) .INIT_OUT(0) // Initial output value (0-1) ) BUFHCE_inst ( .O(O), // 1-bit output: Clock output .CE(CE), // 1-bit input: Active high enable .I(I) // 1-bit input: Clock input ); // End of BUFHCE_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 93 Chapter 4: About Design Elements BUFIO Primitive: Local Clock Buffer for I/O Introduction This design element is simply a clock-in, clock-out buffer. It drives a dedicated clock net within the I/O column, independent of the global clock resources. Thus, these elements are ideally suited for source-synchronous data capture (forwarded/receiver clock distribution). They can be driven by a dedicated MRCC I/O located in the same clock region or a BUFMRCE/BUFMR component capable of clocking multiple clock regions. The BUFIO can only drive I/O components within the bank in which they exist. These elements cannot directly drive logic resources (CLB, block RAM, etc.) because the I/O clock network only reaches the I/O column. Port Descriptions Port I Type Input O Output Width 1 1 Function Input port to clock buffer. Connect this to an IBUF connected to a top-level port or an associated BUFMR buffer. Output port from clock buffer. Connect this to the clock inputs to synchronous I/O components like the ISERDESE2, OSERDESE2, IDDR, ODDR or register connected directly to an I/O port (inferred or instantiated). Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards No Macro support No VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFIO: Local Clock Buffer for I/O -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFIO_inst : BUFIO port map ( O => O, -- 1-bit output: Clock output (connect to I/O clock loads). I => I -- 1-bit input: Clock input (connect to an IBUF or BUFMR). ); -- End of BUFIO_inst instantiation Send Feedback 94 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // BUFIO: Local Clock Buffer for I/O // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFIO BUFIO_inst ( .O(O), // 1-bit output: Clock output (connect to I/O clock loads). .I(I) // 1-bit input: Clock input (connect to an IBUF or BUFMR). ); // End of BUFIO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 95 Chapter 4: About Design Elements BUFMR Primitive: Multi-Region Clock Buffer Introduction The BUFMR is a simple clock-in/clock-out buffer. The BUFMR replaces the multi-region/bank support of the BUFR and BUFIO available in prior Virtex architectures. There are two BUFMRs in every bank and each buffer can be driven by one specific MRCC in the same bank. The BUFMRs drive the BUFIOs and/or BUFRs in the same region/banks and in the region above and below via the I/O clocking backbone. It is not suggested to use a BUFMR when driving BUFRs using clock dividers (not in bypass) and instead use a BUFMRCE component. Port Descriptions Port I Direction Input O Output Width 1 1 Function BUFMR clock input pin. Connect to an IBUF input that in turn is directly connected to a MRCC I/O port. BUFMR clock output pin. Connect to BUFIOs and/or BUFRs to be driven in adjacent regions. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards No Macro support No VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFMR: Multi-Region Clock Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFMR_inst : BUFMR port map ( O => O, -- 1-bit output: Clock output (connect to BUFIOs/BUFRs) I => I -- 1-bit input: Clock input (Connect to IBUF) ); -- End of BUFMR_inst instantiation Send Feedback 96 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // BUFMR: Multi-Region Clock Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFMR BUFMR_inst ( .O(O), // 1-bit output: Clock output (connect to BUFIOs/BUFRs) .I(I) // 1-bit input: Clock input (Connect to IBUF) ); // End of BUFMR_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 97 Chapter 4: About Design Elements BUFMRCE Primitive: Multi-Region Clock Buffer with Clock Enable Introduction The BUFMRCE is a simple clock-in/clock-out buffer with clock with clock enable (CE). Asserting CE stops the output clock to a user specified value. The BUFMRCE replaces the multi-region/bank support of the BUFR and BUFIO available in prior Virtex architectures. There are two BUFMRCEs in every bank and each buffer can be driven by one specific MRCC in the same bank. The BUFMRCE drives the BUFIOs and/or BUFRs in the same region/banks and in the region above and below via the I/O clocking backbone. When using BUFR dividers (not in bypass), the BUFMRCE must be disabled by deasserting the CE pin, the BUFR must be reset (cleared by asserting CLR), and then the CE signal should be asserted. This sequence ensures that all BUFR output clocks are phase aligned. If the dividers within the BUFRs are not used, then this additional circuitry is not necessary. If the clock enable circuitry is not needed, a BUFMR component should be used in place of a BUFMRCE. Port Descriptions Port CE Type Input I Input O Output Width 1 1 1 Function Active high buffer enable input. When low, output will settle to INIT_OUT value. BUFMR clock input pin. Connect to an IBUF input that in turn is directly connected to a MRCC I/O port. BUFMR clock output pin. Connect to BUFIOs and/or BUFRs to be driven in the same and adjacent regions. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards No Macro support No Available Attributes Attribute CE_TYPE Type STRING Allowed Values "SYNC", "ASYNC" Default "SYNC" INIT_OUT DECIMAL 0, 1 0 Description Set to "SYNC" for CE to be synchronous to input I and create a glitchless output. Set to "ASYNC" for stopped clock or non-clock operation of the CE signal. Initial output value, also indicates stop low vs stop high behavior Send Feedback 98 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFMRCE: Multi-Region Clock Buffer with Clock Enable -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFMRCE_inst : BUFMRCE generic map ( CE_TYPE => "SYNC", -- SYNC, ASYNC INIT_OUT => 0 -- Initial output and stopped polarity, (0-1) ) port map ( O => O, -- 1-bit output: Clock output (connect to BUFIOs/BUFRs) CE => CE, -- 1-bit input: Active high buffer enable I => I -- 1-bit input: Clock input (Connect to IBUF) ); -- End of BUFMRCE_inst instantiation Verilog Instantiation Template // BUFMRCE: Multi-Region Clock Buffer with Clock Enable // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFMRCE #( .CE_TYPE("SYNC"), // SYNC, ASYNC .INIT_OUT(0) // Initial output and stopped polarity, (0-1) ) BUFMRCE_inst ( .O(O), // 1-bit output: Clock output (connect to BUFIOs/BUFRs) .CE(CE), // 1-bit input: Active high buffer enable .I(I) // 1-bit input: Clock input (Connect to IBUF) ); // End of BUFMRCE_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 99 Chapter 4: About Design Elements BUFR Primitive: Regional Clock Buffer for I/O and Logic Resources within a Clock Region Introduction The BUFR is a regional clock buffer available in 7 series devices. BUFRs drive clock signals to a dedicated clock net within a clock region, independent from the global clock tree. Each BUFR can drive the regional clock nets in the region in which it is located. Unlike BUFIOs, BUFRs can drive the I/O logic and logic resources (CLB, block RAM, etc.) in the existing clock region. BUFRs can be driven by either the output from an IBUFG, BUFMRCE, MMCM or local interconnect. In addition, BUFRs are capable of generating divided clock outputs with respect to the clock input. The divide value is an integer between one and eight. BUFRs are ideal for source-synchronous applications requiring clock domain crossing or serial-to-parallel conversion. There are two BUFRs in a typical clock region (two regional clock networks). If local clocking is needed in multiple clock regions, the BUFMRCE can drive multiple BUFRs in adjacent clock regions to further extend this clocking capability. Please refer to the BUFMRCE for more details. Port Descriptions Port CE Type Input CLR Input I Input O Output Width 1 1 1 1 Function Clock enable port. When asserted low, this port disables the output clock. When asserted high, the clock is propagated out the O output port. Cannot be used in "BYPASS" mode. Connect to vcc when BUFR_DIVIDE is set to "BYPASS" or if not used. Counter asynchronous clear for divided clock output. When asserted high, this port resets the counter used to produce the divided clock output and the output is asserted low. Cannot be used in "BYPASS" mode. Connect to gnd when BUFR_DIVIDE is set to "BYPASS" or if not used. Clock input port. This port is the clock source port for BUFR. It can be driven by an IBUF, BUFMRCE, MMCM or local interconnect. Clock output port. This port drives the clock tracks in the clock region of the BUFR. This port connects to FPGA clocked components. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Send Feedback 100 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute BUFR_DIVIDE SIM_DEVICE Type STRING STRING Allowed_Values "BYPASS", "1", "2", "3", "4", "5", "6", "7", "8" "7SERIES" Default "BYPASS" "7SERIES" Description Defines whether the output clock is a divided version of input clock. For correct simulation behavior, this attribute must be set to "7SERIES" when targeting a 7 series device. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- BUFR: Regional Clock Buffer for I/O and Logic Resources within a Clock Region -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 BUFR_inst : BUFR generic map ( BUFR_DIVIDE => "BYPASS", -- Values: "BYPASS, 1, 2, 3, 4, 5, 6, 7, 8" SIM_DEVICE => ""7SERIES"" -- Must be set to "7SERIES" ) port map ( O => O, -- 1-bit output: Clock output port CE => CE, -- 1-bit input: Active high, clock enable (Divided modes only) CLR => CLR, -- 1-bit input: Active high, asynchronous clear (Divided modes only) I => I -- 1-bit input: Clock buffer input driven by an IBUF, MMCM or local interconnect ); -- End of BUFR_inst instantiation Verilog Instantiation Template // BUFR: Regional Clock Buffer for I/O and Logic Resources within a Clock Region // 7 Series // Xilinx HDL Libraries Guide, version 14.7 BUFR #( .BUFR_DIVIDE("BYPASS"), // Values: "BYPASS, 1, 2, 3, 4, 5, 6, 7, 8" .SIM_DEVICE(""7SERIES"") // Must be set to "7SERIES" ) BUFR_inst ( .O(O), // 1-bit output: Clock output port .CE(CE), // 1-bit input: Active high, clock enable (Divided modes only) .CLR(CLR), // 1-bit input: Active high, asynchronous clear (Divided modes only) .I(I) // 1-bit input: Clock buffer input driven by an IBUF, MMCM or local interconnect ); // End of BUFR_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 101 Chapter 4: About Design Elements CAPTUREE2 Primitive: Register Capture Introduction This element provides user control and synchronization over when and how the capture register (flip-flop and latch) information task is requested. The readback function is provided through dedicated configuration port instructions. However, without this element, the readback data is synchronized to the configuration clock. Only register (flip-flop and latch) states can be captured. Although LUT RAM, SRL, and block RAM states are readback, they cannot be captured. An asserted high CAP signal indicates that the registers in the device are to be captured at the next Low-to-High clock transition. By default, data is captured after every trigger when transition on CLK while CAP is asserted. To limit the readback operation to a single data capture, add the ONESHOT=TRUE attribute to this element. Port Descriptions Port CAP CLK Type Input Input Width 1 1 Function Capture Input Clock Input Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Available Attributes Attribute ONESHOT Type STRING Allowed Values "TRUE", "FALSE" Default "TRUE" Description Specifies the procedure for performing single readback per CAP trigger. Send Feedback 102 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- CAPTUREE2: Register Capture -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 CAPTUREE2_inst : CAPTUREE2 generic map ( ONESHOT => "TRUE" -- Specifies the procedure for performing single readback per CAP trigger. ) port map ( CAP => CAP, -- 1-bit input: Capture Input CLK => CLK -- 1-bit input: Clock Input ); -- End of CAPTUREE2_inst instantiation Verilog Instantiation Template // CAPTUREE2: Register Capture // 7 Series // Xilinx HDL Libraries Guide, version 14.7 CAPTUREE2 #( .ONESHOT("TRUE") // Specifies the procedure for performing single readback per CAP trigger. ) CAPTUREE2_inst ( .CAP(CAP), // 1-bit input: Capture Input .CLK(CLK) // 1-bit input: Clock Input ); // End of CAPTUREE2_inst instantiation For More Information See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 103 Chapter 4: About Design Elements CARRY4 Primitive: Fast Carry Logic with Look Ahead Introduction This circuit design represents the fast carry logic for a slice. The carry chain consists of a series of four MUXes and four XORs that connect to the other logic (LUTs) in the slice via dedicated routes to form more complex functions. The fast carry logic is useful for building arithmetic functions like adders, counters, subtractors and add/subs, as well as such other logic functions as wide comparators, address decoders, and some logic gates (specifically, AND and OR). Port Descriptions Port O CO DI S CYINIT CI Direction Output Output Input Input Input Input Width 4 4 4 4 1 1 Function Carry chain XOR general data out Carry-out of each stage of the carry chain Carry-MUX data input Carry-MUX select line Carry-in initialization input Carry cascade input Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 104 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- CARRY4: Fast Carry Logic Component -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 CARRY4_inst : CARRY4 port map ( CO => CO, -- 4-bit carry out O => O, -- 4-bit carry chain XOR data out CI => CI, -- 1-bit carry cascade input CYINIT => CYINIT, -- 1-bit carry initialization DI => DI, -- 4-bit carry-MUX data in S => S -- 4-bit carry-MUX select input ); -- End of CARRY4_inst instantiation Verilog Instantiation Template // CARRY4: Fast Carry Logic Component // 7 Series // Xilinx HDL Libraries Guide, version 14.7 CARRY4 CARRY4_inst ( .CO(CO), // 4-bit carry out .O(O), // 4-bit carry chain XOR data out .CI(CI), // 1-bit carry cascade input .CYINIT(CYINIT), // 1-bit carry initialization .DI(DI), // 4-bit carry-MUX data in .S(S) // 4-bit carry-MUX select input ); // End of CARRY4_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 105 Chapter 4: About Design Elements CFGLUT5 Primitive: 5-input Dynamically Reconfigurable Look-Up Table (LUT) Introduction This element is a runtime, dynamically reconfigurable, 5-input look-up table (LUT) that enables the changing of the logical function of the LUT during circuit operation. Using the CDI pin, a new INIT value can be synchronously shifted in serially to change the logical function. The O6 output pin produces the logical output function, based on the current INIT value loaded into the LUT and the currently selected I0-I4 input pins. Optionally, you can use the O5 output in combination with the O6 output to create two individual 4-input functions sharing the same inputs or a 5-input function and a 4-input function that uses a subset of the 5-input logic (see tables below). This component occupies one of the four LUT6 components within a Slice-M. To cascade this element, connect the CDO pin from each element to the CDI input of the next element. This will allow a single serial chain of data (32-bits per LUT) to reconfigure multiple LUTs. Port Descriptions Port O6 O5 I0, I1, I2, I3, I4 CDO Direction Output Output Input Output Width 1 1 1 1 CDI CLK CE Input 1 Input 1 Input 1 Function 5-LUT output 4-LUT output LUT inputs Reconfiguration data cascaded output (optionally connect to the CDI input of a subsequent LUT) Reconfiguration data serial input Reconfiguration clock Active high reconfiguration clock enable Send Feedback 106 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No • Connect the CLK input to the clock source used to supply the reconfiguration data. • Connect the CDI input to the source of the reconfiguration data. • Connect the CE pin to the active high logic if you need to enable/disable LUT reconfiguration. • Connect the I4-I0 pins to the source inputs to the logic equation. The logic function is output on O6 and O5. • To cascade this element, connect the CDO pin from each element to the CDI input of the next element to allow a single serial chain of data to reconfigure multiple LUTs. The INIT attribute should be placed on this design element to specify the initial logical function of the LUT. A new INIT can be loaded into the LUT any time during circuit operation by shifting in 32-bits per LUT in the chain, representing the new INIT value. Disregard the O6 and O5 output data until all 32-bits of new INIT data has been clocked into the LUT. The logical function of the LUT changes as new INIT data is shifted into it. Data should be shifted in MSB (INIT[31]) first and LSB (INIT[0]) last. In order to understand the O6 and O5 logical value based on the current INIT, see the table below: I4 I3 I2 I1 I0 O6 Value O5 Value 11111 11110 .. . 10001 10000 01111 01110 .. . INIT[31] INIT[30] .. . INIT[17] INIT[16] INIT[15] INIT[14] .. . INIT[15] INIT[14] .. . INIT[1] INIT[0] INIT[15] INIT[14] .. . 00001 00000 INIT[1] INIT[0] INIT[1] INIT[0] For instance, the INIT value of FFFF8000 would represent the following logical equations: • O6 = I4 or (I3 and I2 and I1 and I0) • O5 = I3 and I2 and I1 and I0 To use these elements as two, 4-input LUTs with the same inputs but different functions, tie the I4 signal to a logical one. The INIT[31:16] values apply to the logical values of the O6 output and INIT [15:0] apply to the logical values of the O5 output. Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 32-bit Value Default All zeros Description Specifies the initial logical expression of this element. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 107 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- CFGLUT5: Reconfigurable 5-input LUT (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 CFGLUT5_inst : CFGLUT5 generic map ( INT => X"00000000") port map ( CDO => CDO, -- Reconfiguration cascade output O5 => O5, -- 4-LUT output O6 => O6, -- 5-LUT output CDI => CDI, -- Reconfiguration data input CE => CE, -- Reconfiguration enable input CLK => CLK, -- Clock input I0 => I0, -- Logic data input I1 => I1, -- Logic data input I2 => I2, -- Logic data input I3 => I3, -- Logic data input I4 => I4 -- Logic data input ); -- End of CFGLUT5_inst instantiation Verilog Instantiation Template // CFGLUT5: Reconfigurable 5-input LUT (Mapped to a SliceM LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 CFGLUT5 #( .INIT(32'h00000000) // Specify initial LUT contents ) CFGLUT5_inst ( .CDO(CDO), // Reconfiguration cascade output .O5(O5), // 4-LUT output .O6(O6), // 5-LUT output .CDI(CDI), // Reconfiguration data input .CE(CE), // Reconfiguration enable input .CLK(CLK), // Clock input .I0(I0), // Logic data input .I1(I1), // Logic data input .I2(I2), // Logic data input .I3(I3), // Logic data input .I4(I4) // Logic data input ); // End of CFGLUT5_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 108 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements DCIRESET Primitive: Digitally Controlled Impedance Reset Component Introduction This design element is used to reset the Digitally Controlled Impedance (DCI) state machine after configuration has been completed. By toggling the RST input to the DCIRESET primitive while the device is operating, the DCI state-machine is reset and both phases of impedance adjustment proceed in succession. All I/Os using DCI will be unavailable until the LOCKED output from the DCIRESET block is asserted Port Descriptions Port LOCKED Type Output RST Input Width 1 1 Function DCI state-machine LOCK status output. When low, DCI I/O impedance is being calibrated and DCI I/Os are unavailable. Upon a low-to-high assertion, DCI I/Os are available for use. Active-high asynchronous reset input to DCI state-machine. After RST is asserted, I/Os utilizing DCI will be unavailable until LOCKED is asserted. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards No Macro support No VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- DCIRESET: Digitally Controlled Impedance Reset Component -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 DCIRESET_inst : DCIRESET port map ( LOCKED => LOCKED, -- 1-bit output: LOCK status output RST => RST -- 1-bit input: Active-high asynchronous reset input ); -- End of DCIRESET_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 109 Chapter 4: About Design Elements Verilog Instantiation Template // DCIRESET: Digitally Controlled Impedance Reset Component // 7 Series // Xilinx HDL Libraries Guide, version 14.7 DCIRESET DCIRESET_inst ( .LOCKED(LOCKED), // 1-bit output: LOCK status output .RST(RST) // 1-bit input: Active-high asynchronous reset input ); // End of DCIRESET_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 110 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 DNA_PORT Primitive: Device DNA Access Port Chapter 4: About Design Elements Introduction The DNA_PORT allows access to a dedicated shift register that can be loaded with the Device DNA data bits (factory-programmed, read-only unique ID) for a given 7 series device. In addition to shifting out the DNA data bits, this component allows for the inclusion of supplemental bits of your data, or allows for the DNA data to rollover (repeat DNA data after initial data has been shifted out). This component is primarily used in conjunction with other circuitry to build added copy protection for the FPGA bitstream from possible theft. Connect all inputs and outputs to the design to ensure proper operation. To access the Device DNA data, you must first load the shift register by setting the active high READ signal for one clock cycle. After the shift register is loaded, the data can be synchronously shifted out by enabling the active high SHIFT input and capturing the data out the DOUT output port. Additional data can be appended to the end of the 57-bit shift register by connecting the appropriate logic to the DIN port. If DNA data rollover is desired, connect the DOUT port directly to the DIN port to allow for the same data to be shifted out after completing the 57-bit shift operation. If no additional data is necessary, the DIN port can be tied to a logic zero. The attribute SIM_DNA_VALUE can be optionally set to allow for simulation of a possible DNA data sequence. By default, the Device DNA data bits are all zeros in the simulation model. Port Descriptions Port CLK DIN DOUT READ SHIFT Type Input Input Output Input Input Width 1 1 1 1 1 Function Clock input. User data input pin. DNA output data. Active high load DNA, active low read input. Active high shift enable input. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 111 Chapter 4: About Design Elements Available Attributes Attribute SIM_DNA_VALUE Type HEX Allowed Values Any 57–bit HEX number Default All zeros Description Specifies a sample 57-bit DNA value for simulation VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- DNA_PORT: Device DNA Access Port -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 DNA_PORT_inst : DNA_PORT generic map ( SIM_DNA_VALUE => X"000000000000000" -- Specifies a sample 57-bit DNA value for simulation ) port map ( DOUT => DOUT, -- 1-bit output: DNA output data. CLK => CLK, -- 1-bit input: Clock input. DIN => DIN, -- 1-bit input: User data input pin. READ => READ, -- 1-bit input: Active high load DNA, active low read input. SHIFT => SHIFT -- 1-bit input: Active high shift enable input. ); -- End of DNA_PORT_inst instantiation Verilog Instantiation Template // DNA_PORT: Device DNA Access Port // 7 Series // Xilinx HDL Libraries Guide, version 14.7 DNA_PORT #( .SIM_DNA_VALUE(57'h000000000000000) // Specifies a sample 57-bit DNA value for simulation ) DNA_PORT_inst ( .DOUT(DOUT), // 1-bit output: DNA output data. .CLK(CLK), // 1-bit input: Clock input. .DIN(DIN), // 1-bit input: User data input pin. .READ(READ), // 1-bit input: Active high load DNA, active low read input. .SHIFT(SHIFT) // 1-bit input: Active high shift enable input. ); // End of DNA_PORT_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 112 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 DSP48E1 Primitive: 48-bit Multi-Functional Arithmetic Block Chapter 4: About Design Elements Introduction This design element is a versatile, scalable, hard IP block within 7 series devices that allows for the creation of compact, high-speed, arithmetic-intensive operations, such as those seen for many DSP algorithms. Some of the functions capable within the block include multiplication, addition, subtraction, accumulation, shifting, logical operations and pattern detection. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 113 Chapter 4: About Design Elements Port Descriptions Port A<29:0> Type Input ACIN<29:0> ACOUT<29:0> ALUMODE<3:0> B<17:0> BCIN<17:0> BCOUT<17:0> C<47:0> CARRYCASCIN CARRYCASCOUT CARRYIN CARRYINSEL <2:0> Input Output Input Input Input Output Input Input Output Input Input CARRYOUT<3:0> CEAD CEALUMODE Output Input Input Width 30 30 30 4 18 18 18 48 1 1 1 3 4 1 1 Function Data input for preadder, multiplier, adder/subtractor/accumulator, ALU or concatenation operations. When used with the multiplier or preadder, 25 bits of data (A[24:0]) is used and upper bits (A[29:25]) are unused and may be tied to ground. When using the internal adder/subctractor/accumulator or ALU circuit, all 30 bits are used (A[29:0]). When used in concatenation mode, all 30 bits are used and this constitutes the MSB (upper) bits of the concatenated vector. Cascaded data input from ACOUT of previous DSP48E1 slice (muxed with A). If not used, tie port to all zeros. Cascaded data output to ACIN of next DSP48E1 slice. If not used, leave unconnected. Controls the selection of the logic function in the DSP48E1 slice. The B input of the multiplier. B[17:0] are the least significant bits (LSBs) of the A:B concatenated input to the second-stage adder/subtracter or logic function. Cascaded data input from BCOUT of previous DSP48E1 slice (muxed with B). If not used, tie port to all zeros. Cascaded data output to BCIN of next DSP48E1 slice. If not used, leave unconnected. Data input to the second-stage adder/subtracter, pattern detector, or logic function. Cascaded carry input from CARRYCASCOUT of previous DSP48E1 slice. Cascaded carry output to CARRYCASCIN of next DSP48E1 slice. This signal is internally fed back into the CARRYINSEL multiplexer input of the same DSP48E1 slice. Carry input from the FPGA logic. Selects the carry source: • 0 1 1 - PCIN[47] - Rounding PCIN (round towards zero) • 1 0 0 - CARRYCASCOUT - For larger add/sub/acc (sequential operation via internal feedback). Must select with PREG=1 • 1 0 1 - ~P[47] - Rounding P (round towards infinity). Must select with PREG=1 • 1 1 0 - A[24] - XNOR B[17] Rounding A x B • 1 1 1 - P[47] - For rounding P (round towards zero). Must select with PREG=1 4-bit carry output from each 12-bit field of the accumulate/adder/logic unit. Normal 48-bit operation uses only CARRYOUT3. SIMD operation can use four carry out bits (CARRYOUT[3:0]). Active high, clock enable for the pre-adder output AD pipeline register. Tie to logic one if not used and ADREG=1. Tie to logic zero if ADREG=0. Active High, clock enable for ALUMODE (control inputs) registers (ALUMODEREG=1). Tie to logic one if not used. Send Feedback 114 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Port CEA1 CEA2 CEB1 CEB2 CEC CECARRYIN CECTRL CED CEINMODE CEM CEP CLK D<24:0> INMODE<4:0> MULTSIGNIN MULTSIGNOUT OPMODE<6:0> Chapter 4: About Design Elements Type Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Output Input Width 1 1 1 1 1 1 1 1 1 1 1 1 25 5 1 1 7 Function Active high, clock enable for the first A (input) register. This port is only used if AREG=2 or INMODE0 = 1. Tie to logic one if not used and AREG=2. Tie to logic zero if AREG=0 or 1. When two registers are used, this is the first sequentially. When Dynamic AB Access is used, this clock enable is applied for INMODE[0]=1. Active high, clock enable for the second A (input) register. This port is only used if AREG=1 or 2. Tie to logic one if not used and AREG=1 or 2. Tie to logic zero if AREG=0. When two registers are used, this is the second sequentially. When one register is used (AREG=1), CEA2 is the clock enable. Active high, Clock enable for the first B (input) register. This port is only used if BREG=2 or INMODE4=1. Tie to logic one if not used and BREG=2. Tie to logic zero if BREG=0 or 1. When two registers are used, this is the first sequentially. When Dynamic AB Access is used, this clock enable is applied for INMODE[4]=1. Active high, clock enable for the second B (input) register. This port is only used if BREG=1 or 2. Tie to logic one if not used and BREG=1 or 2. Tie to logic zero if BREG=0. When two registers are used, this is the second sequentially. When one register isused (BREG=1), CEB2 is the clock enable. Active High, Clock enable for the C (input) register (CREG=1). Tie to logic one if not used. Active high, clock enable for the CARRYIN (input from fabric) register (CARRYINREG=1). Tie to logic one if not used. Active high, clock enable for the OPMODE and CARRYINSEL (control inputs) registers (OPMODEREG=1 or CARRYINSELREG=1). Tie to logic one if not used. Active high, Clock enable for the D (input) registers (DREG=1). Tie to logic one if not used. Active high, clock enable for the INMODE control input registers (INMODEREG=1). Tie to logic one if not used. Active high, Clock enable for the post-multiply M (pipeline) register and the internal multiply round CARRYIN register (MREG=1). Tie to logic one if not used. Active high, clock enable for the P (output) register (PREG=1). Tie to logic one if not used. This port is the DSP48E1 input clock, common to all internal registers and flip-flops. 25-bit data input to the pre-adder or alternative input to the multiplier. The pre-adder implements D + A as determined by the INMODE3 signal. These five control bits select the functionality of the pre-adder, the A, B, and D inputs, and the input registers. These bits should be tied to all zeroes if not used. Sign of the multiplied result from the previous DSP48E1 slice for MACC extension. Either connect to the MULTSIGNOUT of another DSP block or tie to ground if not used. Sign of the multiplied result cascaded to the next DSP48E1 slice for MACC extension. Either connect to the MULTSIGNIN of another DSP block or tie to ground if not used. Controls the input to the X, Y, and Z multiplexers in the DSP48E1 slice dictating the operation or function of the DSP slice. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 115 Chapter 4: About Design Elements Port OVERFLOW P<47:0> PATTERNBDETECT PATTERNDETECT PCIN<47:0> PCOUT<47:0> RSTA RSTALLCARRYIN RSTALUMODE RSTB RSTC RSTCTRL RSTD RSTINMODE RSTM RSTP UNDERFLOW Type Output Output Output Output Input Output Input Input Input Input Input Input Input Input Input Input Output Width 1 48 1 1 48 48 1 1 1 1 1 1 1 1 1 1 1 Function Active high Overflow indicator when used with the appropriate setting of the pattern detector and PREG=1. Data output from second stage adder/subtracter or logic function. Active high match indicator between P[47:0] and the pattern bar. Active high Match indicator between P[47:0] and the pattern gated by the MASK. Result arrives on the same cycle as P. Cascaded data input from PCOUT of previous DSP48E1 slice to adder. If used, connect to PCOUT of upstream cascaded DSP slice. If not used, tie port to all zeros. Cascaded data output to PCIN of next DSP48E1 slice. If used, connect to PCIN of downstream cascaded DSP slice. If not used, leave unconnected. Active high, synchronous Reset for both A (input) registers (AREG=1 or 2). Tie to logic zero if not used. Active high, synchronous reset for the Carry (internal path) and the CARRYIN registers (CARRYINREG=1). Tie to logic zero if not used. Active high, synchronous Reset for ALUMODE (control inputs) registers (ALUMODEREG=1). Tie to logic zero if not used. Active high, synchronous Reset for both B (input) registers (BREG=1 or 2). Tie to logic zero if not used. Active high, synchronous reset for the C (input) registers (CREG=1). Tie to logic zero if not used. Active High, synchronous reset for OPMODE and CARRYINSEL (control inputs) registers (OPMODEREG=1 and/or CARRYINSELREG=1). Tie to logic zero if not used. Active high, synchronous reset for the D (input) register and for the pre-adder (output) AD pipeline register (DREG=1 and/or ADREG=1). Tie to logic zero if not used. Active high, synchronous reset for the INMODE (control input) registers (INMODEREG=1). Tie to logic zero if not used. Active high, synchronous reset for the M (pipeline) registers (MREG=1). Tie to logic zero if not used. Active high, synchronous reset for the P (output) registers (PREG=1). Tie to logic zero if not used. Active high underflow indicator when used with the appropriate setting of the pattern detector and PREG=1. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended Yes Yes Send Feedback 116 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute ACASCREG Type DECIMAL ADREG A_INPUT DECIMAL STRING ALUMODEREG DECIMAL AREG AUTORESET _PATDET DECIMAL STRING BCASCREG DECIMAL B_INPUT STRING BREG CARRYINREG DECIMAL DECIMAL CARRYINSELREG DECIMAL CREG DREG INMODEREG MASK DECIMAL DECIMAL DECIMAL HEX Allowed Values Default 1, 0, 2 1 1, 0 1 "DIRECT", "CASCADE" "DIRECT" 1, 0 1 1, 0, 2 1 "NO_RESET", "NO_RESET" "RESET_MATCH", "RESET_NOT _MATCH" 1, 0, 2 1 "DIRECT", "CASCADE" 1, 0, 2 1, 0 1, 0 1, 0 1, 0 1, 0 48-bit HEX "DIRECT" 1 1 1 1 1 1 All ones Description In conjunction with AREG, selects the number of A input registers on the A cascade path, ACOUT. This attribute must be equal to or one less than the AREG value: AREG=0: ACASCREG must be 0 AREG=1: ACASCREG must be 1 AREG=2: ACASCREG can be 1 or 2 Selects the number of AD pipeline registers. Set to 1 to use the AD pipeline registers. Selects the input to the A port between parallel input ("DIRECT") or the cascaded input from the previous slice ("CASCADE"). Selects the number of ALUMODE input registers. Set to 1 to register the ALUMODE inputs. Selects the number of A input pipeline registers. Automatically resets the P Register (accumulated value or counter value) on the next clock cycle, if a pattern detect event has occurred on this clock cycle. The "RESET_MATCH" and "RESET_NOT_MATCH" settings distinguish between whether the DSP48E1 slice should cause an auto reset of the P Register on the next cycle: - if the pattern is matched or - whenever the pattern is not matched on the current cycle but was matched on the previous clock cycle. In conjunction with BREG, selects the number of B input registers on the B cascade path, BCOUT. This attribute must be equal to or one less than the BREG value: BREG=0: BCASCREG must be 0 BREG=1: BCASCREG must be 1 BREG=2: BCASCREG can be 1 or 2 Selects the input to the B port between parallel input ("DIRECT") or the cascaded input from the previous slice ("CASCADE"). Selects the number of B input registers. Selects the number of CARRYIN input registers. Set to 1 to register the CARRYIN inputs. Selects the number of CARRYINSEL input registers. Set to 1 to register the CARRYINSEL inputs. Selects the number of C input registers. Set to 1 to register the C inputs. Selects the number of D input registers. Set to 1 to register the D inputs. Selects the number of INMODE input registers. Set to 1 to register the INMODE inputs. This 48-bit value is used to mask out certain bits during a pattern detection. When a MASK bit is set to 1, the corresponding pattern bit is ignored. When a MASK bit is set to 0, the pattern bit is compared. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 117 Chapter 4: About Design Elements Attribute MREG OPMODEREG PATTERN PREG SEL_MASK SEL_PATTERN USE_DPORT USE_MULT USE_PATTERN _DETECT USE_SIMD Type DECIMAL DECIMAL HEX DECIMAL STRING STRING BOOLEAN STRING STRING STRING Allowed Values Default Description 1, 0 1 Selects the number of multiplier output (M) pipeline register stages. Set to 1 to use the M pipeline registers. 1, 0 1 Selects the number of OPMODE input registers. Set to 1 to register the OPMODE inputs. 48-bit HEX All zeros This 48-bit value is used in the pattern detector. 1, 0 1 Selects the number of P output registers. Set to 1 to register the P outputs. The registered outputs will include CARRYOUT, CARRYCASCOUT, MULTSIGNOUT, PATTERNB_DETECT, PATTERN_DETECT, and PCOUT. "MASK", "C", "ROUNDING _MODE1", "ROUNDING _MODE2" "MASK" Selects the mask to be used for the pattern detector. The C and MASK settings are for standard uses of the pattern detector (counter, overflow detection, etc.). ROUNDING_MODE1 (Cbar left shifted by 1) and ROUNDING_MODE2 (C-bar left shifted by 2) select special masks based off of the optionally registered C port. These rounding modes can be used to implement convergent rounding in the DSP48E1 slice using the pattern detector. "PATTERN", "C" "PATTERN" Selects the input source for the pattern field. The input source can either be a 48-bit dynamic C input or a 48-bit static PATTERN attribute field. FALSE, TRUE FALSE Determines whether the pre-adder and the D Port are used or not. "MULTIPLY", "DYNAMIC", "NONE" "MULTIPLY" Selects usage of the multiplier. Set to "NONE" to save power when using only the Adder/Logic Unit. The "DYNAMIC" setting indicates that the user is switching between A*B and A:B operations on the fly and therefore needs to get the worst-case timing of the two paths. "NO_PATDET", "PATDET" "NO_PATDET" Selects whether the pattern detector and related features are used ("PATDET") or not used ("NO_PATDET"). This attribute is used for speed specification and Simulation Model purposes only. "ONE48", "FOUR12", "TWO24" "ONE48" Selects the mode of operation for the adder/subtracter. The attribute setting can be one 48-bit adder mode ("ONE48"), two 24- bit adder mode ("TWO24"), or four 12-bit adder mode ("FOUR12"). Selecting "ONE48" mode is compatible with Virtex-5 DSP48 operation and is not actually a true SIMD mode. Typical Multiply-Add operations are supported when the mode is set to "ONE48". When either "TWO24" or "FOUR12" mode is selected, the multiplier must not be used, and USE_MULT must be set to "NONE". VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; Send Feedback 118 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements -- DSP48E1: 48-bit Multi-Functional Arithmetic Block -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 DSP48E1_inst : DSP48E1 generic map ( -- Feature Control Attributes: Data Path Selection A_INPUT => "DIRECT", -- Selects A input source, "DIRECT" (A port) or "CASCADE" (ACIN port) B_INPUT => "DIRECT", -- Selects B input source, "DIRECT" (B port) or "CASCADE" (BCIN port) USE_DPORT => FALSE, -- Select D port usage (TRUE or FALSE) USE_MULT => "MULTIPLY", -- Select multiplier usage ("MULTIPLY", "DYNAMIC", or "NONE") USE_SIMD => "ONE48", -- SIMD selection ("ONE48", "TWO24", "FOUR12") -- Pattern Detector Attributes: Pattern Detection Configuration AUTORESET_PATDET => "NO_RESET", -- "NO_RESET", "RESET_MATCH", "RESET_NOT_MATCH" MASK => X"3fffffffffff", -- 48-bit mask value for pattern detect (1=ignore) PATTERN => X"000000000000", -- 48-bit pattern match for pattern detect SEL_MASK => "MASK", -- "C", "MASK", "ROUNDING_MODE1", "ROUNDING_MODE2" SEL_PATTERN => "PATTERN", -- Select pattern value ("PATTERN" or "C") USE_PATTERN_DETECT => "NO_PATDET", -- Enable pattern detect ("PATDET" or "NO_PATDET") -- Register Control Attributes: Pipeline Register Configuration ACASCREG => 1, -- Number of pipeline stages between A/ACIN and ACOUT (0, 1 or 2) ADREG => 1, -- Number of pipeline stages for pre-adder (0 or 1) ALUMODEREG => 1, -- Number of pipeline stages for ALUMODE (0 or 1) AREG => 1, -- Number of pipeline stages for A (0, 1 or 2) BCASCREG => 1, -- Number of pipeline stages between B/BCIN and BCOUT (0, 1 or 2) BREG => 1, -- Number of pipeline stages for B (0, 1 or 2) CARRYINREG => 1, -- Number of pipeline stages for CARRYIN (0 or 1) CARRYINSELREG => 1, -- Number of pipeline stages for CARRYINSEL (0 or 1) CREG => 1, -- Number of pipeline stages for C (0 or 1) DREG => 1, -- Number of pipeline stages for D (0 or 1) INMODEREG => 1, -- Number of pipeline stages for INMODE (0 or 1) MREG => 1, -- Number of multiplier pipeline stages (0 or 1) OPMODEREG => 1, -- Number of pipeline stages for OPMODE (0 or 1) PREG => 1 -- Number of pipeline stages for P (0 or 1) ) port map ( -- Cascade: 30-bit (each) output: Cascade Ports ACOUT => ACOUT, -- 30-bit output: A port cascade output BCOUT => BCOUT, -- 18-bit output: B port cascade output CARRYCASCOUT => CARRYCASCOUT, -- 1-bit output: Cascade carry output MULTSIGNOUT => MULTSIGNOUT, -- 1-bit output: Multiplier sign cascade output PCOUT => PCOUT, -- 48-bit output: Cascade output -- Control: 1-bit (each) output: Control Inputs/Status Bits OVERFLOW => OVERFLOW, -- 1-bit output: Overflow in add/acc output PATTERNBDETECT => PATTERNBDETECT, -- 1-bit output: Pattern bar detect output PATTERNDETECT => PATTERNDETECT, -- 1-bit output: Pattern detect output UNDERFLOW => UNDERFLOW, -- 1-bit output: Underflow in add/acc output -- Data: 4-bit (each) output: Data Ports CARRYOUT => CARRYOUT, -- 4-bit output: Carry output P => P, -- 48-bit output: Primary data output -- Cascade: 30-bit (each) input: Cascade Ports ACIN => ACIN, -- 30-bit input: A cascade data input BCIN => BCIN, -- 18-bit input: B cascade input CARRYCASCIN => CARRYCASCIN, -- 1-bit input: Cascade carry input MULTSIGNIN => MULTSIGNIN, -- 1-bit input: Multiplier sign input PCIN => PCIN, -- 48-bit input: P cascade input -- Control: 4-bit (each) input: Control Inputs/Status Bits ALUMODE => ALUMODE, -- 4-bit input: ALU control input CARRYINSEL => CARRYINSEL, -- 3-bit input: Carry select input CLK => CLK, -- 1-bit input: Clock input INMODE => INMODE, -- 5-bit input: INMODE control input OPMODE => OPMODE, -- 7-bit input: Operation mode input -- Data: 30-bit (each) input: Data Ports A => A, -- 30-bit input: A data input B => B, -- 18-bit input: B data input C => C, -- 48-bit input: C data input CARRYIN => CARRYIN, -- 1-bit input: Carry input signal D => D, -- 25-bit input: D data input -- Reset/Clock Enable: 1-bit (each) input: Reset/Clock Enable Inputs CEA1 => CEA1, -- 1-bit input: Clock enable input for 1st stage AREG CEA2 => CEA2, -- 1-bit input: Clock enable input for 2nd stage AREG CEAD => CEAD, -- 1-bit input: Clock enable input for ADREG Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 119 Chapter 4: About Design Elements CEALUMODE => CEALUMODE, CEB1 => CEB1, CEB2 => CEB2, CEC => CEC, CECARRYIN => CECARRYIN, CECTRL => CECTRL, CED => CED, CEINMODE => CEINMODE, CEM => CEM, CEP => CEP, RSTA => RSTA, RSTALLCARRYIN => RSTALLCARRYIN, RSTALUMODE => RSTALUMODE, RSTB => RSTB, RSTC => RSTC, RSTCTRL => RSTCTRL, RSTD => RSTD, RSTINMODE => RSTINMODE, RSTM => RSTM, RSTP => RSTP ); -- 1-bit input: Clock enable input for ALUMODE -- 1-bit input: Clock enable input for 1st stage BREG -- 1-bit input: Clock enable input for 2nd stage BREG -- 1-bit input: Clock enable input for CREG -- 1-bit input: Clock enable input for CARRYINREG -- 1-bit input: Clock enable input for OPMODEREG and CARRYINSELREG -- 1-bit input: Clock enable input for DREG -- 1-bit input: Clock enable input for INMODEREG -- 1-bit input: Clock enable input for MREG -- 1-bit input: Clock enable input for PREG -- 1-bit input: Reset input for AREG -- 1-bit input: Reset input for CARRYINREG -- 1-bit input: Reset input for ALUMODEREG -- 1-bit input: Reset input for BREG -- 1-bit input: Reset input for CREG -- 1-bit input: Reset input for OPMODEREG and CARRYINSELREG -- 1-bit input: Reset input for DREG and ADREG -- 1-bit input: Reset input for INMODEREG -- 1-bit input: Reset input for MREG -- 1-bit input: Reset input for PREG -- End of DSP48E1_inst instantiation Verilog Instantiation Template // DSP48E1: 48-bit Multi-Functional Arithmetic Block // 7 Series // Xilinx HDL Libraries Guide, version 14.7 DSP48E1 #( // Feature Control Attributes: Data Path Selection .A_INPUT("DIRECT"), // Selects A input source, "DIRECT" (A port) or "CASCADE" (ACIN port) .B_INPUT("DIRECT"), // Selects B input source, "DIRECT" (B port) or "CASCADE" (BCIN port) .USE_DPORT("FALSE"), // Select D port usage (TRUE or FALSE) .USE_MULT("MULTIPLY"), // Select multiplier usage ("MULTIPLY", "DYNAMIC", or "NONE") .USE_SIMD("ONE48"), // SIMD selection ("ONE48", "TWO24", "FOUR12") // Pattern Detector Attributes: Pattern Detection Configuration .AUTORESET_PATDET("NO_RESET"), // "NO_RESET", "RESET_MATCH", "RESET_NOT_MATCH" .MASK(48'h3fffffffffff), // 48-bit mask value for pattern detect (1=ignore) .PATTERN(48'h000000000000), // 48-bit pattern match for pattern detect .SEL_MASK("MASK"), // "C", "MASK", "ROUNDING_MODE1", "ROUNDING_MODE2" .SEL_PATTERN("PATTERN"), // Select pattern value ("PATTERN" or "C") .USE_PATTERN_DETECT("NO_PATDET"), // Enable pattern detect ("PATDET" or "NO_PATDET") // Register Control Attributes: Pipeline Register Configuration .ACASCREG(1), // Number of pipeline stages between A/ACIN and ACOUT (0, 1 or 2) .ADREG(1), // Number of pipeline stages for pre-adder (0 or 1) .ALUMODEREG(1), // Number of pipeline stages for ALUMODE (0 or 1) .AREG(1), // Number of pipeline stages for A (0, 1 or 2) .BCASCREG(1), // Number of pipeline stages between B/BCIN and BCOUT (0, 1 or 2) .BREG(1), // Number of pipeline stages for B (0, 1 or 2) .CARRYINREG(1), // Number of pipeline stages for CARRYIN (0 or 1) .CARRYINSELREG(1), // Number of pipeline stages for CARRYINSEL (0 or 1) .CREG(1), // Number of pipeline stages for C (0 or 1) .DREG(1), // Number of pipeline stages for D (0 or 1) .INMODEREG(1), // Number of pipeline stages for INMODE (0 or 1) .MREG(1), // Number of multiplier pipeline stages (0 or 1) .OPMODEREG(1), // Number of pipeline stages for OPMODE (0 or 1) .PREG(1) // Number of pipeline stages for P (0 or 1) ) DSP48E1_inst ( // Cascade: 30-bit (each) output: Cascade Ports .ACOUT(ACOUT), // 30-bit output: A port cascade output .BCOUT(BCOUT), // 18-bit output: B port cascade output .CARRYCASCOUT(CARRYCASCOUT), // 1-bit output: Cascade carry output .MULTSIGNOUT(MULTSIGNOUT), // 1-bit output: Multiplier sign cascade output .PCOUT(PCOUT), // 48-bit output: Cascade output // Control: 1-bit (each) output: Control Inputs/Status Bits .OVERFLOW(OVERFLOW), // 1-bit output: Overflow in add/acc output .PATTERNBDETECT(PATTERNBDETECT), // 1-bit output: Pattern bar detect output .PATTERNDETECT(PATTERNDETECT), // 1-bit output: Pattern detect output Send Feedback 120 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements .UNDERFLOW(UNDERFLOW), // 1-bit output: Underflow in add/acc output // Data: 4-bit (each) output: Data Ports .CARRYOUT(CARRYOUT), // 4-bit output: Carry output .P(P), // 48-bit output: Primary data output // Cascade: 30-bit (each) input: Cascade Ports .ACIN(ACIN), // 30-bit input: A cascade data input .BCIN(BCIN), // 18-bit input: B cascade input .CARRYCASCIN(CARRYCASCIN), // 1-bit input: Cascade carry input .MULTSIGNIN(MULTSIGNIN), // 1-bit input: Multiplier sign input .PCIN(PCIN), // 48-bit input: P cascade input // Control: 4-bit (each) input: Control Inputs/Status Bits .ALUMODE(ALUMODE), // 4-bit input: ALU control input .CARRYINSEL(CARRYINSEL), // 3-bit input: Carry select input .CLK(CLK), // 1-bit input: Clock input .INMODE(INMODE), // 5-bit input: INMODE control input .OPMODE(OPMODE), // 7-bit input: Operation mode input // Data: 30-bit (each) input: Data Ports .A(A), // 30-bit input: A data input .B(B), // 18-bit input: B data input .C(C), // 48-bit input: C data input .CARRYIN(CARRYIN), // 1-bit input: Carry input signal .D(D), // 25-bit input: D data input // Reset/Clock Enable: 1-bit (each) input: Reset/Clock Enable Inputs .CEA1(CEA1), // 1-bit input: Clock enable input for 1st stage AREG .CEA2(CEA2), // 1-bit input: Clock enable input for 2nd stage AREG .CEAD(CEAD), // 1-bit input: Clock enable input for ADREG .CEALUMODE(CEALUMODE), // 1-bit input: Clock enable input for ALUMODE .CEB1(CEB1), // 1-bit input: Clock enable input for 1st stage BREG .CEB2(CEB2), // 1-bit input: Clock enable input for 2nd stage BREG .CEC(CEC), // 1-bit input: Clock enable input for CREG .CECARRYIN(CECARRYIN), // 1-bit input: Clock enable input for CARRYINREG .CECTRL(CECTRL), // 1-bit input: Clock enable input for OPMODEREG and CARRYINSELREG .CED(CED), // 1-bit input: Clock enable input for DREG .CEINMODE(CEINMODE), // 1-bit input: Clock enable input for INMODEREG .CEM(CEM), // 1-bit input: Clock enable input for MREG .CEP(CEP), // 1-bit input: Clock enable input for PREG .RSTA(RSTA), // 1-bit input: Reset input for AREG .RSTALLCARRYIN(RSTALLCARRYIN), // 1-bit input: Reset input for CARRYINREG .RSTALUMODE(RSTALUMODE), // 1-bit input: Reset input for ALUMODEREG .RSTB(RSTB), // 1-bit input: Reset input for BREG .RSTC(RSTC), // 1-bit input: Reset input for CREG .RSTCTRL(RSTCTRL), // 1-bit input: Reset input for OPMODEREG and CARRYINSELREG .RSTD(RSTD), // 1-bit input: Reset input for DREG and ADREG .RSTINMODE(RSTINMODE), // 1-bit input: Reset input for INMODEREG .RSTM(RSTM), // 1-bit input: Reset input for MREG .RSTP(RSTP) // 1-bit input: Reset input for PREG ); // End of DSP48E1_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 121 Chapter 4: About Design Elements EFUSE_USR Primitive: 32-bit non-volatile design ID Introduction Provides internal access to the 32 non-volatile, user-programmable eFUSE bits Port Descriptions Port EFUSEUSR<31:0> Type Output Width 32 Function User eFUSE register value output Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Available Attributes Attribute Type SIM_EFUSE _VALUE HEX Allowed Values 32'h00000000 to 32'hffffffff Default 32'h00000000 Description Value of the 32-bit non-volatile value used in simulation VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- EFUSE_USR: 32-bit non-volatile design ID -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 EFUSE_USR_inst : EFUSE_USR generic map ( SIM_EFUSE_VALUE => X"00000000" -- Value of the 32-bit non-volatile value used in simulation ) port map ( EFUSEUSR => EFUSEUSR -- 32-bit output: User eFUSE register value output ); -- End of EFUSE_USR_inst instantiation Send Feedback 122 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // EFUSE_USR: 32-bit non-volatile design ID // 7 Series // Xilinx HDL Libraries Guide, version 14.7 EFUSE_USR #( .SIM_EFUSE_VALUE(32'h00000000) // Value of the 32-bit non-volatile value used in simulation ) EFUSE_USR_inst ( .EFUSEUSR(EFUSEUSR) // 32-bit output: User eFUSE register value output ); // End of EFUSE_USR_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 123 Chapter 4: About Design Elements FDCE Primitive: D Flip-Flop with Clock Enable and Asynchronous Clear Introduction This design element is a single D-type flip-flop with clock enable and asynchronous clear. When clock enable (CE) is High and asynchronous clear (CLR) is Low, the data on the data input (D) of this design element is transferred to the corresponding data output (Q) during the Low-to-High clock (C) transition. When CLR is High, it overrides all other inputs and resets the data output (Q) Low. When CE is Low, clock transitions are ignored. This flip-flop is asynchronously cleared, outputs Low, when power is applied. For FPGA devices, power-on conditions are simulated when global set/reset (GSR) is active. GSR defaults to active-High but can be inverted by adding an inverter in front of the GSR input of the STARTUP_E2 symbol. Logic Table Inputs Outputs CLR CE D C Q 1 X X X 0 0 0 X X No Change 0 1 D ↑ D Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Binary Allowed Values 1, 0 Default 0 Description Sets the initial value of Q output after configuration. Send Feedback 124 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- FDCE: Single Data Rate D Flip-Flop with Asynchronous Clear and -- Clock Enable (posedge clk). -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 FDCE_inst : FDCE generic map ( INIT => '0') -- Initial value of register ('0' or '1') port map ( Q => Q, -- Data output C => C, -- Clock input CE => CE, -- Clock enable input CLR => CLR, -- Asynchronous clear input D => D -- Data input ); -- End of FDCE_inst instantiation Verilog Instantiation Template // FDCE: Single Data Rate D Flip-Flop with Asynchronous Clear and // Clock Enable (posedge clk). // 7 Series // Xilinx HDL Libraries Guide, version 14.7 FDCE #( .INIT(1'b0) // Initial value of register (1'b0 or 1'b1) ) FDCE_inst ( .Q(Q), // 1-bit Data output .C(C), // 1-bit Clock input .CE(CE), // 1-bit Clock enable input .CLR(CLR), // 1-bit Asynchronous clear input .D(D) // 1-bit Data input ); // End of FDCE_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 125 Chapter 4: About Design Elements FDPE Primitive: D Flip-Flop with Clock Enable and Asynchronous Preset Introduction This design element is a single D-type flip-flop with data (D), clock enable (CE), and asynchronous preset (PRE) inputs and data output (Q). The asynchronous PRE, when High, overrides all other inputs and sets the (Q) output High. Data on the (D) input is loaded into the flip-flop when PRE is Low and CE is High on the Low-to-High clock (C) transition. When CE is Low, the clock transitions are ignored. For FPGA devices, this flip-flop is asynchronously preset, output High, when power is applied. Power-on conditions are simulated when global set/reset (GSR) is active. GSR defaults to active-High but can be inverted by adding an inverter in front of the GSR input of the STARTUP_E2 symbol. Logic Table Inputs Outputs PRE CE D C Q 1 X X X 1 0 0 X X No Change 0 1 D ↑ D Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Binary Allowed Values 0, 1 Default 1 Description Sets the initial value of Q output after configuration Send Feedback 126 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- FDPE: Single Data Rate D Flip-Flop with Asynchronous Preset and -- Clock Enable (posedge clk). -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 FDPE_inst : FDPE generic map ( INIT => '0') -- Initial value of register ('0' or '1') port map ( Q => Q, -- Data output C => C, -- Clock input CE => CE, -- Clock enable input PRE => PRE, -- Asynchronous preset input D => D -- Data input ); -- End of FDPE_inst instantiation Verilog Instantiation Template // FDPE: Single Data Rate D Flip-Flop with Asynchronous Preset and // Clock Enable (posedge clk). // 7 Series // Xilinx HDL Libraries Guide, version 14.7 FDPE #( .INIT(1'b0) // Initial value of register (1'b0 or 1'b1) ) FDPE_inst ( .Q(Q), // 1-bit Data output .C(C), // 1-bit Clock input .CE(CE), // 1-bit Clock enable input .PRE(PRE), // 1-bit Asynchronous preset input .D(D) // 1-bit Data input ); // End of FDPE_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 127 Chapter 4: About Design Elements FDRE Primitive: D Flip-Flop with Clock Enable and Synchronous Reset Introduction This design element is a single D-type flip-flop with data (D), clock enable (CE), and synchronous reset (R) inputs and data output (Q). The synchronous reset (R) input, when High, overrides all other inputs and resets the (Q) output Low on the Low-to-High clock (C) transition. The data on the (D) input is loaded into the flip-flop when R is Low and CE is High during the Low-to-High clock transition. This flip-flop is asynchronously cleared, outputs Low, when power is applied. For FPGA devices, power-on conditions are simulated when global set/reset (GSR) is active. GSR defaults to active-High but can be inverted by adding an inverter in front of the GSR input of the STARTUP_E2 symbol. Logic Table Inputs Outputs R CE D C Q 1 X X ↑ 0 0 0 X X No Change 0 1 D ↑ D Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Binary Allowed Values 0, 1 Default 0 Description Sets the initial value of Q output after configuration Send Feedback 128 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- FDRE: Single Data Rate D Flip-Flop with Synchronous Reset and -- Clock Enable (posedge clk). -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 FDRE_inst : FDRE generic map ( INIT => '0') -- Initial value of register ('0' or '1') port map ( Q => Q, -- Data output C => C, -- Clock input CE => CE, -- Clock enable input R => R, -- Synchronous reset input D => D -- Data input ); -- End of FDRE_inst instantiation Verilog Instantiation Template // FDRE: Single Data Rate D Flip-Flop with Synchronous Reset and // Clock Enable (posedge clk). // 7 Series // Xilinx HDL Libraries Guide, version 14.7 FDRE #( .INIT(1'b0) // Initial value of register (1'b0 or 1'b1) ) FDRE_inst ( .Q(Q), // 1-bit Data output .C(C), // 1-bit Clock input .CE(CE), // 1-bit Clock enable input .R(R), // 1-bit Synchronous reset input .D(D) // 1-bit Data input ); // End of FDRE_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 129 Chapter 4: About Design Elements FDSE Primitive: D Flip-Flop with Clock Enable and Synchronous Set Introduction FDSE is a single D-type flip-flop with data (D), clock enable (CE), and synchronous set (S) inputs and data output (Q). The synchronous set (S) input, when High, overrides the clock enable (CE) input and sets the Q output High during the Low-to-High clock (C) transition. The data on the D input is loaded into the flip-flop when S is Low and CE is High during the Low-to-High clock (C) transition. For FPGA devices, this flip-flop is asynchronously preset, output High, when power is applied. Power-on conditions are simulated when global set/reset (GSR) is active. GSR defaults to active-High but can be inverted by adding an inverter in front of the GSR input of the STARTUP_E2 symbol. Logic Table Inputs Outputs S CE D C Q 1 X X ↑ 1 0 0 X X No Change 0 1 D ↑ D Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Binary Allowed Values 0, 1 Default 1 Description Sets the initial value of Q output after configuration Send Feedback 130 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- FDSE: Single Data Rate D Flip-Flop with Synchronous Set and -- Clock Enable (posedge clk). -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 FDSE_inst : FDSE generic map ( INIT => '0') -- Initial value of register ('0' or '1') port map ( Q => Q, -- Data output C => C, -- Clock input CE => CE, -- Clock enable input S => S, -- Synchronous Set input D => D -- Data input ); -- End of FDSE_inst instantiation Verilog Instantiation Template // FDSE: Single Data Rate D Flip-Flop with Synchronous Set and // Clock Enable (posedge clk). // 7 Series // Xilinx HDL Libraries Guide, version 14.7 FDSE #( .INIT(1'b0) // Initial value of register (1'b0 or 1'b1) ) FDSE_inst ( .Q(Q), // 1-bit Data output .C(C), // 1-bit Clock input .CE(CE), // 1-bit Clock enable input .S(S), // 1-bit Synchronous set input .D(D) // 1-bit Data input ); // End of FDSE_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 131 Chapter 4: About Design Elements FIFO18E1 Primitive: 18Kb FIFO (First-In-First-Out) Block RAM Memory Introduction 7 series devices contain several block RAM memories, each of which can be separately configured as a FIFO, an automatic error-correction RAM, or as a general-purpose 36Kb or 18Kb RAM/ROM memory. These Block RAM memories offer fast and flexible storage of large amounts of on-chip data. The FIFO18E1 uses the FIFO control logic and the 18Kb Block RAM. This primitive can be used in a 4-bit wide by 4K deep, 9-bit wide by 2K deep, 18-bit wide by 1K deep, or a 36-bit wide by 512 deep configuration. The primitive can be configured in either synchronous or dual-clock (asynchronous) mode, with all associated FIFO flags and status signals. When using the dual-clock mode with independent clocks, depending on the offset between read and write clock edges, the Empty, Almost Empty, Full and Almost Full flags can deassert one cycle later. Due to the asynchronous nature of the clocks the simulation model only reflects the deassertion latency cycles listed in the User Guide. Note For a 36-bit wide by 512 deep FIFO, the "FIFO18_36" mode must be used. For deeper or wider configurations of the FIFO, the FIFO36E1 can be used. If error-correction circuitry is desired, the FIFO36E1 with "FIFO36_72" mode must be used. Port Descriptions Port ALMOSTEMPTY Type Output ALMOSTFULL Output DI<31:0> DIP<3:0> DO<31:0> DOP<3:0> Input Input Output Output Width 1 1 32 4 32 4 Function Programmable flag to indicate the FIFO is almost empty. The ALMOST_EMPTY_OFFSET attribute specifies the threshold where this flag is triggered relative to full/empty. Programmable flag to indicate that the FIFO is almost full. The ALMOST_FULL_OFFSET attribute specifies the threshold where this flag is triggered relative to full/empty. FIFO data input bus. FIFO parity data input bus. FIFO data output bus. FIFO parity data output bus. Send Feedback 132 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port EMPTY FULL RDCLK RDCOUNT<11:0> RDEN RDERR REGCE RST RSTREG WRCLK WRCOUNT<11:0> WREN WRERR Type Output Output Input Output Input Output Input Input Input Input Output Input Output Width 1 1 1 12 1 1 1 1 1 1 12 1 1 Function Active high logic to indicate that the FIFO is currently empty. Active high logic indicates that the FIFO is full. Rising edge read clock. Read count. Active high FIFO read enable. Read error occurred. Output register clock enable for pipelined synchronous FIFO. DO_REG must be set to 1 if using this enable. Active high (FIFO logic) asynchronous reset (for dual-clock FIFO), synchronous reset (for synchronous FIFO). Must be held for a minimum of 5 WRCLK/RDCLK cycles. Output register synchronous set/reset. DO_REG must be set to 1 if using this reset. Rising edge write clock. Write count. Active high FIFO write enable. Write error occurred. When the FIFO is full, any additional write operation generates an error flag. Synchronous with WRCLK. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes No Yes Recommended Available Attributes Attribute ALMOST_EMPTY _OFFSET Type HEX Allowed Values Default 13'h0000 to 13'h1fff 13'h0080 ALMOST_FULL _OFFSET HEX 13'h0000 to 13'h1fff 13'h0080 DATA_WIDTH DECIMAL 4, 9, 18, 36 4 DO_REG EN_SYN DECIMAL 1, 0 BOOLEAN FALSE, TRUE 1 FALSE Description Specifies the amount of data contents in the RAM to trigger the ALMOST_EMPTY flag. Specifies the amount of data contents in the RAM to trigger the ALMOST_FULL flag. Specifies the desired data width for the FIFO. Note If set to 36, FIFO_MODE must be set to FIFO18_36. Data pipeline register for EN_SYN. EN_SYN denotes whether the FIFO is operating in either dual-clock (two independent clocks) or synchronous (a Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 133 Chapter 4: About Design Elements Attribute Type Allowed Values Default FIFO_MODE FIRST_WORD_FALL _THROUGH INIT SIM_DEVICE STRING "FIFO18", "FIFO18_36" BOOLEAN FALSE, TRUE HEX STRING 36 bit HEX "7SERIES" "FIFO18" FALSE All zeros ""7SERIES"" SRVAL HEX 36 bit HEX All zeros Description single clock) mode. Dual-clock must use DO_REG=1. Selects "FIFO18" or "FIFO18_36" mode. If set to "FIFO18_36", DATA_WIDTH must be set to 36. If TRUE, the first write to the FIFO will appear on DO without a first RDEN assertion. Specifies the initial value on the DO output after configuration. Must be set to "7SERIES" in order to exhibit proper simulation behavior under all conditions. Specifies the output value of the FIFO upon assertion of the synchronous reset (RSTREG) signal. Only valid for DO_REG=1. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- FIFO18E1: 18Kb FIFO (First-In-First-Out) Block RAM Memory -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 FIFO18E1_inst : FIFO18E1 generic map ( ALMOST_EMPTY_OFFSET => X"0080", -- Sets the almost empty threshold ALMOST_FULL_OFFSET => X"0080", -- Sets almost full threshold DATA_WIDTH => 4, -- Sets data width to 4-36 DO_REG => 1, -- Enable output register (1-0) Must be 1 if EN_SYN = FALSE EN_SYN => FALSE, -- Specifies FIFO as dual-clock (FALSE) or Synchronous (TRUE) FIFO_MODE => "FIFO18", -- Sets mode to FIFO18 or FIFO18_36 FIRST_WORD_FALL_THROUGH => FALSE, -- Sets the FIFO FWFT to FALSE, TRUE INIT => X"000000000", -- Initial values on output port SIM_DEVICE => "7SERIES", -- Must be set to "7SERIES" for simulation behavior SRVAL => X"000000000" -- Set/Reset value for output port ) port map ( -- Read Data: 32-bit (each) output: Read output data DO => DO, -- 32-bit output: Data output DOP => DOP, -- 4-bit output: Parity data output -- Status: 1-bit (each) output: Flags and other FIFO status outputs ALMOSTEMPTY => ALMOSTEMPTY, -- 1-bit output: Almost empty flag ALMOSTFULL => ALMOSTFULL, -- 1-bit output: Almost full flag EMPTY => EMPTY, -- 1-bit output: Empty flag FULL => FULL, -- 1-bit output: Full flag RDCOUNT => RDCOUNT, -- 12-bit output: Read count RDERR => RDERR, -- 1-bit output: Read error WRCOUNT => WRCOUNT, -- 12-bit output: Write count WRERR => WRERR, -- 1-bit output: Write error -- Read Control Signals: 1-bit (each) input: Read clock, enable and reset input signals RDCLK => RDCLK, -- 1-bit input: Read clock RDEN => RDEN, -- 1-bit input: Read enable REGCE => REGCE, -- 1-bit input: Clock enable RST => RST, -- 1-bit input: Asynchronous Reset RSTREG => RSTREG, -- 1-bit input: Output register set/reset -- Write Control Signals: 1-bit (each) input: Write clock and enable input signals WRCLK => WRCLK, -- 1-bit input: Write clock Send Feedback 134 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements WREN => WREN, -- 1-bit input: Write enable -- Write Data: 32-bit (each) input: Write input data DI => DI, -- 32-bit input: Data input DIP => DIP -- 4-bit input: Parity input ); -- End of FIFO18E1_inst instantiation Verilog Instantiation Template // FIFO18E1: 18Kb FIFO (First-In-First-Out) Block RAM Memory // 7 Series // Xilinx HDL Libraries Guide, version 14.7 FIFO18E1 #( .ALMOST_EMPTY_OFFSET(13'h0080), // Sets the almost empty threshold .ALMOST_FULL_OFFSET(13'h0080), // Sets almost full threshold .DATA_WIDTH(4), // Sets data width to 4-36 .DO_REG(1), // Enable output register (1-0) Must be 1 if EN_SYN = FALSE .EN_SYN("FALSE"), // Specifies FIFO as dual-clock (FALSE) or Synchronous (TRUE) .FIFO_MODE("FIFO18"), // Sets mode to FIFO18 or FIFO18_36 .FIRST_WORD_FALL_THROUGH("FALSE"), // Sets the FIFO FWFT to FALSE, TRUE .INIT(36'h000000000), // Initial values on output port .SIM_DEVICE("7SERIES"), // Must be set to "7SERIES" for simulation behavior .SRVAL(36'h000000000) // Set/Reset value for output port ) FIFO18E1_inst ( // Read Data: 32-bit (each) output: Read output data .DO(DO), // 32-bit output: Data output .DOP(DOP), // 4-bit output: Parity data output // Status: 1-bit (each) output: Flags and other FIFO status outputs .ALMOSTEMPTY(ALMOSTEMPTY), // 1-bit output: Almost empty flag .ALMOSTFULL(ALMOSTFULL), // 1-bit output: Almost full flag .EMPTY(EMPTY), // 1-bit output: Empty flag .FULL(FULL), // 1-bit output: Full flag .RDCOUNT(RDCOUNT), // 12-bit output: Read count .RDERR(RDERR), // 1-bit output: Read error .WRCOUNT(WRCOUNT), // 12-bit output: Write count .WRERR(WRERR), // 1-bit output: Write error // Read Control Signals: 1-bit (each) input: Read clock, enable and reset input signals .RDCLK(RDCLK), // 1-bit input: Read clock .RDEN(RDEN), // 1-bit input: Read enable .REGCE(REGCE), // 1-bit input: Clock enable .RST(RST), // 1-bit input: Asynchronous Reset .RSTREG(RSTREG), // 1-bit input: Output register set/reset // Write Control Signals: 1-bit (each) input: Write clock and enable input signals .WRCLK(WRCLK), // 1-bit input: Write clock .WREN(WREN), // 1-bit input: Write enable // Write Data: 32-bit (each) input: Write input data .DI(DI), // 32-bit input: Data input .DIP(DIP) // 4-bit input: Parity input ); // End of FIFO18E1_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 135 Chapter 4: About Design Elements FIFO36E1 Primitive: 36Kb FIFO (First-In-First-Out) Block RAM Memory Introduction 7 series devices contain several block RAM memories that can be configured as FIFOs, automatic error-correction RAM, or general-purpose 36Kb or 18Kb RAM/ROM memories. These Block RAM memories offer fast and flexible storage of large amounts of on-chip data. The FIFO36E1 allows access to the Block RAM in the 36Kb FIFO configurations. This component can be configured and used as a 4-bit wide by 8K deep, 9-bit by 4K deep, 18-bit by 2K deep, 36-bit wide by 1K deep, or 72-bit wide by 512 deep synchronous or dual-clock (asynchronous) FIFO RAM with all associated FIFO flags. When using the dual-clock mode with independent clocks, depending on the offset between read and write clock edges, the Empty, Almost Empty, Full and Almost Full flags can deassert one cycle later. Due to the asynchronous nature of the clocks the simulation model only reflects the deassertion latency cycles listed in the User Guide. Note For a 72-bit wide by 512 deep FIFO, the "FIFO36_72" mode must be used. For smaller configurations of the FIFO, the FIFO18E1 can be used. If error-correction circuitry is desired, the "FIFO36_72" mode must be used. Port Descriptions Port ALMOSTEMPTY Type Output ALMOSTFULL Output DBITERR Output Width 1 1 1 Function Programmable flag to indicate the FIFO is almost empty. The ALMOST_EMPTY_OFFSET attribute specifies where to trigger this flag. Programmable flag to indicate the FIFO is almost full. The ALMOST_FULL_OFFSET attribute specifies where to trigger this flag. Status output from ECC function to indicate a double bit error was detected. EN_ECC_READ needs to be TRUE in order to use this functionality. Send Feedback 136 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Port DI<63:0> DIP<7:0> DO<63:0> DOP<7:0> ECCPARITY<7:0> EMPTY FULL INJECTDBITERR INJECTSBITERR RDCLK RDCOUNT<12:0> RDEN RDERR REGCE RST RSTREG SBITERR WRCLK WRCOUNT<12:0> WREN WRERR Type Input Input Output Output Output Output Output Input Input Input Output Input Output Input Input Input Output Input Output Input Output Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Chapter 4: About Design Elements Width 64 8 64 8 8 1 1 1 1 1 13 1 1 1 1 1 1 1 13 1 1 Function FIFO data input bus. FIFO parity data input bus. FIFO data output bus. FIFO parity data output bus. 8-bit data generated by the ECC encoder used by the ECC decoder for memory error detection and correction. Active high logic to indicate that the FIFO is currently empty. Active high logic indicates that the FIFO is full. Inject a double bit error if ECC feature is used. Inject a single bit error if ECC feature is used. Rising edge read clock. Read count. Active high FIFO read enable. Read error occurred. Output register clock enable for pipelined synchronous FIFO. DO_REG must be 1 to use this enable. Active high (FIFO logic) asynchronous reset (for dual-clock FIFO), synchronous reset (synchronous FIFO) for 5 CLK cycles. Output register synchronous set/reset. DO_REG must be 1 to use this reset. Status output from ECC function to indicate a single bit error was detected. EN_ECC_READ needs to be TRUE in order to use this functionality. Write clock and enable input signals Write count. Active high FIFO write enable. Write error occurred. When the FIFO is full, any additional write operation generates an error flag. Synchronous with WRCLK. Yes No Yes Recommended Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 137 Chapter 4: About Design Elements Available Attributes Attribute Type ALMOST_EMPTY _OFFSET HEX ALMOST_FULL _OFFSET HEX DATA_WIDTH DECIMAL DO_REG DECIMAL EN_ECC_READ EN_ECC_WRITE EN_SYN BOOLEAN BOOLEAN BOOLEAN FIFO_MODE STRING FIRST_WORD_FALL _THROUGH INIT SIM_DEVICE SRVAL BOOLEAN HEX STRING HEX Allowed Values 13'h0000 to 13'h1fff 13'h0000 to 13'h1fff 4, 9, 18, 36, 72 1, 0 FALSE, TRUE FALSE, TRUE FALSE, TRUE "FIFO36", "FIFO36_72" FALSE, TRUE 72 bit HEX "7SERIES" 72 bit HEX Default Description 13'h0080 Specifies the amount of data contents in the RAM to trigger the ALMOST_EMPTY flag. 13'h0080 Specifies the amount of data contents in the RAM to trigger the ALMOST_FULL flag. 4 Specifies the desired data width for the FIFO. For data widths of 72, FIFO_MODE must be set to "FIFO36_72" 1 Enable output register to the FIFO for improved clock-to-out timing at the expense of added read latency (one pipeline delay). DO_REG must be 1 when EN_SYN is set to FALSE. FALSE Enable the ECC decoder circuitry. FALSE Enable the ECC encoder circuitry. FALSE When FALSE, specifies the FIFO to be used in asynchronous mode (two independent clock) or when TRUE in synchronous (a single clock) operation. "FIFO36" Selects regular "FIFO36" or the wide "FIFO36_72" mode. If set to "FIFO36_72", the DATA_WIDTH attribute has to be 72. FALSE If TRUE, the first write to the FIFO will appear on DO without an RDEN assertion. All zeros Specifies the initial value on the DO output after configuration. ""7SERIES"" Must be set to "7SERIES" in order to exhibit proper simulation behavior under all conditions. All zeros Specifies the output value of the FIFO upon assertion of the synchronous reset (RSTREG) signal. Only valid for DO_REG=1. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- FIFO36E1: 36Kb FIFO (First-In-First-Out) Block RAM Memory -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 FIFO36E1_inst : FIFO36E1 generic map ( ALMOST_EMPTY_OFFSET => X"0080", ALMOST_FULL_OFFSET => X"0080", DATA_WIDTH => 4, -- Sets the almost empty threshold -- Sets almost full threshold -- Sets data width to 4-72 Send Feedback 138 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements DO_REG => 1, -- Enable output register (1-0) Must be 1 if EN_SYN = FALSE EN_ECC_READ => FALSE, -- Enable ECC decoder, FALSE, TRUE EN_ECC_WRITE => FALSE, -- Enable ECC encoder, FALSE, TRUE EN_SYN => FALSE, -- Specifies FIFO as Asynchronous (FALSE) or Synchronous (TRUE) FIFO_MODE => "FIFO36", -- Sets mode to "FIFO36" or "FIFO36_72" FIRST_WORD_FALL_THROUGH => FALSE, -- Sets the FIFO FWFT to FALSE, TRUE INIT => X"000000000000000000", -- Initial values on output port SIM_DEVICE => "7SERIES", -- Must be set to "7SERIES" for simulation behavior SRVAL => X"000000000000000000" -- Set/Reset value for output port ) port map ( -- ECC Signals: 1-bit (each) output: Error Correction Circuitry ports DBITERR => DBITERR, -- 1-bit output: Double bit error status ECCPARITY => ECCPARITY, -- 8-bit output: Generated error correction parity SBITERR => SBITERR, -- 1-bit output: Single bit error status -- Read Data: 64-bit (each) output: Read output data DO => DO, -- 64-bit output: Data output DOP => DOP, -- 8-bit output: Parity data output -- Status: 1-bit (each) output: Flags and other FIFO status outputs ALMOSTEMPTY => ALMOSTEMPTY, -- 1-bit output: Almost empty flag ALMOSTFULL => ALMOSTFULL, -- 1-bit output: Almost full flag EMPTY => EMPTY, -- 1-bit output: Empty flag FULL => FULL, -- 1-bit output: Full flag RDCOUNT => RDCOUNT, -- 13-bit output: Read count RDERR => RDERR, -- 1-bit output: Read error WRCOUNT => WRCOUNT, -- 13-bit output: Write count WRERR => WRERR, -- 1-bit output: Write error -- ECC Signals: 1-bit (each) input: Error Correction Circuitry ports INJECTDBITERR => INJECTDBITERR, -- 1-bit input: Inject a double bit error input INJECTSBITERR => INJECTSBITERR, -- Read Control Signals: 1-bit (each) input: Read clock, enable and reset input signals RDCLK => RDCLK, -- 1-bit input: Read clock RDEN => RDEN, -- 1-bit input: Read enable REGCE => REGCE, -- 1-bit input: Clock enable RST => RST, -- 1-bit input: Reset RSTREG => RSTREG, -- 1-bit input: Output register set/reset -- Write Control Signals: 1-bit (each) input: Write clock and enable input signals WRCLK => WRCLK, -- 1-bit input: Rising edge write clock. WREN => WREN, -- 1-bit input: Write enable -- Write Data: 64-bit (each) input: Write input data DI => DI, -- 64-bit input: Data input DIP => DIP -- 8-bit input: Parity input ); -- End of FIFO36E1_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 139 Chapter 4: About Design Elements Verilog Instantiation Template // FIFO36E1: 36Kb FIFO (First-In-First-Out) Block RAM Memory // 7 Series // Xilinx HDL Libraries Guide, version 14.7 FIFO36E1 #( .ALMOST_EMPTY_OFFSET(13'h0080), // Sets the almost empty threshold .ALMOST_FULL_OFFSET(13'h0080), // Sets almost full threshold .DATA_WIDTH(4), // Sets data width to 4-72 .DO_REG(1), // Enable output register (1-0) Must be 1 if EN_SYN = FALSE .EN_ECC_READ("FALSE"), // Enable ECC decoder, FALSE, TRUE .EN_ECC_WRITE("FALSE"), // Enable ECC encoder, FALSE, TRUE .EN_SYN("FALSE"), // Specifies FIFO as Asynchronous (FALSE) or Synchronous (TRUE) .FIFO_MODE("FIFO36"), // Sets mode to "FIFO36" or "FIFO36_72" .FIRST_WORD_FALL_THROUGH("FALSE"), // Sets the FIFO FWFT to FALSE, TRUE .INIT(72'h000000000000000000), // Initial values on output port .SIM_DEVICE("7SERIES"), // Must be set to "7SERIES" for simulation behavior .SRVAL(72'h000000000000000000) // Set/Reset value for output port ) FIFO36E1_inst ( // ECC Signals: 1-bit (each) output: Error Correction Circuitry ports .DBITERR(DBITERR), // 1-bit output: Double bit error status .ECCPARITY(ECCPARITY), // 8-bit output: Generated error correction parity .SBITERR(SBITERR), // 1-bit output: Single bit error status // Read Data: 64-bit (each) output: Read output data .DO(DO), // 64-bit output: Data output .DOP(DOP), // 8-bit output: Parity data output // Status: 1-bit (each) output: Flags and other FIFO status outputs .ALMOSTEMPTY(ALMOSTEMPTY), // 1-bit output: Almost empty flag .ALMOSTFULL(ALMOSTFULL), // 1-bit output: Almost full flag .EMPTY(EMPTY), // 1-bit output: Empty flag .FULL(FULL), // 1-bit output: Full flag .RDCOUNT(RDCOUNT), // 13-bit output: Read count .RDERR(RDERR), // 1-bit output: Read error .WRCOUNT(WRCOUNT), // 13-bit output: Write count .WRERR(WRERR), // 1-bit output: Write error // ECC Signals: 1-bit (each) input: Error Correction Circuitry ports .INJECTDBITERR(INJECTDBITERR), // 1-bit input: Inject a double bit error input .INJECTSBITERR(INJECTSBITERR), // Read Control Signals: 1-bit (each) input: Read clock, enable and reset input signals .RDCLK(RDCLK), // 1-bit input: Read clock .RDEN(RDEN), // 1-bit input: Read enable .REGCE(REGCE), // 1-bit input: Clock enable .RST(RST), // 1-bit input: Reset .RSTREG(RSTREG), // 1-bit input: Output register set/reset // Write Control Signals: 1-bit (each) input: Write clock and enable input signals .WRCLK(WRCLK), // 1-bit input: Rising edge write clock. .WREN(WREN), // 1-bit input: Write enable // Write Data: 64-bit (each) input: Write input data .DI(DI), // 64-bit input: Data input .DIP(DIP) // 8-bit input: Parity input ); // End of FIFO36E1_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 140 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 FRAME_ECCE2 Primitive: Configuration Frame Error Correction Chapter 4: About Design Elements Introduction This design element enables the dedicated, built-in Error Correction Code (ECC) for the configuration memory of the FPGA. This element contains outputs that allow monitoring of the status of the ECC circuitry and the status of the readback CRC circuitry. Port Descriptions Port CRCERROR ECCERROR ECCERRORSINGLE FAR<25:0> SYNBIT<4:0> SYNDROME<12:0> SYNDROMEVALID SYNWORD<6:0> Type Output Output Output Output Output Output Output Output Width 1 1 1 26 5 13 1 7 Function Output indicating a CRC error. Output indicating an ECC error. Output Indicating single-bit Frame ECC error detected. Frame Address Register Value output. Output bit address of error. Output location of erroneous bit. Frame ECC output indicating the SYNDROME output is valid. Word output in the frame where an ECC error has been detected. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 141 Chapter 4: About Design Elements Available Attributes Attribute FARSRC Type STRING Allowed Values "EFAR", "FAR" Default "EFAR" FRAME_RBT_IN STRING _FILENAME String representing file None name and location Description Determines if the output of FAR[25:0] configuration register points to the FAR or EFAR. Sets configuration option register bit CTL0[7]. This file is output by the ICAP_E2 model and it contains Frame Data information for the Raw Bitstream (RBT) file. The FRAME_ECCE2 model will parse this file, calculate ECC and output any error conditions. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- FRAME_ECCE2: Configuration Frame Error Correction -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 FRAME_ECCE2_inst : FRAME_ECCE2 generic map ( FARSRC => "EFAR", -- Determines if the output of FAR[25:0] configuration register points -- to the FAR or EFAR. Sets configuration option register bit CTL0[7]. FRAME_RBT_IN_FILENAME => "None" -- This file is output by the ICAP_E2 model and it contains Frame Data -- information for the Raw Bitstream (RBT) file. The FRAME_ECCE2 model -- will parse this file, calculate ECC and output any error conditions. ) port map ( CRCERROR => CRCERROR, -- 1-bit output: Output indicating a CRC error. ECCERROR => ECCERROR, -- 1-bit output: Output indicating an ECC error. ECCERRORSINGLE => ECCERRORSINGLE, -- 1-bit output: Output Indicating single-bit Frame ECC error detected. FAR => FAR, -- 26-bit output: Frame Address Register Value output. SYNBIT => SYNBIT, -- 5-bit output: Output bit address of error. SYNDROME => SYNDROME, -- 13-bit output: Output location of erroneous bit. SYNDROMEVALID => SYNDROMEVALID, -- 1-bit output: Frame ECC output indicating the SYNDROME output is -- valid. SYNWORD => SYNWORD -- 7-bit output: Word output in the frame where an ECC error has been -- detected. ); -- End of FRAME_ECCE2_inst instantiation Verilog Instantiation Template // FRAME_ECCE2: Configuration Frame Error Correction // 7 Series // Xilinx HDL Libraries Guide, version 14.7 FRAME_ECCE2 #( .FARSRC("EFAR"), // Determines if the output of FAR[25:0] configuration register points to // the FAR or EFAR. Sets configuration option register bit CTL0[7]. .FRAME_RBT_IN_FILENAME("None") // This file is output by the ICAP_E2 model and it contains Frame Data // information for the Raw Bitstream (RBT) file. The FRAME_ECCE2 model // will parse this file, calculate ECC and output any error conditions. ) FRAME_ECCE2_inst ( .CRCERROR(CRCERROR), // 1-bit output: Output indicating a CRC error. Send Feedback 142 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements .ECCERROR(ECCERROR), // 1-bit output: Output indicating an ECC error. .ECCERRORSINGLE(ECCERRORSINGLE), // 1-bit output: Output Indicating single-bit Frame ECC error detected. .FAR(FAR), // 26-bit output: Frame Address Register Value output. .SYNBIT(SYNBIT), // 5-bit output: Output bit address of error. .SYNDROME(SYNDROME), // 13-bit output: Output location of erroneous bit. .SYNDROMEVALID(SYNDROMEVALID), // 1-bit output: Frame ECC output indicating the SYNDROME output is // valid. .SYNWORD(SYNWORD) // 7-bit output: Word output in the frame where an ECC error has been // detected. ); // End of FRAME_ECCE2_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 143 Chapter 4: About Design Elements GTHE2_CHANNEL Primitive: Gigabit Transceiver for 7 Series Devices Introduction GTHE2 is a gigabit transceiver component for 7 series devices. It is not intended for direct instantiation, and should be configured using the Xilinx CORE Generator. See the 7 series FPGAs Transceivers User Guide for details. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 144 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements GTHE2_COMMON Primitive: Gigabit Transceiver for 7 Series Devices Introduction GTHE2 is a gigabit transceiver component for 7 series devices. It is not intended for direct instantiation, and should be configured using the Xilinx CORE Generator. See the 7 series FPGAs Transceivers User Guide for details. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 145 Chapter 4: About Design Elements GTPE2_CHANNEL Primitive: Gigabit Transceiver for 7 series Devices Introduction GTPE2 is a gigabit transceiver component for 7 series devices. It is not intended for direct instantiation, and should be configured using the Xilinx CORE Generator. See the 7 series FPGAs Transceivers User Guide for details. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 146 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements GTPE2_COMMON Primitive: Gigabit Transceiver for 7 series Devices Introduction GTPE2 is a gigabit transceiver component for 7 series devices. It is not intended for direct instantiation, and should be configured using the Xilinx CORE Generator. See the 7 series FPGAs Transceivers User Guide for details. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 147 Chapter 4: About Design Elements GTXE2_CHANNEL Primitive: Gigabit Transceiver for 7 series Devices Introduction GTXE2 is a gigabit transceiver component for 7 series devices. It is not intended for direct instantiation, and should be configured using the Xilinx CORE Generator. See the 7 series FPGAs Transceivers User Guide for details. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 148 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements GTXE2_COMMON Primitive: Gigabit Transceiver for 7 series Devices Introduction GTXE2 is a gigabit transceiver component for 7 series devices. It is not intended for direct instantiation, and should be configured using the Xilinx CORE Generator. See the 7 series FPGAs Transceivers User Guide for details. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 149 Chapter 4: About Design Elements IBUF Primitive: Input Buffer Introduction This design element is automatically inserted (inferred) by the synthesis tool to any signal directly connected to a top-level input or in-out port of the design. You should generally let the synthesis tool infer this buffer. However, it can be instantiated into the design if required. In order to do so, connect the input port (I) directly to the associated top-level input or in-out port, and connect the output port (O) to the logic sourced by that port. Modify any necessary generic maps (VHDL) or named parameter value assignment (Verilog) in order to change the default behavior of the component. Port Descriptions Port O I Direction Output Input Width 1 1 Function Buffer output Buffer input Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No In general, this element is inferred by the synthesis tool for any specified top-level input port to the design. It is generally not necessary to specify them in the source code. However, if desired, they be manually instantiated by either copying the instantiation code from the appropriate Libraries Guide HDL template and pasting it into the top-level entity/module of your code. It is recommended to always put all I/O components on the top-level of the design to help facilitate hierarchical design methods. Connect the I port directly to the top-level input port of the design and the O port to the logic in which this input is to source. Specify the desired generic/defparam values in order to configure the proper behavior of the buffer. Available Attributes Attribute Data Type Allowed Values IBUF_LOW_PWR Boolean TRUE, FALSE IOSTANDARD String See Data Sheet. Default TRUE "DEFAULT" Description When set to TRUE, allows for reduced power when using differential or referenced (requiring VREF) input standards like LVDS or HSTL. A setting of FALSE demands more power but delivers higher performance characteristics. Consult the 7 Series FPGA SelectIO Resources User Guide for details. Assigns an I/O standard to the element. Send Feedback 150 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUF: Single-ended Input Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUF_inst : IBUF generic map ( IBUF_LOW_PWR => TRUE, -- Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards IOSTANDARD => "DEFAULT") port map ( O => O, -- Buffer output I => I -- Buffer input (connect directly to top-level port) ); -- End of IBUF_inst instantiation Verilog Instantiation Template // IBUF: Single-ended Input Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUF #( .IBUF_LOW_PWR("TRUE"), // Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards .IOSTANDARD("DEFAULT") // Specify the input I/O standard ) IBUF_inst ( .O(O), // Buffer output .I(I) // Buffer input (connect directly to top-level port) ); // End of IBUF_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 151 Chapter 4: About Design Elements IBUF_IBUFDISABLE Primitive: Single-ended Input Buffer with Input Disable Introduction This design element is an input buffer used to connect internal logic to an external pin. This element includes an input path disable as an additional power saving feature when the I/O is not used for a sustained amount of time. Port Descriptions Port I Direction Input IBUFDISABLE Input Width 1 1 O Output 1 Function Input port connection. Connect directly to top-level port in the design. Disables input path through the buffer and forces to a logic high when USE_IBUFDISABLE is set to "TRUE" and this signal is asserted high. If USE_IBUFDISABLE is set to "FALSE" this input is ignored and should be tied to ground. This feature is generally used to reduce power at times when the I/O is idle for a period of time. Buffer output representing the input path to the device. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Send Feedback 152 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute IBUF_LOW_PWR Data Type String Allowed Values "TRUE", "FALSE" Default "TRUE" IOSTANDARD USE_IBUFDISABLE String String See Data Sheet "TRUE", "FALSE" "DEFAULT" "TRUE" Description Allows a trade off of lower power consumption versus highest performance when referenced I/O standards are used. Assigns an I/O standard to the element. Enables or disables the feature of IBUFDISABLE. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUF_IBUFDISABLE: Single-ended Input Buffer with Disable -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUF_IBUFDISABLE_inst : IBUF_IBUFDISABLE generic map ( IBUF_LOW_PWR => "TRUE", -- Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards IOSTANDARD => "DEFAULT", -- Specify the input I/O standard USE_IBUFDISABLE => "TRUE") -- Set to "TRUE" to enable IBUFDISABLE feature port map ( O => O, -- Buffer output I => I, -- Buffer input (connect directly to top-level port) IBUFDISABLE => IBUFDISABLE -- Buffer disable input, low=disable ); -- End of IBUF_IBUFDISABLE_inst instantiation Verilog Instantiation Template // IBUF_IBUFDISABLE: Single-ended Input Buffer with Disable // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUF_IBUFDISABLE #( .IBUF_LOW_PWR("TRUE"), // Low power ("TRUE") vs. performance ("FALSE") for referenced I/O standards .IOSTANDARD("DEFAULT"), // Specify the input I/O standard .USE_IBUFDISABLE("TRUE") // Set to "TRUE" to enable IBUFDISABLE feature ) IBUF_IBUFDISABLE_inst ( .O(O), // Buffer output .I(I), // Buffer input (connect directly to top-level port) .IBUFDISABLE(IBUFDISABLE) // Buffer disable input, low=disable ); // End of IBUF_IBUFDISABLE_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 153 Chapter 4: About Design Elements IBUF_INTERMDISABLE Primitive: Single-ended Input Buffer with Input Termination Disable and Input Disable Introduction This design element is an input buffer used to connect internal logic to an external pin. This element includes an input termination (INTERM) enable/disable as well as an input path disable as additional power saving features when the I/O is not being used for a sustained amount of time. Port Descriptions Port I Direction Input Width 1 IBUFDISABLE Input 1 INTERMDISABLE O Input 1 Output 1 Function Input port connection. Connect directly to top-level port in the design. Disables input path through the buffer and forces to a logic high when USE_IBUFDISABLE is set to "TRUE" and this signal is asserted high. If USE_IBUFDISABLE is set to "FALSE" this input is ignored and should be tied to ground. This feature is generally used to reduce power at times when the I/O is idle for a period of time. Disables input termination. This feature is generally used to reduce power at times when the I/O is idle. Buffer output representing the input path to the device. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Available Attributes Attribute IBUF_LOW_PWR Data Type String Allowed Values "TRUE", "FALSE" Default "TRUE" IOSTANDARD USE_IBUFDISABLE String String See Data Sheet "TRUE", "FALSE" "DEFAULT" "TRUE" Description Allows a trade off of lower power consumption vs. highest performance when referenced I/O standards are used. Assigns an I/O standard to the element. Enables or disables the feature of IBUFDISABLE. Send Feedback 154 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUF_INTERMDISABLE: Single-ended Input Buffer with Termination Input Disable -- May only be placed in High Range (HR) Banks -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUF_INTERMDISABLE_inst : IBUF_INTERMDISABLE generic map ( IBUF_LOW_PWR => "TRUE", -- Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards IOSTANDARD => "DEFAULT", -- Specify the input I/O standard USE_IBUFDISABLE => "TRUE") -- Set to "TRUE" to enable IBUFDISABLE feature port map ( O => O, -- Buffer output I => I, -- Buffer input (connect directly to top-level port) INTERMDISABLE => INTERMDISABLE, -- Input Termination Disable IBUFDISABLE => IBUFDISABLE -- Buffer disable input, low=disable ); -- End of IBUF_INTERMDISABLE_inst instantiation Verilog Instantiation Template // IBUF_INTERMDISABLE: Single-ended Input Buffer with Termination Input Disable // May only be placed in High Range (HR) Banks // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUF_INTERMDISABLE #( .IBUF_LOW_PWR("TRUE"), // Low power ("TRUE") vs. performance ("FALSE") for referenced I/O standards .IOSTANDARD("DEFAULT"), // Specify the input I/O standard .USE_IBUFDISABLE("TRUE") // Set to "TRUE" to enable IBUFDISABLE feature ) IBUF_INTERMDISABLE_inst ( .O(O), // Buffer output .I(I), // Buffer input (connect directly to top-level port) .IBUFDISABLE(IBUFDISABLE), // Buffer disable input, low=disable .INTERMDISABLE(INTERMDISABLE) // Input Termination Disable ); // End of IBUF_INTERMDISABLE_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 155 Chapter 4: About Design Elements IBUFDS Primitive: Differential Signaling Input Buffer Introduction This design element is an input buffer that supports low-voltage, differential signaling. In IBUFDS, a design level interface signal is represented as two distinct ports (I and IB), one deemed the "master" and the other the "slave." The master and the slave are opposite phases of the same logical signal (for example, MYNET_P and MYNET_N). Optionally, a programmable differential termination feature is available to help improve signal integrity and reduce external components. Logic Table Inputs I IB 0 0 0 1 1 0 1 1 Outputs O No Change 0 1 No Change Port Descriptions Port I IB O Direction Input Input Output Width 1 1 1 Function Diff_p Buffer Input Diff_n Buffer Input Buffer Output Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Put all I/O components on the top-level of the design to help facilitate hierarchical design methods. Connect the I port directly to the top-level "master" input port of the design, the IB port to the top-level "slave" input port, and the O port to the logic in which this input is to source. Specify the desired generic/defparam values in order to configure the proper behavior of the buffer. Send Feedback 156 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute DIFF_TERM Data Allowed Type Values Boolean TRUE, FALSE Default FALSE IBUF_LOW_PWR Boolean TRUE, FALSE TRUE IOSTANDARD String See Data Sheet. "DEFAULT" Description The differential termination attribute is designed for the 7 Series FPGA supported differential input I/O standards. It is used to turn the built-in differential termination on (TRUE) or off (FALSE). When set to TRUE, allows for reduced power when using differential or referenced (requiring VREF) input standards like LVDS or HSTL. A setting of FALSE demands more power but delivers higher performance characteristics. Consult the 7 Series FPGA SelectIO Resources User Guide for details. Assigns an I/O standard to the element. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUFDS: Differential Input Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUFDS_inst : IBUFDS generic map ( DIFF_TERM => FALSE, -- Differential Termination IBUF_LOW_PWR => TRUE, -- Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards IOSTANDARD => "DEFAULT") port map ( O => O, -- Buffer output I => I, -- Diff_p buffer input (connect directly to top-level port) IB => IB -- Diff_n buffer input (connect directly to top-level port) ); -- End of IBUFDS_inst instantiation Verilog Instantiation Template // IBUFDS: Differential Input Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUFDS #( .DIFF_TERM("FALSE"), // Differential Termination .IBUF_LOW_PWR("TRUE"), // Low power="TRUE", Highest performance="FALSE" .IOSTANDARD("DEFAULT") // Specify the input I/O standard ) IBUFDS_inst ( .O(O), // Buffer output .I(I), // Diff_p buffer input (connect directly to top-level port) .IB(IB) // Diff_n buffer input (connect directly to top-level port) ); // End of IBUFDS_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 157 Chapter 4: About Design Elements IBUFDS_DIFF_OUT Primitive: Differential Signaling Input Buffer With Differential Output Introduction This design element is an input buffer that supports differential signaling. In IBUFDS_DIFF_OUT, a design level interface signal is represented as two distinct ports (I and IB), one deemed the "master" and the other the "slave." The master and the slave are opposite phases of the same logical signal (for example, MYNET_P and MYNET_N). The IBUFDS_DIFF_OUT differs from the IBUFDS in that it allows internal access to both phases of the differential signal. Optionally, a programmable differential termination feature is available to help improve signal integrity and reduce external components. Logic Table Inputs I IB 0 0 0 1 1 0 1 1 Outputs O No Change 0 1 No Change OB No Change 1 0 No Change Port Descriptions Port I IB O OB Direction Input Input Output Output Width 1 1 1 1 Function Diff_p Buffer Input (connect to top-level port in the design). Diff_n Buffer Input (connect to top-level port in the design). Diff_p Buffer Output. Diff_n Buffer Output. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No It is suggested to put all I/O components on the top-level of the design to help facilitate hierarchical design methods. Connect the I port directly to the top-level "master" input port of the design, the IB port to the top-level "slave" input port, and the O and OB ports to the logic in which this input is to source. Specify the desired generic/parameter values in order to configure the proper behavior of the buffer. Send Feedback 158 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute DIFF_TERM Data Allowed Type Values Boolean TRUE, FALSE Default FALSE IBUF_LOW_PWR Boolean TRUE, FALSE TRUE IOSTANDARD String See Data Sheet. "DEFAULT" Description The differential termination attribute is designed for the 7 Series FPGA supported differential input I/O standards. It is used to turn the built-in differential termination on (TRUE) or off (FALSE). When set to TRUE, allows for reduced power when using differential or referenced (requiring VREF) input standards like LVDS or HSTL. A setting of FALSE demands more power but delivers higher performance characteristics. Consult the 7 Series FPGA SelectIO Resources User Guide for details. Assigns an I/O standard to the element. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUFDS_DIFF_OUT: Differential Input Buffer with Differential Output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUFDS_DIFF_OUT_inst : IBUFDS_DIFF_OUT generic map ( DIFF_TERM => FALSE, -- Differential Termination IBUF_LOW_PWR => TRUE, -- Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards IOSTANDARD => "DEFAULT", -- Specify the input I/O standard USE_IBUFDISABLE => "TRUE" port map ( O => O, -- Buffer diff_p output OB => OB, -- Buffer diff_n output I => I, -- Diff_p buffer input (connect directly to top-level port) IB => IB -- Diff_n buffer input (connect directly to top-level port) ); -- End of IBUFDS_DIFF_OUT_inst instantiation Verilog Instantiation Template // IBUFDS_DIFF_OUT: Differential Input Buffer with Differential Output // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUFDS_DIFF_OUT #( .DIFF_TERM("FALSE"), // Differential Termination, "TRUE"/"FALSE" .IBUF_LOW_PWR("TRUE"), // Low power="TRUE", Highest performance="FALSE" .IOSTANDARD("DEFAULT") // Specify the input I/O standard ) IBUFDS_DIFF_OUT_inst ( .O(O), // Buffer diff_p output .OB(OB), // Buffer diff_n output .I(I), // Diff_p buffer input (connect directly to top-level port) .IB(IB) // Diff_n buffer input (connect directly to top-level port) ); // End of IBUFDS_DIFF_OUT_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 159 Chapter 4: About Design Elements For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 160 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements IBUFDS_DIFF_OUT_IBUFDISABLE Primitive: Input Differential Buffer with Input Disable and Differential Output Introduction This design element is a differential input buffer used to connect internal logic to an external bidirectional pin. This element includes an input path disable as an additional power saving feature when the input is idle for a sustained time. The IOBUFDS_DIFF_OUT_IBUFDISABLE differs from the IOBUFDS_IBUFDISABLE in that it allows internal access to both phases of the differential signal. Port Descriptions Port I Direction Input IB Input IBUFDISABLE Input Width 1 1 1 O Output 1 OB Output 1 Function Input p-side port connection. Connect directly to top-level port in the design. Input n-side port connection. Connect directly to top-level port in the design. Disables input path through the buffer and forces to a logic high when USE_IBUFDISABLE is set to "TRUE" and this signal is asserted high. If USE_IBUFDISABLE is set to "FALSE" this input is ignored and should be tied to ground. This feature is generally used to reduce power at times when the I/O is idle for a period of time. Buffer p-side output representing the input path to the device. Buffer n-side output representing the input path to the device. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 161 Chapter 4: About Design Elements Available Attributes Attribute DIFF_TERM IBUF_LOW_PWR Data Type String String Allowed Values "TRUE", "FALSE" "TRUE", "FALSE" Default "FALSE" "TRUE" IOSTANDARD USE_IBUFDISABLE String String See Data Sheet "TRUE", "FALSE" "DEFAULT" "TRUE" Description Enable the built-in differential termination. Allows a trade off of lower power consumption vs. highest performance when referenced I/O standards are used. Assigns an I/O standard to the element. Enables or disables the feature of IBUFDISABLE. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUFDS_DIFF_OUT_IBUFDISABLE: Differential Input Buffer with Differential Output w/ Disable -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUFDS_DIFF_OUT_IBUFDISABLE_inst : IBUFDS_DIFF_OUT_IBUFDISABLE generic map ( DIFF_TERM => "FALSE", -- Differential Termination IBUF_LOW_PWR => "TRUE", -- Low power "TRUE" vs. performance "FALSE" setting for referenced I/O standards IOSTANDARD => "DEFAULT", -- Specify the input I/O standard USE_IBUFDISABLE => "TRUE") -- Set to "TRUE" to enable IBUFDISABLE feature port map ( O => O, -- Buffer diff_p output OB => OB, -- Buffer diff_n output I => I, -- Diff_p buffer input (connect directly to top-level port) IB => IB, -- Diff_n buffer input (connect directly to top-level port) IBUFDISABLE => IBUFDISABLE -- Buffer disable input, low=disable ); -- End of IBUFDS_DIFF_OUT_IBUFDISABLE_inst instantiation Verilog Instantiation Template // IBUFDS_DIFF_OUT_IBUFDISABLE: Differential Input Buffer with Differential Output with Input Disable // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUFDS_DIFF_OUT_IBUFDISABLE #( .DIFF_TERM("FALSE"), // Differential Termination, "TRUE"/"FALSE" .IBUF_LOW_PWR("TRUE"), // Low power="TRUE", Highest performance="FALSE" .IOSTANDARD("DEFAULT"), // Specify the input I/O standard .USE_IBUFDISABLE("TRUE") // Set to "TRUE" to enable IBUFDISABLE feature ) IBUFDS_DIFF_OUT_IBUFDISABLE_inst ( .O(O), // Buffer diff_p output .OB(OB), // Buffer diff_n output .I(I), // Diff_p buffer input (connect directly to top-level port) .IB(IB), // Diff_n buffer input (connect directly to top-level port) .IBUFDISABLE(IBUFDISABLE) // Buffer disable input, low=disable ); // End of IBUFDS_DIFF_OUT_IBUFDISABLE_inst instantiation Send Feedback 162 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 163 Chapter 4: About Design Elements IBUFDS_DIFF_OUT_INTERMDISABLE Primitive: Input Differential Buffer with Input Termination Disable, Input Disable, and Differential Output Introduction This design element is a differential input buffer used to connect internal logic to an external bidirectional pin. This element includes an uncalibrated input termination (INTERM) disable as well as input path disable as additional power saving features when the I/O is idle for a sustained time. The IOBUFDS_DIFF_OUT_INTERMDISABLE differs from the IOBUFDS_INTERMDISABLE in that it allows internal access to both phases of the differential signal. This element may only be placed in High Range (HR) banks in the 7 series devices. Port Descriptions Port I Direction Width Input 1 IB Input 1 IBUFDISABLE Input 1 INTERMDISABLE O OB Input 1 Output 1 Output 1 Function Input p-side port connection. Connect directly to top-level port in the design. Input n-side port connection. Connect directly to top-level port in the design. Disables input path through the buffer and forces to a logic high when USE_IBUFDISABLE is set to "TRUE" and this signal is asserted high. If USE_IBUFDISABLE is set to "FALSE" this input is ignored and should be tied to ground. This feature is generally used to reduce power at times when the I/O is idle. Disables input termination. This feature is generally used to reduce power at times when the I/O is idle. Buffer p-side output representing the input path to the device. Buffer n-side output representing the input path to the device. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Send Feedback 164 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute DIFF_TERM Data Type String IBUF_LOW_PWR String Allowed Values "TRUE", "FALSE" "TRUE", "FALSE" Default "FALSE" "TRUE" IOSTANDARD USE_IBUFDISABLE String String See Data Sheet "TRUE", "FALSE" "DEFAULT" "TRUE" Description Enable the built-in differential termination. Allows a trade off of lower power consumption vs. highest performance when referenced I/O standards are used. Assigns an I/O standard to the element. Enables or disables the feature of IBUFDISABLE. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUFDS_DIFF_OUT_INTERMDISABLE: Differential Input Buffer with Differential Output w/ Disable -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUFDS_DIFF_OUT_INTERMDISABLE_inst : IBUFDS_DIFF_OUT_INTERMDISABLE generic map ( DIFF_TERM => "FALSE", -- Differential Termination IBUF_LOW_PWR => "TRUE", -- Low power "TRUE" vs. performance "FALSE" setting for referenced I/O standards IOSTANDARD => "DEFAULT", -- Specify the input I/O standard USE_IBUFDISABLE => "TRUE") -- Set to "TRUE" to enable IBUFDISABLE feature port map ( O => O, -- Buffer diff_p output OB => OB, -- Buffer diff_n output I => I, -- Diff_p buffer input (connect directly to top-level port) IB => IB, -- Diff_n buffer input (connect directly to top-level port) IBUFDISABLE => IBUFDISABLE, -- Buffer disable input, low=disable INTERMDISABLE => INTERMDISABLE -- Input termination disable ); -- End of IBUFDS_DIFF_OUT_INTERMDISABLE_inst instantiation Verilog Instantiation Template // IBUFDS_DIFF_OUT_INTERMDISABLE: Differential Input Buffer with Differential Output with Input Termination Disable // May only be placed in High Range (HR) Banks // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUFDS_DIFF_OUT_INTERMDISABLE #( .DIFF_TERM("FALSE"), // Differential Termination, "TRUE"/"FALSE" .IBUF_LOW_PWR("TRUE"), // Low power="TRUE", Highest performance="FALSE" .IOSTANDARD("DEFAULT"), // Specify the input I/O standard .USE_IBUFDISABLE("TRUE") // Set to "TRUE" to enable IBUFDISABLE feature ) IBUFDS_DIFF_OUT_INTERMDISABLE_inst ( .O(O), // Buffer diff_p output .OB(OB), // Buffer diff_n output .I(I), // Diff_p buffer input (connect directly to top-level port) .IB(IB), // Diff_n buffer input (connect directly to top-level port) .IBUFDISABLE(IBUFDISABLE), // Buffer disable input, low=disable .INTERMDISABLE(INTERMDISABLE) // Input Termination Disable ); // End of IBUFDS_DIFF_OUT_INTERMDISABLE_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 165 Chapter 4: About Design Elements For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 166 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements IBUFDS_GTE2 Primitive: Gigabit Transceiver Buffer Introduction IBUFDS_GTE2 is the gigabit transceiver input pad buffer component in 7 series devices. The REFCLK signal should be routed to the dedicated reference clock input pins on the serial transceiver, and you should instantiate the IBUFDS_GTE2 primitive in your design. See the 7 series FPGAs Transceivers User Guide for more information on PCB layout requirements, including reference clock requirements. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes No Recommended No VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUFDS_GTE2: Gigabit Transceiver Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUFDS_GTE2_inst : IBUFDS_GTE2 generic map ( CLKCM_CFG => TRUE, -- Refer to Transceiver User Guide CLKRCV_TRST => TRUE, -- Refer to Transceiver User Guide CLKSWING_CFG => '11' -- Refer to Transceiver User Guide ) port map ( O => O, -- 1-bit output: Refer to Transceiver User Guide ODIV2 => ODIV2, -- 1-bit output: Refer to Transceiver User Guide CEB => CEB, -- 1-bit input: Refer to Transceiver User Guide I => I, -- 1-bit input: Refer to Transceiver User Guide IB => IB -- 1-bit input: Refer to Transceiver User Guide ); -- End of IBUFDS_GTE2_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 167 Chapter 4: About Design Elements Verilog Instantiation Template // IBUFDS_GTE2: Gigabit Transceiver Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUFDS_GTE2 #( .CLKCM_CFG("TRUE"), // Refer to Transceiver User Guide .CLKRCV_TRST("TRUE"), // Refer to Transceiver User Guide .CLKSWING_CFG(2'b11) // Refer to Transceiver User Guide ) IBUFDS_GTE2_inst ( .O(O), // 1-bit output: Refer to Transceiver User Guide .ODIV2(ODIV2), // 1-bit output: Refer to Transceiver User Guide .CEB(CEB), // 1-bit input: Refer to Transceiver User Guide .I(I), // 1-bit input: Refer to Transceiver User Guide .IB(IB) // 1-bit input: Refer to Transceiver User Guide ); // End of IBUFDS_GTE2_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 168 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements IBUFDS_IBUFDISABLE Primitive: Input Differential Buffer with Input Path Disable Introduction This design element is an input differential buffer used to connect internal logic to an external bidirectional pin. This element includes an input path disable as an additional power saving feature when the I/O is either is an unused state for a sustained amount of time. Port Descriptions Port I Direction Input IB Input IBUFDISABLE Input Width 1 1 1 O Output 1 Function Input p-side port connection. Connect directly to top-level port in the design. Input n-side port connection. Connect directly to top-level port in the design. Disables input path through the buffer and forces to a logic high when USE_IBUFDISABLE is set to "TRUE" and this signal is asserted high. If USE_IBUFDISABLE is set to "FALSE" this input is ignored and should be tied to ground. This feature is generally used to reduce power at times when the I/O is idle. Buffer output representing the input path to the device. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Put all I/O components on the top-level of the design to help facilitate hierarchical design methods. Connect the I port directly to the top-level "master" input port of the design, the IB port to the top-level "slave" input port, and the O port to the logic in which this input is to source. Specify the desired generic/defparam values in order to configure the proper behavior of the buffer. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 169 Chapter 4: About Design Elements Available Attributes Attribute DIFF_TERM IBUF_LOW_PWR Data Type String String Allowed Values "TRUE", "FALSE" "TRUE", "FALSE" Default "FALSE" "TRUE" IOSTANDARD USE_IBUFDISABLE String String See Data Sheet "TRUE", "FALSE" "DEFAULT" "TRUE" Description Enable the built-in differential termination. Allows a trade off of lower power consumption vs. highest performance when referenced I/O standards are used. Assigns an I/O standard to the element. Enables or disables the feature of IBUFDISABLE. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUFDS_IBUFDISABLE: Differential Input Buffer w/ Disable -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUFDS_IBUFDISABLE_inst : IBUFDS_IBUFDISABLE generic map ( DIFF_TERM => "FALSE", -- Differential Termination IBUF_LOW_PWR => "TRUE", -- Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards IOSTANDARD => "DEFAULT" -- Specify the input I/O standard USE_IBUFDISABLE => "TRUE") -- Set to "TRUE" to enable IBUFDISABLE feature port map ( O => O, -- Buffer output I => I, -- Diff_p buffer input (connect directly to top-level port) IB => IB, -- Diff_n buffer input (connect directly to top-level port) IBUFDISABLE => IBUFDISABLE -- Buffer disable input, low=disable ); -- End of IBUFDS_IBUFDISABLE_inst instantiation Verilog Instantiation Template // IBUFDS_IBUFDISABLE: Differential Input Buffer with Input Disable // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUFDS_IBUFDISABLE #( .DIFF_TERM("FALSE"), // Differential Termination .IBUF_LOW_PWR("TRUE"), // Low power="TRUE", Highest performance="FALSE" .IOSTANDARD("DEFAULT"), // Specify the input I/O standard .USE_IBUFDISABLE("TRUE") // Set to "TRUE" to enable IBUFDISABLE feature ) IBUFDS_IBUFDISABLE_inst ( .O(O), // Buffer output .I(I), // Diff_p buffer input (connect directly to top-level port) .IB(IB), // Diff_n buffer input (connect directly to top-level port) .IBUFDISABLE(IBUFDISABLE) // Buffer disable input, low=disable ); // End of IBUFDS_IBUFDISABLE_inst instantiation Send Feedback 170 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 171 Chapter 4: About Design Elements IBUFDS_INTERMDISABLE Primitive: Input Differential Buffer with Input Termination Disable and Input Disable Introduction This design element is an input differential buffer used to connect internal logic to an external bidirectional pin. This element includes an uncalibrated input termination (INTERM) disable as well as input path disable as additional power saving features when the input is idle for a sustained amount of time. This element may only be placed in High Range (HR) banks in the 7 series devices. Port Descriptions Port I Direction Input IB Input IBUFDISABLE Input Width 1 1 1 INTERMDISABLE Input 1 O Output 1 Function Input p-side port connection. Connect directly to top-level port in the design. Input n-side port connection. Connect directly to top-level port in the design. Disables input path through the buffer and forces to a logic high when USE_IBUFDISABLE is set to "TRUE" and this signal is asserted high. If USE_IBUFDISABLE is set to "FALSE" this input is ignored and should be tied to ground. This feature is generally used to reduce power at times when the I/O is idle. Disables input termination. This feature is generally used to reduce power at times when the I/O is idle. Buffer output representing the input path to the device. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Send Feedback 172 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute DIFF_TERM Data Type String IBUF_LOW_PWR String Allowed Values "TRUE", "FALSE" "TRUE", "FALSE" Default "FALSE" "TRUE" IOSTANDARD USE_IBUFDISABLE String String See Data Sheet "TRUE", "FALSE" "DEFAULT" "TRUE" Description Enable the built-in differential termination. Allows a trade off of lower power consumption versus. highest performance when referenced I/O standards are used. Assigns an I/O standard to the element. Enables or disables the IBUFDISABLE feature. Generally used when it is not desirable to disable the input path in order to allow a read during write operation. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUFDS_INTERMDISABLE: Differential Input Buffer with Input Termination Disable -- May only be placed in High Range (HR) Banks -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUFDS_INTERMDISABLE_inst : IBUFDS_INTERMDISABLE generic map ( DIFF_TERM => "FALSE", -- Differential Termination IBUF_LOW_PWR => "TRUE", -- Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards IOSTANDARD => "DEFAULT" -- Specify the input I/O standard USE_IBUFDISABLE => "TRUE") -- Set to "TRUE" to enable IBUFDISABLE feature port map ( O => O, -- Buffer output I => I, -- Diff_p buffer input (connect directly to top-level port) IB => IB, -- Diff_n buffer input (connect directly to top-level port) IBUFDISABLE => IBUFDISABLE, -- Buffer disable input, low=disable INTERMDISALE => INTERMDISABLE -- Input termination disable ); -- End of IBUFDS_IBUFDISABLE_inst instantiation Verilog Instantiation Template // IBUFDS_INTERMDISABLE: Differential Input Buffer with Input Termination Disable // May only be placed in High Range (HR) Banks // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUFDS_INTERMDISABLE #( .DIFF_TERM("FALSE"), // Differential Termination .IBUF_LOW_PWR("TRUE"), // Low power="TRUE", Highest performance="FALSE" .IOSTANDARD("DEFAULT"), // Specify the input I/O standard .USE_IBUFDISABLE("TRUE") // Set to "TRUE" to enable IBUFDISABLE feature ) IBUFDS_INTERMDISABLE_inst ( .O(O), // Buffer output .I(I), // Diff_p buffer input (connect directly to top-level port) .IB(IB), // Diff_n buffer input (connect directly to top-level port) .IBUFDISABLE(IBUFDISABLE), // Buffer disable input, low=disable .INTERMDISABLE(INTERMDISABLE) // Input Termination Disable ); // End of IBUFDS_INTERMDISABLE_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 173 Chapter 4: About Design Elements For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 174 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 IBUFG Primitive: Dedicated Input Clock Buffer Chapter 4: About Design Elements Introduction The IBUFG is a dedicated input to the FPGA that should be used to connect incoming clocks to global clock routing resources. The IBUFG provides dedicated connections from a top-level port to the Clock Management Tile (which includes an MMCM and PLL) or BUFG, providing the minimum amount of clock delay and jitter to the device. The IBUFG input can only be driven by clock capable pins (MRCC or SRCC pins). Port Descriptions Port O I Direction Output Input Width 1 1 Function Clock Buffer output. Clock Buffer input. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute IBUF_LOW_PWR Data Type Allowed Values Boolean TRUE, FALSE Default TRUE IOSTANDARD String See Data Sheet "DEFAULT" Description Select between power and performance: • TRUE reduces power when using differential or referenced (requiring VREF) input standards like LVDS or HSTL. • FALSE demands more power but delivers higher performance. See the 7 Series FPGA SelectIO Resources User Guide for details. Assigns an I/O standard to the element. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 175 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUFG: Single-ended global clock input buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUFG_inst : IBUFG generic map ( IBUF_LOW_PWR => TRUE, -- Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards IOSTANDARD => "DEFAULT") port map ( O => O, -- Clock buffer output I => I -- Clock buffer input (connect directly to top-level port) ); -- End of IBUFG_inst instantiation Verilog Instantiation Template // IBUFG: Single-ended global clock input buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUFG #( .IBUF_LOW_PWR("TRUE"), // Low power="TRUE", Highest performance="FALSE" .IOSTANDARD("DEFAULT") // Specify the input I/O standard ) IBUFG_inst ( .O(O), // Clock buffer output .I(I) // Clock buffer input (connect directly to top-level port) ); // End of IBUFG_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 176 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements IBUFGDS Primitive: Differential Signaling Dedicated Input Clock Buffer Introduction This design element is a dedicated differential signaling input buffer for connection to the clock buffer (BUFG) or MMCM. In IBUFGDS, a design-level interface signal is represented as two distinct ports (I and IB), one deemed the "master" and the other the "slave." The master and the slave are opposite phases of the same logical signal (for example, MYNET_P and MYNET_N). Logic Table Inputs I IB 0 0 0 1 1 0 1 1 Outputs O No Change 0 1 No Change Port Descriptions Port O IB I Direction Output Input Input Width 1 1 1 Function Clock Buffer output Diff_n Clock Buffer Input Diff_p Clock Buffer Input Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Put all I/O components on the top-level of the design to help facilitate hierarchical design methods. Connect the I port directly to the top-level "master" input port of the design, the IB port to the top-level "slave" input port and the O port to an MMCM, BUFG or logic in which this input is to source. Some synthesis tools infer the BUFG automatically if necessary, when connecting an IBUFG to the clock resources of the FPGA. Specify the desired generic/defparam values in order to configure the proper behavior of the buffer. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 177 Chapter 4: About Design Elements Available Attributes Attribute DIFF_TERM Data Type Boolean Allowed Values TRUE, FALSE IBUF_LOW_PWR Boolean TRUE, FALSE Default FALSE TRUE IOSTANDARD String See Data Sheet "DEFAULT" Description Specifies the use of the internal differential termination resistance. When set to TRUE, allows for reduced power when using differential or referenced (requiring VREF) input standards like LVDS or HSTL. A setting of FALSE demands more power but delivers higher performance characteristics. Consult the 7 Series FPGA SelectIO Resources User Guide for details. Assigns an I/O standard to the element. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUFGDS: Differential Global Clock Input Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUFGDS_inst : IBUFGDS generic map ( DIFF_TERM => FALSE, -- Differential Termination IBUF_LOW_PWR => TRUE, -- Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards IOSTANDARD => "DEFAULT") port map ( O => O, -- Clock buffer output I => I, -- Diff_p clock buffer input (connect directly to top-level port) IB => IB -- Diff_n clock buffer input (connect directly to top-level port) ); -- End of IBUFGDS_inst instantiation Verilog Instantiation Template // IBUFGDS: Differential Global Clock Input Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUFGDS #( .DIFF_TERM("FALSE"), // Differential Termination .IBUF_LOW_PWR("TRUE"), // Low power="TRUE", Highest performance="FALSE" .IOSTANDARD("DEFAULT") // Specify the input I/O standard ) IBUFGDS_inst ( .O(O), // Clock buffer output .I(I), // Diff_p clock buffer input (connect directly to top-level port) .IB(IB) // Diff_n clock buffer input (connect directly to top-level port) ); // End of IBUFGDS_inst instantiation Send Feedback 178 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 179 Chapter 4: About Design Elements IBUFGDS_DIFF_OUT Primitive: Differential Signaling Dedicated Input Clock Buffer with Differential Output Introduction This design element is an input buffer that supports differential signaling. In IBUFGDS_DIFF_OUT, a design level interface signal is represented as two distinct ports (I and IB), one deemed the "master" and the other the "slave." The master and the slave are opposite phases of the same logical signal (for example, MYNET_P and MYNET_N). The IBUFGDS_DIFF_OUT differs from the IBUFGDS in that it allows internal access to both phases of the differential signal. Optionally, a programmable differential termination feature is available to help improve signal integrity and reduce external components. Logic Table Inputs I IB 0 0 0 1 1 0 1 1 Outputs O No Change 0 1 No Change OB No Change 1 0 No Change Port Descriptions Port I IB O OB Direction Input Input Output Output Width 1 1 1 1 Function Diff_p Buffer Input (connect to top-level port in the design). Diff_n Buffer Input (connect to top-level port in the design). Diff_p Buffer Output. Diff_n Buffer Output. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Xilinx suggests that you put all I/O components on the top-level of the design to help facilitate hierarchical design methods. Connect the I port directly to the top-level "master" input port of the design, the IB port to the top-level "slave" input port, and the O and OB ports to the logic in which this input is to source. Specify the desired generic/parameter values in order to configure the proper behavior of the buffer. Send Feedback 180 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute IOSTANDARD DIFF_TERM Data Type String Boolean Allowed Values See Data Sheet TRUE, FALSE IBUF_LOW_PWR Boolean TRUE, FALSE Default "DEFAULT" FALSE TRUE Description Assigns an I/O standard to the element. Specifies the use of the internal differential termination resistance. When set to TRUE, allows for reduced power when using differential or referenced (requiring VREF) input standards like LVDS or HSTL. A setting of FALSE demands more power but delivers higher performance characteristics. Consult the 7 Series FPGA SelectIO Resources User Guide for details. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IBUFGDS_DIFF_OUT: Differential Global Clock Buffer with Differential Output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IBUFGDS_DIFF_OUT_inst : IBUFGDS_DIFF_OUT generic map ( DIFF_TERM => FALSE, -- Differential Termination IBUF_LOW_PWR => TRUE, -- Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards IOSTANDARD => "DEFAULT") -- Specify the input I/O standard port map ( O => O, -- Buffer diff_p output OB => OB, -- Buffer diff_n output I => I, -- Diff_p buffer input (connect directly to top-level port) IB => IB -- Diff_n buffer input (connect directly to top-level port) ); -- End of IBUFGDS_DIFF_OUT_inst instantiation Verilog Instantiation Template // IBUFGDS_DIFF_OUT: Differential Global Clock Buffer with Differential Output // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IBUFGDS_DIFF_OUT #( .DIFF_TERM("FALSE"), // Differential Termination, "TRUE"/"FALSE" .IBUF_LOW_PWR("TRUE"), // Low power="TRUE", Highest performance="FALSE" .IOSTANDARD("DEFAULT") // Specify the input I/O standard ) IBUFGDS_DIFF_OUT_inst ( .O(O), // Buffer diff_p output .OB(OB), // Buffer diff_n output .I(I), // Diff_p buffer input (connect directly to top-level port) .IB(IB) // Diff_n buffer input (connect directly to top-level port) ); // End of IBUFGDS_DIFF_OUT_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 181 Chapter 4: About Design Elements For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 182 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 ICAPE2 Primitive: Internal Configuration Access Port Chapter 4: About Design Elements Introduction This design element gives you access to the configuration functions of the FPGA from the FPGA fabric. Using this component, commands and data can be written to and read from the configuration logic of the FPGA array. Since the improper use of this function can have a negative effect on the functionality and reliability of the FPGA, you should not use this element unless you are very familiar with its capabilities. Port Descriptions Port CLK CSIB I<31:0> O<31:0> RDWRB Type Input Input Input Output Input Width 1 1 32 32 1 Function Clock Input Active-Low ICAP Enable Configuration data input bus Configuration data output bus Read/Write Select input Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Available Attributes Attribute DEVICE_ID Type HEX Allowed Values 32'h03651093, 32'h036A2093, 32'h036A4093, 32'h036A6093, 32'h036BF093, 32'h036B1093, 32'h036B3093, 32'h036C2093, 32'h036C4093, 32'h036C6093, 32'h036DF093, 32'h036D1093, 32'h036D3093, 32'h036D5093, 32'h036D9093, 32'h0362C093, Default 0'h3651093 Description Specifies the pre-programmed Device ID value to be used for simulation purposes. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 183 Chapter 4: About Design Elements Attribute Type ICAP_WIDTH STRING SIM_CFG_FILE _NAME STRING Allowed Values 32'h0362D093, 32'h0363B093, 32'h0364C093, 32'h0371F093, 32'h0372C093, 32'h0377F093, 32'h03627093, 32'h03628093, 32'h03631093, 32'h03636093, 32'h03642093, 32'h03647093, 32'h03656093, 32'h03667093, 32'h03671093, 32'h03676093, 32'h03680093, 32'h03681093, 32'h03682093, 32'h03687093, 32'h03691093, 32'h03692093, 32'h03696093, 32'h03702093, 32'h03704093, 32'h03711093, 32'h03722093, 32'h03727093, 32'h03731093, 32'h03747093, 32'h03751093, 32'h03752093, 32'h03762093, 32'h03771093, 32'h03782093 "X32", "X8", "X16" Default "X32" String representing file None name and location Description Specifies the input and output data width. Specifies the Raw Bitstream (RBT) file to be parsed by the simulation model. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- ICAPE2: Internal Configuration Access Port -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 ICAPE2_inst : ICAPE2 generic map ( DEVICE_ID => X"3651093", -- Specifies the pre-programmed Device ID value to be used for simulation -- purposes. ICAP_WIDTH => "X32", -- Specifies the input and output data width. SIM_CFG_FILE_NAME => "None" -- Specifies the Raw Bitstream (RBT) file to be parsed by the simulation -- model. ) port map ( O => O, -- 32-bit output: Configuration data output bus CLK => CLK, -- 1-bit input: Clock Input Send Feedback 184 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements CSIB => CSIB, I => I, RDWRB => RDWRB ); -- 1-bit input: Active-Low ICAP Enable -- 32-bit input: Configuration data input bus -- 1-bit input: Read/Write Select input -- End of ICAPE2_inst instantiation Verilog Instantiation Template // ICAPE2: Internal Configuration Access Port // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ICAPE2 #( .DEVICE_ID(0'h3651093), // Specifies the pre-programmed Device ID value to be used for simulation // purposes. .ICAP_WIDTH("X32"), // Specifies the input and output data width. .SIM_CFG_FILE_NAME("None") // Specifies the Raw Bitstream (RBT) file to be parsed by the simulation // model. ) ICAPE2_inst ( .O(O), // 32-bit output: Configuration data output bus .CLK(CLK), // 1-bit input: Clock Input .CSIB(CSIB), // 1-bit input: Active-Low ICAP Enable .I(I), // 32-bit input: Configuration data input bus .RDWRB(RDWRB) // 1-bit input: Read/Write Select input ); // End of ICAPE2_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 185 Chapter 4: About Design Elements IDDR Primitive: Input Dual Data-Rate Register Introduction This design element is a dedicated input register designed to receive external dual data rate (DDR) signals into Xilinx® FPGAs. The IDDR is available with modes that present the data to the FPGA fabric at the time and clock edge they are captured, or on the same clock edge. This feature allows you to avoid additional timing complexities and resource usage. • OPPOSITE_EDGE mode - Data is recovered in the classic DDR methodology. Given a DDR data and clock at pin D and C respectively, Q1 changes after every positive edge of clock C, and Q2 changes after every negative edge of clock C. • SAME_EDGE mode - Data is still recovered by opposite edges of clock C. However, an extra register has been placed behind the negative edge data register. This extra register is clocked with positive clock edge of clock signal C. As a result, DDR data is now presented into the FPGA fabric at the same clock edge. However, because of this feature, the data pair appears to be "separated." Q1 and Q2 no longer have pair 1 and 2. Instead, the first pair presented is Pair 1 and DONT_CARE, followed by Pair 2 and 3 at the next clock cycle. • SAME_EDGE_PIPELINED mode - Recovers data in a similar fashion as the SAME_EDGE mode. In order to avoid the "separated" effect of the SAME_EDGE mode, an extra register has been placed in front of the positive edge data register. A data pair now appears at the Q1 and Q2 pin at the same time. However, using this mode costs you an additional cycle of latency for Q1 and Q2 signals to change. IDDR also works with the SelectIO™ features, such as the IDELAYE2. Note For high speed interfaces, the IDDR_2CLK component can be used to specify two independent clocks to capture the data. Use this component when the performance requirements of the IDDR are not adequate, since the IDDR_2CLK requires more clocking resources and can imply placement restrictions that are not necessary when using the IDDR component. Port Descriptions Port Q1 - Q2 Direction Output C Input CE Input D Input R Input S Input Width Function 1 These pins are the IDDR output that connects to the FPGA fabric. Q1 is the first data pair and Q2 is the second data pair. 1 Clock input pin. 1 When asserted Low, this port disables the output clock at port O. 1 This pin is where the DDR data is presented into the IDDR module. This pin connects to a top-level input or bi-directional port, an IDELAYE2 configured for an input delay or to an appropriate input or bidirectional buffer. 1 Active high reset forcing Q1 and Q2 to a logic zero. Can be synchronous or asynchronous based on the SRTYPE attribute. 1 Active high reset forcing Q1 and Q2 to a logic one. Can be synchronous or asynchronous based on the SRTYPE attribute. Send Feedback 186 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Note You cannot have an active set and an active reset in this component. One or both of the signals R and S must be tied to ground. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No Yes No Available Attributes Attribute Data Type DDR_CLK_EDGE String INIT_Q1 Binary Allowed Values "OPPOSITE_EDGE", "SAME_EDGE", "SAME_EDGE_ PIPELINED" 0, 1 Default "OPPOSITE_ EDGE" 0 INIT_Q2 Binary 0, 1 0 SRTYPE String "SYNC" or "ASYNC" "SYNC" Description Sets the IDDR mode of operation with respect to clock edge. Initial value on the Q1 pin after configuration startup or when GSR is asserted. Initial value on the Q2 pin after configuration startup or when GSR is asserted. Set/reset type selection. "SYNC" specifies the behavior of the reset (R) and set (S) pins to be synchronous to the positive edge of the C clock pin. "ASYNC" specifies an asynchronous set/reset function. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IDDR: Double Data Rate Input Register with Set, Reset -- and Clock Enable. -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IDDR_inst : IDDR generic map ( DDR_CLK_EDGE => "OPPOSITE_EDGE", -- "OPPOSITE_EDGE", "SAME_EDGE" -- or "SAME_EDGE_PIPELINED" INIT_Q1 => '0', -- Initial value of Q1: '0' or '1' INIT_Q2 => '0', -- Initial value of Q2: '0' or '1' SRTYPE => "SYNC") -- Set/Reset type: "SYNC" or "ASYNC" port map ( Q1 => Q1, -- 1-bit output for positive edge of clock Q2 => Q2, -- 1-bit output for negative edge of clock C => C, -- 1-bit clock input CE => CE, -- 1-bit clock enable input D => D, -- 1-bit DDR data input R => R, -- 1-bit reset S => S -- 1-bit set ); Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 187 Chapter 4: About Design Elements -- End of IDDR_inst instantiation Verilog Instantiation Template // IDDR: Input Double Data Rate Input Register with Set, Reset // and Clock Enable. // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IDDR #( .DDR_CLK_EDGE("OPPOSITE_EDGE"), // "OPPOSITE_EDGE", "SAME_EDGE" // or "SAME_EDGE_PIPELINED" .INIT_Q1(1'b0), // Initial value of Q1: 1'b0 or 1'b1 .INIT_Q2(1'b0), // Initial value of Q2: 1'b0 or 1'b1 .SRTYPE("SYNC") // Set/Reset type: "SYNC" or "ASYNC" ) IDDR_inst ( .Q1(Q1), // 1-bit output for positive edge of clock .Q2(Q2), // 1-bit output for negative edge of clock .C(C), // 1-bit clock input .CE(CE), // 1-bit clock enable input .D(D), // 1-bit DDR data input .R(R), // 1-bit reset .S(S) // 1-bit set ); // End of IDDR_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 188 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements IDDR_2CLK Primitive: Input Dual Data-Rate Register with Dual Clock Inputs Introduction This design element is a dedicated input register designed to receive external dual data rate (DDR) signals into Xilinx® FPGAs. You should only use the IDDR_2CLK for very high speed interfaces, since it requires more clocking resources, more power, and can imply certain placement restrictions that are not necessary when using the IDDR component. The IDDR component is also easier to use, uses fewer resources, and has fewer restrictions, though it cannot operate at the same high I/O speeds. The IDDR_2CLK is available with modes that present the data to the FPGA fabric at the time and clock edge they are captured, or on the same clock edge. This feature allows designers to avoid additional timing complexities and resource usage. • OPPOSITE_EDGE mode - Data is presented in the classic DDR methodology. Given a DDR data and clock at pin D and C respectively, Q1 changes after every positive edge of clock C, and Q2 changes after every positive edge of clock CB. • SAME_EDGE mode - Data is still presented by positive edges of each clock. However, an extra register has been placed in front of the CB clocked data register. This extra register is clocked with positive clock edge of clock signal C. As a result, DDR data is now presented into the FPGA fabric at the positive edge of clock C. However, because of this feature, the data pair appears to be "separated." Q1 and Q2 no longer have pair 1 and 2. Instead, the first pair presented is Pair 1 and DON'T CARE, followed by Pair 2 and 3 at the next clock cycle. • SAME_EDGE_PIPELINED mode - Presents data in a similar fashion as the SAME_EDGE mode. In order to avoid the "separated" effect of the SAME_EDGE mode, an extra register has been placed in front of the C clocked data register. A data pair now appears at the Q1 and Q2 pin at the same time during the positive edge of C. However, using this mode requires an additional cycle of latency for Q1 and Q2 signals to change. IDDR also works with SelectIO™ features, such as the IODELAYE2. Port Descriptions Port Q1 : Q2 Direction Output C Input CB Input CE Input D Input Width 1 1 1 1 1 Function These pins are the IDDR output that connects to the FPGA fabric. Q1 is the first data pair and Q2 is the second data pair. Primary clock input pin used to capture the positive edge data. Secondary clock input pin (typically 180 degrees out of phase with the primary clock) used to capture the negative edge data. When asserted Low, this port disables the output clock at port O. This pin is where the DDR data is presented into the IDDR module. This pin connects to a top-level input or bi-directional port, and IODELAY configured for an input delay or to an appropriate input or bidirectional buffer. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 189 Chapter 4: About Design Elements Port R S Direction Input Input Width 1 1 Function Active high reset forcing Q1 and Q2 to a logic zero. Can be synchronous or asynchronous based on the SRTYPE attribute. Active high reset forcing Q1 and Q2 to a logic one. Can be synchronous or asynchronous based on the SRTYPE attribute. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No • Connect the C pin to the appropriate clock source, representing the positive clock edge and CB to the clock source representing the negative clock edge. • Connect the D pin to the top-level input, or bidirectional port, an IODELAY, or an instantiated input or bidirectional buffer. • The Q1 and Q2 pins should be connected to the appropriate data sources. • CE should be tied high when not used, or connected to the appropriate clock enable logic. • R and S pins should be tied low, if not used, or to the appropriate set or reset generation logic. • Set all attributes to the component to represent the desired behavior. • Always instantiate this component in pairs with the same clocking, and to LOC those to the appropriate P and N I/O pair in order not to sacrifice possible I/O resources. • Always instantiate this component in the top-level hierarchy of your design, along with any other instantiated I/O components for the design. This helps facilitate hierarchical design flows/practices. • To minimize CLK skew, both CLK and CLKB should come from global routing (MMCM) and not from the local inversion. MMCM de-skews these clocks whereas the local inversion adds skew. Available Attributes Attribute Data Type DDR_CLK_EDGE String INIT_Q1 Binary Allowed Values "OPPOSITE_EDGE", "SAME_EDGE" "SAME_EDGE_ PIPELINED" 0, 1 INIT_Q2 Binary 0, 1 SRTYPE String "SYNC" or "ASYNC" Default "OPPOSITE_ EDGE" 0 0 "SYNC" Description DDR clock mode recovery mode selection. See Introduction for more explanation. Initial value on the Q1 pin after configuration startup or when GSR is asserted. Initial value on the Q2 pin after configuration startup or when GSR is asserted. Set/reset type selection. SYNC" specifies the behavior of the reset (R) and set (S) pins to be synchronous to the positive edge of the C clock pin. "ASYNC" specifies an asynchronous set/reset function. Send Feedback 190 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IDDR_2CLK: Dual-Clock, Input Double Data Rate Input Register with -- Set, Reset and Clock Enable. -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IDDR_2CLK_inst : IDDR_2CLK generic map ( DDR_CLK_EDGE => "OPPOSITE_EDGE", -- "OPPOSITE_EDGE", "SAME_EDGE" -- or "SAME_EDGE_PIPELINED" INIT_Q1 => '0', -- Initial value of Q1: '0' or '1' INIT_Q2 => '0', -- Initial value of Q2: '0' or '1' SRTYPE => "SYNC") -- Set/Reset type: "SYNC" or "ASYNC" port map ( Q1 => Q1, -- 1-bit output for positive edge of clock Q2 => Q2, -- 1-bit output for negative edge of clock C => C, -- 1-bit primary clock input CB => CB, -- 1-bit secondary clock input CE => CE, -- 1-bit clock enable input D => D, -- 1-bit DDR data input R => R, -- 1-bit reset S => S -- 1-bit set ); -- End of IDDR_2CLK_inst instantiation Verilog Instantiation Template // IDDR_2CLK: Dual-Clock, Input Double Data Rate Input Register with // Set, Reset and Clock Enable. // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IDDR_2CLK #( .DDR_CLK_EDGE("OPPOSITE_EDGE"), // "OPPOSITE_EDGE", "SAME_EDGE" // or "SAME_EDGE_PIPELINED" .INIT_Q1(1'b0), // Initial value of Q1: 1'b0 or 1'b1 .INIT_Q2(1'b0), // Initial value of Q2: 1'b0 or 1'b1 .SRTYPE("SYNC") // Set/Reset type: "SYNC" or "ASYNC" ) IDDR_2CLK_inst ( .Q1(Q1), // 1-bit output for positive edge of clock .Q2(Q2), // 1-bit output for negative edge of clock .C(C), // 1-bit primary clock input .CB(CB), // 1-bit secondary clock input .CE(CE), // 1-bit clock enable input .D(D), // 1-bit DDR data input .R(R), // 1-bit reset .S(S) // 1-bit set ); // End of IDDR_2CLK_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 191 Chapter 4: About Design Elements IDELAYCTRL Primitive: IDELAYE2/ODELAYE2 Tap Delay Value Control Introduction At least one of these design elements must be instantiated when using IDELAYE2 or ODELAYE2. The IDELAYCTRL module provides a reference clock input that allows internal circuitry to derive a voltage bias, independent of PVT (process, voltage, and temperature) variations, in order to define precise delay tap values for the associated IDELAYE2 and ODELAYE2 components. Use the IODELAY_GROUP attribute when instantiating this component to distiguish which IDELAYCTRL is associated with which IDELAYE2 and ODELAYE2. See the ISE Constrainst Guide for more details on IODELAY_GROUP. Port Descriptions Port RDY Type Output REFCLK RST Input Input Width 1 1 1 Function The ready (RDY) signal indicates when the IDELAYE2 and ODELAYE2 modules in the specific region are calibrated. The RDY signal is deasserted if REFCLK is held High or Low for one clock period or more. If RDY is deasserted Low, the IDELAYCTRL module must be reset. If not needed, RDY to be unconnected/ignored. Time reference to IDELAYCTRL to calibrate all IDELAYE2 and ODELAYE2 modules in the same region. REFCLK can be supplied directly from a user-supplied source or the MMCME2/PLLE2 and must be routed on a global clock buffer. Active-High asynchronous reset. To ensure proper IDELAYE2 and ODELAYE2 operation, IDELAYCTRL must be reset after configuration and the REFCLK signal is stable. A reset pulse width Tidelayctrl_rpw is required. RST (Module reset) - Resets the IDELAYCTRL circuitry. The RST signal is an active-high asynchronous reset. To reset the IDELAYCTRL, assert it High for at least 50 ns. REFCLK (Reference Clock) - Provides a voltage bias, independent of process, voltage, and temperature variations, to the tap-delay lines in the IOBs. The frequency of REFCLK must be 200 MHz to guarantee the tap-delay value specified in the applicable data sheet. RDY (Ready Output) - Indicates the validity of the reference clock input, REFCLK. When REFCLK disappears (i.e., REFCLK is held High or Low for one clock period or more), the RDY signal is deasserted. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Send Feedback 192 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IDELAYCTRL: IDELAYE2/ODELAYE2 Tap Delay Value Control -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IDELAYCTRL_inst : IDELAYCTRL port map ( RDY => RDY, -- 1-bit output: Ready output REFCLK => REFCLK, -- 1-bit input: Reference clock input RST => RST -- 1-bit input: Active high reset input ); -- End of IDELAYCTRL_inst instantiation Verilog Instantiation Template // IDELAYCTRL: IDELAYE2/ODELAYE2 Tap Delay Value Control // 7 Series // Xilinx HDL Libraries Guide, version 14.7 (* IODELAY_GROUP = *) // Specifies group name for associated IDELAYs/ODELAYs and IDELAYCTRL IDELAYCTRL IDELAYCTRL_inst ( .RDY(RDY), // 1-bit output: Ready output .REFCLK(REFCLK), // 1-bit input: Reference clock input .RST(RST) // 1-bit input: Active high reset input ); // End of IDELAYCTRL_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 193 Chapter 4: About Design Elements IDELAYE2 Primitive: Input Fixed or Variable Delay Element Introduction Every I/O block contains a programmable absolute delay element called IDELAYE2. The IDELAYE2 can be connected to an input register/ISERDESE1 or driven directly into FPGA logic. The IDELAYE2 is a 31-tap, wraparound, delay element with a calibrated tap resolution. Refer to the 7 series FPGA Data Sheet for delay values. The IDELAYE2 allows incoming signals to be delayed on an individual basis. The tap delay resolution is varied by selecting an IDELAYCTRL reference clock from the range specified in the 7 series FPGA Data Sheet. Port Descriptions Port C Type Input CE CINVCTRL Input Input CNTVALUEIN <4:0> CNTVALUEOUT <4:0> Input Output DATAIN Input DATAOUT IDATAIN Output Input Width 1 1 1 5 5 1 1 1 Function All control inputs to IDELAYE2 primitive (RST, CE, and INC) are synchronous to the clock input (C). A clock must be connected to this port when IDELAYE2 is configured in "VARIABLE", "VAR_LOAD" or "VAR_LOAD_PIPE" mode. C can be locally inverted, and must be supplied by a global or regional clock buffer. This clock should be connected to the same clock in the SelectIO logic resources (when using ISERDESE2 and OSERDESE2, C is connected to CLKDIV). Active high enable increment/decrement function The CINVCTRL pin is used for dynamically switching the polarity of C pin. This is for use in applications when glitches are not an issue. When switching the polarity, do not use the IDELAYE2 control pins for two clock cycles. Counter value from FPGA logic for dynamically loadable tap value input. The CNTVALUEOUT pins are used for reporting the dynamically switching value of the delay element. CNTVALUEOUT is only available when IDELAYE2 is in "VAR_LOAD" or "VAR_LOAD_PIPE" mode. The DATAIN input is directly driven by the FPGA logic providing a logic accessible delay line. The data is driven back into the FPGA logic through the DATAOUT port with a delay set by the IDELAY_VALUE. DATAIN can be locally inverted. The data cannot be driven to an I/O. Delayed data from either the IDATAIN or DATAIN input paths. DATAOUT connects to an ISERDESE2, input register or FPGA logic. The IDATAIN input is driven by its associated I/O. The data can be driven to either an ISERDESE1 or input register block, directly into the Send Feedback 194 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port INC LD LDPIPEEN REGRST Type Input Input Input Input Width 1 1 1 1 Function FPGA logic, or to both through the DATAOUT port with a delay set by the IDELAY_VALUE. Increment/decrement number of tap delays Load IDELAY_VALUE to the counter. Enable PIPELINE register to load data from LD pins. When in "VARIABLE" mode, resets the delay element to a value set by the IDELAY_VALUE. If this attribute is not specified, a value of zero is assumed. The RST signal is an active-high reset and is synchronous to the input clock signal (C). When in "VAR_LOAD" or "VAR_LOAD_PIPE" mode, the IDELAYE2 reset signal resets the delay element to a value set by the CNTVALUEIN. The value present at CNTVALUEIN will be the new tap value. As a results of this functionality the IDELAY_VALUE is ignored. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Available Attributes Attribute CINVCTRL_SEL Type STRING DELAY_SRC STRING HIGH _PERFORMANCE _MODE STRING IDELAY_TYPE STRING Allowed Values "FALSE", "TRUE" Default "FALSE" "IDATAIN", "DATAIN" "IDATAIN" "FALSE", "TRUE" "FALSE" "FIXED", "VARIABLE", "VAR_LOAD", "VAR_LOAD_PIPE" "FIXED" Description Enables the CINVCTRL_SEL pin to dynamically switch the polarity of the C pin. Select the delay source input to the IDELAYE2 • "IDATAIN": IDELAYE2 chain input is IDATAIN • "DATAIN" : IDELAYE2 chain input is DATAIN When TRUE, this attribute reduces the output jitter. When FALSE, power consumption is reduced. The difference in power consumption is quantified in the Xilinx Power Estimator tool. Sets the type of tap delay line. • "FIXED" - Sets a static delay value. • "VARIABLE" - Dynamically adjust (incement/decrement) delay value. • "VAR_LOAD" - Dynamically loads tap values. • "VAR_LOAD_PIPE" - Pipelined dynamically loadable tap values. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 195 Chapter 4: About Design Elements Attribute IDELAY_VALUE PIPE_SEL REFCLK _FREQUENCY Type DECIMAL Allowed Values Default 0, 1, 2, 3, 4, 5, 6, 7, 8, 0 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 STRING 1 significant digit FLOAT "FALSE", "TRUE" 190.0 to 310.0 "FALSE" 200.0 SIGNAL_PATTERN STRING "DATA", "CLOCK" "DATA" Description Specifies the fixed number of delay taps in fixed mode or the initial starting number of taps in "VARIABLE" mode (input path). When IDELAY_TYPE is set to "VAR_LOAD" or "VAR_LOAD_PIPE" mode, this value is ignored. Select pipelined mode. Sets the tap value (in MHz) used by the timing analyzer for static timing analysis and functional/timing simulation. The frequency of REFCLK must be within the given datasheet range to guarantee the tap-delay value and performance. Causes the timing analyzer to account for the appropriate amount of delay-chain jitter in the data or clock path. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IDELAYE2: Input Fixed or Variable Delay Element -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IDELAYE2_inst : IDELAYE2 generic map ( CINVCTRL_SEL => "FALSE", -- Enable dynamic clock inversion (FALSE, TRUE) DELAY_SRC => "IDATAIN", -- Delay input (IDATAIN, DATAIN) HIGH_PERFORMANCE_MODE => "FALSE", -- Reduced jitter ("TRUE"), Reduced power ("FALSE") IDELAY_TYPE => "FIXED", -- FIXED, VARIABLE, VAR_LOAD, VAR_LOAD_PIPE IDELAY_VALUE => 0, -- Input delay tap setting (0-31) PIPE_SEL => "FALSE", -- Select pipelined mode, FALSE, TRUE REFCLK_FREQUENCY => 200.0, -- IDELAYCTRL clock input frequency in MHz (190.0-210.0, 290.0-310.0). SIGNAL_PATTERN => "DATA" -- DATA, CLOCK input signal ) port map ( CNTVALUEOUT => CNTVALUEOUT, -- 5-bit output: Counter value output DATAOUT => DATAOUT, -- 1-bit output: Delayed data output C => C, -- 1-bit input: Clock input CE => CE, -- 1-bit input: Active high enable increment/decrement input CINVCTRL => CINVCTRL, -- 1-bit input: Dynamic clock inversion input CNTVALUEIN => CNTVALUEIN, -- 5-bit input: Counter value input DATAIN => DATAIN, -- 1-bit input: Internal delay data input IDATAIN => IDATAIN, -- 1-bit input: Data input from the I/O INC => INC, -- 1-bit input: Increment / Decrement tap delay input LD => LD, -- 1-bit input: Load IDELAY_VALUE input LDPIPEEN => LDPIPEEN, -- 1-bit input: Enable PIPELINE register to load data input REGRST => REGRST -- 1-bit input: Active-high reset tap-delay input ); -- End of IDELAYE2_inst instantiation Send Feedback 196 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // IDELAYE2: Input Fixed or Variable Delay Element // 7 Series // Xilinx HDL Libraries Guide, version 14.7 (* IODELAY_GROUP = *) // Specifies group name for associated IDELAYs/ODELAYs and IDELAYCTRL IDELAYE2 #( .CINVCTRL_SEL("FALSE"), // Enable dynamic clock inversion (FALSE, TRUE) .DELAY_SRC("IDATAIN"), // Delay input (IDATAIN, DATAIN) .HIGH_PERFORMANCE_MODE("FALSE"), // Reduced jitter ("TRUE"), Reduced power ("FALSE") .IDELAY_TYPE("FIXED"), // FIXED, VARIABLE, VAR_LOAD, VAR_LOAD_PIPE .IDELAY_VALUE(0), // Input delay tap setting (0-31) .PIPE_SEL("FALSE"), // Select pipelined mode, FALSE, TRUE .REFCLK_FREQUENCY(200.0), // IDELAYCTRL clock input frequency in MHz (190.0-210.0, 290.0-310.0). .SIGNAL_PATTERN("DATA") // DATA, CLOCK input signal ) IDELAYE2_inst ( .CNTVALUEOUT(CNTVALUEOUT), // 5-bit output: Counter value output .DATAOUT(DATAOUT), // 1-bit output: Delayed data output .C(C), // 1-bit input: Clock input .CE(CE), // 1-bit input: Active high enable increment/decrement input .CINVCTRL(CINVCTRL), // 1-bit input: Dynamic clock inversion input .CNTVALUEIN(CNTVALUEIN), // 5-bit input: Counter value input .DATAIN(DATAIN), // 1-bit input: Internal delay data input .IDATAIN(IDATAIN), // 1-bit input: Data input from the I/O .INC(INC), // 1-bit input: Increment / Decrement tap delay input .LD(LD), // 1-bit input: Load IDELAY_VALUE input .LDPIPEEN(LDPIPEEN), // 1-bit input: Enable PIPELINE register to load data input .REGRST(REGRST) // 1-bit input: Active-high reset tap-delay input ); // End of IDELAYE2_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 197 Chapter 4: About Design Elements IN_FIFO Primitive: Input First-In, First-Out (FIFO) Introduction The Input FIFO is a new resource located next to the I/O. This dedicated hardware is designed to help transition the data from the input port, input register, IDDR or ISERDES to the fabric. It has two basic modes the first is a 4x4 mode where the data coming into the FIFO goes out at the same rate. The second mode is a 4x8 mode where the data coming out is de-serialized by a factor of 2. In other words in 4x8 mode 4 bits go to the IN_FIFO and 8 bits come out. Features of this component include: • Array dimensions: 80 wide, 8 deep (4x8 mode); 40 wide, 8 deep (4x4 mode) • Empty and Full flags • Programmable Almost Empty and Almost Full flags Send Feedback 198 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port Descriptions Port Type ALMOSTEMPTY Output Width 1 ALMOSTFULL Output 1 D0<3:0> D1<3:0> D2<3:0> D3<3:0> D4<3:0> D5<7:0> D6<7:0> D7<3:0> D8<3:0> D9<3:0> EMPTY FULL Q0<7:0> Q1<7:0> Q2<7:0> Q3<7:0> Q4<7:0> Q5<7:0> Q6<7:0> Q7<7:0> Q8<7:0> Q9<7:0> RDCLK RDEN RESET WRCLK WREN Input 4 Input 4 Input 4 Input 4 Input 4 Input 8 Input 8 Input 4 Input 4 Input 4 Output 1 Output 1 Output 8 Output 8 Output 8 Output 8 Output 8 Output 8 Output 8 Output 8 Output 8 Output 8 Input 1 Input 1 Input 1 Input 1 Input 1 Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Function Active high output flag indicating the FIFO is almost empty. The threshold of the almost empty flag is set by the ALMOST_EMPTY_VALUE attribute. Active high output flag indicating the FIFO is almost full. The threshold of the almost empty flag is set by the ALMOST_FULL_VALUE attribute. Channel 0 input bus. Channel 1 input bus. Channel 2 input bus. Channel 3 input bus. Channel 4 input bus. Channel 5 input bus. Channel 6 input bus. Channel 7 input bus. Channel 8 input bus. Channel 9 input bus. Active high output flag indicating the FIFO is empty. Active high output flag indicating the FIFO is full. Channel 0 input bus. Channel 1 output bus. Channel 2 output bus. Channel 3 output bus. Channel 4 output bus. Channel 5 output bus. Channel 6 output bus. Channel 7 output bus. Channel 8 output bus. Channel 9 output bus. Read clock. Active high read enable. Active high asynchronous reset. Write clock. Active high write enable. Yes No No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 199 Chapter 4: About Design Elements Available Attributes Attribute Type Allowed Values ALMOST_EMPTY DECIMAL 1, 2 _VALUE ALMOST_FULL DECIMAL 1, 2 _VALUE ARRAY_MODE STRING "ARRAY_MODE_4_X_8", "ARRAY_MODE_4_X_4" SYNCHRONOUS STRING "FALSE" _MODE Default 1 1 "ARRAY_MODE_4_X_8" "FALSE" Description Specifies the number of entries left before asserting the ALMOSTEMPTY output signal. Specifies the number of entries left before asserting the ALMOSTFULL output signal. Specifies deserializer mode: • "ARRAY_MODE_8_X_8" Eight bits in, eight bits out • "ARRAY_MODE_4_X_8" Four bits in, eight bits out Specify whether the RDCLK and WRCLK are synchrnous to each other. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IN_FIFO: Input First-In, First-Out (FIFO) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IN_FIFO_inst : IN_FIFO generic map ( ALMOST_EMPTY_VALUE => 1, -- Almost empty offset (1-2) ALMOST_FULL_VALUE => 1, -- Almost full offset (1-2) ARRAY_MODE => "ARRAY_MODE_4_X_8", -- ARRAY_MODE_4_X_8, ARRAY_MODE_4_X_4 SYNCHRONOUS_MODE => "FALSE" -- Clock synchronous (FALSE) ) port map ( -- FIFO Status Flags: 1-bit (each) output: Flags and other FIFO status outputs ALMOSTEMPTY => ALMOSTEMPTY, -- 1-bit output: Almost empty ALMOSTFULL => ALMOSTFULL, -- 1-bit output: Almost full EMPTY => EMPTY, -- 1-bit output: Empty FULL => FULL, -- 1-bit output: Full -- Q0-Q9: 8-bit (each) output: FIFO Outputs Q0 => Q0, -- 8-bit output: Channel 0 Q1 => Q1, -- 8-bit output: Channel 1 Q2 => Q2, -- 8-bit output: Channel 2 Q3 => Q3, -- 8-bit output: Channel 3 Q4 => Q4, -- 8-bit output: Channel 4 Q5 => Q5, -- 8-bit output: Channel 5 Q6 => Q6, -- 8-bit output: Channel 6 Q7 => Q7, -- 8-bit output: Channel 7 Q8 => Q8, -- 8-bit output: Channel 8 Q9 => Q9, -- 8-bit output: Channel 9 -- D0-D9: 4-bit (each) input: FIFO inputs D0 => D0, -- 4-bit input: Channel 0 D1 => D1, -- 4-bit input: Channel 1 D2 => D2, -- 4-bit input: Channel 2 D3 => D3, -- 4-bit input: Channel 3 D4 => D4, -- 4-bit input: Channel 4 D5 => D5, -- 8-bit input: Channel 5 D6 => D6, -- 8-bit input: Channel 6 D7 => D7, -- 4-bit input: Channel 7 Send Feedback 200 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements D8 => D8, -- 4-bit input: Channel 8 D9 => D9, -- 4-bit input: Channel 9 -- FIFO Control Signals: 1-bit (each) input: Clocks, Resets and Enables RDCLK => RDCLK, -- 1-bit input: Read clock RDEN => RDEN, -- 1-bit input: Read enable RESET => RESET, -- 1-bit input: Reset WRCLK => WRCLK, -- 1-bit input: Write clock WREN => WREN -- 1-bit input: Write enable ); -- End of IN_FIFO_inst instantiation Verilog Instantiation Template // IN_FIFO: Input First-In, First-Out (FIFO) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IN_FIFO #( .ALMOST_EMPTY_VALUE(1), // Almost empty offset (1-2) .ALMOST_FULL_VALUE(1), // Almost full offset (1-2) .ARRAY_MODE("ARRAY_MODE_4_X_8"), // ARRAY_MODE_4_X_8, ARRAY_MODE_4_X_4 .SYNCHRONOUS_MODE("FALSE") // Clock synchronous (FALSE) ) IN_FIFO_inst ( // FIFO Status Flags: 1-bit (each) output: Flags and other FIFO status outputs .ALMOSTEMPTY(ALMOSTEMPTY), // 1-bit output: Almost empty .ALMOSTFULL(ALMOSTFULL), // 1-bit output: Almost full .EMPTY(EMPTY), // 1-bit output: Empty .FULL(FULL), // 1-bit output: Full // Q0-Q9: 8-bit (each) output: FIFO Outputs .Q0(Q0), // 8-bit output: Channel 0 .Q1(Q1), // 8-bit output: Channel 1 .Q2(Q2), // 8-bit output: Channel 2 .Q3(Q3), // 8-bit output: Channel 3 .Q4(Q4), // 8-bit output: Channel 4 .Q5(Q5), // 8-bit output: Channel 5 .Q6(Q6), // 8-bit output: Channel 6 .Q7(Q7), // 8-bit output: Channel 7 .Q8(Q8), // 8-bit output: Channel 8 .Q9(Q9), // 8-bit output: Channel 9 // D0-D9: 4-bit (each) input: FIFO inputs .D0(D0), // 4-bit input: Channel 0 .D1(D1), // 4-bit input: Channel 1 .D2(D2), // 4-bit input: Channel 2 .D3(D3), // 4-bit input: Channel 3 .D4(D4), // 4-bit input: Channel 4 .D5(D5), // 8-bit input: Channel 5 .D6(D6), // 8-bit input: Channel 6 .D7(D7), // 4-bit input: Channel 7 .D8(D8), // 4-bit input: Channel 8 .D9(D9), // 4-bit input: Channel 9 // FIFO Control Signals: 1-bit (each) input: Clocks, Resets and Enables .RDCLK(RDCLK), // 1-bit input: Read clock .RDEN(RDEN), // 1-bit input: Read enable .RESET(RESET), // 1-bit input: Reset .WRCLK(WRCLK), // 1-bit input: Write clock .WREN(WREN) // 1-bit input: Write enable ); // End of IN_FIFO_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 201 Chapter 4: About Design Elements IOBUF Primitive: Bi-Directional Buffer Introduction The design element is a bidirectional single-ended I/O Buffer used to connect internal logic to an external bidirectional pin. Logic Table Inputs T I 1 X 0 1 0 0 Bidirectional IO Z 1 0 Outputs O IO 1 0 Port Descriptions Port O IO I T Direction Output In/out Input Input Width 1 1 1 1 Function Buffer output Buffer In/out Buffer input 3-State enable input Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 202 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute DRIVE Data Type Integer Allowed Values 2, 4, 6, 8, 12, 16, 24 IOSTANDARD SLEW String String See Data Sheet "SLOW", "FAST" Default 12 "DEFAULT" "SLOW" Description Selects output drive strength (mA) for the SelectIO™ buffers that use the LVTTL, LVCMOS12, LVCMOS15, LVCMOS18, LVCMOS25, or LVCMOS33 interface I/O standard. Assigns an I/O standard to the element. Sets the output rise and fall time. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IOBUF: Single-ended Bi-directional Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IOBUF_inst : IOBUF generic map ( DRIVE => 12, IOSTANDARD => "DEFAULT", SLEW => "SLOW") port map ( O => O, -- Buffer output IO => IO, -- Buffer inout port (connect directly to top-level port) I => I, -- Buffer input T => T -- 3-state enable input, high=input, low=output ); -- End of IOBUF_inst instantiation Verilog Instantiation Template // IOBUF: Single-ended Bi-directional Buffer // All devices // Xilinx HDL Libraries Guide, version 14.7 IOBUF #( .DRIVE(12), // Specify the output drive strength .IBUF_LOW_PWR("TRUE"), // Low Power - "TRUE", High Performance = "FALSE" .IOSTANDARD("DEFAULT"), // Specify the I/O standard .SLEW("SLOW") // Specify the output slew rate ) IOBUF_inst ( .O(O), // Buffer output .IO(IO), // Buffer inout port (connect directly to top-level port) .I(I), // Buffer input .T(T) // 3-state enable input, high=input, low=output ); // End of IOBUF_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 203 Chapter 4: About Design Elements IOBUF_DCIEN Primitive: Bi-Directional Single-ended Buffer with DCI and Input Disable Introduction This design element is a bidirectional single ended I/O buffer used to connect internal logic to an external bidirectional pin. This element includes Digitally Controlled Impedance (DCI) termination enable/disable as well as input path disable as additional power saving features when the I/O is either in an unused state or being used as an output for a sustained amount of time. This element may only be placed in High Performance (HP) banks in the 7 series devices. Port Descriptions Port IO Direction In/out I IBUFDISABLE Input Input Width 1 1 1 DCITERMDISABLE Input 1 T Input 1 O Output 1 Function Bi-directional port connection. Connect directly to top-level port in the design. Buffer input representing the output path to the device. Disables input path. When this signal is asserted HIGH and the attribute USE_IBUFDISABLE is set to "TRUE", the input path through the input buffer is disabled and forced to a logic HIGH. If USE_IBUFDISABLE is set to "FALSE" this input is ignored and should be tied to ground. This feature is generally used to reduce power at times when the I/O is either idle or during sustained write (output) conditions. Disables DCI termination. When this signal is asserted HIGH, DCI termination is disabled. This feature is generally used to reduce power at times when the I/O is either idle or during sustained write (output) conditions. Sets the I/O in a high impedance 3-state mode when the I/O is being used for a read (input) operation. The T pin also affects the IBUFDISABLE function when USE_IBUFDISABLE = "TRUE". Buffer output representing the input path to the device. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Send Feedback 204 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute DRIVE Data Type Integer Allowed Values 2, 4, 6, 8, 12, 16, 24 IBUF_LOW_ PWR IOSTANDARD SLEW String "TRUE", "FALSE" String String See Data Sheet "SLOW", "FAST", USE_ IBUFDISABLE String "TRUE", "FALSE" Default 12 "TRUE" "DEFAULT" "SLOW" "TRUE" Description Selects output drive strength (mA) for the SelectIO™ buffers. Allows a trade off of lower power consumption vs. highest performance. Assigns an I/O standard to the element. Sets the output rise and fall time. See the Data Sheet for recommendations of the best setting for this attribute. Enables or disables the feature of IBUFDISABLE. Set to FALSE when it is not desirable to have the T pin disable input path to allow a read during write operation. When set to TRUE deasserting T (IO used as output) or asserting IBUFDISABLE will disable the input path through the buffer and forces to a logic high. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IOBUF_DCIEN: Single-ended Bi-directional Buffer with Digital Controlled Impedance (DCI) -- and Input path enable/disable -- May only be placed in High Performance (HP) Banks -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IOBUF_DCIEN_inst : IOBUF_DCIEN generic map ( DRIVE => 12, IOSTANDARD => "DEFAULT", IBUF_LOW_PWR => "TRUE", SLEW => "SLOW") port map ( O => O, -- Buffer output IO => IO, -- Buffer inout port (connect directly to top-level port) DCITERMDISABLE => DCITERMDISABLE, -- DCI Termination enable input I => I, -- Buffer input IBUFDISABLE => IBUFDISABLE, -- Input disable input, low=disable T => T -- 3-state enable input, high=input, low=output ); -- End of IOBUF_DCIEN_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 205 Chapter 4: About Design Elements Verilog Instantiation Template // IOBUF_DCIEN: Single-ended Bi-directional Buffer with Digital Controlled Impedance (DCI) // and Input path enable/disable // May only be placed in High Performance (HP) Banks // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IOBUF_DCIEN #( .DRIVE(12), // Specify the output drive strength .IBUF_LOW_PWR("TRUE"), // Low Power - "TRUE", High Performance = "FALSE" .IOSTANDARD("DEFAULT"), // Specify the I/O standard .SLEW("SLOW"), // Specify the output slew rate .USE_IBUFDISABLE("TRUE") // Use IBUFDISABLE function, "TRUE" or "FALSE" ) IOBUF_DCIEN_inst ( .O(O), // Buffer output .IO(IO), // Buffer inout port (connect directly to top-level port) .DCITERMDISABLE(DCITERMDISABLE), // DCI Termination enable input .I(I), // Buffer input .IBUFDISABLE(IBUFDISABLE), // Input disable input, low=disable .T(T) // 3-state enable input, high=input, low=output ); // End of IOBUF_DCIEN_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 206 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements IOBUF_INTERMDISABLE Primitive: Bi-Directional Single-ended Buffer with Input Termination Disable and Input Path Disable Introduction The design element is a bidirectional single-ended I/O Buffer used to connect internal logic to an external bidirectional pin. This element include uncalibrated input termination (INTERM) disable as well as input path disable as additional power saving features when the I/O is either is an unused state or being used as an output for several clock cycles. This element may only be placed in High Range (HR) banks in the 7 series devices. Port Descriptions Port O Direction Output IO In/out I Input IBUFDISABLE Input Width 1 1 1 1 INTERMDISABLE Input 1 T Input 1 Function Buffer output representing the input path to the device. Bi-directional port connection. Connect directly to top-level port in the design. Buffer input representing the output path to the device. Disables input path through the buffer and forces to a logic high when USE_IBUFDISABLE is set to "TRUE". If USE_IBUFDISABLE is set to "FALSE" this input is ignored and should be tied to ground. This feature is generally used to reduce power at times when the I/O is either idle or during sustained write (output) conditions. Disables input termination. This feature is generally used to reduce power at times when the I/O is either idle or during sustained write (output) conditions. Sets the I/O in a high impedance 3-state mode when the I/O is being used for a read (input) operation. The T pin also affects the IBUFDISABLE function when USE_IBUFDISABLE = "TRUE". The T pin also disables INTERM when in a write (output) mode. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 207 Chapter 4: About Design Elements Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Available Attributes Attribute DRIVE Data Type Integer Allowed Values 2, 4, 6, 8, 12, 16, 24 IBUF_LOW_ PWR IOSTANDARD SLEW String "TRUE", "FALSE" String String See Data Sheet "SLOW", "FAST" USE_ IBUFDISABLE String "TRUE", "FALSE" Default 12 "TRUE" "DEFAULT" "SLOW" "TRUE" Description Selects output drive strength (mA) for the SelectIO™ buffers. Allows a trade off of lower power consumption vs. highest performance. Assigns an I/O standard to the element. Sets the output rise and fall time. See the Data Sheet for recommendations of the best setting for this attribute. Enables or disables the feature of IBUFDISABLE. Generally used when it is not desirable to have the T pin disable input path to allow a read during write operation. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IOBUF_INTERMDISABLE: Single-ended Bi-directional Buffer with Input Termination -- and Input path enable/disable -- May only be placed in High Range (HR) Banks -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IOBUF_INTERMDISABLE_inst : IOBUF_INTERMDISABLE generic map ( DRIVE => 12, IOSTANDARD => "DEFAULT", -- Specify the I/O standard IBUF_LOW_PWR => "TRUE", -- Low Power - "TRUE", High Performance = "FALSE" USE_IBUFDISABLE => "TRUE", -- Use IBUFDISABLE function "TRUE" or "FALSE" SLEW => "SLOW") port map ( O => O, -- Buffer output IO => IO, -- Buffer inout port (connect directly to top-level port) DCITERMDISABLE => DCITERMDISABLE, -- DCI Termination enable input I => I, -- Buffer input IBUFDISABLE => IBUFDISABLE, -- Input disable input, low=disable INTERMDISABLE => INTERMDISABLE, -- Input termination disable input T => T -- 3-state enable input, high=input, low=output ); -- End of IOBUF_INTERMDISABLE_inst instantiation Send Feedback 208 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // IOBUF_INTERMDISABLE: Single-ended Bi-directional Buffer with Input Termination // and Input path enable/disable // May only be placed in High Range (HR) Banks // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IOBUF_INTERMDISABLE #( .DRIVE(12), // Specify the output drive strength .IBUF_LOW_PWR("TRUE"), // Low Power - "TRUE", High Performance = "FALSE" .IOSTANDARD("DEFAULT"), // Specify the I/O standard .SLEW("SLOW"), // Specify the output slew rate .USE_IBUFDISABLE("TRUE") // Use IBUFDISABLE function, "TRUE" or "FALSE" ) IOBUF_INTERMDISABLE_inst ( .O(O), // Buffer output .IO(IO), // Buffer inout port (connect directly to top-level port) .I(I), // Buffer input .IBUFDISABLE(IBUFDISABLE), // Input disable input, low=disable .INTERMDISABLE(INTERMDISABLE), // Input termination disable input .T(T) // 3-state enable input, high=input, low=output ); // End of IOBUF_INTERMDISABLE_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 209 Chapter 4: About Design Elements IOBUFDS Primitive: 3-State Differential Signaling I/O Buffer with Active Low Output Enable Introduction The design element is a bidirectional buffer that supports low-voltage, differential signaling. For the IOBUFDS, a design level interface signal is represented as two distinct ports (IO and IOB), one deemed the "master" and the other the "slave." The master and the slave are opposite phases of the same logical signal (for example, MYNET_P and MYNET_N). Optionally, a programmable differential termination feature is available to help improve signal integrity and reduce external components. Also available is a programmable delay is to assist in the capturing of incoming data to the device. Logic Table Inputs I T X 1 0 0 I 0 Bidirectional IO IOB Z Z 0 1 1 0 Outputs O No Change 0 1 Port Descriptions Port O IO IOB I T Direction Output In/out In/out Input Input Width 1 1 1 1 1 Function Buffer output Diff_p In/out Diff_n In/out Buffer input 3-state enable input Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Send Feedback 210 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute DIFF_TERM Data Type Boolean Allowed Values Default TRUE, FALSE FALSE IBUF_LOW_PWR Boolean TRUE, FALSE TRUE IOSTANDARD SLEW String String See Data Sheet "DEFAULT" "SLOW" or "FAST" "SLOW" Description The differential termination attribute is designed for the 7 Series FPGA supported differential input I/O standards. It is used to turn the built-in differential termination on (TRUE) or off (FALSE). When set to TRUE, allows for reduced power when using differential or referenced (requiring VREF) input standards like LVDS or HSTL. A setting of FALSE demands more power but delivers higher performance characteristics. Consult the 7 Series FPGA SelectIO Resources User Guide for details. Assigns an I/O standard to the element. Specifies the slew rate of the output driver. Consult the product Data Sheet for recommendations of the best setting for this attribute. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IOBUFDS: Differential Bi-directional Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IOBUFDS_inst : IOBUFDS generic map ( DIFF_TERM => FALSE, -- Differential Termination (TRUE/FALSE) IBUF_LOW_PWR => TRUE, -- Low Power = TRUE, High Performance = FALSE IOSTANDARD => "BLVDS_25", -- Specify the I/O standard SLEW => "SLOW") -- Specify the output slew rate port map ( O => O, -- Buffer output IO => IO, -- Diff_p inout (connect directly to top-level port) IOB => IOB, -- Diff_n inout (connect directly to top-level port) I => I, -- Buffer input T => T -- 3-state enable input, high=input, low=output ); -- End of IOBUFDS_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 211 Chapter 4: About Design Elements Verilog Instantiation Template // IOBUFDS: Differential Bi-directional Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IOBUFDS #( .DIFF_TERM("FALSE"), // Differential Termination ("TRUE"/"FALSE") .IBUF_LOW_PWR("TRUE"), // Low Power - "TRUE", High Performance = "FALSE" .IOSTANDARD("BLVDS_25"), // Specify the I/O standard .SLEW("SLOW") // Specify the output slew rate ) IOBUFDS_inst ( .O(O), // Buffer output .IO(IO), // Diff_p inout (connect directly to top-level port) .IOB(IOB), // Diff_n inout (connect directly to top-level port) .I(I), // Buffer input .T(T) // 3-state enable input, high=input, low=output ); // End of IOBUFDS_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 212 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements IOBUFDS_DCIEN Primitive: Bi-Directional Differential Buffer with DCI Enable/Disable and Input Disable Introduction This design element is a bidirectional differential I/O buffer used to connect internal logic to an external bidirectional pin. This element includes Digitally Controlled Impedance (DCI) termination enable/disable as well as input path disable as additional power saving features when the I/O is either in an unused state or being used as an output for a sustained amount of time. This element may only be placed in High Performance (HP) banks in the 7 series devices. Port Descriptions Port IO Direction In/out IOB In/out I Input IBUFDISABLE Input Width 1 1 1 1 DCITERMDISABLE Input 1 T Input 1 O Output 1 Function Bi-directional p-side port connection. Connect directly to top-level port in the design. Bi-directional p-side port connection. Connect directly to top-level port in the design. Buffer input representing the output path to the device. Disables input path. When this signal is asserted HIGH and the attribute USE_IBUFDISABLE is set to "TRUE", the input path through the input buffer is disabled and forced to a logic HIGH.. If USE_IBUFDISABLE is set to "FALSE" this input is ignored and should be tied to ground. This feature is generally used to reduce power at times when the I/O is either idle or during sustained write (output) conditions. Disables DCI termination. When this signal is asserted HIGH, DCI termination is disabled. This feature is generally used to reduce power at times when the I/O is either idle or during sustained write (output) conditions. Sets the I/O in a high impedance 3-state mode when the I/O is being used for a read (input) operation. The T pin also affects the IBUFDISABLE function when USE_IBUFDISABLE = "TRUE". Buffer output representing the input path to the device. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 213 Chapter 4: About Design Elements Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Available Attributes Attribute DIFF_TERM Data Type String Allowed Values "TRUE", "FALSE" IBUF_LOW_ PWR IOSTANDARD SLEW String "TRUE", "FALSE" String String See Data Sheet "SLOW", "FAST", USE_ IBUFDISABLE String "TRUE", "FALSE" Default "FALSE" "TRUE" "DEFAULT" "SLOW" "TRUE" Description Enable the built-in differential termination. Allows a trade off of lower power consumption vs. highest performance. Assigns an I/O standard to the element. Sets the output rise and fall time. See the Data Sheet for recommendations of the best setting for this attribute. Enables or disables the feature of IBUFDISABLE. Set to FALSE when it is not desirable to have the T pin disable input path to allow a read during write operation. When set to TRUE deasserting T (IO used as output) or asserting IBUFDISABLE will disable the input path through the buffer and forces to a logic high. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IOBUFDS_DCIEN: Differential Bi-directional Buffer with Digital Controlled Impedance (DCI) -- and Input path enable/disable -- May only be placed in High Performance (HP) Banks -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IOBUFDS_DCIEN_inst : IOBUFDS_DCIEN generic map ( DIFF_TERM => "FALSE", -- Differential termination (TRUE/FALSE) IBUF_LOW_PWR => "TRUE", -- Low Power - TRUE, HIGH Performance = FALSE IOSTANDARD => "BLVDS_25", -- Specify the I/O standard SLEW => "SLOW", -- Specify the output slew rate USE_IBUFDISABLE => "TRUE") -- Use IBUFDISABLE function "TRUE" or "FALSE" port map ( O => O, -- Buffer output IO => IO, -- Diff_p inout (connect directly to top-level port) IOB => IOB, -- Diff_n inout (connect directly to top-level port) DCITERMDISABLE => DCITERMDISABLE, -- DCI Termination enable input I => I, -- Buffer input IBUFDISABLE => IBUFDISABLE, -- Input disable input, low=disable T => T -- 3-state enable input, high=input, low=output ); -- End of IOBUFDS_DCIEN_inst instantiation Send Feedback 214 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // IOBUFDS_DCIEN: Differential Bi-directional Buffer with Digital Controlled Impedance (DCI) // and Input path enable/disable // May only be placed in High Performance (HP) Banks // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IOBUFDS_DCIEN #( .DIFF_TERM("FALSE"), // Differential Termination ("TRUE"/"FALSE") .IBUF_LOW_PWR("TRUE"), // Low Power - "TRUE", High Performance = "FALSE" .IOSTANDARD("BLVDS_25"), // Specify the I/O standard .SLEW("SLOW"), // Specify the output slew rate .USE_IBUFDISABLE("TRUE") // Use IBUFDISABLE function, "TRUE" or "FALSE" ) IOBUFDS_DCIEN_inst ( .O(O), // Buffer output .IO(IO), // Diff_p inout (connect directly to top-level port) .IOB(IOB), // Diff_n inout (connect directly to top-level port) .DCITERMDISABLE(DCITERMDISABLE), // DCI Termination enable input .I(I), // Buffer input .IBUFDISABLE(IBUFDISABLE), // Input disable input, low=disable .T(T) // 3-state enable input, high=input, low=output ); // End of IOBUFDS_DCIEN_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 215 Chapter 4: About Design Elements IOBUFDS_DIFF_OUT Primitive: Differential Bi-directional Buffer with Differential Output Introduction This design element is a bidirectional buffer that supports low-voltage, differential signaling. For the IOBUFDS_DIFF_OUT, a design level interface signal is represented as two distinct ports (IO and IOB), one deemed the "master" and the other the "slave." The master and the slave are opposite phases of the same logical signal (for example, MYNET_P and MYNET_N). The IOBUFDS_DIFF_OUT differs from the IOBUFDS in that it allows internal access to both phases of the differential signal. Optionally, a programmable differential termination feature is available to help improve signal integrity and reduce external components. Port Descriptions Port O OB IO IOB I TM Direction Output Output In/out In/out Input Input TS Input Width 1 1 1 1 1 1 1 Function Buffer p-side output Buffer n-side output Diff_p In/out (connect directly to top-level port) Diff_n In/out (connect directly to top-level port) Buffer input 3-state enable input from master OLOGIC, high=input, low=output 3-state enable input from slave OLOGIC, high=input, low=output Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Send Feedback 216 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute DIFF_TERM Data Type Boolean Allowed Values Default TRUE, FALSE FALSE IBUF_LOW_PWR Boolean TRUE, FALSE TRUE IOSTANDARD String See Data Sheet "DEFAULT" Description The differential termination attribute is designed for the 7 Series FPGA supported differential input I/O standards. It is used to turn the built-in, 100?, differential termination on (TRUE) or off (FALSE). When set to TRUE, allows for reduced power when using differential or referenced (requiring VREF) input standards like LVDS or HSTL. A setting of FALSE demands more power but delivers higher performance characteristics. Consult the 7 Series FPGA SelectIO Resources User Guide for details. Assigns an I/O standard to the element. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IOBUFDS_DIFF_OUT: Differential Bi-directional Buffer with Differential Output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IOBUFDS_DIFF_OUT_inst : IOBUFDS_DIFF_OUT generic map ( DIFF_TERM => FALSE, -- Differential Termination (TRUE/FALSE) IBUF_LOW_PWR => TRUE, -- Low Power - TRUE, High Performance = FALSE IOSTANDARD => "BLVDS_25") -- Specify the I/O standard port map ( O => O, -- Buffer p-side output OB => OB, -- Buffer n-side output IO => IO, -- Diff_p inout (connect directly to top-level port) IOB => IOB, -- Diff_n inout (connect directly to top-level port) I => I, -- Buffer input TM => TM, -- 3-state enable input, high=input, low=output TS => TS -- 3-state enable input, high=output, low=input ); -- End of IOBUFDS_DIFF_OUT_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 217 Chapter 4: About Design Elements Verilog Instantiation Template // IOBUFDS_DIFF_OUT: Differential Bi-directional Buffer with Differential Output // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IOBUFDS_DIFF_OUT #( .DIFF_TERM("FALSE"), // Differential Termination ("TRUE"/"FALSE") .IBUF_LOW_PWR("TRUE"), // Low Power - "TRUE", High Performance = "FALSE" .IOSTANDARD("BLVDS_25") // Specify the I/O standard ) IOBUFDS_DIFF_OUT_inst ( .O(O), // Buffer p-side output .OB(OB), // Buffer n-side output .IO(IO), // Diff_p inout (connect directly to top-level port) .IOB(IOB), // Diff_n inout (connect directly to top-level port) .I(I), // Buffer input .TM(TM), // 3-state enable input, high=input, low=output .TS(TS) // 3-state enable input, high=output, low=input ); // End of IOBUFDS_DIFF_OUT_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 218 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements IOBUFDS_DIFF_OUT_DCIEN Primitive: Bi-Directional Differential Buffer with DCI Disable, Input Disable, and Differential Output Introduction This design element is a bidirectional differential I/O buffer used to connect internal logic to an external bidirectional pin. This element includes Digitally Controlled Impedance (DCI) termination enable/ disable as well as input path disable as additional power saving features when the I/O is either is an unused state or being used as an output for a sustained amount of time. The IOBUFDS_DIFF_OUT_DCIEN differs from the IOBUFDS_DCIEN in that it allows internal access to both phases of the differential signal. This element may only be placed in High Performance (HP) banks in the 7 series devices. Port Descriptions Port IO Direction In/out IOB In/out I Input IBUFDISABLE Input Width 1 1 1 1 DCITERMDISABLE Input 1 TM Input 1 Function Bi-directional p-side port connection. Connect directly to top-level port in the design. Bi-directional n-side port connection. Connect directly to top-level port in the design. Buffer input representing the output path to the device. Disables input path. When this signal is asserted HIGH and the attribute USE_IBUFDISABLE is set to "TRUE", the input path through the input buffer is disabled and forced to a logic HIGH.. If USE_IBUFDISABLE is set to "FALSE" this input is ignored and should be tied to ground. This feature is generally used to reduce power at times when the I/O is either idle or during sustained write (output) conditions. Disables DCI termination. When this signal is asserted HIGH, DCI termination is disabled. This feature is generally used to reduce power at times when the I/O is either idle or during sustained write (output) conditions. P-side or master side of the high impedance 3-state mode when the I/O is being used for a read (input) operation. The TM pin also affects the Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 219 Chapter 4: About Design Elements Port TS O OB Direction Input Output Output Width 1 1 1 Function IBUFDISABLE function when USE_IBUFDISABLE = "TRUE". N-side or slave side of the high impedance 3-state mode when the I/O is being used for a read (input) operation. The TM pin also affects the IBUFDISABLE function when USE_IBUFDISABLE = "TRUE". Buffer p-side output representing the input path to the device. Buffer n-side output representing the input path to the device. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Available Attributes Attribute DIFF_TERM Data Type String Allowed Values "TRUE", "FALSE" IBUF_LOW_ PWR IOSTANDARD USE_ IBUFDISABLE String "TRUE", "FALSE" String String See Data Sheet "TRUE", "FALSE" Default "FALSE" "TRUE" "DEFAULT" "TRUE" Description Enable the built-in differential termination. Allows a trade off of lower power consumption vs highest performance. Assigns an I/O standard to the element. Enables or disables the feature of IBUFDISABLE. Set to FALSE when it is not desirable to have the T pin disable input path to allow a read during write operation. When set to TRUE deasserting T (IO used as output) or asserting IBUFDISABLE will disable the input path through the buffer and forces to a logic high. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IOBUFDS_DIFF_OUT_DCIEN: Differential Bi-directional Buffer with Differential Output, -- Digital Controlled Impedance (DCI)and Input path enable/disable -- May only be placed in High Performance (HP) Banks -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IOBUFDS_DIFF_OUT_DCIEN_inst : IOBUFDS_DIFF_OUT_DCIEN generic map ( DIFF_TERM => "FALSE", -- Differential Termination (TRUE/FALSE) Send Feedback 220 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements IBUF_LOW_PWR => "TRUE", -- Low Power - TRUE, High Performance = FALSE IOSTANDARD => "BLVDS_25", -- Specify the I/O standard USE_IBUFDISABLE => "TRUE") -- Use IBUFDISABLE function, "TRUE" or "FALSE" port map ( O => O, -- Buffer p-side output OB => OB, -- Buffer n-side output IO => IO, -- Diff_p inout (connect directly to top-level port) IOB => IOB, -- Diff_n inout (connect directly to top-level port) DCITERMDISABLE => DCITERMDISABLE, -- DCI Termination enable input I => I, -- Buffer input IBUFTERMDISABLE => IBUFTERMDISABLE, -- input disable input, low=disable TM => TM, -- 3-state enable input, high=input, low=output TS => TS -- 3-state enable input, high=output, low=input ); -- End of IOBUFDS_DIFF_OUT_DCIEN_inst instantiation Verilog Instantiation Template // IOBUFDS_DIFF_OUT_DCIEN: Differential Bi-directional Buffer with Differential Output, // Digital Controlled Impedance (DCI)and Input path enable/disable // May only be placed in High Performance (HP) Banks // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IOBUFDS_DIFF_OUT_DCIEN #( .DIFF_TERM("FALSE"), // Differential Termination ("TRUE"/"FALSE") .IBUF_LOW_PWR("TRUE"), // Low Power - "TRUE", High Performance = "FALSE" .IOSTANDARD("BLVDS_25"), // Specify the I/O standard .USE_IBUFDISABLE("TRUE") // Use IBUFDISABLE function, "TRUE" or "FALSE" ) IOBUFDS_DIFF_OUT_DCIEN_inst ( .O(O), // Buffer p-side output .OB(OB), // Buffer n-side output .IO(IO), // Diff_p inout (connect directly to top-level port) .IOB(IOB), // Diff_n inout (connect directly to top-level port) .DCITERMDISABLE(DCITERMDISABLE), // DCI Termination enable input .I(I), // Buffer input .IBUFDISABLE(IBUFDISABLE), // Input disable input, low=disable .TM(TM), // 3-state enable input, high=input, low=output .TS(TS) // 3-state enable input, high=output, low=input ); // End of IOBUFDS_DIFF_OUT_DCIEN_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 221 Chapter 4: About Design Elements IOBUFDS_DIFF_OUT_INTERMDISABLE Primitive: Bi-Directional Differential Buffer with Input Termination Disable, Input Disable, and Differential Output Introduction This design element is a bidirectional differential I/O Buffer used to connect internal logic to an external bidirectional pin. This element includes an uncalibrated input termination (INTERM) disable as well as input path disable as additional power saving features when the I/O is either is an unused state or being used as an output for several clock cycles. The IOBUFDS_DIFF_OUT_INTERMDISABLE differs from the IOBUFDS_INTERMDISABLE in that it allows internal access to both phases of the differential signal. This element may only be placed in High Range (HR) banks in the 7 series devices. Port Descriptions Port IO Direction In/out IOB In/out I IBUFDISABLE Input Input Width 1 1 1 1 INTERMDISABLE Input 1 TM Input 1 TS Input 1 Function Bi-directional p-side port connection. Connect directly to top-level port in the design. Bi-directional n-side port connection. Connect directly to top-level port in the design. Buffer input representing the output path to the device. Disables input path through the buffer and forces to a logic high when USE_IBUFDISABLE is set to "TRUE". If USE_IBUFDISABLE is set to "FALSE" this input is ignored and should be tied to ground. This feature is generally used to reduce power at times when the I/O is either idle or during sustained write (output) conditions. Disables input termination. This feature is generally used to reduce power at times when the I/O is either idle or during sustained write (output) conditions. P-side or master side of the high impedance 3-state mode when the I/O is being used for a read (input) operation. The TM pin also affects the IBUFDISABLE function when USE_IBUFDISABLE = "TRUE", and disables INTERM when in a write (output) mode. N-side or slave side of the high impedance 3-state mode when the I/O is being used for a read (input) operation. The TS pin also affects the IBUFDISABLE function when Send Feedback 222 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port O OB Direction Output Output Width 1 1 Function USE_IBUFDISABLE = "TRUE", and disables INTERM when in a write (output) mode. Buffer p-side output representing the input path to the device. Buffer n-side output representing the input path to the device. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Available Attributes Attribute DIFF_TERM Data Type String IBUF_LOW_PWR String Allowed Values Default "TRUE", "FALSE" "FALSE" "TRUE", "FALSE" "TRUE" IOSTANDARD USE_IBUFDISABLE String String See Data Sheet "TRUE", "FALSE" "DEFAULT" "TRUE" Description Enable the built-in differential termination. Allows a trade off of lower power consumption vs. highest performance when referenced I/O standards are used. Assigns an I/O standard to the element. Enables or disables the feature of IBUFDISABLE. Generally used when it is not desirable to have the T pin disable input path to allow a read during write operation. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IOBUFDS_DIFF_OUT_INTERMDISABLE: Differential Global Clock Buffer with Differential Output -- Input Termination and Input Path Disable -- May only be placed in High Range (HR) Banks -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IOBUFDS_DIFF_OUT_INTERMDISABLE_inst : IOBUFDS_DIFF_OUT_INTERMDISABLE generic map ( DIFF_TERM => "FALSE", -- Differential Termination (TRUE/FALSE) IBUF_LOW_PWR => "TRUE", -- Low Power - TRUE, High Performance = FALSE IOSTANDARD => "BLVDS_25", -- Specify the I/O standard USE_IBUFDISABLE => "TRUE") -- Use IBUFDISABLE function, "TRUE" or "FALSE" port map ( O => O, -- Buffer p-side output OB => OB, -- Buffer n-side output IO => IO, -- Diff_p inout (connect directly to top-level port) IOB => IOB, -- Diff_n inout (connect directly to top-level port) DCITERMDISABLE => DCITERMDISABLE, -- DCI Termination enable input Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 223 Chapter 4: About Design Elements I => I, -- Buffer input IBUFDISABLE => IBUFDISABLE, -- input disable input, low=disable INTERMDISABLE => INTERMDISABLE, -- Input termination disable input TM => TM, -- 3-state enable input, high=input, low=output TS => TS -- 3-state enable input, high=output, low=input ); -- End of IOBUFDS_DIFF_OUT_INTERMDISABLE_inst instantiation Verilog Instantiation Template // IOBUFDS_DIFF_OUT_INTERMDISABLE: Differential Global Clock Buffer with Differential Output // Input Termination and Input Path Disable // May only be placed in High Range (HR) Banks // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IOBUFDS_DIFF_OUT_INTERMDISABLE #( .DIFF_TERM("FALSE"), // Differential Termination, "TRUE"/"FALSE" .IBUF_LOW_PWR("TRUE"), // Low power="TRUE", Highest performance="FALSE" .IOSTANDARD("DEFAULT"), // Specify the input I/O standard .USE_IBUFDISABLE("TRUE") // Set to "TRUE" to enable IBUFDISABLE feature ) IOBUFDS_DIFF_OUT_INTERMDISABLE_inst ( .O(O), // Buffer p-side output .OB(OB), // Buffer n-side output .IO(IO), // Diff_p inout (connect directly to top-level port) .IOB(IOB), // Diff_n inout (connect directly to top-level port) .I(I), // Buffer input .INTERMDISABLE(INTERMDISABLE), // Input termination disable input .IBUFDISABLE(IBUFDISABLE), // Input disable input, low=disable .TM(TM), // 3-state enable input, high=input, low=output .TS(TS) // 3-state enable input, high=output, low=input ); // End of IOBUFDS_DIFF_OUT_INTERMDISABLE_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 224 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements IOBUFDS_INTERMDISABLE Primitive: Bi-Directional Differential Buffer with Input Termination Disable and Input Disable Introduction This design element is a bidirectional differential I/O buffer used to connect internal logic to an external bidirectional pin. This element includes an uncalibrated input termination (INTERM) disable as well as an input path disable as additional power saving features when the I/O is either is an unused state or being used as an output for a sustained amount of time. This element may only be placed in High Range (HR) banks in 7 series devices. Port Descriptions Port IO Direction In/out IOB In/out I IBUFDISABLE Input Input Width 1 1 1 1 INTERMDISABLE Input 1 T Input 1 O Output 1 Function Bi-directional p-side port connection. Connect directly to top-level port in the design. Bi-directional n-side port connection. Connect directly to top-level port in the design. Buffer input representing the output path to the device. Disables input path through the buffer and forces to a logic high when USE_IBUFDISABLE is set to "TRUE". If USE_IBUFDISABLE is set to "FALSE" this input is ignored and should be tied to ground. This feature is generally used to reduce power at times when the I/O is either idle or during sustained write (output) conditions. Disables input termination. This feature is generally used to reduce power at times when the I/O is either idle or during sustained write (output) conditions. Sets the I/O in a high impedance 3-state mode when the I/O is being used for a read (input) operation. The T pin also affects the IBUFDISABLE function when USE_IBUFDISABLE = "TRUE". The T pin also disables INTERM when in a write (output) mode. Buffer output representing the input path to the device. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 225 Chapter 4: About Design Elements Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Available Attributes Attribute DIFF_TERM Data Type String IBUF_LOW_PWR String Allowed Values Default "TRUE", "FALSE" "FALSE" "TRUE", "FALSE" "TRUE" IOSTANDARD SLEW String String See Data Sheet "DEFAULT" "SLOW" or "FAST" "SLOW" USE_IBUFDISABLE String "TRUE", "FALSE" "TRUE" Description Enable the built-in differential termination. Allows a trade off of lower power consumption vs. highest performance when referenced I/O standards are used. Assigns an I/O standard to the element. Sets the output rise and fall time. See the Data Sheet for recommendations of the best setting for this attribute. Enables or disables the feature of IBUFDISABLE. Generally used when it is not desirable to have the T pin disable input path to allow a read during write operation. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- IOBUFDS_INTERMDISABLE: Differential Bi-directional Buffer with Input Termination -- and Input path enable/disable -- May only be placed in High Range (HR) Banks -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 IOBUFDS_INTERMDISABLE_inst : IOBUFDS_INTERMDISABLE generic map ( DIFF_TERM => "FALSE", -- Differential termination (TRUE/FALSE) IBUF_LOW_PWR => "TRUE", -- Low Power - TRUE, HIGH Performance = FALSE IOSTANDARD => "BLVDS_25", -- Specify the I/O standard SLEW => "SLOW", -- Specify the output slew rate USE_IBUFDISABLE => "TRUE") -- Use IBUFDISABLE function "TRUE" or "FALSE" port map ( O => O, -- Buffer output IO => IO, -- Diff_p inout (connect directly to top-level port) IOB => IOB, -- Diff_n inout (connect directly to top-level port) DCITERMDISABLE => DCITERMDISABLE, -- DCI Termination enable input I => I, -- Buffer input IBUFDISABLE => IBUFDISABLE, -- Input disable input, low=disable INTERMDISABLE => INTERMDISABLE, -- Input termination disable input T => T -- 3-state enable input, high=input, low=output ); -- End of IOBUFDS_INTERMDISABLE_inst instantiation Send Feedback 226 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // IOBUFDS_INTERMDISABLE: Differential Bi-directional Buffer with Input Termination // and Input path enable/disable // May only be placed in High Range (HR) Banks // 7 Series // Xilinx HDL Libraries Guide, version 14.7 IOBUFDS_INTERMDISABLE #( .DIFF_TERM("FALSE"), // Differential Termination ("TRUE"/"FALSE") .IBUF_LOW_PWR("TRUE"), // Low Power - "TRUE", High Performance = "FALSE" .IOSTANDARD("BLVDS_25"), // Specify the I/O standard .SLEW("SLOW"), // Specify the output slew rate .USE_IBUFDISABLE("TRUE") // Use IBUFDISABLE function, "TRUE" or "FALSE" ) IOBUFDS_INTERMDISABLE_inst ( .O(O), // Buffer output .IO(IO), // Diff_p inout (connect directly to top-level port) .IOB(IOB), // Diff_n inout (connect directly to top-level port) .I(I), // Buffer input .IBUFDISABLE(IBUFDISABLE), // Input disable input, low=disable .INTERMDISABLE(INTERMDISABLE), // Input termination disable input .T(T) // 3-state enable input, high=input, low=output ); // End of IOBUFDS_INTERMDISABLE_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 227 Chapter 4: About Design Elements ISERDESE2 Primitive: Input SERial/DESerializer with Bitslip Introduction The ISERDESE2 in 7 series FPGAs is a dedicated serial-to-parallel converter with specific clocking and logic features designed to facilitate the implementation of high-speed source-synchronous applications. The ISERDESE2 avoids the additional timing complexities encountered when designing deserializers in the FPGA fabric. ISERDESE2 features include: • Dedicated Deserializer/Serial-to-Parallel Converter, which enables high-speed data transfer without requiring the FPGA fabric to match the input data frequency. This converter supports both single data rate (SDR) and double data rate (DDR) modes. In SDR mode, the serial-to-parallel converter creates a 2-, 3-, 4-, 5-, 6-, 7-, or 8-bit wide parallel word. In DDR mode, the serial-to-parallel converter creates a 4-, 6-, 8-, 10-, or 14-bit-wide parallel word. • Bitslip Submodule, which lets designers reorder the sequence of the parallel data stream going into the FPGA fabric. This can be used for training source-synchronous interfaces that include a training pattern. • Dedicated Support for Strobe-based Memory Interfaces, including the OCLK input pin, to handle the strobe-to-FPGA clock domain crossover entirely within the ISERDESE2 block. This allows for higher performance and a simplified implementation. • Dedicated Support for Networking Interfaces • Dedicated Support for Memory Interfaces Send Feedback 228 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port Descriptions Port BITSLIP Type Input CE1, CE2 Input CLK CLKB Input Input CLKDIV Input CLKDIVP D Input Input DDLY Input DYNCLKDIVSEL Input DYNCLKSEL Input O Output OCLK Input OCLKB Input Width 1 1 1 1 1 1 1 1 1 1 1 1 1 Function The BITSLIP pin performs a Bitslip operation synchronous to CLKDIV when asserted (active High). Subsequently, the data seen on the Q1 to Q8 output ports will shift, as in a barrel-shifter operation, one position every time Bitslip is invoked (DDR operation is different from SDR). Each ISERDESE2 block contains an input clock enable module. When NUM_CE = 1, the CE2 input is not used, and the CE1 input is an active high clock enable connected directly to the input registers in the ISERDESE2. When NUM_CE = 2, the CE1 and CE2 inputs are both used, with CE1 enabling the ISERDESE2 for half of a CLKDIV cycle, and CE2 enabling the ISERDESE2 for the other half. The clock enable module functions as a 2:1 serial-to-parallel converter, clocked by CLKDIV. The clock enable module is needed specifically for bidirectional memory interfaces when ISERDESE2 is configured for 1:4 deserialization in DDR mode. When the attribute NUM_CE = 2, the clock enable module is enabled and both CE1 and CE2 ports are available. When NUM_CE = 1, only CE1 is available and functions as a regular clock enable. The high-speed clock input (CLK) is used to clock in the input serial data stream. The high-speed secondary clock input (CLKB) is used to clock in the input serial data stream. In any mode other than "MEMORY_QDR", connect CLKB to an inverted version of CLK. In "MEMORY_QDR" mode CLKB should be connected to a unique, phase shifted clock. The divided clock input (CLKDIV) is typically a divided version of CLK (depending on the width of the implemented deserialization). It drives the output of the serial-to-parallel converter, the Bitslip submodule, and the CE module. Only supported in MIG. Sourced by PHASER_IN divided CLK in MEMORY_DDR3 mode. All other modes connect to ground. The serial input data port (D) is the serial (high-speed) data input port of the ISERDESE2. This port works in conjunction only with the 7 series FPGA I/O resource. The serial input data port (DDLY) is the serial (high-speed) data input port of the ISERDESE2. This port works in conjunction only with the 7 series FPGA IDELAYE2 resource. Dynamically select CLKDIV inversion. Dynamically select CLK and CLKB inversion. The combinatorial output port (O) is an unregistered output of the ISERDESE2 module. This output can come directly from the data input (D), or from the data input (DDLY) via the IDELAYE2. The OCLK clock input synchronizes data transfer in strobe-based memory interfaces. The OCLK clock is only used when INTERFACE_TYPE is set to "MEMORY". The OCLK clock input is used to transfer strobe-based memory data onto a free-running clock domain. OCLK is a free-running FPGA clock at the same frequency as the strobe on the CLK input. The timing of the domain transfer is set by the user by adjusting the delay of the strobe signal to the CLK input (e.g., using IDELAY). Examples of setting the timing of this domain transfer are given in the Memory Interface Generator (MIG). When INTERFACE_TYPE is "NETWORKING", this port is unused and should be connected to GND. The OCLK clock input synchronizes data transfer in strobe-based memory interfaces. The OCLKB clock is only used when INTERFACE_TYPE is set to "MEMORY". Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 229 Chapter 4: About Design Elements Port OFB Q1 - Q8 Type Input Output RST Input SHIFTIN1, SHIFTIN2 SHIFTOUT1, SHIFTOUT2 Input Output Width 1 1 1 1 1 Function The serial input data port (OFB) is the serial (high-speed) data input port of the ISERDESE2. This port works in conjunction only with the 7 series FPGA OSERDESE2 port OFB. The output ports Q1 to Q8 are the registered outputs of the ISERDESE2 module. One ISERDESE2 block can support up to eight bits (i.e., a 1:8 deserialization). Bit widths greater than eight (up to 14) can be supported using Width Expansion. The first data bit received appears on the highest order Q output. The bit ordering at the input of an OSERDESE2 is the opposite of the bit ordering at the output of an ISERDESE2 block. For example, the least significant bit A of the word FEDCBA is placed at the D1 input of an OSERDESE2, but the same bit A emerges from the ISERDESE2 block at the Q8 output. In other words, D1 is the least significant input to the OSERDESE2, while Q8 is the least significant output of the ISERDESE2 block. When width expansion is used, D1 of the master OSERDESE1 is the least significant input, while Q7 of the slave ISERDESE2 block is the least significant output. The reset input causes the outputs of all data flip-flops in the CLK and CLKDIV domains to be driven low asynchronously. ISERDESE2 circuits running in the CLK domain where timing is critical use an internal, dedicated circuit to retime the RST input to produce a reset signal synchronous to the CLK domain. Similarly, there is a dedicated circuit to retime the RST input to produce a reset signal synchronous to the CLKDIV domain. Because the ISERDESE2 is driven into reset asynchronously but comes out of reset synchronously it must be treated as a synchronous reset to the CLKDIV time domain and have a minimum pulse of one CLKDIV cycle. When building an interface consisting of multiple ISERDESE2 ports, all ISERDESE2 ports in the interface must be synchronized. The internal retiming of the RST input is designed so that all ISERDESE2 blocks that receive the same reset pulse come out of reset synchronized with one another. If SERDES_MODE="SLAVE", connect SHIFTIN1/2 to the master ISERDESE2 SHIFTOUT1/2 outputs. Otherwise, leave SHIFTOUT1/2 unconnected and/or SHIFTIN1/2 grounded. If SERDES_MODE="MASTER" and two ISERDESE2s are to be cascaded, connect SHIFTOUT1/2 to the slave ISERDESE2 SHIFTIN1/2 inputs. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Send Feedback 230 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute DATA_RATE Type STRING Allowed Values "DDR", "SDR" Default "DDR" DATA_WIDTH DECIMAL 4, 2, 3, 5, 6, 7, 8, 10, 14 4 DYN_CLKDIV_INV STRING _EN DYN_CLK_INV_ENSTRING "FALSE", "TRUE" "FALSE", "TRUE" "FALSE" "FALSE" INIT_Q1, INIT_Q2, INIT_Q3, INIT_Q4 BINARY INTERFACE_TYPE STRING IOBDELAY STRING 1'b0 to 1'b1 1'b0 "MEMORY", "MEMORY_DDR3", "MEMORY_QDR", "NETWORKING", "OVERSAMPLE" "NONE", "BOTH", "IBUF", "IFD" "MEMORY" "NONE" NUM_CE OFB_USED DECIMAL 2, 1 STRING "FALSE", "TRUE" 2 "FALSE" Description The DATA_RATE attribute defines whether the incoming data stream is processed as single data rate (SDR) or double data rate (DDR). Defines the width of the serial-to-parallel converter. The legal value depends on the DATA_RATE attribute (SDR or DDR). • If DATA_RATE = DDR, value is limited to 4, 6, 8, 10 or 14. • If DATA_RATE = SDR, value is limited to 2, 3, 4, 5, 6, 7, or 8. Enables DYNCLKDIVINVSEL inversion when TRUE and disables HDL inversions on CLKDIV pin. Enables DYNCLKINVSEL inversion when TRUE and disables HDL inversions on CLK and CLKB pins. Defines the initial value on the Q1 through Q4 outputs after configuration. Specifies mode of operation for the ISERDESE2. For details on each mode, please refer to the 7 series FPGA SelectIO Resources User Guide. Defines input sources for ISERDESE2 module. The D and DDLY pins are dedicated inputs to the ISERDESE2. The D input is a direct connection to the I/O. The DDLY pin is a direct connection to the IODELAYE2. This allows the user to either have a delayed or non-delayed version of the input to the registered (Q1- Q6) or combinatorial path (O) output. The attribute IOBDELAY determines the input applied the output. • "NONE" - O => D | Q1-Q6 => D • "IBUF" - O => DDLY | Q1-Q6 => D • "IFD" - O => D | Q1-Q6 => DDLY • "BOTH" - O => DDLY | Q1-Q6 => DDLY The NUM_CE attribute defines the number of clock enables (CE1 and CE2) used. Enables the path from the OLOGIC, OSERDES OFB pin to the ISERDES OFB pin. Disables the use of the D input pin. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 231 Chapter 4: About Design Elements Attribute SERDES_MODE Type STRING Allowed Values "MASTER", "SLAVE" Default "MASTER" SRVAL_Q1, BINARY 1'b0 to 1'b1 1'b0 SRVAL_Q2, SRVAL_Q3, SRVAL_Q4 Description The SERDES_MODE attribute defines whether the ISERDESE2 module is a master or slave when using width expansion. Set to "MASTER" when not using width explansion. Defines the value (set or reset) of Q1 through Q4 outputs when the SR pin is invoked. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- ISERDESE2: Input SERial/DESerializer with Bitslip -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 ISERDESE2_inst : ISERDESE2 generic map ( DATA_RATE => "DDR", -- DDR, SDR DATA_WIDTH => 4, -- Parallel data width (2-8,10,14) DYN_CLKDIV_INV_EN => "FALSE", -- Enable DYNCLKDIVINVSEL inversion (FALSE, TRUE) DYN_CLK_INV_EN => "FALSE", -- Enable DYNCLKINVSEL inversion (FALSE, TRUE) -- INIT_Q1 - INIT_Q4: Initial value on the Q outputs (0/1) INIT_Q1 => '0', INIT_Q2 => '0', INIT_Q3 => '0', INIT_Q4 => '0', INTERFACE_TYPE => "MEMORY", -- MEMORY, MEMORY_DDR3, MEMORY_QDR, NETWORKING, OVERSAMPLE IOBDELAY => "NONE", -- NONE, BOTH, IBUF, IFD NUM_CE => 2, -- Number of clock enables (1,2) OFB_USED => "FALSE", -- Select OFB path (FALSE, TRUE) SERDES_MODE => "MASTER", -- MASTER, SLAVE -- SRVAL_Q1 - SRVAL_Q4: Q output values when SR is used (0/1) SRVAL_Q1 => '0', SRVAL_Q2 => '0', SRVAL_Q3 => '0', SRVAL_Q4 => '0' ) port map ( O => O, -- 1-bit output: Combinatorial output -- Q1 - Q8: 1-bit (each) output: Registered data outputs Q1 => Q1, Q2 => Q2, Q3 => Q3, Q4 => Q4, Q5 => Q5, Q6 => Q6, Q7 => Q7, Q8 => Q8, -- SHIFTOUT1, SHIFTOUT2: 1-bit (each) output: Data width expansion output ports SHIFTOUT1 => SHIFTOUT1, SHIFTOUT2 => SHIFTOUT2, BITSLIP => BITSLIP, -- 1-bit input: The BITSLIP pin performs a Bitslip operation synchronous to -- CLKDIV when asserted (active High). Subsequently, the data seen on the -- Q1 to Q8 output ports will shift, as in a barrel-shifter operation, one -- position every time Bitslip is invoked (DDR operation is different from -- SDR). -- CE1, CE2: 1-bit (each) input: Data register clock enable inputs CE1 => CE1, CE2 => CE2, CLKDIVP => CLKDIVP, -- 1-bit input: TBD Send Feedback 232 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements -- Clocks: 1-bit (each) input: ISERDESE2 clock input ports CLK => CLK, -- 1-bit input: High-speed clock CLKB => CLKB, -- 1-bit input: High-speed secondary clock CLKDIV => CLKDIV, -- 1-bit input: Divided clock OCLK => OCLK, -- 1-bit input: High speed output clock used when INTERFACE_TYPE="MEMORY" -- Dynamic Clock Inversions: 1-bit (each) input: Dynamic clock inversion pins to switch clock polarity DYNCLKDIVSEL => DYNCLKDIVSEL, -- 1-bit input: Dynamic CLKDIV inversion DYNCLKSEL => DYNCLKSEL, -- 1-bit input: Dynamic CLK/CLKB inversion -- Input Data: 1-bit (each) input: ISERDESE2 data input ports D => D, -- 1-bit input: Data input DDLY => DDLY, -- 1-bit input: Serial data from IDELAYE2 OFB => OFB, -- 1-bit input: Data feedback from OSERDESE2 OCLKB => OCLKB, -- 1-bit input: High speed negative edge output clock RST => RST, -- 1-bit input: Active high asynchronous reset -- SHIFTIN1, SHIFTIN2: 1-bit (each) input: Data width expansion input ports SHIFTIN1 => SHIFTIN1, SHIFTIN2 => SHIFTIN2 ); -- End of ISERDESE2_inst instantiation Verilog Instantiation Template // ISERDESE2: Input SERial/DESerializer with Bitslip // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ISERDESE2 #( .DATA_RATE("DDR"), // DDR, SDR .DATA_WIDTH(4), // Parallel data width (2-8,10,14) .DYN_CLKDIV_INV_EN("FALSE"), // Enable DYNCLKDIVINVSEL inversion (FALSE, TRUE) .DYN_CLK_INV_EN("FALSE"), // Enable DYNCLKINVSEL inversion (FALSE, TRUE) // INIT_Q1 - INIT_Q4: Initial value on the Q outputs (0/1) .INIT_Q1(1'b0), .INIT_Q2(1'b0), .INIT_Q3(1'b0), .INIT_Q4(1'b0), .INTERFACE_TYPE("MEMORY"), // MEMORY, MEMORY_DDR3, MEMORY_QDR, NETWORKING, OVERSAMPLE .IOBDELAY("NONE"), // NONE, BOTH, IBUF, IFD .NUM_CE(2), // Number of clock enables (1,2) .OFB_USED("FALSE"), // Select OFB path (FALSE, TRUE) .SERDES_MODE("MASTER"), // MASTER, SLAVE // SRVAL_Q1 - SRVAL_Q4: Q output values when SR is used (0/1) .SRVAL_Q1(1'b0), .SRVAL_Q2(1'b0), .SRVAL_Q3(1'b0), .SRVAL_Q4(1'b0) ) ISERDESE2_inst ( .O(O), // 1-bit output: Combinatorial output // Q1 - Q8: 1-bit (each) output: Registered data outputs .Q1(Q1), .Q2(Q2), .Q3(Q3), .Q4(Q4), .Q5(Q5), .Q6(Q6), .Q7(Q7), .Q8(Q8), // SHIFTOUT1, SHIFTOUT2: 1-bit (each) output: Data width expansion output ports .SHIFTOUT1(SHIFTOUT1), .SHIFTOUT2(SHIFTOUT2), .BITSLIP(BITSLIP), // 1-bit input: The BITSLIP pin performs a Bitslip operation synchronous to // CLKDIV when asserted (active High). Subsequently, the data seen on the Q1 // to Q8 output ports will shift, as in a barrel-shifter operation, one // position every time Bitslip is invoked (DDR operation is different from // SDR). // CE1, CE2: 1-bit (each) input: Data register clock enable inputs .CE1(CE1), .CE2(CE2), Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 233 Chapter 4: About Design Elements .CLKDIVP(CLKDIVP), // 1-bit input: TBD // Clocks: 1-bit (each) input: ISERDESE2 clock input ports .CLK(CLK), // 1-bit input: High-speed clock .CLKB(CLKB), // 1-bit input: High-speed secondary clock .CLKDIV(CLKDIV), // 1-bit input: Divided clock .OCLK(OCLK), // 1-bit input: High speed output clock used when INTERFACE_TYPE="MEMORY" // Dynamic Clock Inversions: 1-bit (each) input: Dynamic clock inversion pins to switch clock polarity .DYNCLKDIVSEL(DYNCLKDIVSEL), // 1-bit input: Dynamic CLKDIV inversion .DYNCLKSEL(DYNCLKSEL), // 1-bit input: Dynamic CLK/CLKB inversion // Input Data: 1-bit (each) input: ISERDESE2 data input ports .D(D), // 1-bit input: Data input .DDLY(DDLY), // 1-bit input: Serial data from IDELAYE2 .OFB(OFB), // 1-bit input: Data feedback from OSERDESE2 .OCLKB(OCLKB), // 1-bit input: High speed negative edge output clock .RST(RST), // 1-bit input: Active high asynchronous reset // SHIFTIN1, SHIFTIN2: 1-bit (each) input: Data width expansion input ports .SHIFTIN1(SHIFTIN1), .SHIFTIN2(SHIFTIN2) ); // End of ISERDESE2_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 234 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 KEEPER Primitive: KEEPER Symbol Chapter 4: About Design Elements Introduction The design element is a weak keeper element that retains the value of the net connected to its bidirectional O pin. For example, if a logic 1 is being driven onto the net, KEEPER drives a weak/resistive 1 onto the net. If the net driver is then 3-stated, KEEPER continues to drive a weak/resistive 1 onto the net. Port Descriptions Name O Direction Output Width 1-Bit Function Keeper output Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards No Macro support No VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- KEEPER: I/O Buffer Weak Keeper -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 KEEPER_inst : KEEPER port map ( O => O -- Keeper output (connect directly to top-level port) ); -- End of KEEPER_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 235 Chapter 4: About Design Elements Verilog Instantiation Template // KEEPER: I/O Buffer Weak Keeper // 7 Series // Xilinx HDL Libraries Guide, version 14.7 KEEPER KEEPER_inst ( .O(O) // Keeper output (connect directly to top-level port) ); // End of KEEPER_inst instantiation For More Information See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 236 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements LDCE Primitive: Transparent Data Latch with Asynchronous Clear and Gate Enable Introduction This design element is a transparent data latch with asynchronous clear and gate enable. When the asynchronous clear input (CLR) is High, it overrides the other inputs and resets the data (Q) output Low. Q reflects the data (D) input while the gate (G) input and gate enable (GE) are High and CLR is Low. If (GE) is Low, data on (D) cannot be latched. The data on the (D) input during the High-to-Low gate transition is stored in the latch. The data on the (Q) output remains unchanged as long as (G) or (GE) remains low. This latch is asynchronously cleared, outputs Low, when power is applied. Power-on conditions are simulated when global set/reset (GSR) is active. Logic Table Inputs Outputs CLR GE G D Q 1 X X X 0 0 0 X X No Change 0 1 1 D D 0 1 0 X No Change 0 1 ↓ D D Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Binary Allowed Values 0, 1 Default 0 Description Sets the initial value of Q output after configuration. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 237 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LDCE: Transparent latch with Asynchronous Reset and -- Gate Enable. -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LDCE_inst : LDCE generic map ( INIT => '0') -- Initial value of latch ('0' or '1') port map ( Q => Q, -- Data output CLR => CLR, -- Asynchronous clear/reset input D => D, -- Data input G => G, -- Gate input GE => GE -- Gate enable input ); -- End of LDCE_inst instantiation Verilog Instantiation Template // LDCE: Transparent latch with Asynchronous Reset and Gate Enable. // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LDCE #( .INIT(1'b0) // Initial value of latch (1'b0 or 1'b1) ) LDCE_inst ( .Q(Q), // Data output .CLR(CLR), // Asynchronous clear/reset input .D(D), // Data input .G(G), // Gate input .GE(GE) // Gate enable input ); // End of LDCE_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 238 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements LDPE Primitive: Transparent Data Latch with Asynchronous Preset and Gate Enable Introduction This design element is a transparent data latch with asynchronous preset and gate enable. When the asynchronous preset (PRE) is High, it overrides the other input and presets the data (Q) output High. Q reflects the data (D) input while the gate (G) input and gate enable (GE) are High. The data on the (D) input during the High-to-Low gate transition is stored in the latch. The data on the (Q) output remains unchanged as long as (G) or (GE) remains Low. This latch is asynchronously preset, output High, when power is applied. Power-on conditions are simulated when global set/reset (GSR) is active. Logic Table Inputs PRE GE G D 1 X X X 0 0 X X 0 1 1 D 0 1 0 X 0 1 ↓ D Outputs Q 1 No Change D No Change D Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Binary Allowed Values Default 0, 1 1 Description Specifies the initial value upon power-up or the assertion of GSR for the (Q) port. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 239 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LDPE: Transparent latch with Asynchronous Set and -- Gate Enable. -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LDPE_inst : LDPE generic map ( INIT => '0') -- Initial value of latch ('0' or '1') port map ( Q => Q, -- Data output CLR => CLR, -- Asynchronous preset/set input D => D, -- Data input G => G, -- Gate input GE => GE -- Gate enable input ); -- End of LDPE_inst instantiation Verilog Instantiation Template // LDPE: Transparent latch with Asynchronous Preset and Gate Enable. // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LDPE #( .INIT(1'b1) // Initial value of latch (1'b0 or 1'b1) ) LDPE_inst ( .Q(Q), // Data output .PRE(PRE), // Asynchronous preset/set input .D(D), // Data input .G(G), // Gate input .GE(GE) // Gate enable input ); // End of LDPE_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 240 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 LUT1 Primitive: 1-Bit Look-Up Table with General Output Chapter 4: About Design Elements Introduction This design element is a 1-bit look-up table (LUT) with general output (O). An INIT attribute with an appropriate number of hexadecimal digits for the number of inputs must be attached to the LUT to specify its function. This element provides a look-up table version of a buffer or inverter. These elements are the basic building blocks. Multiple variants of LUTs accommodate additional types of outputs that can be used by different timing models for more accurate pre-layout timing estimation. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs Outputs I0 O 0 INIT[0] 1 INIT[1] INIT = Binary number assigned to the INIT attribute Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 241 Chapter 4: About Design Elements Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 2-Bit Value Default All zeros Description Initializes look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT1: 1-input Look-Up Table with general output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT1_inst : LUT1 generic map ( INIT => "00") port map ( O => O, -- LUT general output I0 => I0 -- LUT input ); -- End of LUT1_inst instantiation Verilog Instantiation Template // LUT1: 1-input Look-Up Table with general output (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT1 #( .INIT(2'b00) // Specify LUT Contents ) LUT1_inst ( .O(O), // LUT general output .I0(I0) // LUT input ); // End of LUT1_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 242 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 LUT1_D Primitive: 1-Bit Look-Up Table with Dual Output Chapter 4: About Design Elements Introduction This design element is a 1-bit look-up table (LUT) with two functionally identical outputs, O and LO. It provides a look-up table version of a buffer or inverter. The O output is a general interconnect. The LO output is used to connect to another input within the same CLB slice. A mandatory INIT attribute, with an appropriate number of hexadecimal digits for the number of inputs, must be attached to the LUT to specify its function. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: • The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. • The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs Outputs I0 O 0 INIT[0] 1 INIT[1] INIT = Binary number assigned to the INIT attribute LO INIT[0] INIT[1] Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 2-Bit Value Default All zeros Description Initializes look-up tables. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 243 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT1_D: 1-input Look-Up Table with general and local outputs -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT1_D_inst : LUT1_D generic map ( INIT => "00") port map ( LO => LO, -- LUT local output O => O, -- LUT general output I0 => I0 -- LUT input ); -- End of LUT1_D_inst instantiation Verilog Instantiation Template // LUT1_D: 1-input Look-Up Table with general and local outputs (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT1_D #( .INIT(2'b00) // Specify LUT Contents ) LUT1_D_inst ( .LO(LO), // LUT local output .O(O), // LUT general output .I0(I0) // LUT input ); // End of LUT1_D_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 244 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 LUT1_L Primitive: 1-Bit Look-Up Table with Local Output Chapter 4: About Design Elements Introduction This design element is a 1-bit look-up table (LUT) with a local output (LO) that is used to connect to another output within the same CLB slice. It provides a look-up table version of a buffer or inverter. A mandatory INIT attribute, with an appropriate number of hexadecimal digits for the number of inputs, must be attached to the LUT to specify its function. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs I0 0 1 INIT = Binary number assigned to the INIT attribute Outputs LO INIT[0] INIT[1] Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 2-Bit Value Default All zeros Description Initializes look-up tables. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 245 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT1_L: 1-input Look-Up Table with local output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT1_L_inst : LUT1_L generic map ( INIT => "00") port map ( LO => LO, -- LUT local output I0 => I0 -- LUT input ); -- End of LUT1_L_inst instantiation Verilog Instantiation Template // LUT1_L: 1-input Look-Up Table with local output (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT1_L #( .INIT(2'b00) // Specify LUT Contents ) LUT1_L_inst ( .LO(LO), // LUT local output .I0(I0) // LUT input ); // End of LUT1_L_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 246 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 LUT2 Primitive: 2-Bit Look-Up Table with General Output Chapter 4: About Design Elements Introduction This design element is a 2-bit look-up table (LUT) with general output (O). An INIT attribute with an appropriate number of hexadecimal digits for the number of inputs must be attached to the LUT to specify its function. This element provides a look-up table version of a buffer or inverter. These elements are the basic building blocks. Multiple variants of LUTs accommodate additional types of outputs that can be used by different timing models for more accurate pre-layout timing estimation. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs Outputs I1 I0 O 0 0 INIT[0] 0 1 INIT[1] 1 0 INIT[2] 1 1 INIT[3] INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 247 Chapter 4: About Design Elements Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 4-Bit Value Default All zeros Description Initializes look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT2: 2-input Look-Up Table with general output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT2_inst : LUT2 generic map ( INIT => X"0") port map ( O => O, -- LUT general output I0 => I0, -- LUT input I1 => I1 -- LUT input ); -- End of LUT2_inst instantiation Verilog Instantiation Template // LUT2: 2-input Look-Up Table with general output (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT2 #( .INIT(4'h0) // Specify LUT Contents ) LUT2_inst ( .O(O), // LUT general output .I0(I0), // LUT input .I1(I1) // LUT input ); // End of LUT2_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 248 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 LUT2_D Primitive: 2-Bit Look-Up Table with Dual Output Chapter 4: About Design Elements Introduction This design element is a 2-bit look-up table (LUT) with two functionally identical outputs, O and LO. The O output is a general interconnect. The LO output is used to connect to another input within the same CLB slice. A mandatory INIT attribute, with an appropriate number of hexadecimal digits for the number of inputs, must be attached to the LUT to specify its function. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: • The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. • The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs Outputs I1 I0 O LO 0 0 INIT[0] INIT[0] 0 1 INIT[1] INIT[1] 1 0 INIT[2] INIT[2] 1 1 INIT[3] INIT[3] INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 4-Bit Value Default All zeros Description Initializes look-up tables. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 249 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT2_D: 2-input Look-Up Table with general and local outputs -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT2_D_inst : LUT2_D generic map ( INIT => X"0") port map ( LO => LO, -- LUT local output O => O, -- LUT general output I0 => I0, -- LUT input I1 => I1 -- LUT input ); -- End of LUT2_D_inst instantiation Verilog Instantiation Template // LUT2_D: 2-input Look-Up Table with general and local outputs (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT2_D #( .INIT(4'h0) // Specify LUT Contents ) LUT2_D_inst ( .LO(LO), // LUT local output .O(O), // LUT general output .I0(I0), // LUT input .I1(I1) // LUT input ); // End of LUT2_L_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 250 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 LUT2_L Primitive: 2-Bit Look-Up Table with Local Output Chapter 4: About Design Elements Introduction This design element is a 2-bit look-up table (LUT) with a local output (LO) that is used to connect to another output within the same CLB slice and to the fast connect buffer. It provides a look-up table version of a buffer or inverter. A mandatory INIT attribute, with an appropriate number of hexadecimal digits for the number of inputs, must be attached to the LUT to specify its function. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs Outputs I1 I0 LO 0 0 INIT[0] 0 1 INIT[1] 1 0 INIT[2] 1 1 INIT[3] INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 251 Chapter 4: About Design Elements Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 4-Bit Value Default All zeros Description Initializes look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT2_L: 2-input Look-Up Table with local output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT2_L_inst : LUT2_L generic map ( INIT => X"0") port map ( LO => LO, -- LUT local output I0 => I0, -- LUT input I1 => I1 -- LUT input ); -- End of LUT2_L_inst instantiation Verilog Instantiation Template // LUT2_L: 2-input Look-Up Table with local output (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT2_L #( .INIT(4'h0) // Specify LUT Contents ) LUT2_L_inst ( .LO(LO), // LUT local output .I0(I0), // LUT input .I1(I1) // LUT input ); // End of LUT2_L_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 252 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 LUT3 Primitive: 3-Bit Look-Up Table with General Output Chapter 4: About Design Elements Introduction This design element is a 3-bit look-up table (LUT) with general output (O). A mandatory INIT attribute, with an appropriate number of hexadecimal digits for the number of inputs, must be attached to the LUT to specify its function. An INIT attribute with an appropriate number of hexadecimal digits for the number of inputs must be attached to the LUT to specify its function. This element provides a look-up table version of a buffer or inverter. These elements are the basic building blocks. Multiple variants of LUTs accommodate additional types of outputs that can be used by different timing models for more accurate pre-layout timing estimation. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs Outputs I2 I1 I0 O 0 0 0 INIT[0] 0 0 1 INIT[1] 0 1 0 INIT[2] 0 1 1 INIT[3] 1 0 0 INIT[4] 1 0 1 INIT[5] 1 1 0 INIT[6] 1 1 1 INIT[7] INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 253 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 8-Bit Value Default All zeros Description Initializes look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT3: 3-input Look-Up Table with general output (Mapped to a LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT3_inst : LUT3 generic map ( INIT => X"00") port map ( O => O, -- LUT general output I0 => I0, -- LUT input I1 => I1, -- LUT input I2 => I2 -- LUT input ); -- End of LUT3_inst instantiation Verilog Instantiation Template // LUT3: 3-input Look-Up Table with general output (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT3 #( .INIT(8'h00) // Specify LUT Contents ) LUT3_inst ( .O(O), // LUT general output .I0(I0), // LUT input .I1(I1), // LUT input .I2(I2) // LUT input ); // End of LUT3_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 254 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 LUT3_D Primitive: 3-Bit Look-Up Table with Dual Output Chapter 4: About Design Elements Introduction This design element is a 3-bit look-up table (LUT) with two functionally identical outputs, O and LO. The O output is a general interconnect. The LO output is used to connect to another input within the same CLB slice. A mandatory INIT attribute, with an appropriate number of hexadecimal digits for the number of inputs, must be attached to the LUT to specify its function. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: • The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. • The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs Outputs I2 I1 I0 O 0 0 0 INIT[0] 0 0 1 INIT[1] 0 1 0 INIT[2] 0 1 1 INIT[3] 1 0 0 INIT[4] 1 0 1 INIT[5] 1 1 0 INIT[6] 1 1 1 INIT[7] INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute LO INIT[0] INIT[1] INIT[2] INIT[3] INIT[4] INIT[5] INIT[6] INIT[7] Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 255 Chapter 4: About Design Elements Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 8-Bit Value Default All zeros Description Initializes look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT3_D: 3-input Look-Up Table with general and local outputs -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT3_D_inst : LUT3_D generic map ( INIT => X"00") port map ( LO => LO, -- LUT local output O => O, -- LUT general output I0 => I0, -- LUT input I1 => I1, -- LUT input I2 => I2 -- LUT input ); -- End of LUT3_D_inst instantiation Verilog Instantiation Template // LUT3_D: 3-input Look-Up Table with general and local outputs (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT3_D #( .INIT(8'h00) // Specify LUT Contents ) LUT3_D_inst ( .LO(LO), // LUT local output .O(O), // LUT general output .I0(I0), // LUT input .I1(I1), // LUT input .I2(I2) // LUT input ); // End of LUT3_D_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 256 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 LUT3_L Primitive: 3-Bit Look-Up Table with Local Output Chapter 4: About Design Elements Introduction This design element is a 3-bit look-up table (LUT) with a local output (LO) that is used to connect to another output within the same CLB slice and to the fast connect buffer. It provides a look-up table version of a buffer or inverter. A mandatory INIT attribute, with an appropriate number of hexadecimal digits for the number of inputs, must be attached to the LUT to specify its function. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs Outputs I2 I1 I0 LO 0 0 0 INIT[0] 0 0 1 INIT[1] 0 1 0 INIT[2] 0 1 1 INIT[3] 1 0 0 INIT[4] 1 0 1 INIT[5] 1 1 0 INIT[6] 1 1 1 INIT[7] INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 257 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 8-Bit Value Default All zeros Description Initializes look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT3_L: 3-input Look-Up Table with local output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT3_L_inst : LUT3_L generic map ( INIT => X"00") port map ( LO => LO, -- LUT local output I0 => I0, -- LUT input I1 => I1, -- LUT input I2 => I2 -- LUT input ); -- End of LUT3_L_inst instantiation Verilog Instantiation Template // LUT3_L: 3-input Look-Up Table with local output (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT3_L #( .INIT(8'h00) // Specify LUT Contents ) LUT3_L_inst ( .LO(LO), // LUT local output .I0(I0), // LUT input .I1(I1), // LUT input .I2(I2) // LUT input ); // End of LUT3_L_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 258 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 LUT4 Primitive: 4-Bit Look-Up-Table with General Output Chapter 4: About Design Elements Introduction This design element is a 4-bit look-up table (LUT) with general output (O). An INIT attribute with an appropriate number of hexadecimal digits for the number of inputs must be attached to the LUT to specify its function. This element provides a look-up table version of a buffer or inverter. These elements are the basic building blocks. Multiple variants of LUTs accommodate additional types of outputs that can be used by different timing models for more accurate pre-layout timing estimation. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs I3 I2 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 I1 I0 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0 Outputs O INIT[0] INIT[1] INIT[2] INIT[3] INIT[4] INIT[5] INIT[6] INIT[7] INIT[8] INIT[9] INIT[10] INIT[11] INIT[12] Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 259 Chapter 4: About Design Elements Inputs I3 I2 I1 I0 1 1 0 1 1 1 1 0 1 1 1 1 INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Outputs O INIT[13] INIT[14] INIT[15] Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 16-Bit Value Default All zeros Description Initializes look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT4: 4-input Look-Up Table with general output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT4_inst : LUT4 generic map ( INIT => X"0000") port map ( O => O, -- LUT general output I0 => I0, -- LUT input I1 => I1, -- LUT input I2 => I2, -- LUT input I3 => I3 -- LUT input ); -- End of LUT4_inst instantiation Send Feedback 260 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // LUT4: 4-input Look-Up Table with general output (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT4 #( .INIT(16'h0000) // Specify LUT Contents ) LUT4_inst ( .O(O), // LUT general output .I0(I0), // LUT input .I1(I1), // LUT input .I2(I2), // LUT input .I3(I3) // LUT input ); // End of LUT4_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 261 Chapter 4: About Design Elements LUT4_D Primitive: 4-Bit Look-Up Table with Dual Output Introduction This design element is a 4-bit look-up table (LUT) with two functionally identical outputs, O and LO The O output is a general interconnect. The LO output is used to connect to another input within the same CLB slice. A mandatory INIT attribute, with an appropriate number of hexadecimal digits for the number of inputs, must be attached to the LUT to specify its function. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: • The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. • The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs I3 I2 I1 I0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 Outputs O INIT[0] INIT[1] INIT[2] INIT[3] INIT[4] INIT[5] INIT[6] INIT[7] INIT[8] INIT[9] INIT[10] INIT[11] INIT[12] INIT[13] LO INIT[0] INIT[1] INIT[2] INIT[3] INIT[4] INIT[5] INIT[6] INIT[7] INIT[8] INIT[9] INIT[10] INIT[11] INIT[12] INIT[13] Send Feedback 262 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Inputs Outputs I3 I2 I1 I0 O 1 1 1 0 INIT[14] 1 1 1 1 INIT[15] INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute LO INIT[14] INIT[15] Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 16-Bit Value Default All zeros Description Initializes look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT4_D: 4-input Look-Up Table with general and local outputs -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT4_D_inst : LUT4_D generic map ( INIT => X"0000") port map ( LO => LO, -- LUT local output O => O, -- LUT general output I0 => I0, -- LUT input I1 => I1, -- LUT input I2 => I2, -- LUT input I3 => I3 -- LUT input ); -- End of LUT4_D_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 263 Chapter 4: About Design Elements Verilog Instantiation Template // LUT4_D: 4-input Look-Up Table with general and local outputs (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT4_D #( .INIT(16'h0000) // Specify LUT Contents ) LUT4_D_inst ( .LO(LO), // LUT local output .O(O), // LUT general output .I0(I0), // LUT input .I1(I1), // LUT input .I2(I2), // LUT input .I3(I3) // LUT input ); // End of LUT4_D_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 264 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 LUT4_L Primitive: 4-Bit Look-Up Table with Local Output Chapter 4: About Design Elements Introduction This design element is a 4-bit look-up table (LUT) with a local output (LO) that is used to connect to another output within the same CLB slice and to the fast connect buffer. It provides a look-up table version of a buffer or inverter. A mandatory INIT attribute, with an appropriate number of hexadecimal digits for the number of inputs, must be attached to the LUT to specify its function. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs I3 I2 I1 I0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 Outputs LO INIT[0] INIT[1] INIT[2] INIT[3] INIT[4] INIT[5] INIT[6] INIT[7] INIT[8] INIT[9] INIT[10] INIT[11] INIT[12] Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 265 Chapter 4: About Design Elements Inputs Outputs I3 I2 I1 I0 LO 1 1 0 1 INIT[13] 1 1 1 0 INIT[14] 1 1 1 1 INIT[15] INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 16-Bit Value Default All zeros Description Initializes look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT4_L: 4-input Look-Up Table with local output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT4_L_inst : LUT4_L generic map ( INIT => X"0000") port map ( LO => LO, -- LUT local output I0 => I0, -- LUT input I1 => I1, -- LUT input I2 => I2, -- LUT input I3 => I3 -- LUT input ); -- End of LUT4_L_inst instantiation Send Feedback 266 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // LUT4_L: 4-input Look-Up Table with local output (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT4_L #( .INIT(16'h0000) // Specify LUT Contents ) LUT4_L_inst ( .LO(LO), // LUT local output .I0(I0), // LUT input .I1(I1), // LUT input .I2(I2), // LUT input .I3(I3) // LUT input ); // End of LUT4_L_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 267 Chapter 4: About Design Elements LUT5 Primitive: 5-Input Lookup Table with General Output Introduction This design element is a 5-input, 1-output look-up table (LUT) that can either act as an asynchronous 32-bit ROM (with 5-bit addressing) or implement any 5-input logic function. LUTs are the basic logic building blocks and are used to implement most logic functions of the design. One LUT5 is packed into a LUT6 within a slice, or two LUT5s can be packed into a single LUT6 with some restrictions. The functionality of the LUT5, LUT5_L and LUT5_D is the same. However, the LUT5_L and LUT5_D allow the additional specification to connect the LUT5 output signal to an internal slice or CLB connection using the LO output. The LUT5_L specifies that the only connections from the LUT5 will be within a slice or CLB, while the LUT5_D allows the specification to connect the output of the LUT to both inter-slice/CLB logic and external logic as well. The LUT5 does not state any specific output connections and should be used in all cases except where internal slice or CLB signal connections must be implicitly specified. An INIT attribute consisting of a 32-bit hexadecimal value must be specified to indicate the LUTs logical function. The INIT value is calculated by assigning a 1 to the corresponding INIT bit value when the associated inputs are applied. For instance, a Verilog INIT value of 32'h80000000 (X"80000000" for VHDL) makes the output zero unless all of the inputs are one (a 5-input AND gate). A Verilog INIT value of 32'hfffffffe (X"FFFFFFFE" for VHDL) makes the output one unless all zeros are on the inputs (a 5-input OR gate). The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs Outputs I4 I3 I2 I1 I0 LO 0 0 0 0 0 INIT[0] 0 0 0 0 1 INIT[1] 0 0 0 1 0 INIT[2] 0 0 0 1 1 INIT[3] 0 0 1 0 0 INIT[4] 0 0 1 0 1 INIT[5] Send Feedback 268 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Inputs I4 I3 I2 I1 I0 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Port Description Name O I0, I1, I2, I3, I4 Direction Output Input Width 1 1 Function 5-LUT output LUT inputs Outputs LO INIT[6] INIT[7] INIT[8] INIT[9] INIT[10] INIT[11] INIT[12] INIT[13] INIT[14] INIT[15] INIT[16] INIT[17] INIT[18] INIT[19] INIT[20] INIT[21] INIT[22] INIT[23] INIT[24] INIT[25] INIT[26] INIT[27] INIT[28] INIT[29] INIT[30] INIT[31] Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 269 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 32-Bit Value Default All zeros Description Specifies the logic value for the look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT5: 5-input Look-Up Table with general output (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT5_inst : LUT5 generic map ( INIT => X"00000000") -- Specify LUT Contents port map ( O => O, -- LUT general output I0 => I0, -- LUT input I1 => I1, -- LUT input I2 => I2, -- LUT input I3 => I3, -- LUT input I4 => I4 -- LUT input ); -- End of LUT5_inst instantiation Verilog Instantiation Template // LUT5: 5-input Look-Up Table with general output (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT5 #( .INIT(32'h00000000) // Specify LUT Contents ) LUT5_inst ( .O(O), // LUT general output .I0(I0), // LUT input .I1(I1), // LUT input .I2(I2), // LUT input .I3(I3), // LUT input .I4(I4) // LUT input ); // End of LUT5_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 270 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements LUT5_D Primitive: 5-Input Lookup Table with General and Local Outputs Introduction This design element is a 5-input, 1-output look-up table (LUT) that can either act as an asynchronous 32-bit ROM (with 5-bit addressing) or implement any 5-input logic function. LUTs are the basic logic building blocks and are used to implement most logic functions of the design. One LUT5 will be packed into a LUT6 within a slice, or two LUT5s can be packed into a single LUT6 with some restrictions. The functionality of the LUT5, LUT5_L and LUT5_D is the same. However, the LUT5_L and LUT5_D allow the additional specification to connect the LUT5 output signal to an internal slice or CLB connection using the LO output. The LUT5_L specifies that the only connections from the LUT5 will be within a slice or CLB, while the LUT5_D allows the specification to connect the output of the LUT to both inter-slice/CLB logic and external logic. The LUT5 does not state any specific output connections and should be used in all cases except where internal slice or CLB signal connections must be implicitly specified. An INIT attribute consisting of a 32-bit hexadecimal value must be specified to indicate the LUTs logical function. The INIT value is calculated by assigning a 1 to the corresponding INIT bit value when the associated inputs are applied. For instance, a Verilog INIT value of 32'h80000000 (X"80000000" for VHDL) will make the output zero unless all of the inputs are one (a 5-input AND gate). A Verilog INIT value of 32'hfffffffe (X"FFFFFFFE" for VHDL) will make the output one unless all zeros are on the inputs (a 5-input OR gate). The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: • The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. • The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs I4 I3 I2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 I1 I0 0 0 0 1 1 0 1 1 0 0 0 1 Outputs O INIT[0] INIT[1] INIT[2] INIT[3] INIT[4] INIT[5] LO INIT[0] INIT[1] INIT[2] INIT[3] INIT[4] INIT[5] Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 271 Chapter 4: About Design Elements Inputs Outputs I4 I3 I2 I1 I0 O 0 0 1 1 0 INIT[6] 0 0 1 1 1 INIT[7] 0 1 0 0 0 INIT[8] 0 1 0 0 1 INIT[9] 0 1 0 1 0 INIT[10] 0 1 0 1 1 INIT[11] 0 1 1 0 0 INIT[12] 0 1 1 0 1 INIT[13] 0 1 1 1 0 INIT[14] 0 1 1 1 1 INIT[15] 1 0 0 0 0 INIT[16] 1 0 0 0 1 INIT[17] 1 0 0 1 0 INIT[18] 1 0 0 1 1 INIT[19] 1 0 1 0 0 INIT[20] 1 0 1 0 1 INIT[21] 1 0 1 1 0 INIT[22] 1 0 1 1 1 INIT[23] 1 1 0 0 0 INIT[24] 1 1 0 0 1 INIT[25] 1 1 0 1 0 INIT[26] 1 1 0 1 1 INIT[27] 1 1 1 0 0 INIT[28] 1 1 1 0 1 INIT[29] 1 1 1 1 0 INIT[30] 1 1 1 1 1 INIT[31] INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Port Description Name O L0 I0, I1, I2, I3, I4 Direction Output Output Input Width 1 1 1 Function 5-LUT output 5-LUT output for internal CLB connection LUT inputs LO INIT[6] INIT[7] INIT[8] INIT[9] INIT[10] INIT[11] INIT[12] INIT[13] INIT[14] INIT[15] INIT[16] INIT[17] INIT[18] INIT[19] INIT[20] INIT[21] INIT[22] INIT[23] INIT[24] INIT[25] INIT[26] INIT[27] INIT[28] INIT[29] INIT[30] INIT[31] Send Feedback 272 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 32-Bit Value Default All zeros Description Specifies the logic value for the look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT5_D: 5-input Look-Up Table with general and local outputs (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT5_D_inst : LUT5_D generic map ( INIT => X"00000000") -- Specify LUT contents port map ( LO => LO, -- LUT local output O => O, -- LUT general output I0 => I0, -- LUT input I1 => I1, -- LUT input I2 => I2, -- LUT input I3 => I3, -- LUT input I4 => I4 -- LUT input ); -- End of LUT5_D_inst instantiation Verilog Instantiation Template // LUT5_D: 5-input Look-Up Table with general and local outputs (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT5_D #( .INIT(32'h0000000) // Specify LUT Contents ) LUT5_D_inst ( .LO(LO), // LUT local output .O(O), // LUT general output .I0(I0), // LUT input .I1(I1), // LUT input .I2(I2), // LUT input .I3(I3), // LUT input .I4(I4) // LUT input ); // End of LUT5_D_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 273 Chapter 4: About Design Elements For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 274 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 LUT5_L Primitive: 5-Input Lookup Table with Local Output Chapter 4: About Design Elements Introduction This design element is a 5-input, 1-output look-up table (LUT) that can either act as an asynchronous 32-bit ROM (with 5-bit addressing) or implement any 5-input logic function. LUTs are the basic logic building blocks and are used to implement most logic functions of the design. One LUT5 will be packed into a LUT6 within a slice, or two LUT5s can be packed into a single LUT6 with some restrictions. The functionality of the LUT5, LUT5_L and LUT5_D is the same. However, the LUT5_L and LUT5_D allow the additional specification to connect the LUT5 output signal to an internal slice or CLB connection using the LO output. The LUT5_L specifies that the only connections from the LUT5 is within a slice or CLB, while the LUT5_D allows the specification to connect the output of the LUT to both inter-slice/CLB logic and external logic as well. The LUT5 does not state any specific output connections and should be used in all cases except where internal slice or CLB signal connections must be implicitly specified. An INIT attribute consisting of a 32-bit hexadecimal value must be specified to indicate the LUTs logical function. The INIT value is calculated by assigning a 1 to the corresponding INIT bit value when the associated inputs are applied. For instance, a Verilog INIT value of 32'h80000000 (X"80000000" for VHDL) makes the output zero unless all of the inputs are one (a 5-input AND gate). A Verilog INIT value of 32'hfffffffe (X"FFFFFFFE" for VHDL) makes the output one unless all zeros are on the inputs (a 5-input OR gate). The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary truth table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed logic value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs I4 I3 I2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 I1 I0 0 0 0 1 1 0 1 1 0 0 0 1 Outputs LO INIT[0] INIT[1] INIT[2] INIT[3] INIT[4] INIT[5] Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 275 Chapter 4: About Design Elements Inputs I4 I3 I2 I1 I0 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Outputs LO INIT[6] INIT[7] INIT[8] INIT[9] INIT[10] INIT[11] INIT[12] INIT[13] INIT[14] INIT[15] INIT[16] INIT[17] INIT[18] INIT[19] INIT[20] INIT[21] INIT[22] INIT[23] INIT[24] INIT[25] INIT[26] INIT[27] INIT[28] INIT[29] INIT[30] INIT[31] Port Description Name L0 I0, I1, I2, I3, I4 Direction Output Input Width 1 1 Function 6/5-LUT output for internal CLB connection LUT inputs Send Feedback 276 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 32-Bit Value Default All zeros Description Specifies the logic value for the look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT5_L: 5-input Look-Up Table with local output (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT5_L_inst : LUT5_L generic map ( INIT => X"00000000") -- Specify LUT Contents port map ( LO => LO, -- LUT local output I0 => I0, -- LUT input I1 => I1, -- LUT input I2 => I2, -- LUT input I3 => I3, -- LUT input I4 => I4 -- LUT input ); -- End of LUT5_L_inst instantiation Verilog Instantiation Template // LUT5_L: 5-input Look-Up Table with local output (Mapped to a LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT5_L #( .INIT(32'h0000000) // Specify LUT Contents ) LUT5_L_inst ( .LO(LO), // LUT local output .I0(I0), // LUT input .I1(I1), // LUT input .I2(I2), // LUT input .I3(I3), // LUT input .I4(I4) // LUT input ); // End of LUT5_L_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 277 Chapter 4: About Design Elements LUT6 Primitive: 6-Input Lookup Table with General Output Introduction This design element is a 6-input, 1-output look-up table (LUT) that can either act as an asynchronous 64-bit ROM (with 6-bit addressing) or implement any 6-input logic function. LUTs are the basic logic building blocks and are used to implement most logic functions of the design. A LUT6 is mapped to one of the four look-up tables in the slice. The functionality of the LUT6, LUT6_L and LUT6_D is the same. However, the LUT6_L and LUT6_D allow the additional specification to connect the LUT6 output signal to an internal slice, or CLB connection, using the LO output. The LUT6_L specifies that the only connections from the LUT6 will be within a slice, or CLB, while the LUT6_D allows the specification to connect the output of the LUT to both inter-slice/CLB logic and external logic as well. The LUT6 does not state any specific output connections and should be used in all cases except where internal slice or CLB signal connections must be implicitly specified. An INIT attribute consisting of a 64-bit Hexadecimal value must be specified to indicate the LUTs logical function. The INIT value is calculated by assigning a 1 to corresponding INIT bit value when the associated inputs are applied. For instance, a Verilog INIT value of 64'h8000000000000000 (X"8000000000000000" for VHDL) makes the output zero unless all of the inputs are one (a 6-input AND gate). A Verilog INIT value of 64'hfffffffffffffffe (X"FFFFFFFFFFFFFFFE" for VHDL) makes the output one unless all zeros are on the inputs (a 6-input OR gate). The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs Outputs I5 I4 I3 I2 I1 I0 O 0 0 0 0 0 0 INIT[0] 0 0 0 0 0 1 INIT[1] 0 0 0 0 1 0 INIT[2] Send Feedback 278 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Inputs I5 I4 I3 I2 I1 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 0 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 1 1 0 0 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 0 0 1 1 Chapter 4: About Design Elements Outputs I0 O 1 INIT[3] 0 INIT[4] 1 INIT[5] 0 INIT[6] 1 INIT[7] 0 INIT[8] 1 INIT[9] 0 INIT[10] 1 INIT[11] 0 INIT[12] 1 INIT[13] 0 INIT[14] 1 INIT[15] 0 INIT[16] 1 INIT[17] 0 INIT[18] 1 INIT[19] 0 INIT[20] 1 INIT[21] 0 INIT[22] 1 INIT[23] 0 INIT[24] 1 INIT[25] 0 INIT[26] 1 INIT[27] 0 INIT[28] 1 INIT[29] 0 INIT[30] 1 INIT[31] 0 INIT[32] 1 INIT[33] 0 INIT[34] 1 INIT[35] 0 INIT[36] 1 INIT[37] 0 INIT[38] 1 INIT[39] Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 279 Chapter 4: About Design Elements Inputs I5 I4 I3 I2 I1 I0 1 0 1 0 0 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 1 0 0 1 0 1 1 0 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 0 1 1 0 0 1 1 1 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 0 0 0 1 1 1 0 0 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Outputs O INIT[40] INIT[41] INIT[42] INIT[43] INIT[44] INIT[45] INIT[46] INIT[47] INIT[48] INIT[49] INIT[50] INIT[51] INIT[52] INIT[53] INIT[54] INIT[55] INIT[56] INIT[57] INIT[58] INIT[59] INIT[60] INIT[61] INIT[62] INIT[63] Port Description Name O I0, I1, I2, I3, I4, I5 Direction Output Input Width 1 1 Function 6/5-LUT output LUT inputs Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 280 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 64-Bit Value Default All zeros Description Specifies the logic value for the look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT6: 6-input Look-Up Table with general output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT6_inst : LUT6 generic map ( INIT => X"0000000000000000") -- Specify LUT Contents port map ( O => O, -- LUT general output I0 => I0, -- LUT input I1 => I1, -- LUT input I2 => I2, -- LUT input I3 => I3, -- LUT input I4 => I4, -- LUT input I5 => I5 -- LUT input ); -- End of LUT6_inst instantiation Verilog Instantiation Template // LUT6: 6-input Look-Up Table with general output // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT6 #( .INIT(64'h0000000000000000) // Specify LUT Contents ) LUT6_inst ( .O(O), // LUT general output .I0(I0), // LUT input .I1(I1), // LUT input .I2(I2), // LUT input .I3(I3), // LUT input .I4(I4), // LUT input .I5(I5) // LUT input ); // End of LUT6_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 281 Chapter 4: About Design Elements LUT6_2 Primitive: Six-input, 2-output, Look-Up Table Introduction This design element is a 6-input, 2-output look-up table (LUT) that can either act as a dual asynchronous 32-bit ROM (with 5-bit addressing), implement any two 5-input logic functions with shared inputs, or implement a 6-input logic function and a 5-input logic function with shared inputs and shared logic values. LUTs are the basic logic building blocks and are used to implement most logic functions of the design. A LUT6_2 will be mapped to one of the four look-up tables in the slice. An INIT attribute consisting of a 64-bit hexadecimal value must be specified to indicate the LUTs logical function. The INIT value is calculated by assigning a 1 to corresponding INIT bit value when the associated inputs are applied. For instance, a Verilog INIT value of 64'hfffffffffffffffe (X"FFFFFFFFFFFFFFFE" for VHDL) makes the O6 output 1 unless all zeros are on the inputs and the O5 output a 1, or unless I[4:0] are all zeroes (a 5-input and 6-input OR gate). The lower half (bits 31:0) of the INIT values apply to the logic function of the O5 output. The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs I5 I4 I3 I2 I1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 Outputs I0 O5 0 INIT[0] 1 INIT[1] 0 INIT[2] 1 INIT[3] 0 INIT[4] O6 INIT[0] INIT[1] INIT[2] INIT[3] INIT[4] Send Feedback 282 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Inputs 0 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 0 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 1 1 0 0 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 0 0 1 1 1 0 1 0 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 Outputs 1 INIT[5] INIT[5] 0 INIT[6] INIT[6] 1 INIT[7] INIT[7] 0 INIT[8] INIT[8] 1 INIT[9] INIT[9] 0 INIT[10] INIT[10] 1 INIT[11] INIT[11] 0 INIT[12] INIT[12] 1 INIT[13] INIT[13] 0 INIT[14] INIT[14] 1 INIT[15] INIT[15] 0 INIT[16] INIT[16] 1 INIT[17] INIT[17] 0 INIT[18] INIT[18] 1 INIT[19] INIT[19] 0 INIT[20] INIT[20] 1 INIT[21] INIT[21] 0 INIT[22] INIT[22] 1 INIT[23] INIT[23] 0 INIT[24] INIT[24] 1 INIT[25] INIT[25] 0 INIT[26] INIT[26] 1 INIT[27] INIT[27] 0 INIT[28] INIT[28] 1 INIT[29] INIT[29] 0 INIT[30] INIT[30] 1 INIT[31] INIT[31] 0 INIT[0] INIT[32] 1 INIT[1] INIT[33] 0 INIT[2] INIT[34] 1 INIT[3] INIT[35] 0 INIT[4] INIT[36] 1 INIT[5] INIT[37] 0 INIT[6] INIT[38] 1 INIT[7] INIT[39] 0 INIT[8] INIT[40] 1 INIT[9] INIT[41] 0 INIT[10] INIT[42] 1 INIT[11] INIT[43] Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 283 Chapter 4: About Design Elements Inputs Outputs 1 0 1 1 0 0 INIT[12] 1 0 1 1 0 1 INIT[13] 1 0 1 1 1 0 INIT[14] 1 0 1 1 1 1 INIT[15] 1 1 0 0 0 0 INIT[16] 1 1 0 0 0 1 INIT[17] 1 1 0 0 1 0 INIT[18] 1 1 0 0 1 1 INIT[19] 1 1 0 1 0 0 INIT[20] 1 1 0 1 0 1 INIT[21] 1 1 0 1 1 0 INIT[22] 1 1 0 1 1 1 INIT[23] 1 1 1 0 0 0 INIT[24] 1 1 1 0 0 1 INIT[25] 1 1 1 0 1 0 INIT[26] 1 1 1 0 1 1 INIT[27] 1 1 1 1 0 0 INIT[28] 1 1 1 1 0 1 INIT[29] 1 1 1 1 1 0 INIT[30] 1 1 1 1 1 1 INIT[31] INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute INIT[44] INIT[45] INIT[46] INIT[47] INIT[48] INIT[49] INIT[50] INIT[51] INIT[52] INIT[53] INIT[54] INIT[55] INIT[56] INIT[57] INIT[58] INIT[59] INIT[60] INIT[61] INIT[62] INIT[63] Port Descriptions Port O6 O5 I0, I1, I2, I3, I4, I5 Direction Output Output Input Width 1 1 1 Function 6/5-LUT output 5-LUT output LUT inputs Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 64-Bit Value Default All zeros Description Specifies the LUT5/6 output function. Send Feedback 284 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT6_2: 6-input 2 output Look-Up Table -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT6_2_inst : LUT6_2 generic map ( INIT => X"0000000000000000") -- Specify LUT Contents port map ( O6 => O6, -- 6/5-LUT output (1-bit) O5 => O5, -- 5-LUT output (1-bit) I0 => I0, -- LUT input (1-bit) I1 => I1, -- LUT input (1-bit) I2 => I2, -- LUT input (1-bit) I3 => I3, -- LUT input (1-bit) I4 => I4, -- LUT input (1-bit) I5 => I5 -- LUT input (1-bit) ); -- End of LUT6_2_inst instantiation Verilog Instantiation Template // LUT6_2: 6-input, 2 output Look-Up Table // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT6_2 #( .INIT(64'h0000000000000000) // Specify LUT Contents ) LUT6_2_inst ( .O6(O6), // 1-bit LUT6 output .O5(O5), // 1-bit lower LUT5 output .I0(I0), // 1-bit LUT input .I1(I1), // 1-bit LUT input .I2(I2), // 1-bit LUT input .I3(I3), // 1-bit LUT input .I4(I4), // 1-bit LUT input .I5(I5) // 1-bit LUT input (fast MUX select only available to O6 output) ); // End of LUT6_2_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 285 Chapter 4: About Design Elements LUT6_D Primitive: 6-Input Lookup Table with General and Local Outputs Introduction This design element is a six-input, one-output look-up table (LUT) that can either act as an asynchronous 64-bit ROM (with 6-bit addressing) or implement any 6-input logic function. LUTs are the basic logic building blocks and are used to implement most logic functions of the design. A LUT6 is mapped to one of the four look-up tables in the slice. The functionality of the LUT6, LUT6_L and LUT6_D is the same. However, the LUT6_L and LUT6_D allow the additional specification to connect the LUT6 output signal to an internal slice, or CLB connection, using the LO output. The LUT6_L specifies that the only connections from the LUT6 will be within a slice, or CLB, while the LUT6_D allows the specification to connect the output of the LUT to both inter-slice/CLB logic and external logic as well. The LUT6 does not state any specific output connections and should be used in all cases except where internal slice or CLB signal connections must be implicitly specified. An INIT attribute consisting of a 64-bit Hexadecimal value must be specified to indicate the LUTs logical function. The INIT value is calculated by assigning a 1 to corresponding INIT bit value when the associated inputs are applied. For instance, a Verilog INIT value of 64'h8000000000000000 (X"8000000000000000" for VHDL) makes the output zero unless all of the inputs are one (a 6-input AND gate). A Verilog INIT value of 64'hfffffffffffffffe (X"FFFFFFFFFFFFFFFE" for VHDL) makes the output one unless all zeros are on the inputs (a 6-input OR gate). The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: • The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary logic table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. • The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation. This method is easier to understand once you have grasped the concept and is more self-documenting than the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs I5 I4 I3 I2 I1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Outputs I0 O 0 INIT[0] 1 INIT[1] 0 INIT[2] LO INIT[0] INIT[1] INIT[2] Send Feedback 286 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Inputs I5 I4 I3 I2 I1 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 0 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 1 1 0 0 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 0 0 1 1 Chapter 4: About Design Elements Outputs I0 O 1 INIT[3] 0 INIT[4] 1 INIT[5] 0 INIT[6] 1 INIT[7] 0 INIT[8] 1 INIT[9] 0 INIT[10] 1 INIT[11] 0 INIT[12] 1 INIT[13] 0 INIT[14] 1 INIT[15] 0 INIT[16] 1 INIT[17] 0 INIT[18] 1 INIT[19] 0 INIT[20] 1 INIT[21] 0 INIT[22] 1 INIT[23] 0 INIT[24] 1 INIT[25] 0 INIT[26] 1 INIT[27] 0 INIT[28] 1 INIT[29] 0 INIT[30] 1 INIT[31] 0 INIT[32] 1 INIT[33] 0 INIT[34] 1 INIT[35] 0 INIT[36] 1 INIT[37] 0 INIT[38] 1 INIT[39] LO INIT[3] INIT[4] INIT[5] INIT[6] INIT[7] INIT[8] INIT[9] INIT[10] INIT[11] INIT[12] INIT[13] INIT[14] INIT[15] INIT[16] INIT[17] INIT[18] INIT[19] INIT[20] INIT[21] INIT[22] INIT[23] INIT[24] INIT[25] INIT[26] INIT[27] INIT[28] INIT[29] INIT[30] INIT[31] INIT[32] INIT[33] INIT[34] INIT[35] INIT[36] INIT[37] INIT[38] INIT[39] Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 287 Chapter 4: About Design Elements Inputs Outputs I5 I4 I3 I2 I1 I0 O 1 0 1 0 0 0 INIT[40] 1 0 1 0 0 1 INIT[41] 1 0 1 0 1 0 INIT[42] 1 0 1 0 1 1 INIT[43] 1 0 1 1 0 0 INIT[44] 1 0 1 1 0 1 INIT[45] 1 0 1 1 1 0 INIT[46] 1 0 1 1 1 1 INIT[47] 1 1 0 0 0 0 INIT[48] 1 1 0 0 0 1 INIT[49] 1 1 0 0 1 0 INIT[50] 1 1 0 0 1 1 INIT[51] 1 1 0 1 0 0 INIT[52] 1 1 0 1 0 1 INIT[53] 1 1 0 1 1 0 INIT[54] 1 1 0 1 1 1 INIT[55] 1 1 1 0 0 0 INIT[56] 1 1 1 0 0 1 INIT[57] 1 1 1 0 1 0 INIT[58] 1 1 1 0 1 1 INIT[59] 1 1 1 1 0 0 INIT[60] 1 1 1 1 0 1 INIT[61] 1 1 1 1 1 0 INIT[62] 1 1 1 1 1 1 INIT[63] INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Port Description Name O6 O5 I0, I1, I2, I3, I4, I5 Direction Output Output Input Width 1 1 1 Function 6/5-LUT output 5-LUT output LUT inputs Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No LO INIT[40] INIT[41] INIT[42] INIT[43] INIT[44] INIT[45] INIT[46] INIT[47] INIT[48] INIT[49] INIT[50] INIT[51] INIT[52] INIT[53] INIT[54] INIT[55] INIT[56] INIT[57] INIT[58] INIT[59] INIT[60] INIT[61] INIT[62] INIT[63] Send Feedback 288 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Default Any 64-Bit Value All zeros Description Specifies the logic value for the look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT6_D: 6-input Look-Up Table with general and local outputs -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT6_D_inst : LUT6_D generic map ( INIT => X"0000000000000000") -- Specify LUT contents port map ( LO => LO, -- LUT local output O => O, -- LUT general output I0 => I0, -- LUT input I1 => I1, -- LUT input I2 => I2, -- LUT input I3 => I3, -- LUT input I4 => I4, -- LUT input I5 => I5 -- LUT input ); -- End of LUT6_D_inst instantiation Verilog Instantiation Template // LUT6_D: 6-input Look-Up Table with general and local outputs // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT6_D #( .INIT(64'h0000000000000000) // Specify LUT Contents ) LUT6_D_inst ( .LO(LO), // LUT local output .O(O), // LUT general output .I0(I0), // LUT input .I1(I1), // LUT input .I2(I2), // LUT input .I3(I3), // LUT input .I4(I4), // LUT input .I5(I5) // LUT input ); // End of LUT6_D_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 289 Chapter 4: About Design Elements LUT6_L Primitive: 6-Input Lookup Table with Local Output Introduction This design element is a 6-input, 1-output look-up table (LUT) that can either act as an asynchronous 64-bit ROM (with 6-bit addressing) or implement any 6-input logic function. LUTs are the basic logic building blocks and are used to implement most logic functions of the design. A LUT6 is mapped to one of the four look-up tables in the slice. The functionality of the LUT6, LUT6_L and LUT6_D is the same. However, the LUT6_L and LUT6_D allow the additional specification to connect the LUT6 output signal to an internal slice, or CLB connection, using the LO output. The LUT6_L specifies that the only connections from the LUT6 are within a slice, or CLB, while the LUT6_D allows the specification to connect the output of the LUT to both inter-slice/CLB logic and external logic as well. The LUT6 does not state any specific output connections and should be used in all cases except where internal slice or CLB signal connections must be implicitly specified. An INIT attribute consisting of a 64-bit hexadecimal value must be specified to indicate the LUT's logical function. The INIT value is calculated by assigning a 1 to the corresponding INIT bit value when the associated inputs are applied. For instance, a Verilog INIT value of 64'h8000000000000000 (X"8000000000000000" for VHDL) will make the output zero unless all of the inputs are one (a 6-input AND gate). A Verilog INIT value of 64'hfffffffffffffffe (X"FFFFFFFFFFFFFFFE" for VHDL) will make the output one unless all zeros are on the inputs (a 6-input OR gate). The INIT parameter for the FPGA LUT primitive is what gives the LUT its logical value. By default, this value is zero, thus driving the output to a zero regardless of the input values (acting as a ground). However, in most cases a new INIT value must be determined in order to specify the logic function for the LUT primitive. There are at least two methods by which the LUT value can be determined: The Logic Table Method -A common method to determine the desired INIT value for a LUT is using a logic table. To do so, simply create a binary truth table of all possible inputs, specify the desired logic value of the output and then create the INIT string from those output values. The Equation Method -Another method to determine the LUT value is to define parameters for each input to the LUT that correspond to their listed truth value and use those to build the logic equation you are after. This method is easier to understand once you have grasped the concept and is more self-documenting that the above method. However, this method does require the code to first specify the appropriate parameters. Logic Table Inputs I5 I4 I3 I2 0 0 0 0 0 0 0 0 Outputs I1 I0 LO 0 0 INIT[0] 0 1 INIT[1] Send Feedback 290 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Inputs I5 I4 I3 I2 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 1 1 0 0 1 Chapter 4: About Design Elements Outputs I1 I0 LO 1 0 INIT[2] 1 1 INIT[3] 0 0 INIT[4] 0 1 INIT[5] 1 0 INIT[6] 1 1 INIT[7] 0 0 INIT[8] 0 1 INIT[9] 1 0 INIT[10] 1 1 INIT[11] 0 0 INIT[12] 0 1 INIT[13] 1 0 INIT[14] 1 1 INIT[15] 0 0 INIT[16] 0 1 INIT[17] 1 0 INIT[18] 1 1 INIT[19] 0 0 INIT[20] 0 1 INIT[21] 1 0 INIT[22] 1 1 INIT[23] 0 0 INIT[24] 0 1 INIT[25] 1 0 INIT[26] 1 1 INIT[27] 0 0 INIT[28] 0 1 INIT[29] 1 0 INIT[30] 1 1 INIT[31] 0 0 INIT[32] 0 1 INIT[33] 1 0 INIT[34] 1 1 INIT[35] 0 0 INIT[36] 0 1 INIT[37] 1 0 INIT[38] Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 291 Chapter 4: About Design Elements Inputs I5 I4 I3 I2 I1 I0 1 0 0 1 1 1 1 0 1 0 0 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 1 0 0 1 0 1 1 0 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 0 1 1 0 0 1 1 1 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 0 0 0 1 1 1 0 0 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 INIT = Binary equivalent of the hexadecimal number assigned to the INIT attribute Outputs LO INIT[39] INIT[40] INIT[41] INIT[42] INIT[43] INIT[44] INIT[45] INIT[46] INIT[47] INIT[48] INIT[49] INIT[50] INIT[51] INIT[52] INIT[53] INIT[54] INIT[55] INIT[56] INIT[57] INIT[58] INIT[59] INIT[60] INIT[61] INIT[62] INIT[63] Port Description Name LO I0, I1, I2, I3, I4, I5 Direction Output Input Width 1 1 Function 6/5-LUT output or internal CLB connection LUT inputs Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 292 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 64-Bit Value Default All zeros Description Specifies the logic value for the look-up tables. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- LUT6_L: 6-input Look-Up Table with local output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 LUT6_L_inst : LUT6_L generic map ( INIT => X"0000000000000000") -- Specify LUT Contents port map ( LO => LO, -- LUT local output I0 => I0, -- LUT input I1 => I1, -- LUT input I2 => I2, -- LUT input I3 => I3, -- LUT input I4 => I4, -- LUT input I5 => I5 -- LUT input ); -- End of LUT6_L_inst instantiation Verilog Instantiation Template // LUT6_L: 6-input Look-Up Table with local output // 7 Series // Xilinx HDL Libraries Guide, version 14.7 LUT6_L #( .INIT(64'h0000000000000000) // Specify LUT Contents ) LUT6_L_inst ( .LO(LO), // LUT local output .I0(I0), // LUT input .I1(I1), // LUT input .I2(I2), // LUT input .I3(I3), // LUT input .I4(I4), // LUT input .I5(I5) // LUT input ); // End of LUT6_L_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 293 Chapter 4: About Design Elements MMCME2_ADV Primitive: Advanced Mixed Mode Clock Manager Introduction The MMCME2 is a mixed signal block designed to support frequency synthesis, clock network deskew, and jitter reduction. The clock outputs can each have an individual divide, phase shift and duty cycle based on the same VCO frequency. Additionally, the MMCME2 supports dynamic phase shifting and fractional divides. Port Descriptions Port CLKFBIN CLKFBOUT CLKFBOUTB CLKFBSTOPPED CLKINSEL Type Input Output Output Output Input CLKINSTOPPED CLKIN1 CLKIN2 Output Input Input CLKOUT0 CLKOUT0B CLKOUT1 Output Output Output Width 1 1 1 1 1 1 1 1 1 1 1 Function Feedback clock pin to the MMCM Dedicated MMCM Feedback clock output Inverted CLKFBOUT Status pin indicating that the feedback clock has stopped. Signal controls the state of the input MUX, High = CLKIN1, Low = CLKIN2. Status pin indicating that the input clock has stopped. Primary clock input. Secondary clock input to dynamically switch the MMCM reference clock. CLKOUT0 output Inverted CLKOUT0 output CLKOUT1 output Send Feedback 294 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port CLKOUT1B CLKOUT2 CLKOUT2B CLKOUT3 CLKOUT3B CLKOUT4 CLKOUT5 CLKOUT6 DADDR<6:0> Type Output Output Output Output Output Output Output Output Input DCLK DEN Input Input DI<15:0> DO<15:0> DRDY Input Output Output DWE Input LOCKED Output PSCLK PSDONE PSEN PSINCDEC PWRDWN RST Input Output Input Input Input Input Width 1 1 1 1 1 1 1 1 7 1 1 16 16 1 1 1 1 1 1 1 1 1 Function Inverted CLKOUT1 output CLKOUT2 output Inverted CLKOUT2 output CLKOUT3 output Inverted CLKOUT3 output CLKOUT4 output CLKOUT5 output CLKOUT6 output The dynamic reconfiguration address (DADDR) input bus provides a reconfiguration address for the dynamic reconfiguration. When not used, all bits must be assigned zeros. The DCLK signal is the reference clock for the dynamic reconfiguration port. The dynamic reconfiguration enable (DEN) provides the enable control signal to access the dynamic reconfiguration feature. When the dynamic reconfiguration feature is not used, DEN must be tied Low. The dynamic reconfiguration data input (DI) bus provides reconfiguration data. When not used, all bits must be set to zero. The dynamic reconfiguration output bus provides MMCM data output when using dynamic reconfiguration. The dynamic reconfiguration ready output (DRDY) provides the response to the DEN signal for the MMCMs dynamic reconfiguration feature. The dynamic reconfiguration write enable (DWE) input pin provides the write enable control signal to write the DI data into the DADDR address. When not used, it must be tied Low. An output from the MMCM that indicates when the MMCM has achieved phase alignment within a predefined window and frequency matching within a predefined PPM range. The MMCM automatically locks after power on, no extra reset is required. LOCKED will be deasserted if the input clock stops or the phase alignment is violated (e.g., input clock phase shift). The MMCM automatically reacquires lock after LOCKED is deasserted. Phase shift clock. Phase shift done. Phase shift enable Phase shift increment/decrement control. Powers down instantiated but unused MMCMs. Asynchronous reset signal. The MMCM will synchronously re-enable itself when this signal is released (i.e., MMCM re-enabled). A reset is required when the input clock conditions change (e.g., frequency). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 295 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes No Recommended No Available Attributes Attribute BANDWIDTH Type STRING Allowed Values "OPTIMIZED", "HIGH", "LOW" CLKFBOUT_MULT _F 3 significant 2.000 to 64.000 digit FLOAT CLKFBOUT_PHASE 3 significant -360.000 to digit FLOAT 360.000 CLKIN1_PERIOD, CLKIN2_PERIOD FLOAT(nS) 0.000 to 100.000 CLKOUT1_DIVIDE, CLKOUT2_DIVIDE, CLKOUT3_DIVIDE, CLKOUT4_DIVIDE, CLKOUT5_DIVIDE, CLKOUT6_DIVIDE CLKOUT0_DIVIDE _F DECIMAL 3 significant digit FLOAT 1 to 128 1.000 to 128.000 CLKOUT0_DUTY _CYCLE to CLKOUT6_DUTY _CYCLE CLKOUT0_PHASE to CLKOUT6_PHASE 3 significant 0.001 to 0.999 digit FLOAT 3 significant -360.000 to digit FLOAT 360.000 Default Description "OPTIMIZED" Specifies the MMCM programming algorithm affecting the jitter, phase margin and other characteristics of the MMCM. 5.000 Specifies the amount to multiply all CLKOUT clock outputs if a different frequency is desired. This number, in combination with the associated CLKOUT#_DIVIDE value and DIVCLK_DIVIDE value, will determine the output frequency. 0.000 Specifies the phase offset in degrees of the clock feedback output. Shifting the feedback clock results in a negative phase shift of all output clocks to the MMCM. 0.000 Specifies the input period in ns to the MMCM CLKIN inputs. Resolution is down to the ps. For example a value of 33.333 would indicate a 30 MHz input clock. This information is mandatory and must be supplied. CLKIN1_PERIOD relates to the input period on the CLKIN1 input while CLKIN2_PERIOD relates to the input clock period on the CLKIN2 input. 1 Specifies the amount to divide the associated CLKOUT clock output if a different frequency is desired. This number in combination with the CLKFBOUT_MULT_F and DIVCLK_DIVIDE values will determine the output frequency. 1.000 Specifies the amount to divide the associated CLKOUT clock output if a different frequency is desired. This number in combination with the CLKFBOUT_MULT_F and DIVCLK_DIVIDE values will determine the output frequency. 0.500 Specifies the Duty Cycle of the associated CLKOUT clock output in percentage (i.e., 0.50 will generate a 50% duty cycle). 0.000 Specifies the phase offset in degrees of the clock feedback output. Shifting the feedback clock results in a negative phase shift of all output clocks to the MMCM. Send Feedback 296 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Attribute CLKOUT4 _CASCADE COMPENSATION DIVCLK_DIVIDE REF_JITTER1, REF_JITTER2 SS_EN SS_MOD_PERIOD SS_MODE STARTUP_WAIT CLKFBOUT_USE _FINE_PS to CLKOUT6_USE _FINE_PS Type Allowed Values Default Description BOOLEAN FALSE, TRUE FALSE Cascades the output divider (counter) into the input of the CLKOUT4 divider for an output clock divider that is greater than 128. STRING "ZHOLD", "BUF_IN", "EXTERNAL", "INTERNAL" "ZHOLD" Clock input compensation. Should be set to ZHOLD. Defines how the MMCM feedback is configured. • "ZHOLD" - MMCM is configured to provide a negative hold time at the I/O registers. • "INTERNAL" - MMCM is using its own internal feedback path so no delay is being compensated. • "EXTERNAL" - a network external to the FPGA is being compensated. • "BUF_IN" - configuration does not match with the other compensation modes and no delay will be compensated. This is the case if a clock input is driven by a BUFG/BUFH/BUFR/GT. DECIMAL 1 to 106 1 Specifies the division ratio for all output clocks with respect to the input clock. Effectively divides the CLKIN going into the PFD. 3 significant 0.000 to 0.999 digit FLOAT 0.010 Allows specification of the expected jitter on the CLKIN inputs in order to better optimize MMCM performance. A bandwidth setting of OPTIMIZED will attempt to choose the best parameter for input clocking when unknown. If known, then the value provided should be specified in terms of the UI percentage (the maximum peak to peak value) of the expected jitter on the input clock. REF_JITTER1 relates to the input jitter on CLKIN1 while REF_JITTER2 relates to the input jitter on CLKIN2. STRING "FALSE", "TRUE" "FALSE" Enables the spread spectrum feature for the MMCM. Used in conjunction with SS_MODE and SS_MOD_PERIOD attributes. DECIMAL(nS) 4000 to 40000 10000 Specifies the spread spectrum modulation period (ns). STRING "CENTER_HIGH", "CENTER_HIGHC"ontrols the spread spectrum frequency "CENTER_LOW", deviation and the spread type. "DOWN_HIGH", "DOWN_LOW" BOOLEAN FALSE, TRUE FALSE Delays configuration DONE signal from asserting until MMCM is locked. BOOLEAN FALSE, TRUE FALSE Counter variable fine phase shift enable. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 297 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- MMCME2_ADV: Advanced Mixed Mode Clock Manager -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 MMCME2_ADV_inst : MMCME2_ADV generic map ( BANDWIDTH => "OPTIMIZED", -- Jitter programming (OPTIMIZED, HIGH, LOW) CLKFBOUT_MULT_F => 5.0, -- Multiply value for all CLKOUT (2.000-64.000). CLKFBOUT_PHASE => 0.0, -- Phase offset in degrees of CLKFB (-360.000-360.000). -- CLKIN_PERIOD: Input clock period in ns to ps resolution (i.e. 33.333 is 30 MHz). CLKIN1_PERIOD => 0.0, CLKIN2_PERIOD => 0.0, -- CLKOUT0_DIVIDE - CLKOUT6_DIVIDE: Divide amount for CLKOUT (1-128) CLKOUT1_DIVIDE => 1, CLKOUT2_DIVIDE => 1, CLKOUT3_DIVIDE => 1, CLKOUT4_DIVIDE => 1, CLKOUT5_DIVIDE => 1, CLKOUT6_DIVIDE => 1, CLKOUT0_DIVIDE_F => 1.0, -- Divide amount for CLKOUT0 (1.000-128.000). -- CLKOUT0_DUTY_CYCLE - CLKOUT6_DUTY_CYCLE: Duty cycle for CLKOUT outputs (0.01-0.99). CLKOUT0_DUTY_CYCLE => 0.5, CLKOUT1_DUTY_CYCLE => 0.5, CLKOUT2_DUTY_CYCLE => 0.5, CLKOUT3_DUTY_CYCLE => 0.5, CLKOUT4_DUTY_CYCLE => 0.5, CLKOUT5_DUTY_CYCLE => 0.5, CLKOUT6_DUTY_CYCLE => 0.5, -- CLKOUT0_PHASE - CLKOUT6_PHASE: Phase offset for CLKOUT outputs (-360.000-360.000). CLKOUT0_PHASE => 0.0, CLKOUT1_PHASE => 0.0, CLKOUT2_PHASE => 0.0, CLKOUT3_PHASE => 0.0, CLKOUT4_PHASE => 0.0, CLKOUT5_PHASE => 0.0, CLKOUT6_PHASE => 0.0, CLKOUT4_CASCADE => FALSE, -- Cascade CLKOUT4 counter with CLKOUT6 (FALSE, TRUE) COMPENSATION => "ZHOLD", -- ZHOLD, BUF_IN, EXTERNAL, INTERNAL DIVCLK_DIVIDE => 1, -- Master division value (1-106) -- REF_JITTER: Reference input jitter in UI (0.000-0.999). REF_JITTER1 => 0.0, REF_JITTER2 => 0.0, STARTUP_WAIT => FALSE, -- Delays DONE until MMCM is locked (FALSE, TRUE) -- Spread Spectrum: Spread Spectrum Attributes SS_EN => "FALSE", -- Enables spread spectrum (FALSE, TRUE) SS_MODE => "CENTER_HIGH", -- CENTER_HIGH, CENTER_LOW, DOWN_HIGH, DOWN_LOW SS_MOD_PERIOD => 10000, -- Spread spectrum modulation period (ns) (VALUES) -- USE_FINE_PS: Fine phase shift enable (TRUE/FALSE) CLKFBOUT_USE_FINE_PS => FALSE, CLKOUT0_USE_FINE_PS => FALSE, CLKOUT1_USE_FINE_PS => FALSE, CLKOUT2_USE_FINE_PS => FALSE, CLKOUT3_USE_FINE_PS => FALSE, CLKOUT4_USE_FINE_PS => FALSE, CLKOUT5_USE_FINE_PS => FALSE, CLKOUT6_USE_FINE_PS => FALSE ) port map ( -- Clock Outputs: 1-bit (each) output: User configurable clock outputs CLKOUT0 => CLKOUT0, -- 1-bit output: CLKOUT0 CLKOUT0B => CLKOUT0B, -- 1-bit output: Inverted CLKOUT0 CLKOUT1 => CLKOUT1, -- 1-bit output: CLKOUT1 CLKOUT1B => CLKOUT1B, -- 1-bit output: Inverted CLKOUT1 CLKOUT2 => CLKOUT2, -- 1-bit output: CLKOUT2 CLKOUT2B => CLKOUT2B, -- 1-bit output: Inverted CLKOUT2 Send Feedback 298 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements CLKOUT3 => CLKOUT3, -- 1-bit output: CLKOUT3 CLKOUT3B => CLKOUT3B, -- 1-bit output: Inverted CLKOUT3 CLKOUT4 => CLKOUT4, -- 1-bit output: CLKOUT4 CLKOUT5 => CLKOUT5, -- 1-bit output: CLKOUT5 CLKOUT6 => CLKOUT6, -- 1-bit output: CLKOUT6 -- DRP Ports: 16-bit (each) output: Dynamic reconfiguration ports DO => DO, -- 16-bit output: DRP data DRDY => DRDY, -- 1-bit output: DRP ready -- Dynamic Phase Shift Ports: 1-bit (each) output: Ports used for dynamic phase shifting of the outputs PSDONE => PSDONE, -- 1-bit output: Phase shift done -- Feedback Clocks: 1-bit (each) output: Clock feedback ports CLKFBOUT => CLKFBOUT, -- 1-bit output: Feedback clock CLKFBOUTB => CLKFBOUTB, -- 1-bit output: Inverted CLKFBOUT -- Status Ports: 1-bit (each) output: MMCM status ports CLKFBSTOPPED => CLKFBSTOPPED, -- 1-bit output: Feedback clock stopped CLKINSTOPPED => CLKINSTOPPED, -- 1-bit output: Input clock stopped LOCKED => LOCKED, -- 1-bit output: LOCK -- Clock Inputs: 1-bit (each) input: Clock inputs CLKIN1 => CLKIN1, -- 1-bit input: Primary clock CLKIN2 => CLKIN2, -- 1-bit input: Secondary clock -- Control Ports: 1-bit (each) input: MMCM control ports CLKINSEL => CLKINSEL, -- 1-bit input: Clock select, High=CLKIN1 Low=CLKIN2 PWRDWN => PWRDWN, -- 1-bit input: Power-down RST => RST, -- 1-bit input: Reset -- DRP Ports: 7-bit (each) input: Dynamic reconfiguration ports DADDR => DADDR, -- 7-bit input: DRP address DCLK => DCLK, -- 1-bit input: DRP clock DEN => DEN, -- 1-bit input: DRP enable DI => DI, -- 16-bit input: DRP data DWE => DWE, -- 1-bit input: DRP write enable -- Dynamic Phase Shift Ports: 1-bit (each) input: Ports used for dynamic phase shifting of the outputs PSCLK => PSCLK, -- 1-bit input: Phase shift clock PSEN => PSEN, -- 1-bit input: Phase shift enable PSINCDEC => PSINCDEC, -- 1-bit input: Phase shift increment/decrement -- Feedback Clocks: 1-bit (each) input: Clock feedback ports CLKFBIN => CLKFBIN -- 1-bit input: Feedback clock ); -- End of MMCME2_ADV_inst instantiation Verilog Instantiation Template // MMCME2_ADV: Advanced Mixed Mode Clock Manager // 7 Series // Xilinx HDL Libraries Guide, version 14.7 MMCME2_ADV #( .BANDWIDTH("OPTIMIZED"), // Jitter programming (OPTIMIZED, HIGH, LOW) .CLKFBOUT_MULT_F(5.0), // Multiply value for all CLKOUT (2.000-64.000). .CLKFBOUT_PHASE(0.0), // Phase offset in degrees of CLKFB (-360.000-360.000). // CLKIN_PERIOD: Input clock period in ns to ps resolution (i.e. 33.333 is 30 MHz). .CLKIN1_PERIOD(0.0), .CLKIN2_PERIOD(0.0), // CLKOUT0_DIVIDE - CLKOUT6_DIVIDE: Divide amount for CLKOUT (1-128) .CLKOUT1_DIVIDE(1), .CLKOUT2_DIVIDE(1), .CLKOUT3_DIVIDE(1), .CLKOUT4_DIVIDE(1), .CLKOUT5_DIVIDE(1), .CLKOUT6_DIVIDE(1), .CLKOUT0_DIVIDE_F(1.0), // Divide amount for CLKOUT0 (1.000-128.000). // CLKOUT0_DUTY_CYCLE - CLKOUT6_DUTY_CYCLE: Duty cycle for CLKOUT outputs (0.01-0.99). .CLKOUT0_DUTY_CYCLE(0.5), .CLKOUT1_DUTY_CYCLE(0.5), .CLKOUT2_DUTY_CYCLE(0.5), .CLKOUT3_DUTY_CYCLE(0.5), .CLKOUT4_DUTY_CYCLE(0.5), .CLKOUT5_DUTY_CYCLE(0.5), .CLKOUT6_DUTY_CYCLE(0.5), // CLKOUT0_PHASE - CLKOUT6_PHASE: Phase offset for CLKOUT outputs (-360.000-360.000). .CLKOUT0_PHASE(0.0), Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 299 Chapter 4: About Design Elements .CLKOUT1_PHASE(0.0), .CLKOUT2_PHASE(0.0), .CLKOUT3_PHASE(0.0), .CLKOUT4_PHASE(0.0), .CLKOUT5_PHASE(0.0), .CLKOUT6_PHASE(0.0), .CLKOUT4_CASCADE("FALSE"), // Cascade CLKOUT4 counter with CLKOUT6 (FALSE, TRUE) .COMPENSATION("ZHOLD"), // ZHOLD, BUF_IN, EXTERNAL, INTERNAL .DIVCLK_DIVIDE(1), // Master division value (1-106) // REF_JITTER: Reference input jitter in UI (0.000-0.999). .REF_JITTER1(0.0), .REF_JITTER2(0.0), .STARTUP_WAIT("FALSE"), // Delays DONE until MMCM is locked (FALSE, TRUE) // Spread Spectrum: Spread Spectrum Attributes .SS_EN("FALSE"), // Enables spread spectrum (FALSE, TRUE) .SS_MODE("CENTER_HIGH"), // CENTER_HIGH, CENTER_LOW, DOWN_HIGH, DOWN_LOW .SS_MOD_PERIOD(10000), // Spread spectrum modulation period (ns) (VALUES) // USE_FINE_PS: Fine phase shift enable (TRUE/FALSE) .CLKFBOUT_USE_FINE_PS("FALSE"), .CLKOUT0_USE_FINE_PS("FALSE"), .CLKOUT1_USE_FINE_PS("FALSE"), .CLKOUT2_USE_FINE_PS("FALSE"), .CLKOUT3_USE_FINE_PS("FALSE"), .CLKOUT4_USE_FINE_PS("FALSE"), .CLKOUT5_USE_FINE_PS("FALSE"), .CLKOUT6_USE_FINE_PS("FALSE") ) MMCME2_ADV_inst ( // Clock Outputs: 1-bit (each) output: User configurable clock outputs .CLKOUT0(CLKOUT0), // 1-bit output: CLKOUT0 .CLKOUT0B(CLKOUT0B), // 1-bit output: Inverted CLKOUT0 .CLKOUT1(CLKOUT1), // 1-bit output: CLKOUT1 .CLKOUT1B(CLKOUT1B), // 1-bit output: Inverted CLKOUT1 .CLKOUT2(CLKOUT2), // 1-bit output: CLKOUT2 .CLKOUT2B(CLKOUT2B), // 1-bit output: Inverted CLKOUT2 .CLKOUT3(CLKOUT3), // 1-bit output: CLKOUT3 .CLKOUT3B(CLKOUT3B), // 1-bit output: Inverted CLKOUT3 .CLKOUT4(CLKOUT4), // 1-bit output: CLKOUT4 .CLKOUT5(CLKOUT5), // 1-bit output: CLKOUT5 .CLKOUT6(CLKOUT6), // 1-bit output: CLKOUT6 // DRP Ports: 16-bit (each) output: Dynamic reconfiguration ports .DO(DO), // 16-bit output: DRP data .DRDY(DRDY), // 1-bit output: DRP ready // Dynamic Phase Shift Ports: 1-bit (each) output: Ports used for dynamic phase shifting of the outputs .PSDONE(PSDONE), // 1-bit output: Phase shift done // Feedback Clocks: 1-bit (each) output: Clock feedback ports .CLKFBOUT(CLKFBOUT), // 1-bit output: Feedback clock .CLKFBOUTB(CLKFBOUTB), // 1-bit output: Inverted CLKFBOUT // Status Ports: 1-bit (each) output: MMCM status ports .CLKFBSTOPPED(CLKFBSTOPPED), // 1-bit output: Feedback clock stopped .CLKINSTOPPED(CLKINSTOPPED), // 1-bit output: Input clock stopped .LOCKED(LOCKED), // 1-bit output: LOCK // Clock Inputs: 1-bit (each) input: Clock inputs .CLKIN1(CLKIN1), // 1-bit input: Primary clock .CLKIN2(CLKIN2), // 1-bit input: Secondary clock // Control Ports: 1-bit (each) input: MMCM control ports .CLKINSEL(CLKINSEL), // 1-bit input: Clock select, High=CLKIN1 Low=CLKIN2 .PWRDWN(PWRDWN), // 1-bit input: Power-down .RST(RST), // 1-bit input: Reset // DRP Ports: 7-bit (each) input: Dynamic reconfiguration ports .DADDR(DADDR), // 7-bit input: DRP address .DCLK(DCLK), // 1-bit input: DRP clock .DEN(DEN), // 1-bit input: DRP enable .DI(DI), // 16-bit input: DRP data .DWE(DWE), // 1-bit input: DRP write enable // Dynamic Phase Shift Ports: 1-bit (each) input: Ports used for dynamic phase shifting of the outputs .PSCLK(PSCLK), // 1-bit input: Phase shift clock .PSEN(PSEN), // 1-bit input: Phase shift enable .PSINCDEC(PSINCDEC), // 1-bit input: Phase shift increment/decrement // Feedback Clocks: 1-bit (each) input: Clock feedback ports .CLKFBIN(CLKFBIN) // 1-bit input: Feedback clock ); Send Feedback 300 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements // End of MMCME2_ADV_inst instantiation For More Information See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 301 Chapter 4: About Design Elements MMCME2_BASE Primitive: Base Mixed Mode Clock Manager Introduction The MMCME2 is a mixed signal block designed to support frequency synthesis, clock network deskew, and jitter reduction. The clock outputs can each have an individual divide, phase shift and duty cycle based on the same VCO frequency. Additionally, the MMCME2 supports dynamic phase shifting and fractional divides. Port Descriptions Port CLKFBIN CLKFBOUT CLKFBOUTB CLKOUT0 CLKOUT0B CLKOUT1 CLKOUT1B CLKOUT2 CLKOUT2B CLKOUT3 CLKOUT3B Type Input Output Output Output Output Output Output Output Output Output Output Width 1 1 1 1 1 1 1 1 1 1 1 Function Feedback clock pin to the MMCM Dedicated MMCM Feedback clock output Inverted CLKFBOUT output CLKOUT0 output Inverted CLKOUT0 output CLKOUT1 output Inverted CLKOUT1 output CLKOUT2 output Inverted CLKOUT2 output CLKOUT3 output Inverted CLKOUT3 output Send Feedback 302 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port CLKOUT4 CLKOUT5 CLKOUT6 Clock Inputs PWRDWN RST Status Ports Type Output Output Output Input Input Input Width 1 1 1 1 1 1 Output 1 Function CLKOUT4 output CLKOUT5 output CLKOUT6 output General clock input. Powers down instantiated but unused MMCMs. Asynchronous reset signal. The MMCM will synchronously re-enable itself when this signal is released (i.e., MMCM re-enabled). A reset is required when the input clock conditions change (e.g., frequency). An output from the MMCM that indicates when the MMCM has achieved phase alignment within a predefined window and frequency matching within a predefined PPM range. The MMCM automatically locks after power on, no extra reset is required. LOCKED will be deasserted if the input clock stops or the phase alignment is violated (e.g., input clock phase shift). The MMCM automatically reacquires lock after LOCKED is deasserted. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes No Recommended No Available Attributes Attribute BANDWIDTH CLKFBOUT_MULT _F CLKFBOUT_PHASE CLKIN1_PERIOD Type STRING Allowed Values "OPTIMIZED", "HIGH", "LOW" 3 significant 2.000 to 64.000 digit FLOAT 3 significant -360.000 to digit 360.000 FLOAT FLOAT(nS) 0.000 to 100.000 Default Description "OPTIMIZED" Specifies the MMCM programming algorithm affecting the jitter, phase margin and other characteristics of the MMCM. 5.000 Specifies the amount to multiply all CLKOUT clock outputs if a different frequency is desired. This number, in combination with the associated CLKOUT#_DIVIDE value and DIVCLK_DIVIDE value, will determine the output frequency. 0.000 Specifies the phase offset in degrees of the clock feedback output. Shifting the feedback clock results in a negative phase shift of all output clocks to the MMCM. 0.000 Specifies the input period in ns to the MMCM CLKIN1 input. Resolution is down to the ps (3 decimal places). For example, a value of 33.333 would indicate a 30 MHz input clock. This information is mandatory and must be supplied. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 303 Chapter 4: About Design Elements Attribute CLKOUT1_DIVIDE, CLKOUT2_DIVIDE, CLKOUT3_DIVIDE, CLKOUT4_DIVIDE, CLKOUT5_DIVIDE, CLKOUT6_DIVIDE CLKOUT0_DIVIDE _F Type DECIMAL Allowed Values 1 to 128 Default 1 3 significant 1.000 to 128.000 digit FLOAT 1.000 CLKOUT0_DUTY _CYCLE to CLKOUT6_DUTY _CYCLE CLKOUT0_PHASE to CLKOUT6_PHASE 3 significant 0.001 to 0.999 digit FLOAT 3 significant -360.000 to digit 360.000 FLOAT CLKOUT4 _CASCADE BOOLEAN FALSE, TRUE 0.500 0.000 FALSE DIVCLK_DIVIDE DECIMAL 1 to 106 1 REF_JITTER1 3 significant 0.000 to 0.999 digit FLOAT 0.010 STARTUP_WAIT BOOLEAN FALSE, TRUE FALSE Description Specifies the amount to divide the associated CLKOUT clock output if a different frequency is desired. This number in combination with the CLKFBOUT_MULT_F and DIVCLK_DIVIDE values will determine the output frequency. Specifies the amount to divide the associated CLKOUT clock output if a different frequency is desired. This number in combination with the CLKFBOUT_MULT_F and DIVCLK_DIVIDE values will determine the output frequency. Specifies the Duty Cycle of the associated CLKOUT clock output in percentage (i.e., 0.50 will generate a 50% duty cycle). Specifies the phase offset in degrees of the clock feedback output. Shifting the feedback clock results in a negative phase shift of all output clocks to the MMCM. Cascades the output divider (counter) CLKOUT6 into the input of the CLKOUT4 divider for an output clock divider that is greater than 128. Specifies the division ratio for all output clocks with respect to the input clock. Effectively divides the CLKIN going into the PFD. Allows specification of the expected jitter on CLKIN1 in order to better optimize MMCM performance. A bandwidth setting of OPTIMIZED will attempt to choose the best parameter for input clocking when unknown. If known, then the value provided should be specified in terms of the UI percentage (the maximum peak to peak value) of the expected jitter on the input clock. Delays configuration DONE signal from asserting until MMCM is locked. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- MMCME2_BASE: Base Mixed Mode Clock Manager -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 MMCME2_BASE_inst : MMCME2_BASE generic map ( BANDWIDTH => "OPTIMIZED", -- Jitter programming (OPTIMIZED, HIGH, LOW) CLKFBOUT_MULT_F => 5.0, -- Multiply value for all CLKOUT (2.000-64.000). CLKFBOUT_PHASE => 0.0, -- Phase offset in degrees of CLKFB (-360.000-360.000). Send Feedback 304 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements CLKIN1_PERIOD => 0.0, -- Input clock period in ns to ps resolution (i.e. 33.333 is 30 MHz). -- CLKOUT0_DIVIDE - CLKOUT6_DIVIDE: Divide amount for each CLKOUT (1-128) CLKOUT1_DIVIDE => 1, CLKOUT2_DIVIDE => 1, CLKOUT3_DIVIDE => 1, CLKOUT4_DIVIDE => 1, CLKOUT5_DIVIDE => 1, CLKOUT6_DIVIDE => 1, CLKOUT0_DIVIDE_F => 1.0, -- Divide amount for CLKOUT0 (1.000-128.000). -- CLKOUT0_DUTY_CYCLE - CLKOUT6_DUTY_CYCLE: Duty cycle for each CLKOUT (0.01-0.99). CLKOUT0_DUTY_CYCLE => 0.5, CLKOUT1_DUTY_CYCLE => 0.5, CLKOUT2_DUTY_CYCLE => 0.5, CLKOUT3_DUTY_CYCLE => 0.5, CLKOUT4_DUTY_CYCLE => 0.5, CLKOUT5_DUTY_CYCLE => 0.5, CLKOUT6_DUTY_CYCLE => 0.5, -- CLKOUT0_PHASE - CLKOUT6_PHASE: Phase offset for each CLKOUT (-360.000-360.000). CLKOUT0_PHASE => 0.0, CLKOUT1_PHASE => 0.0, CLKOUT2_PHASE => 0.0, CLKOUT3_PHASE => 0.0, CLKOUT4_PHASE => 0.0, CLKOUT5_PHASE => 0.0, CLKOUT6_PHASE => 0.0, CLKOUT4_CASCADE => FALSE, -- Cascade CLKOUT4 counter with CLKOUT6 (FALSE, TRUE) DIVCLK_DIVIDE => 1, -- Master division value (1-106) REF_JITTER1 => 0.0, -- Reference input jitter in UI (0.000-0.999). STARTUP_WAIT => FALSE -- Delays DONE until MMCM is locked (FALSE, TRUE) ) port map ( -- Clock Outputs: 1-bit (each) output: User configurable clock outputs CLKOUT0 => CLKOUT0, -- 1-bit output: CLKOUT0 CLKOUT0B => CLKOUT0B, -- 1-bit output: Inverted CLKOUT0 CLKOUT1 => CLKOUT1, -- 1-bit output: CLKOUT1 CLKOUT1B => CLKOUT1B, -- 1-bit output: Inverted CLKOUT1 CLKOUT2 => CLKOUT2, -- 1-bit output: CLKOUT2 CLKOUT2B => CLKOUT2B, -- 1-bit output: Inverted CLKOUT2 CLKOUT3 => CLKOUT3, -- 1-bit output: CLKOUT3 CLKOUT3B => CLKOUT3B, -- 1-bit output: Inverted CLKOUT3 CLKOUT4 => CLKOUT4, -- 1-bit output: CLKOUT4 CLKOUT5 => CLKOUT5, -- 1-bit output: CLKOUT5 CLKOUT6 => CLKOUT6, -- 1-bit output: CLKOUT6 -- Feedback Clocks: 1-bit (each) output: Clock feedback ports CLKFBOUT => CLKFBOUT, -- 1-bit output: Feedback clock CLKFBOUTB => CLKFBOUTB, -- 1-bit output: Inverted CLKFBOUT -- Status Ports: 1-bit (each) output: MMCM status ports LOCKED => LOCKED, -- 1-bit output: LOCK -- Clock Inputs: 1-bit (each) input: Clock input CLKIN1 => CLKIN1, -- 1-bit input: Clock -- Control Ports: 1-bit (each) input: MMCM control ports PWRDWN => PWRDWN, -- 1-bit input: Power-down RST => RST, -- 1-bit input: Reset -- Feedback Clocks: 1-bit (each) input: Clock feedback ports CLKFBIN => CLKFBIN -- 1-bit input: Feedback clock ); -- End of MMCME2_BASE_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 305 Chapter 4: About Design Elements Verilog Instantiation Template // MMCME2_BASE: Base Mixed Mode Clock Manager // 7 Series // Xilinx HDL Libraries Guide, version 14.7 MMCME2_BASE #( .BANDWIDTH("OPTIMIZED"), // Jitter programming (OPTIMIZED, HIGH, LOW) .CLKFBOUT_MULT_F(5.0), // Multiply value for all CLKOUT (2.000-64.000). .CLKFBOUT_PHASE(0.0), // Phase offset in degrees of CLKFB (-360.000-360.000). .CLKIN1_PERIOD(0.0), // Input clock period in ns to ps resolution (i.e. 33.333 is 30 MHz). // CLKOUT0_DIVIDE - CLKOUT6_DIVIDE: Divide amount for each CLKOUT (1-128) .CLKOUT1_DIVIDE(1), .CLKOUT2_DIVIDE(1), .CLKOUT3_DIVIDE(1), .CLKOUT4_DIVIDE(1), .CLKOUT5_DIVIDE(1), .CLKOUT6_DIVIDE(1), .CLKOUT0_DIVIDE_F(1.0), // Divide amount for CLKOUT0 (1.000-128.000). // CLKOUT0_DUTY_CYCLE - CLKOUT6_DUTY_CYCLE: Duty cycle for each CLKOUT (0.01-0.99). .CLKOUT0_DUTY_CYCLE(0.5), .CLKOUT1_DUTY_CYCLE(0.5), .CLKOUT2_DUTY_CYCLE(0.5), .CLKOUT3_DUTY_CYCLE(0.5), .CLKOUT4_DUTY_CYCLE(0.5), .CLKOUT5_DUTY_CYCLE(0.5), .CLKOUT6_DUTY_CYCLE(0.5), // CLKOUT0_PHASE - CLKOUT6_PHASE: Phase offset for each CLKOUT (-360.000-360.000). .CLKOUT0_PHASE(0.0), .CLKOUT1_PHASE(0.0), .CLKOUT2_PHASE(0.0), .CLKOUT3_PHASE(0.0), .CLKOUT4_PHASE(0.0), .CLKOUT5_PHASE(0.0), .CLKOUT6_PHASE(0.0), .CLKOUT4_CASCADE("FALSE"), // Cascade CLKOUT4 counter with CLKOUT6 (FALSE, TRUE) .DIVCLK_DIVIDE(1), // Master division value (1-106) .REF_JITTER1(0.0), // Reference input jitter in UI (0.000-0.999). .STARTUP_WAIT("FALSE") // Delays DONE until MMCM is locked (FALSE, TRUE) ) MMCME2_BASE_inst ( // Clock Outputs: 1-bit (each) output: User configurable clock outputs .CLKOUT0(CLKOUT0), // 1-bit output: CLKOUT0 .CLKOUT0B(CLKOUT0B), // 1-bit output: Inverted CLKOUT0 .CLKOUT1(CLKOUT1), // 1-bit output: CLKOUT1 .CLKOUT1B(CLKOUT1B), // 1-bit output: Inverted CLKOUT1 .CLKOUT2(CLKOUT2), // 1-bit output: CLKOUT2 .CLKOUT2B(CLKOUT2B), // 1-bit output: Inverted CLKOUT2 .CLKOUT3(CLKOUT3), // 1-bit output: CLKOUT3 .CLKOUT3B(CLKOUT3B), // 1-bit output: Inverted CLKOUT3 .CLKOUT4(CLKOUT4), // 1-bit output: CLKOUT4 .CLKOUT5(CLKOUT5), // 1-bit output: CLKOUT5 .CLKOUT6(CLKOUT6), // 1-bit output: CLKOUT6 // Feedback Clocks: 1-bit (each) output: Clock feedback ports .CLKFBOUT(CLKFBOUT), // 1-bit output: Feedback clock .CLKFBOUTB(CLKFBOUTB), // 1-bit output: Inverted CLKFBOUT // Status Ports: 1-bit (each) output: MMCM status ports .LOCKED(LOCKED), // 1-bit output: LOCK // Clock Inputs: 1-bit (each) input: Clock input .CLKIN1(CLKIN1), // 1-bit input: Clock // Control Ports: 1-bit (each) input: MMCM control ports .PWRDWN(PWRDWN), // 1-bit input: Power-down .RST(RST), // 1-bit input: Reset // Feedback Clocks: 1-bit (each) input: Clock feedback ports .CLKFBIN(CLKFBIN) // 1-bit input: Feedback clock ); // End of MMCME2_BASE_inst instantiation Send Feedback 306 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 307 Chapter 4: About Design Elements MUXF7 Primitive: 2-to-1 Look-Up Table Multiplexer with General Output Introduction This design element is a two input multiplexer which, in combination with two LUT6 elements will let you create any 7-input function, an 8-to-1 multiplexer, or other logic functions up to 12-bits wide. Local outputs of the LUT6 element are connected to the I0 and I1 inputs of the MUXF7. The S input is driven from any internal net. When Low, S selects I0. When High, S selects I1. The O output is a general interconnect. The variants, "MUXF7_D" and "MUXF7_L", provide additional types of outputs that can be used by different timing models for more accurate pre-layout timing estimation. Logic Table Inputs S I0 0 I0 1 X X 0 X 1 Outputs I1 O X I0 I1 I1 0 0 1 1 Port Descriptions Port O I0 I1 S Direction Output Input Input Input Width 1 1 1 1 Function Output of MUX to general routing. Input (tie to LUT6 LO out). Input (tie to LUT6 LO out). Input select to MUX. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 308 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- MUXF7: CLB MUX to tie two LUT6's together with general output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 MUXF7_inst : MUXF7 port map ( O => O, -- Output of MUX to general routing I0 => I0, -- Input (tie to LUT6 O6 pin) I1 => I1, -- Input (tie to LUT6 O6 pin) S => S -- Input select to MUX ); -- End of MUXF7_inst instantiation Verilog Instantiation Template // MUXF7: CLB MUX to tie two LUT6's together with general output // 7 Series // Xilinx HDL Libraries Guide, version 14.7 MUXF7 MUXF7_inst ( .O(O), // Output of MUX to general routing .I0(I0), // Input (tie to LUT6 O6 pin) .I1(I1), // Input (tie to LUT6 O6 pin) .S(S) // Input select to MUX ); // End of MUXF7_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 309 Chapter 4: About Design Elements MUXF7_D Primitive: 2-to-1 Look-Up Table Multiplexer with Dual Output Introduction This design element is a two input multiplexer which, in combination with two LUT6 elements will let you create any 7-input function, an 8-to-1 multiplexer, or other logic functions up to 12-bits wide. Local outputs of the LUT6 element are connected to the I0 and I1 inputs of the MUXF7. The S input is driven from any internal net. When Low, S selects I0. When High, S selects I1. Outputs O and LO are functionally identical. The O output is a general interconnect. The LO output connects to other inputs in the same CLB slice. See also "MUXF7" and "MUXF7_L". Logic Table Inputs Outputs S I0 I1 O LO 0 I0 X I0 I0 1 X I1 I1 I1 X 0 0 0 0 X 1 1 1 1 Port Descriptions Port O LO I0 I1 S Direction Output Output Input Input Input Width 1 1 1 1 1 Function Output of MUX to general routing. Output of MUX to local routing. Input (tie to LUT6 LO out). Input (tie to LUT6 LO out). Input select to MUX. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 310 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- MUXF7_D: CLB MUX to tie two LUT6's together with general and local outputs -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 MUXF7_D_inst : MUXF7_D port map ( LO => LO, -- Output of MUX to local routing O => O, -- Output of MUX to general routing I0 => I0, -- Input (tie to LUT6 O6 pin) I1 => I1, -- Input (tie to LUT6 O6 pin) S => S -- Input select to MUX ); -- End of MUXF7_D_inst instantiation Verilog Instantiation Template // MUXF7_D: CLB MUX to tie two LUT6's together with general and local outputs // 7 Series // Xilinx HDL Libraries Guide, version 14.7 MUXF7_D MUXF7_D_inst ( .LO(LO), // Output of MUX to local routing .O(O), // Output of MUX to general routing .I0(I0), // Input (tie to LUT6 O6 pin) .I1(I1), // Input (tie to LUT6 O6 pin) .S(S) // Input select to MUX ); // End of MUXF7_D_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 311 Chapter 4: About Design Elements MUXF7_L Primitive: 2-to-1 look-up table Multiplexer with Local Output Introduction This design element is a two input multiplexer which, in combination with two LUT6 elements will let you create any 7-input function, an 8-to-1 multiplexer, or other logic functions up to 12-bits wide. Local outputs of the LUT6 element are connected to the I0 and I1 inputs of the MUXF7. The S input is driven from any internal net. When Low, S selects I0. When High, S selects I1. The LO output connects to other inputs in the same CLB slice. See also "MUXF7" and "MUXF7_D". Logic Table Inputs Output S I0 I1 LO 0 I0 X I0 1 X I1 I1 X 0 0 0 X 1 1 1 Port Descriptions Port LO I0 I1 S Direction Output Input Input Input Width 1 1 1 1 Function Output of MUX to local routing Input Input Input select to MUX Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 312 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- MUXF7_L: CLB MUX to tie two LUT6's together with local output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 MUXF7_L_inst : MUXF7_L port map ( LO => LO, -- Output of MUX to local routing I0 => I0, -- Input (tie to LUT6 O6 pin) I1 => I1, -- Input (tie to LUT6 O6 pin) S => S -- Input select to MUX ); -- End of MUXF7_L_inst instantiation Verilog Instantiation Template // MUXF7_L: CLB MUX to tie two LUT6's together with local output // 7 Series // Xilinx HDL Libraries Guide, version 14.7 MUXF7_L MUXF7_L_inst ( .LO(LO), // Output of MUX to local routing .I0(I0), // Input (tie to LUT6 O6 pin) .I1(I1), // Input (tie to LUT6 O6 pin) .S(S) // Input select to MUX ); // End of MUXF7_L_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 313 Chapter 4: About Design Elements MUXF8 Primitive: 2-to-1 Look-Up Table Multiplexer with General Output Introduction This design element is a two input multiplexer which, in combination with two MUXF7 multiplexers and their four associated LUT6 elements, will let you create any 8-input function, a 16-to-1 multiplexer, or other logic functions up to 24-bits wide. Local outputs of MUXF7 are connected to the I0 and I1 inputs of the MUXF8. The S input is driven from any internal net. When Low, S selects I0. When High, S selects I1. The O output is a general interconnect. The variants, "MUXF8_D" and "MUXF8_L", provide additional types of outputs that can be used by different timing models for more accurate pre-layout timing estimation. Logic Table Inputs S I0 0 I0 1 X X 0 X 1 Outputs I1 O X I0 I1 I1 0 0 1 1 Port Descriptions Port O I0 I1 S Direction Output Input Input Input Width 1 1 1 1 Function Output of MUX to general routing Input (tie to MUXF7 LO out) Input (tie to MUXF7 LO out) Input select to MUX Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 314 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- MUXF8: CLB MUX to tie two MUXF7's together with general output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 MUXF8_inst : MUXF8 port map ( O => O, -- Output of MUX to general routing I0 => I0, -- Input (tie to MUXF7 L/LO out) I1 => I1, -- Input (tie to MUXF7 L/LO out) S => S -- Input select to MUX ); -- End of MUXF8_inst instantiation Verilog Instantiation Template // MUXF8: CLB MUX to tie two MUXF7's together with general output // 7 Series // Xilinx HDL Libraries Guide, version 14.7 MUXF8 MUXF8_inst ( .O(O), // Output of MUX to general routing .I0(I0), // Input (tie to MUXF7 L/LO out) .I1(I1), // Input (tie to MUXF7 L/LO out) .S(S) // Input select to MUX ); // End of MUXF8_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 315 Chapter 4: About Design Elements MUXF8_D Primitive: 2-to-1 Look-Up Table Multiplexer with Dual Output Introduction This design element is a two input multiplexer which, in combination with two MUXF7 multiplexers and their four associated LUT6 elements, will let you create any 8-input function, a 16-to-1 multiplexer, or other logic functions up to 24-bits wide. Local outputs of MUXF7 are connected to the I0 and I1 inputs of the MUXF8. The S input is driven from any internal net. When Low, S selects I0. When High, S selects I1. Outputs O and LO are functionally identical. The O output is a general interconnect. The LO output connects to other inputs in the same CLB slice. See also "MUXF8" and "MUXF8_L". Logic Table Inputs Outputs S I0 I1 O LO 0 I0 X I0 I0 1 X I1 I1 I1 X 0 0 0 0 X 1 1 1 1 Port Descriptions Port O LO I0 I1 S Direction Output Output Input Input Input Width 1 1 1 1 1 Function Output of MUX to general routing Output of MUX to local routing Input (tie to MUXF7 LO out) Input (tie to MUXF7 LO out) Input select to MUX Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 316 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- MUXF8_D: CLB MUX to tie two MUXF7's together with general and local outputs -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 MUXF8_D_inst : MUXF8_D port map ( LO => LO, -- Output of MUX to local routing O => O, -- Output of MUX to general routing I0 => I0, -- Input (tie to MUXF7 L/LO out) I1 => I1, -- Input (tie to MUXF7 L/LO out) S => S -- Input select to MUX ); -- End of MUXF8_D_inst instantiation Verilog Instantiation Template // MUXF8_D: CLB MUX to tie two MUXF7's together with general and local outputs // 7 Series // Xilinx HDL Libraries Guide, version 14.7 MUXF8_D MUXF8_D_inst ( .LO(LO), // Output of MUX to local routing .O(O), // Output of MUX to general routing .I0(I0), // Input (tie to MUXF7 L/LO out) .I1(I1), // Input (tie to MUXF7 L/LO out) .S(S) // Input select to MUX ); // End of MUXF8_D_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 317 Chapter 4: About Design Elements MUXF8_L Primitive: 2-to-1 Look-Up Table Multiplexer with Local Output Introduction This design element is a two input multiplexer which, in combination with two MUXF7 multiplexers and their four associated LUT6 elements, will let you create any 8-input function, a 16-to-1 multiplexer, or other logic functions up to 24-bits wide. Local outputs of MUXF7 are connected to the I0 and I1 inputs of the MUXF8. The S input is driven from any internal net. When Low, S selects I0. When High, S selects I1. The LO output connects to other inputs in the same CLB slice. See also "MUXF8" and "MUXF8_D". Logic Table Inputs Output S I0 I1 LO 0 I0 X I0 1 X I1 I1 X 0 0 0 X 1 1 1 Port Descriptions Port LO I0 I1 S Direction Output Input Input Input Width 1 1 1 1 Function Output of MUX to local routing Input (tie to MUXF7 LO out) Input (tie to MUXF7 LO out) Input select to MUX Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 318 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- MUXF8_L: CLB MUX to tie two MUXF7's together with local output -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 MUXF8_L_inst : MUXF8_L port map ( LO => LO, -- Output of MUX to local routing I0 => I0, -- Input (tie to MUXF7 L/LO out) I1 => I1, -- Input (tie to MUXF7 L/LO out) S => S -- Input select to MUX ); -- End of MUXF8_L_inst instantiation Verilog Instantiation Template // MUXF8_L: CLB MUX to tie two MUXF7's together with local output // 7 Series // Xilinx HDL Libraries Guide, version 14.7 MUXF8_L MUXF8_L_inst ( .LO(LO), // Output of MUX to local routing .I0(I0), // Input (tie to MUXF7 L/LO out) .I1(I1), // Input (tie to MUXF7 L/LO out) .S(S) // Input select to MUX ); // End of MUXF8_L_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 319 Chapter 4: About Design Elements OBUF Primitive: Output Buffer Introduction This design element is a simple output buffer used to drive output signals to the FPGA device pins that do not need to be 3-stated (constantly driven). Either an OBUF, OBUFT, OBUFDS, or OBUFTDS must be connected to every output port in the design. This element isolates the internal circuit and provides drive current for signals leaving a chip. It exists in input/output blocks (IOB). Its output (O) is connected to an OPAD or an IOPAD. The interface standard used by this element is LVCMOS18. Also, this element has selectable drive and slew rates using the DRIVE and SLOW or FAST constraints. Port Descriptions Port O Direction Output I Input Width 1 1 Function Output of OBUF to be connected directly to top-level output port. Input of OBUF. Connect to the logic driving the output port. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute DRIVE Data Type Integer Allowed Values 2, 4, 6, 8, 12, 16, 24 Default 12 IOSTANDARD SLEW String String See Data Sheet "SLOW" or "FAST" "DEFAULT" "SLOW" Description Specifies the output current drive strength of the I/O. It is suggested that you set this to the lowest setting tolerable for the design drive and timing requirements. Assigns an I/O standard to the element. Specifies the slew rate of the output driver. Consult the product Data Sheet for recommendations of the best setting for this attribute. Send Feedback 320 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- OBUF: Single-ended Output Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 OBUF_inst : OBUF generic map ( DRIVE => 12, IOSTANDARD => "DEFAULT", SLEW => "SLOW") port map ( O => O, -- Buffer output (connect directly to top-level port) I => I -- Buffer input ); -- End of OBUF_inst instantiation Verilog Instantiation Template // OBUF: Single-ended Output Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 OBUF #( .DRIVE(12), // Specify the output drive strength .IOSTANDARD("DEFAULT"), // Specify the output I/O standard .SLEW("SLOW") // Specify the output slew rate ) OBUF_inst ( .O(O), // Buffer output (connect directly to top-level port) .I(I) // Buffer input ); // End of OBUF_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 321 Chapter 4: About Design Elements OBUFDS Primitive: Differential Signaling Output Buffer Introduction This design element is a single output buffer that supports low-voltage, differential signaling. OBUFDS isolates the internal circuit and provides drive current for signals leaving the chip. Its output is represented as two distinct ports (O and OB), one deemed the "master" and the other the "slave." The master and the slave are opposite phases of the same logical signal (for example, MYNET and MYNETB). Logic Table Inputs Outputs I O OB 0 0 1 1 1 0 Port Descriptions Port O OB I Direction Output Output Input Width 1 1 1 Function Diff_p output (connect directly to top level port) Diff_n output (connect directly to top level port) Buffer input Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Available Attributes Attribute IOSTANDARD SLEW Data Type String String Allowed Values See Data Sheet "SLOW" or "FAST" Default "DEFAULT" "SLOW" Description Assigns an I/O standard to the element. Specifies the slew rate of the output driver. Consult the product Data Sheet for recommendations of the best setting for this attribute. Send Feedback 322 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- OBUFDS: Differential Output Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 OBUFDS_inst : OBUFDS generic map ( IOSTANDARD => "DEFAULT", -- Specify the output I/O standard SLEW => "SLOW") -- Specify the output slew rate port map ( O => O, -- Diff_p output (connect directly to top-level port) OB => OB, -- Diff_n output (connect directly to top-level port) I => I -- Buffer input ); -- End of OBUFDS_inst instantiation Verilog Instantiation Template // OBUFDS: Differential Output Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 OBUFDS #( .IOSTANDARD("DEFAULT"), // Specify the output I/O standard .SLEW("SLOW") // Specify the output slew rate ) OBUFDS_inst ( .O(O), // Diff_p output (connect directly to top-level port) .OB(OB), // Diff_n output (connect directly to top-level port) .I(I) // Buffer input ); // End of OBUFDS_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 323 Chapter 4: About Design Elements OBUFT Primitive: 3-State Output Buffer with Active Low Output Enable Introduction This design element is a single, 3-state output buffer with input I, output O, and active-Low output enables (T). This element uses the LVCMOS18 standard and has selectable drive and slew rates using the DRIVE and SLOW or FAST constraints. When T is Low, data on the inputs of the buffers is transferred to the corresponding outputs. When T is High, the output is high impedance (off or Z state). OBUFTs are generally used when a single-ended output is needed with a 3-state capability, such as the case when building bidirectional I/O. Logic Table Inputs T I 1 X 0 1 0 0 Outputs O Z 1 0 Port Descriptions Port O I T Direction Output Input Input Width 1 1 1 Function Buffer output (connect directly to top-level port) Buffer input 3-state enable input Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 324 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute DRIVE Data Type Integer Allowed Values 2, 4, 6, 8, 12, 16, 24 Default 12 IOSTANDARD SLEW String String See Data Sheet "SLOW" or "FAST" "DEFAULT" "SLOW" Description Specifies the output current drive strength of the I/O. It is suggested that you set this to the lowest setting tolerable for the design drive and timing requirements. Assigns an I/O standard to the element. Specifies the slew rate of the output driver. See the Data Sheet for recommendations of the best setting for this attribute. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- OBUFT: Single-ended 3-state Output Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 OBUFT_inst : OBUFT generic map ( DRIVE => 12, IOSTANDARD => "DEFAULT", SLEW => "SLOW") port map ( O => O, -- Buffer output (connect directly to top-level port) I => I, -- Buffer input T => T -- 3-state enable input ); -- End of OBUFT_inst instantiation Verilog Instantiation Template // OBUFT: Single-ended 3-state Output Buffer // All devices // Xilinx HDL Libraries Guide, version 14.7 OBUFT #( .DRIVE(12), // Specify the output drive strength .IOSTANDARD("DEFAULT"), // Specify the output I/O standard .SLEW("SLOW") // Specify the output slew rate ) OBUFT_inst ( .O(O), // Buffer output (connect directly to top-level port) .I(I), // Buffer input .T(T) // 3-state enable input ); // End of OBUFT_inst instantiation For More Information See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 325 Chapter 4: About Design Elements OBUFTDS Primitive: 3-State Output Buffer with Differential Signaling, Active-Low Output Enable Introduction This design element is an output buffer that supports low-voltage, differential signaling. For the OBUFTDS, a design level interface signal is represented as two distinct ports (O and OB), one deemed the "master" and the other the "slave." The master and the slave are opposite phases of the same logical signal (for example, MYNET_P and MYNET_N). Logic Table Inputs I T X 1 0 0 1 0 Outputs O OB Z Z 0 1 1 0 Port Descriptions Port O OB I T Direction Output Output Input Input Width 1 1 1 1 Function Diff_p output (connect directly to top level port) Diff_n output (connect directly to top level port) Buffer input 3-state enable input Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Available Attributes Attribute IOSTANDARD SLEW Data Type String String Allowed Values See Data Sheet "SLOW" or "FAST" Default "DEFAULT" "SLOW" Description Assigns an I/O standard to the element. Specifies the slew rate of the output driver. Consult the product Data Sheet for recommendations of the best setting for this attribute. Send Feedback 326 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- OBUFTDS: Differential 3-state Output Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 OBUFTDS_inst : OBUFTDS generic map ( IOSTANDARD => "DEFAULT") port map ( O => O, -- Diff_p output (connect directly to top-level port) OB => OB, -- Diff_n output (connect directly to top-level port) I => I, -- Buffer input T => T -- 3-state enable input ); -- End of OBUFTDS_inst instantiation Verilog Instantiation Template // OBUFTDS: Differential 3-state Output Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 OBUFTDS #( .IOSTANDARD("DEFAULT"), // Specify the output I/O standard .SLEW("SLOW") // Specify the output slew rate ) OBUFTDS_inst ( .O(O), // Diff_p output (connect directly to top-level port) .OB(OB), // Diff_n output (connect directly to top-level port) .I(I), // Buffer input .T(T) // 3-state enable input ); // End of OBUFTDS_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 327 Chapter 4: About Design Elements ODDR Primitive: Dedicated Dual Data Rate (DDR) Output Register Introduction This design element is a dedicated output register for use in transmitting dual data rate (DDR) signals from FPGA devices. The ODDR interface with the FPGA fabric is not limited to opposite clock edges. It can be configured to present date from the FPGA fabric at the same clock edge. This feature allows designers to avoid additional timing complexities and CLB usage. The ODDR also works with SelectIO™ features. ODDR Modes This element has two modes of operation. These modes are set by the DDR_CLK_EDGE attribute. • OPPOSITE_EDGE mode - The data transmit interface uses classic DDR methodology. Given a data and clock at pin D1-2 and C respectively, D1 is sampled at every positive edge of clock C and D2 is sampled at every negative edge of clock C. Q changes every clock edge. • SAME_EDGE mode - Data is still transmitted at the output of the ODDR by opposite edges of clock C. However, the two inputs to the ODDR are clocked with a positive clock edge of clock signal C and an extra register is clocked with a negative clock edge of clock signal C. Using this feature, DDR data can now be presented into the ODDR at the same clock edge. Port Descriptions Port Q Direction Output C Input CE Input D1 : D2 Input R Input S Input Width 1 1 1 1 (each) 1 1 Function Data Output (DDR) - The ODDR output that connects to the IOB pad. Clock Input - The C pin represents the clock input pin. Clock Enable Input - When asserted High, this port enables the clock input on port C. Data Input - This pin is where the DDR data is presented into the ODDR module. Reset - Depends on how SRTYPE is set. Set - Active High asynchronous set pin. This pin can also be Synchronous depending on the SRTYPE attribute. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Send Feedback 328 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute DDR_CLK_ EDGE INIT SRTYPE Data Type String Integer String Allowed Values "OPPOSITE_EDGE", "SAME_EDGE" 0, 1 "SYNC", "ASYNC" Default "OPPOSITE_ EDGE" 1 "SYNC" Description DDR clock mode recovery mode selection. Q initialization value. Set/Reset type selection. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- ODDR: Output Double Data Rate Output Register with Set, Reset -- and Clock Enable. -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 ODDR_inst : ODDR generic map( DDR_CLK_EDGE => "OPPOSITE_EDGE", -- "OPPOSITE_EDGE" or "SAME_EDGE" INIT => '0', -- Initial value for Q port ('1' or '0') SRTYPE => "SYNC") -- Reset Type ("ASYNC" or "SYNC") port map ( Q => Q, -- 1-bit DDR output C => C, -- 1-bit clock input CE => CE, -- 1-bit clock enable input D1 => D1, -- 1-bit data input (positive edge) D2 => D2, -- 1-bit data input (negative edge) R => R, -- 1-bit reset input S => S -- 1-bit set input ); -- End of ODDR_inst instantiation Verilog Instantiation Template // ODDR: Output Double Data Rate Output Register with Set, Reset // and Clock Enable. // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ODDR #( .DDR_CLK_EDGE("OPPOSITE_EDGE"), // "OPPOSITE_EDGE" or "SAME_EDGE" .INIT(1'b0), // Initial value of Q: 1'b0 or 1'b1 .SRTYPE("SYNC") // Set/Reset type: "SYNC" or "ASYNC" ) ODDR_inst ( .Q(Q), // 1-bit DDR output .C(C), // 1-bit clock input .CE(CE), // 1-bit clock enable input .D1(D1), // 1-bit data input (positive edge) .D2(D2), // 1-bit data input (negative edge) .R(R), // 1-bit reset .S(S) // 1-bit set ); // End of ODDR_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 329 Chapter 4: About Design Elements ODELAYE2 Primitive: Output Fixed or Variable Delay Element Introduction This design element can be used to provide a fixed delay or an adjustable delay to the output path of the 7 series FPGA. This delay can be useful for the purpose of external data alignment, external phase offset and simultaneous switching noise (SSN) mitigation, as well as allowing for the tracking of external data alignment over process, temperature, and voltage (PVT). When used in conjunction with the IDELAYCTRL component circuitry, can provide precise time increments of delay. When used in variable mode, the output path can be adjusted for increasing and decreasing amounts of delay. The ODELAYE2 is not available on the High Range (HR) banks in the 7 series devices. Port Descriptions Port C Type Input CE CINVCTRL Input Input CLKIN CNTVALUEIN <4:0> Input Input CNTVALUEOUT Output <4:0> Width 1 1 1 1 5 5 Function All control inputs to ODELAYE2 primitive (CNTVALUEIN, RST, CE, LD, LDPIPEEN and INC) are synchronous to the clock input (C). A clock must be connected to this port when the ODELAYE2 is configured in "VARIABLE", "VAR_LOAD" or "VAR_LOAD_PIPE" mode. C can be locally inverted, and must be supplied by a global or regional clock buffer. This clock should be connected to the same clock in the SelectIO logic resources (when using OSERDESE2, C is connected to CLKDIV). If the ODELAYE2 is configured as "FIXED", connect this port to gnd. Active high enable increment/decrement function. If the ODELAYE2 is configured as "FIXED", connect this port to gnd. The CINVCTRL pin is used for dynamically switching the polarity of C pin. This is for use in applications when glitches are not an issue. When switching the polarity, do not use the ODELAYE2 control pins for two clock cycles. If the ODELAYE2 is configured as "FIXED", connect this port to gnd. Delayed Clock input into the ODELAYE2. Counter value from FPGA logic for dynamically loadable tap value input when configigured in "VAR_LOAD" or "VAR_LOAD_PIPE" modes. If the ODELAYE2 is configured as "FIXED" or "VARIABLE", connect this port to gnd. The CNTVALUEOUT pins are used for reporting the dynamically switching value of the delay element. CNTVALUEOUT is only available when ODELAYE2 is in "VAR_LOAD" or "VAR_LOAD_PIPE" mode. Send Feedback 330 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port DATAOUT INC LD LDPIPEEN ODATAIN REGRST Type Output Input Input Input Input Input Width 1 1 1 1 1 1 Function Delayed data/clock from either the CLKIN or ODATAIN ports. DATAOUT connects to an I/O port in the case of data or back to the clocking structure in the case of a clock.. The increment/decrement is controlled by the enable signal (CE). This interface is only available when ODELAYE2 is in VARIABLE, VAR_LOAD, or VAR_LOAD_PIPE mode. Load initial value or loaded value to the counter. Enable PIPELINE register to load data from LD pins. The ODATAIN input is the output data to be delayed driven by the OSERDESE2 or output register. The REGRST signal is an active-high reset and is synchronous to the input clock signal (C). When asserted, the tap value reverts to a zero state unless LDPIPEEN is also assreted in which case the tap value results in the value on the CNTVALUEIN port. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Available Attributes Attribute Type CINVCTRL_SEL STRING Allowed Values "FALSE", "TRUE" Default "FALSE" DELAY_SRC STRING "ODATAIN", "CLKIN" "ODATAIN" HIGH STRING _PERFORMANCE _MODE "FALSE", "TRUE" "FALSE" ODELAY_TYPE STRING "FIXED", "VARIABLE", "FIXED" "VAR_LOAD", "VAR_LOAD_PIPE" ODELAY_VALUE DECIMAL 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 10, 11, 12, 13, 14, 15, 16, Description Enables the CINVCTRL_SEL pin to dynamically switch the polarity of the C pin. Select the data input source: • "ODATAIN": ODELAYE2 chain input is ODATAIN • "CLKIN": ODELAYE2 chain input is CLKIN When TRUE, this attribute reduces the output jitter. When FALSE, power consumption is reduced. The difference in power consumption is quantified in the Xilinx Power Estimator tool. Sets the type of tap delay line. • "FIXED": Sets a static delay value • "VARIABLE": Dynamically adjust (incement/decrement) delay value • "VAR_LOAD": Dynamically loads tap values • "VAR_LOAD_PIPE": Pipelined dynamically loadable tap values Specifies the fixed number of delay taps in fixed mode or the Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 331 Chapter 4: About Design Elements Attribute Type Allowed Values 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 Default PIPE_SEL REFCLK _FREQUENCY STRING 1 significant digit FLOAT "FALSE", "TRUE" 190.0 to 310.0 "FALSE" 200.0 SIGNAL_PATTERN STRING "DATA", "CLOCK" "DATA" Description initial starting number of taps in "VARIABLE" mode (output path). When IDELAY_TYPE is set to "VAR_LOAD" or "VAR_LOAD_PIPE" mode, this value is ignored. Select pipelined mode. Sets the tap value (in MHz) used by the Timing Analyzer for static timing analysis and functional/timing simulation. The frequency of REFCLK must be within the given datasheet range to guarantee the tap-delay value and performance. Causes timing analysis to account for the appropriate amount of delay-chain jitter when presented with either a "DATA" pattern with irregular transitions or a "CLOCK" pattern with a regular rise/fall pattern. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- ODELAYE2: Output Fixed or Variable Delay Element -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 ODELAYE2_inst : ODELAYE2 generic map ( CINVCTRL_SEL => "FALSE", -- Enable dynamic clock inversion (FALSE, TRUE) DELAY_SRC => "ODATAIN", -- Delay input (ODATAIN, CLKIN) HIGH_PERFORMANCE_MODE => "FALSE", -- Reduced jitter ("TRUE"), Reduced power ("FALSE") ODELAY_TYPE => "FIXED", -- FIXED, VARIABLE, VAR_LOAD, VAR_LOAD_PIPE ODELAY_VALUE => 0, -- Output delay tap setting (0-31) PIPE_SEL => "FALSE", -- Select pipelined mode, FALSE, TRUE REFCLK_FREQUENCY => 200.0, -- IDELAYCTRL clock input frequency in MHz (190.0-210.0, 290.0-310.0). SIGNAL_PATTERN => "DATA" -- DATA, CLOCK input signal ) port map ( CNTVALUEOUT => CNTVALUEOUT, -- 5-bit output: Counter value output DATAOUT => DATAOUT, -- 1-bit output: Delayed data/clock output C => C, -- 1-bit input: Clock input CE => CE, -- 1-bit input: Active high enable increment/decrement input CINVCTRL => CINVCTRL, -- 1-bit input: Dynamic clock inversion input CLKIN => CLKIN, -- 1-bit input: Clock delay input CNTVALUEIN => CNTVALUEIN, -- 5-bit input: Counter value input INC => INC, -- 1-bit input: Increment / Decrement tap delay input LD => LD, -- 1-bit input: Loads ODELAY_VALUE tap delay in VARIABLE mode, in VAR_LOAD or -- VAR_LOAD_PIPE mode, loads the value of CNTVALUEIN LDPIPEEN => LDPIPEEN, ODATAIN => ODATAIN, REGRST => REGRST ); -- 1-bit input: Enables the pipeline register to load data -- 1-bit input: Output delay data input -- 1-bit input: Active-high reset tap-delay input -- End of ODELAYE2_inst instantiation Send Feedback 332 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // ODELAYE2: Output Fixed or Variable Delay Element // 7 Series // Xilinx HDL Libraries Guide, version 14.7 (* IODELAY_GROUP = *) // Specifies group name for associated IDELAYs/ODELAYs and IDELAYCTRL ODELAYE2 #( .CINVCTRL_SEL("FALSE"), // Enable dynamic clock inversion (FALSE, TRUE) .DELAY_SRC("ODATAIN"), // Delay input (ODATAIN, CLKIN) .HIGH_PERFORMANCE_MODE("FALSE"), // Reduced jitter ("TRUE"), Reduced power ("FALSE") .ODELAY_TYPE("FIXED"), // FIXED, VARIABLE, VAR_LOAD, VAR_LOAD_PIPE .ODELAY_VALUE(0), // Output delay tap setting (0-31) .PIPE_SEL("FALSE"), // Select pipelined mode, FALSE, TRUE .REFCLK_FREQUENCY(200.0), // IDELAYCTRL clock input frequency in MHz (190.0-210.0, 290.0-310.0). .SIGNAL_PATTERN("DATA") // DATA, CLOCK input signal ) ODELAYE2_inst ( .CNTVALUEOUT(CNTVALUEOUT), // 5-bit output: Counter value output .DATAOUT(DATAOUT), // 1-bit output: Delayed data/clock output .C(C), // 1-bit input: Clock input .CE(CE), // 1-bit input: Active high enable increment/decrement input .CINVCTRL(CINVCTRL), // 1-bit input: Dynamic clock inversion input .CLKIN(CLKIN), // 1-bit input: Clock delay input .CNTVALUEIN(CNTVALUEIN), // 5-bit input: Counter value input .INC(INC), // 1-bit input: Increment / Decrement tap delay input .LD(LD), // 1-bit input: Loads ODELAY_VALUE tap delay in VARIABLE mode, in VAR_LOAD or // VAR_LOAD_PIPE mode, loads the value of CNTVALUEIN .LDPIPEEN(LDPIPEEN), .ODATAIN(ODATAIN), .REGRST(REGRST) ); // 1-bit input: Enables the pipeline register to load data // 1-bit input: Output delay data input // 1-bit input: Active-high reset tap-delay input // End of ODELAYE2_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 333 Chapter 4: About Design Elements OSERDESE2 Primitive: Output SERial/DESerializer with bitslip Introduction The OSERDES in 7 series devices is a dedicated parallel-to-serial converter with specific clocking and logic resources designed to facilitate the implementation of high-speed source-synchronous interfaces. Every OSERDES module includes a dedicated serializer for data and 3-state control. Both data and 3-state serializers can be configured in single data rate (SDR) and double data rate (DDR) mode. Data serialization can be up to 8:1 (10:1 or 14:1 if using OSERDES Width Expansion). 3-state serialization can be up to 4:1. Port Descriptions Port CLK Type Input CLKDIV Input D1 - D8 Input OCE OFB Input Output Width 1 1 1 1 1 Function This high speed clock input drives the serial side of the parallel-to-serial converters. This divided high-speed clock input drives the parallel side of the parallel-to-serial converters. This clock is the divided version of the clock connected to the CLK port. All incoming parallel data enters the OSERDES module through ports D1 to D8. These ports are connected to the FPGA fabric, and can be configured from two to eight bits (i.e., a 8:1 serialization). Bit widths greater than six (up to 14) can be supported by using a second OSERDES in SLAVE mode. OCE is an active High clock enable for the data path. The output feedback port (OFB) is the serial (high-speed) data output port of the OSERDESE2. Send Feedback 334 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port OQ RST Type Output Input SHIFTIN1 / SHIFTIN2 SHIFTOUT1 / SHIFTOUT2 TBYTEIN TBYTEOUT TCE TFB Input Output Input Output Input Output TQ T1 - T4 Output Input Width 1 1 1 1 1 1 1 1 1 1 Function The OQ port is the data output port of the OSERDES module. Data at the input port D1 will appear first at OQ. This port connects the output of the data parallel-to-serial converter to the data input of the IOB. This port can not drive the ODELAYE2; the OFB pin must be used. The reset input causes the outputs of all data flip-flops in the CLK and CLKDIV domains to be driven Low asynchronously. OSERDES circuits running in the CLK domain where timing is critical use an internal, dedicated circuit to retime the RST input to produce a reset signal synchronous to the CLK domain. Similarly, there is a dedicated circuit to retime the RST input to produce a reset signal synchronous to the CLKDIV domain. Because there are OSERDES circuits that retime the RST input, the user is only required to provide a reset pulse to the RST input that meets timing on the CLKDIV frequency domain (synchronous to CLKDIV). Therefore, RST should be driven High for a minimum of one CLKDIV cycle. When building an interface consisting of multiple OSERDES ports, all OSERDES ports must be synchronized. The internal retiming of the RST input is designed so that all OSERDES blocks that receive the same reset pulse come out of reset synchronized with one another. Cascade Input for data input expansion. Connect to SHIFTOUT1/2 of slave. Cascade out for data input expansion. Connect to SHIFTIN1/2 of master. Byte group tristate input from source Byte group tristate output to IOB TCE is an active High clock enable for the 3-state control path. This port is the 3-state control output of the OSERDES module sent to the ODELAYE2. When used, this port connects the output of the 3-state parallel-to-serial converter to the control/3-state input of the ODELAYE2. This port is the 3-state control output of the OSERDES module. When used, this port connects the output of the 3-state parallel-to-serial converter to the control/3-state input of the IOB. All parallel 3-state signals enter the OSERDES module through ports T1 to T4. The ports are connected to the FPGA fabric, and can be configured as one, two, or four bits. Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 335 Chapter 4: About Design Elements Available Attributes Attribute Type DATA_RATE_OQ STRING Allowed Values "DDR", "SDR" Default "DDR" DATA_RATE_TQ STRING "DDR", "BUF", "SDR" "DDR" DATA_WIDTH DECIMAL 4, 2, 3, 5, 6, 7, 8, 10, 14 4 INIT_OQ INIT_TQ SERDES_MODE BINARY BINARY STRING 1'b0 to 1'b1 1'b0 to 1'b1 "MASTER", "SLAVE" 1'b0 1'b0 "MASTER" SRVAL_OQ SRVAL_TQ TBYTE_CTL BINARY BINARY STRING 1'b0 to 1'b1 1'b0 to 1'b1 "FALSE", "TRUE" 1'b0 1'b0 "FALSE" TBYTE_SRC STRING TRISTATE_WIDTH DECIMAL "FALSE", "TRUE" 4, 1 "FALSE" 4 Description The DATA_RATE_OQ attribute defines whether data is processed as single data rate (SDR) or double data rate (DDR). The DATA_RATE_TQ attribute defines whether 3-state control is to be processed as single data rate (SDR) or double data rate (DDR). The DATA_WIDTH attribute defines the parallel data input width of the parallel-to-serial converter. The possible values for this attribute depend on the DATA_RATE_OQ attribute. When DATA_RATE_OQ is set to SDR, the possible values for the DATA_WIDTH attribute are 2, 3, 4, 5, 6, 7, and 8. When DATA_RATE_OQ is set to DDR, the possible values for the DATA_WIDTH attribute are 4, 6, 8, 10 and 14. When the DATA_WIDTH is set to widths larger than eight, a pair of OSERDES must be configured into a master-slave configuration. Defines the initial value of OQ output. Defines the initial value of TQ output. The SERDES_MODE attribute defines whether the OSERDES module is a master or slave when using width expansion. Defines the value of OQ outputs when the SR is invoked. Defines the value of YQ outputs when the SR is invoked. Enable Tristate BYTE operation for DDR3 mode. This allows the tristate signal to take value from one of the tristate outputs which is acting as a source. Enable OSERDES to act as a source for Tristate Byte operation in DDR3 mode. The TRISTATE_WIDTH attribute defines the parallel 3-state input width of the 3-state control parallel-to-serial converter. The possible values for this attribute depend on the DATA_RATE_TQ attribute. When DATA_RATE_TQ is set to SDR or BUF, the TRISTATE_WIDTH attribute can only be set to 1. When DATA_RATE_TQ is set to DDR, the possible values for the TRISTATE_WIDTH attribute is 4. TRISTATE_WIDTH cannot be set to widths larger than 4. When a Send Feedback 336 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Attribute Type Allowed Values Default Description DATA_WIDTH is larger than four, set the TRISTATE_WIDTH to 1. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- OSERDESE2: Output SERial/DESerializer with bitslip -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 OSERDESE2_inst : OSERDESE2 generic map ( DATA_RATE_OQ => "DDR", -- DDR, SDR DATA_RATE_TQ => "DDR", -- DDR, BUF, SDR DATA_WIDTH => 4, -- Parallel data width (2-8,10,14) INIT_OQ => '0', -- Initial value of OQ output (1'b0,1'b1) INIT_TQ => '0', -- Initial value of TQ output (1'b0,1'b1) SERDES_MODE => "MASTER", -- MASTER, SLAVE SRVAL_OQ => '0', -- OQ output value when SR is used (1'b0,1'b1) SRVAL_TQ => '0', -- TQ output value when SR is used (1'b0,1'b1) TBYTE_CTL => "FALSE", -- Enable tristate byte operation (FALSE, TRUE) TBYTE_SRC => "FALSE", -- Tristate byte source (FALSE, TRUE) TRISTATE_WIDTH => 4 -- 3-state converter width (1,4) ) port map ( OFB => OFB, -- 1-bit output: Feedback path for data OQ => OQ, -- 1-bit output: Data path output -- SHIFTOUT1 / SHIFTOUT2: 1-bit (each) output: Data output expansion (1-bit each) SHIFTOUT1 => SHIFTOUT1, SHIFTOUT2 => SHIFTOUT2, TBYTEOUT => TBYTEOUT, -- 1-bit output: Byte group tristate TFB => TFB, -- 1-bit output: 3-state control TQ => TQ, -- 1-bit output: 3-state control CLK => CLK, -- 1-bit input: High speed clock CLKDIV => CLKDIV, -- 1-bit input: Divided clock -- D1 - D8: 1-bit (each) input: Parallel data inputs (1-bit each) D1 => D1, D2 => D2, D3 => D3, D4 => D4, D5 => D5, D6 => D6, D7 => D7, D8 => D8, OCE => OCE, -- 1-bit input: Output data clock enable RST => RST, -- 1-bit input: Reset -- SHIFTIN1 / SHIFTIN2: 1-bit (each) input: Data input expansion (1-bit each) SHIFTIN1 => SHIFTIN1, SHIFTIN2 => SHIFTIN2, -- T1 - T4: 1-bit (each) input: Parallel 3-state inputs T1 => T1, T2 => T2, T3 => T3, T4 => T4, TBYTEIN => TBYTEIN, -- 1-bit input: Byte group tristate TCE => TCE -- 1-bit input: 3-state clock enable ); -- End of OSERDESE2_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 337 Chapter 4: About Design Elements Verilog Instantiation Template // OSERDESE2: Output SERial/DESerializer with bitslip // 7 Series // Xilinx HDL Libraries Guide, version 14.7 OSERDESE2 #( .DATA_RATE_OQ("DDR"), // DDR, SDR .DATA_RATE_TQ("DDR"), // DDR, BUF, SDR .DATA_WIDTH(4), // Parallel data width (2-8,10,14) .INIT_OQ(1'b0), // Initial value of OQ output (1'b0,1'b1) .INIT_TQ(1'b0), // Initial value of TQ output (1'b0,1'b1) .SERDES_MODE("MASTER"), // MASTER, SLAVE .SRVAL_OQ(1'b0), // OQ output value when SR is used (1'b0,1'b1) .SRVAL_TQ(1'b0), // TQ output value when SR is used (1'b0,1'b1) .TBYTE_CTL("FALSE"), // Enable tristate byte operation (FALSE, TRUE) .TBYTE_SRC("FALSE"), // Tristate byte source (FALSE, TRUE) .TRISTATE_WIDTH(4) // 3-state converter width (1,4) ) OSERDESE2_inst ( .OFB(OFB), // 1-bit output: Feedback path for data .OQ(OQ), // 1-bit output: Data path output // SHIFTOUT1 / SHIFTOUT2: 1-bit (each) output: Data output expansion (1-bit each) .SHIFTOUT1(SHIFTOUT1), .SHIFTOUT2(SHIFTOUT2), .TBYTEOUT(TBYTEOUT), // 1-bit output: Byte group tristate .TFB(TFB), // 1-bit output: 3-state control .TQ(TQ), // 1-bit output: 3-state control .CLK(CLK), // 1-bit input: High speed clock .CLKDIV(CLKDIV), // 1-bit input: Divided clock // D1 - D8: 1-bit (each) input: Parallel data inputs (1-bit each) .D1(D1), .D2(D2), .D3(D3), .D4(D4), .D5(D5), .D6(D6), .D7(D7), .D8(D8), .OCE(OCE), // 1-bit input: Output data clock enable .RST(RST), // 1-bit input: Reset // SHIFTIN1 / SHIFTIN2: 1-bit (each) input: Data input expansion (1-bit each) .SHIFTIN1(SHIFTIN1), .SHIFTIN2(SHIFTIN2), // T1 - T4: 1-bit (each) input: Parallel 3-state inputs .T1(T1), .T2(T2), .T3(T3), .T4(T4), .TBYTEIN(TBYTEIN), // 1-bit input: Byte group tristate .TCE(TCE) // 1-bit input: 3-state clock enable ); // End of OSERDESE2_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 338 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 OUT_FIFO Primitive: Output First-In, First-Out (FIFO) Buffer Chapter 4: About Design Elements The Output FIFO is a new resource located next to the I/O. This dedicated hardware is designed to help transition the data from fabric to the I/O, ODDR or OSERDES. It has two basic modes the first is a 4x4 mode where the data coming into the FIFO goes out at the same rate. The second mode is a 8x4 mode where the data coming out is serialized by a factor of 2. In other words in 8x4 mode 8 bits go to the OUT_FIFO and 4 bits come out. The Output FIFO is a new resource located next to the I/O. This dedicated hardware is designed to help transition the data from fabric to the I/O, ODDR or OSERDES. It has two basic modes the first is a 4x4 mode where the data coming into the FIFO goes out at the same rate. The second mode is a 8x4 mode where the data coming out is serialized by a factor of 2. In other words in 8x4 mode 8 bits go to the OUT_FIFO and 4 bits come out. Features of this component include: • Array dimensions: 80 wide, 8 deep (8x4 mode); 40 wide, 8 deep (4x4 mode) • Empty and Full flags • Programmable Almost Empty and Almost Full flags Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 339 Chapter 4: About Design Elements Port Descriptions Port Type ALMOSTEMPTY Output Width 1 ALMOSTFULL Output 1 D0<7:0> D1<7:0> D2<7:0> D3<7:0> D4<7:0> D5<7:0> D6<7:0> D7<7:0> D8<7:0> D9<7:0> EMPTY FULL Q0<3:0> Q1<3:0> Q2<3:0> Q3<3:0> Q4<3:0> Q5<7:0> Q6<7:0> Q7<3:0> Q8<3:0> Q9<3:0> RDCLK RDEN RESET WRCLK WREN Input 8 Input 8 Input 8 Input 8 Input 8 Input 8 Input 8 Input 8 Input 8 Input 8 Output 1 Output 1 Output 4 Output 4 Output 4 Output 4 Output 4 Output 8 Output 8 Output 4 Output 4 Output 4 Input 1 Input 1 Input 1 Input 1 Input 1 Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Function Active high output flag indicating the FIFO is almost empty. The threshold of the almost empty flag is set by the ALMOST_EMPTY_VALUE attribute. Active high output flag indicating the FIFO is almost full. The threshold of the almost empty flag is set by the ALMOST_FULL_VALUE attribute. Channel 0 input bus. Channel 1 input bus. Channel 2 input bus. Channel 3 input bus. Channel 4 input bus. Channel 5 input bus. Channel 6 input bus. Channel 7 input bus. Channel 8 input bus. Channel 9 input bus. Active high output flag indicating the FIFO is empty. Active high output flag indicating the FIFO is full. Channel 0 output bus. Channel 1 output bus. Channel 2 output bus. Channel 3 output bus. Channel 4 output bus. Channel 5 output bus. Channel 6 output bus. Channel 7 output bus. Channel 8 output bus. Channel 9 output bus. Read clock Active high read enable Active high asynchronous reset Write clock Active high write enable Yes No Yes No Send Feedback 340 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute ALMOST_EMPTY _VALUE ALMOST_FULL _VALUE ARRAY_MODE OUTPUT_DISABLE SYNCHRONOUS _MODE Type Allowed Values DECIMAL1, 2 DECIMAL1, 2 STRING "ARRAY_MODE_8_X_4", "ARRAY_MODE_4_X_4" STRING "FALSE", "TRUE" STRING "FALSE" Default Description 1 Specifies the number of entries left before asserting the ALMOSTEMPTY output signal. 1 Specifies the number of entries left before asserting the ALMOSTFULL output signal. "ARRAY_MODE_8_X_4S"pecifies serializer mode: • "ARRAY_MODE_4_X_4" - four bits in, four bits out • "ARRAY_MODE_4_X_8" Four bits in, eight bits out "FALSE" Disable output. "FALSE" Must always be set to false. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- OUT_FIFO: Output First-In, First-Out (FIFO) Buffer -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 OUT_FIFO_inst : OUT_FIFO generic map ( ALMOST_EMPTY_VALUE => 1, -- Almost empty offset (1-2) ALMOST_FULL_VALUE => 1, -- Almost full offset (1-2) ARRAY_MODE => "ARRAY_MODE_8_X_4", -- ARRAY_MODE_8_X_4, ARRAY_MODE_4_X_4 OUTPUT_DISABLE => "FALSE", -- Disable output (FALSE, TRUE) SYNCHRONOUS_MODE => "FALSE" -- Must always be set to false. ) port map ( -- FIFO Status Flags: 1-bit (each) output: Flags and other FIFO status outputs ALMOSTEMPTY => ALMOSTEMPTY, -- 1-bit output: Almost empty flag ALMOSTFULL => ALMOSTFULL, -- 1-bit output: Almost full flag EMPTY => EMPTY, -- 1-bit output: Empty flag FULL => FULL, -- 1-bit output: Full flag -- Q0-Q9: 4-bit (each) output: FIFO Outputs Q0 => Q0, -- 4-bit output: Channel 0 output bus Q1 => Q1, -- 4-bit output: Channel 1 output bus Q2 => Q2, -- 4-bit output: Channel 2 output bus Q3 => Q3, -- 4-bit output: Channel 3 output bus Q4 => Q4, -- 4-bit output: Channel 4 output bus Q5 => Q5, -- 8-bit output: Channel 5 output bus Q6 => Q6, -- 8-bit output: Channel 6 output bus Q7 => Q7, -- 4-bit output: Channel 7 output bus Q8 => Q8, -- 4-bit output: Channel 8 output bus Q9 => Q9, -- 4-bit output: Channel 9 output bus -- D0-D9: 8-bit (each) input: FIFO inputs D0 => D0, -- 8-bit input: Channel 0 input bus D1 => D1, -- 8-bit input: Channel 1 input bus D2 => D2, -- 8-bit input: Channel 2 input bus D3 => D3, -- 8-bit input: Channel 3 input bus D4 => D4, -- 8-bit input: Channel 4 input bus D5 => D5, -- 8-bit input: Channel 5 input bus D6 => D6, -- 8-bit input: Channel 6 input bus Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 341 Chapter 4: About Design Elements D7 => D7, -- 8-bit input: Channel 7 input bus D8 => D8, -- 8-bit input: Channel 8 input bus D9 => D9, -- 8-bit input: Channel 9 input bus -- FIFO Control Signals: 1-bit (each) input: Clocks, Resets and Enables RDCLK => RDCLK, -- 1-bit input: Read clock RDEN => RDEN, -- 1-bit input: Read enable RESET => RESET, -- 1-bit input: Active high reset WRCLK => WRCLK, -- 1-bit input: Write clock WREN => WREN -- 1-bit input: Write enable ); -- End of OUT_FIFO_inst instantiation Verilog Instantiation Template // OUT_FIFO: Output First-In, First-Out (FIFO) Buffer // 7 Series // Xilinx HDL Libraries Guide, version 14.7 OUT_FIFO #( .ALMOST_EMPTY_VALUE(1), // Almost empty offset (1-2) .ALMOST_FULL_VALUE(1), // Almost full offset (1-2) .ARRAY_MODE("ARRAY_MODE_8_X_4"), // ARRAY_MODE_8_X_4, ARRAY_MODE_4_X_4 .OUTPUT_DISABLE("FALSE"), // Disable output (FALSE, TRUE) .SYNCHRONOUS_MODE("FALSE") // Must always be set to false. ) OUT_FIFO_inst ( // FIFO Status Flags: 1-bit (each) output: Flags and other FIFO status outputs .ALMOSTEMPTY(ALMOSTEMPTY), // 1-bit output: Almost empty flag .ALMOSTFULL(ALMOSTFULL), // 1-bit output: Almost full flag .EMPTY(EMPTY), // 1-bit output: Empty flag .FULL(FULL), // 1-bit output: Full flag // Q0-Q9: 4-bit (each) output: FIFO Outputs .Q0(Q0), // 4-bit output: Channel 0 output bus .Q1(Q1), // 4-bit output: Channel 1 output bus .Q2(Q2), // 4-bit output: Channel 2 output bus .Q3(Q3), // 4-bit output: Channel 3 output bus .Q4(Q4), // 4-bit output: Channel 4 output bus .Q5(Q5), // 8-bit output: Channel 5 output bus .Q6(Q6), // 8-bit output: Channel 6 output bus .Q7(Q7), // 4-bit output: Channel 7 output bus .Q8(Q8), // 4-bit output: Channel 8 output bus .Q9(Q9), // 4-bit output: Channel 9 output bus // D0-D9: 8-bit (each) input: FIFO inputs .D0(D0), // 8-bit input: Channel 0 input bus .D1(D1), // 8-bit input: Channel 1 input bus .D2(D2), // 8-bit input: Channel 2 input bus .D3(D3), // 8-bit input: Channel 3 input bus .D4(D4), // 8-bit input: Channel 4 input bus .D5(D5), // 8-bit input: Channel 5 input bus .D6(D6), // 8-bit input: Channel 6 input bus .D7(D7), // 8-bit input: Channel 7 input bus .D8(D8), // 8-bit input: Channel 8 input bus .D9(D9), // 8-bit input: Channel 9 input bus // FIFO Control Signals: 1-bit (each) input: Clocks, Resets and Enables .RDCLK(RDCLK), // 1-bit input: Read clock .RDEN(RDEN), // 1-bit input: Read enable .RESET(RESET), // 1-bit input: Active high reset .WRCLK(WRCLK), // 1-bit input: Write clock .WREN(WREN) // 1-bit input: Write enable ); // End of OUT_FIFO_inst instantiation For More Information See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 342 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements PCIE_2_1 Primitive: PCI Express Version 2.1 Model Introduction The PCIE_2_1 primitive is a 7 series PCI Express hard macro simulation model compliant with PCIe specification version 2.1. This element is not intended to be instantiated, used, or modified outside of Xilinx generated IP. Please refer to the 7 series FPGAs Integrated Block for PCI Express User Guide for details on this component. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 343 Chapter 4: About Design Elements PCIE_3_0 Primitive: PCI Express Version 3.0 Model Introduction The PCIE_3_0 primitive is a 7 series PCI Express hard macro simulation model compliant with PCIe specification version 3.0. This element is not intended to be instantiated, used, or modified outside of Xilinx generated IP. Please refer to the 7 series FPGAs Integrated Block for PCI Express User Guide for details on this component. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 344 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements PHASER_IN Primitive: MIG Data Alignment and Capture Component Introduction PHASER_IN works with other Phaser elements to handle data alignment and capture of high-speed memory interfaces. Its only intended use is by the Memory Interface Generator (MIG), and it is not intended to be instantiated, used, or modified outside of Xilinx generated IP. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 345 Chapter 4: About Design Elements PHASER_IN_PHY Primitive: MIG Data Alignment and Capture Component Introduction PHASER_IN_PHY works with other Phaser elements to handle data alignment and capture of high-speed memory interfaces. Its only intended use is by the Memory Interface Generator (MIG), and it is not intended to be instantiated, used, or modified outside of Xilinx generated IP. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 346 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements PHASER_OUT Primitive: MIG Data Alignment and Capture Component Introduction PHASER_OUT works with other Phaser elements to handle data alignment and capture of high-speed memory interfaces. Its only intended use is by the Memory Interface Generator (MIG), and it is not intended to be instantiated, used, or modified outside of Xilinx generated IP. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 347 Chapter 4: About Design Elements PHASER_OUT_PHY Primitive: MIG Data Alignment and Capture Component Introduction PHASER_OUT_PHY works with other Phaser elements to handle data alignment and capture of high-speed memory interfaces. Its only intended use is by the Memory Interface Generator (MIG), and it is not intended to be instantiated, used, or modified outside of Xilinx generated IP. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 348 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements PHASER_REF Primitive: MIG Data Alignment and Capture Component Introduction PHASER_REF works with other Phaser elements to handle data alignment and capture of high-speed memory interfaces. Its only intended use is by the Memory Interface Generator (MIG), and it is not intended to be instantiated, used, or modified outside of Xilinx generated IP. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 349 Chapter 4: About Design Elements PHY_CONTROL Primitive: MIG Data Alignment and Capture Component Introduction PHY_CONTROL works with other Phaser elements to handle data alignment and capture of high-speed memory interfaces. Its only intended use is by the Memory Interface Generator (MIG), and it is not intended to be instantiated, used, or modified outside of Xilinx generated IP. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support No No Recommended No For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 350 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 PLLE2_ADV Primitive: Advanced Phase Locked Loop (PLL) Chapter 4: About Design Elements Introduction The PLLE2 is a mixed signal block designed to support frequency synthesis, clock network deskew, and jitter reduction. The clock outputs can each have an individual divide (1 to 128), phase shift, and duty cycle based on the same VCO frequency. Output clocks are phase aligned to each other (unless phase shifted) and aligned to the input clock with a proper feedback configuration. The PLLE2 complements the MMCM by supporting higher speed clocking while the MMCM has more features to handle most general clocking needs. The PLLE2_BASE is intended for most uses of this PLL component while the PLLE2_ADV is intended for use when clock switch-over or dynamic reconfiguration is required. Port Descriptions Port CLKFBIN CLKFBOUT CLKINSEL Type Input Output Input CLKIN1 CLKIN2 CLKOUT0 CLKOUT1 CLKOUT2 CLKOUT3 CLKOUT4 CLKOUT5 DADDR<6:0> Input Input Output Output Output Output Output Output Input DCLK Input Width 1 1 1 1 1 1 1 1 1 1 1 7 1 Function Feedback clock pin to the PLL Dedicated PLL Feedback clock output Signal controls the state of the input MUX, High = CLKIN1, Low = CLKIN2. Primary clock input. Secondary clock input. CLKOUT0 output Configurable clock output CLKOUT1. Configurable clock output CLKOUT2. Configurable clock output CLKOUT3. Configurable clock output CLKOUT4. Configurable clock output CLKOUT5. The dynamic reconfiguration address (DADDR) input bus provides a reconfiguration address for the dynamic reconfiguration. When not used, all bits must be assigned zeros. The DCLK signal is the reference clock for the dynamic reconfiguration port. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 351 Chapter 4: About Design Elements Port DEN DI<15:0> DO<15:0> DRDY DWE LOCKED PWRDWN RST Type Input Input Output Output Input Output Input Input Width 1 16 16 1 1 1 1 1 Function The dynamic reconfiguration enable (DEN) provides the enable control signal to access the dynamic reconfiguration feature. When the dynamic reconfiguration feature is not used, DEN must be tied Low. The dynamic reconfiguration data input (DI) bus provides reconfiguration data. When not used, all bits must be set to zero. The dynamic reconfiguration output bus provides PLL data output when using dynamic reconfiguration. The dynamic reconfiguration ready output (DRDY) provides the response to the DEN signal for the PLLs dynamic reconfiguration feature. The dynamic reconfiguration write enable (DWE) input pin provides the write enable control signal to write the DI data into the DADDR address. When not used, it must be tied Low. An output from the PLL that indicates when the PLL has achieved phase alignment within a predefined window and frequency matching within a predefined PPM range. The PLL automatically locks after power on, no extra reset is required. LOCKED will be deasserted if the input clock stops or the phase alignment is violated (e.g., input clock phase shift). The PLL automatically reacquires lock after LOCKED is deasserted. Powers down instantiated but unused PLLs. The RST signal is an asynchronous reset for the PLL. The PLL will synchronously re-enable itself when this signal is released and go through a new phase alignment and lock cycle. A reset is required when the input clock conditions change (e.g., frequency). Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Available Attributes Attribute BANDWIDTH Type STRING Allowed Values "OPTIMIZED", "HIGH", "LOW" CLKFBOUT_MULT DECIMAL 2 to 64 CLKFBOUT_PHASE 3 significant -360.000 to 360.000 digit FLOAT Default "OPTIMIZED" 5 0.000 Description Specifies the PLLE2 programming algorithm affecting the jitter, phase margin and other characteristics of the PLLE2. Specifies the amount to multiply all CLKOUT clock outputs if a different frequency is desired. This number, in combination with the associated CLKOUT#_DIVIDE value and DIVCLK_DIVIDE value, will determine the output frequency. Specifies the phase offset in degrees of the clock feedback output. Shifting the feedback clock results in a negative phase shift of all output clocks to the PLL. Send Feedback 352 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Attribute CLKIN1_PERIOD, CLKIN2_PERIOD Type FLOAT(nS) Allowed Values 0.000 to 52.631 Default 0.000 CLKOUT0_DIVIDE, DECIMAL 1 to 128 1 CLKOUT1_DIVIDE, CLKOUT2_DIVIDE, CLKOUT3_DIVIDE, CLKOUT4_DIVIDE, CLKOUT5_DIVIDE CLKOUT0_DUTY _CYCLE, CLKOUT1_DUTY _CYCLE, CLKOUT2_DUTY _CYCLE, CLKOUT3_DUTY _CYCLE, CLKOUT4_DUTY _CYCLE, CLKOUT5_DUTY _CYCLE 3 significant digit FLOAT CLKOUT0_PHASE, CLKOUT1_PHASE, CLKOUT2_PHASE, CLKOUT3_PHASE, CLKOUT4_PHASE, CLKOUT5_PHASE 3 significant digit FLOAT COMPENSATION STRING 0.001 to 0.999 -360.000 to 360.000 "ZHOLD", "BUF_IN", "EXTERNAL", "INTERNAL" 0.500 0.000 "ZHOLD" DIVCLK_DIVIDE DECIMAL 1 to 56 1 Description Specifies the input period in ns to the PLLE2 CLKIN inputs. Resolution is down to the ps. For example a value of 33.333 would indicate a 30 MHz input clock. This information is mandatory and must be supplied. CLKIN1_PERIOD relates to the input period on the CLKIN1 input while CLKIN2_PERIOD relates to the input clock period on the CLKIN2 input. Specifies the amount to divide the associated CLKOUT clock output if a different frequency is desired. This number in combination with the CLKFBOUT_MULT and DIVCLK_DIVIDE values will determine the output frequency. Specifies the Duty Cycle of the associated CLKOUT clock output in percentage (i.e., 0.500 will generate a 50% duty cycle). Specifies the phase offset in degrees of the clock feedback output. Shifting the feedback clock results in a negative phase shift of all output clocks to the PLL. Clock input compensation. Suggested to be set to "ZHOLD". Defines how the PLL feedback is configured. • "ZHOLD" - PLL is configured to provide a negative hold time at the I/O registers. • "INTERNAL" - PLL is using its own internal feedback path so no delay is being compensated. • "EXTERNAL" - a network external to the FPGA is being compensated. • "BUF_IN" - the configuration does not match with the other compensation modes and no delay will be compensated. Specifies the division ratio for all output clocks with respect to the input clock. Effectively divides the CLKIN going into the PFD. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 353 Chapter 4: About Design Elements Attribute REF_JITTER1, REF_JITTER2 Type 3 significant digit FLOAT Allowed Values 0.000 to 0.999 Default 0.010 STARTUP_WAIT STRING "FALSE", "TRUE" "FALSE" Description Allows specification of the expected jitter on the CLKIN inputs in order to better optimize PLL performance. A bandwidth setting of OPTIMIZED will attempt to choose the best parameter for input clocking when unknown. If known, then the value provided should be specified in terms of the UI percentage (the maximum peak to peak value) of the expected jitter on the input clock. REF_JITTER1 relates to the input jitter on CLKIN1 while REF_JITTER2 relates to the input jitter on CLKIN2. When "TRUE", wait for the PLLE2(s) that have this attribute attached to them will delay DONE from going high until a LOCK is achieved. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- PLLE2_ADV: Advanced Phase Locked Loop (PLL) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 PLLE2_ADV_inst : PLLE2_ADV generic map ( BANDWIDTH => "OPTIMIZED", -- OPTIMIZED, HIGH, LOW CLKFBOUT_MULT => 5, -- Multiply value for all CLKOUT, (2-64) CLKFBOUT_PHASE => 0.0, -- Phase offset in degrees of CLKFB, (-360.000-360.000). -- CLKIN_PERIOD: Input clock period in nS to ps resolution (i.e. 33.333 is 30 MHz). CLKIN1_PERIOD => 0.0, CLKIN2_PERIOD => 0.0, -- CLKOUT0_DIVIDE - CLKOUT5_DIVIDE: Divide amount for CLKOUT (1-128) CLKOUT0_DIVIDE => 1, CLKOUT1_DIVIDE => 1, CLKOUT2_DIVIDE => 1, CLKOUT3_DIVIDE => 1, CLKOUT4_DIVIDE => 1, CLKOUT5_DIVIDE => 1, -- CLKOUT0_DUTY_CYCLE - CLKOUT5_DUTY_CYCLE: Duty cycle for CLKOUT outputs (0.001-0.999). CLKOUT0_DUTY_CYCLE => 0.5, CLKOUT1_DUTY_CYCLE => 0.5, CLKOUT2_DUTY_CYCLE => 0.5, CLKOUT3_DUTY_CYCLE => 0.5, CLKOUT4_DUTY_CYCLE => 0.5, CLKOUT5_DUTY_CYCLE => 0.5, -- CLKOUT0_PHASE - CLKOUT5_PHASE: Phase offset for CLKOUT outputs (-360.000-360.000). CLKOUT0_PHASE => 0.0, CLKOUT1_PHASE => 0.0, CLKOUT2_PHASE => 0.0, CLKOUT3_PHASE => 0.0, CLKOUT4_PHASE => 0.0, CLKOUT5_PHASE => 0.0, COMPENSATION => "ZHOLD", -- ZHOLD, BUF_IN, EXTERNAL, INTERNAL DIVCLK_DIVIDE => 1, -- Master division value (1-56) -- REF_JITTER: Reference input jitter in UI (0.000-0.999). REF_JITTER1 => 0.0, REF_JITTER2 => 0.0, STARTUP_WAIT => "FALSE" -- Delay DONE until PLL Locks, ("TRUE"/"FALSE") Send Feedback 354 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements ) port map ( -- Clock Outputs: 1-bit (each) output: User configurable clock outputs CLKOUT0 => CLKOUT0, -- 1-bit output: CLKOUT0 CLKOUT1 => CLKOUT1, -- 1-bit output: CLKOUT1 CLKOUT2 => CLKOUT2, -- 1-bit output: CLKOUT2 CLKOUT3 => CLKOUT3, -- 1-bit output: CLKOUT3 CLKOUT4 => CLKOUT4, -- 1-bit output: CLKOUT4 CLKOUT5 => CLKOUT5, -- 1-bit output: CLKOUT5 -- DRP Ports: 16-bit (each) output: Dynamic reconfiguration ports DO => DO, -- 16-bit output: DRP data DRDY => DRDY, -- 1-bit output: DRP ready -- Feedback Clocks: 1-bit (each) output: Clock feedback ports CLKFBOUT => CLKFBOUT, -- 1-bit output: Feedback clock LOCKED => LOCKED, -- 1-bit output: LOCK -- Clock Inputs: 1-bit (each) input: Clock inputs CLKIN1 => CLKIN1, -- 1-bit input: Primary clock CLKIN2 => CLKIN2, -- 1-bit input: Secondary clock -- Control Ports: 1-bit (each) input: PLL control ports CLKINSEL => CLKINSEL, -- 1-bit input: Clock select, High=CLKIN1 Low=CLKIN2 PWRDWN => PWRDWN, -- 1-bit input: Power-down RST => RST, -- 1-bit input: Reset -- DRP Ports: 7-bit (each) input: Dynamic reconfiguration ports DADDR => DADDR, -- 7-bit input: DRP address DCLK => DCLK, -- 1-bit input: DRP clock DEN => DEN, -- 1-bit input: DRP enable DI => DI, -- 16-bit input: DRP data DWE => DWE, -- 1-bit input: DRP write enable -- Feedback Clocks: 1-bit (each) input: Clock feedback ports CLKFBIN => CLKFBIN -- 1-bit input: Feedback clock ); -- End of PLLE2_ADV_inst instantiation Verilog Instantiation Template // PLLE2_ADV: Advanced Phase Locked Loop (PLL) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 PLLE2_ADV #( .BANDWIDTH("OPTIMIZED"), // OPTIMIZED, HIGH, LOW .CLKFBOUT_MULT(5), // Multiply value for all CLKOUT, (2-64) .CLKFBOUT_PHASE(0.0), // Phase offset in degrees of CLKFB, (-360.000-360.000). // CLKIN_PERIOD: Input clock period in nS to ps resolution (i.e. 33.333 is 30 MHz). .CLKIN1_PERIOD(0.0), .CLKIN2_PERIOD(0.0), // CLKOUT0_DIVIDE - CLKOUT5_DIVIDE: Divide amount for CLKOUT (1-128) .CLKOUT0_DIVIDE(1), .CLKOUT1_DIVIDE(1), .CLKOUT2_DIVIDE(1), .CLKOUT3_DIVIDE(1), .CLKOUT4_DIVIDE(1), .CLKOUT5_DIVIDE(1), // CLKOUT0_DUTY_CYCLE - CLKOUT5_DUTY_CYCLE: Duty cycle for CLKOUT outputs (0.001-0.999). .CLKOUT0_DUTY_CYCLE(0.5), .CLKOUT1_DUTY_CYCLE(0.5), .CLKOUT2_DUTY_CYCLE(0.5), .CLKOUT3_DUTY_CYCLE(0.5), .CLKOUT4_DUTY_CYCLE(0.5), .CLKOUT5_DUTY_CYCLE(0.5), // CLKOUT0_PHASE - CLKOUT5_PHASE: Phase offset for CLKOUT outputs (-360.000-360.000). .CLKOUT0_PHASE(0.0), .CLKOUT1_PHASE(0.0), .CLKOUT2_PHASE(0.0), .CLKOUT3_PHASE(0.0), .CLKOUT4_PHASE(0.0), .CLKOUT5_PHASE(0.0), .COMPENSATION("ZHOLD"), // ZHOLD, BUF_IN, EXTERNAL, INTERNAL .DIVCLK_DIVIDE(1), // Master division value (1-56) // REF_JITTER: Reference input jitter in UI (0.000-0.999). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 355 Chapter 4: About Design Elements .REF_JITTER1(0.0), .REF_JITTER2(0.0), .STARTUP_WAIT("FALSE") // Delay DONE until PLL Locks, ("TRUE"/"FALSE") ) PLLE2_ADV_inst ( // Clock Outputs: 1-bit (each) output: User configurable clock outputs .CLKOUT0(CLKOUT0), // 1-bit output: CLKOUT0 .CLKOUT1(CLKOUT1), // 1-bit output: CLKOUT1 .CLKOUT2(CLKOUT2), // 1-bit output: CLKOUT2 .CLKOUT3(CLKOUT3), // 1-bit output: CLKOUT3 .CLKOUT4(CLKOUT4), // 1-bit output: CLKOUT4 .CLKOUT5(CLKOUT5), // 1-bit output: CLKOUT5 // DRP Ports: 16-bit (each) output: Dynamic reconfiguration ports .DO(DO), // 16-bit output: DRP data .DRDY(DRDY), // 1-bit output: DRP ready // Feedback Clocks: 1-bit (each) output: Clock feedback ports .CLKFBOUT(CLKFBOUT), // 1-bit output: Feedback clock .LOCKED(LOCKED), // 1-bit output: LOCK // Clock Inputs: 1-bit (each) input: Clock inputs .CLKIN1(CLKIN1), // 1-bit input: Primary clock .CLKIN2(CLKIN2), // 1-bit input: Secondary clock // Control Ports: 1-bit (each) input: PLL control ports .CLKINSEL(CLKINSEL), // 1-bit input: Clock select, High=CLKIN1 Low=CLKIN2 .PWRDWN(PWRDWN), // 1-bit input: Power-down .RST(RST), // 1-bit input: Reset // DRP Ports: 7-bit (each) input: Dynamic reconfiguration ports .DADDR(DADDR), // 7-bit input: DRP address .DCLK(DCLK), // 1-bit input: DRP clock .DEN(DEN), // 1-bit input: DRP enable .DI(DI), // 16-bit input: DRP data .DWE(DWE), // 1-bit input: DRP write enable // Feedback Clocks: 1-bit (each) input: Clock feedback ports .CLKFBIN(CLKFBIN) // 1-bit input: Feedback clock ); // End of PLLE2_ADV_inst instantiation For More Information See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 356 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 PLLE2_BASE Primitive: Base Phase Locked Loop (PLL) Chapter 4: About Design Elements Introduction The PLLE2 is a mixed signal block designed to support frequency synthesis, clock network deskew, and jitter reduction. The clock outputs can each have an individual divide (1 to 128), phase shift, and duty cycle based on the same VCO frequency. Output clocks are phase aligned to each other (unless phase shifted) and aligned to the input clock with a proper feedback configuration. The PLLE2 complements the MMCM by supporting higher speed clocking while the MMCM has more features to handle most general clocking needs. The PLLE2_BASE is intended for most uses of this PLL component while the PLLE2_ADV is intended for use when clock switch-over or dynamic reconfiguration is required. Port Descriptions Port CLKFBIN CLKFBOUT CLKIN1 CLKOUT0 CLKOUT1 CLKOUT2 CLKOUT3 CLKOUT4 CLKOUT5 LOCKED Direction Input Output Input Output Output Output Output Output Output Output Width 1 1 1 1 1 1 1 1 1 1 Function Feedback clock pin to the PLL Dedicated PLL Feedback clock output General clock input. Configurable clock output CLKOUT0. Configurable clock output CLKOUT1. Configurable clock output CLKOUT2. Configurable clock output CLKOUT3. Configurable clock output CLKOUT4. Configurable clock output CLKOUT5. An output from the PLL that indicates when the PLL has achieved phase alignment within a predefined window and frequency matching within a predefined PPM range. The PLL automatically locks after power on, no extra reset is required. LOCKED will be deasserted if the input clock stops or the phase alignment is violated (e.g., input clock Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 357 Chapter 4: About Design Elements Port PWRDWN RST Direction Input Input Width 1 1 Function phase shift). The PLL automatically reacquires lock after LOCKED is deasserted. Powers down instantiated but unused PLLs. The RST signal is an asynchronous reset for the PLL. The PLL will synchronously re-enable itself when this signal is released and go through a new phase alignment and lock cycle. A reset is required when the input clock conditions change (e.g., frequency). Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards Yes Macro support No Available Attributes Attribute BANDWIDTH CLKFBOUT_MULT CLKFBOUT_PHASE CLKIN1_PERIOD CLKOUT0_DIVIDE, CLKOUT1_DIVIDE, CLKOUT2_DIVIDE, CLKOUT3_DIVIDE, CLKOUT4_DIVIDE, CLKOUT5_DIVIDE Type STRING DECIMAL 3 significant digit FLOAT FLOAT(nS) DECIMAL Allowed Values "OPTIMIZED", "HIGH", "LOW" 2 to 64 -360.000 to 360.000 0.000 to 52.631 1 to 128 Default "OPTIMIZED" 5 0.000 0.000 1 Description Specifies the PLLE2 programming algorithm affecting the jitter, phase margin and other characteristics of the PLLE2. Specifies the amount to multiply all CLKOUT clock outputs if a different frequency is desired. This number, in combination with the associated CLKOUT#_DIVIDE value and DIVCLK_DIVIDE value, will determine the output frequency. Specifies the phase offset in degrees of the clock feedback output. Shifting the feedback clock results in a negative phase shift of all output clocks to the PLL. Specifies the input period in ns to the PLL CLKIN1 input. Resolution is down to the ps (3 decimal places). For example a value of 33.333 would indicate a 30 MHz input clock. This information is mandatory and must be supplied. Specifies the amount to divide the associated CLKOUT clock output if a different frequency is desired. This number in combination with the CLKFBOUT_MULT and DIVCLK_DIVIDE values will determine the output frequency. Send Feedback 358 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Attribute CLKOUT0_DUTY _CYCLE, CLKOUT1_DUTY _CYCLE, CLKOUT2_DUTY _CYCLE, CLKOUT3_DUTY _CYCLE, CLKOUT4_DUTY _CYCLE, CLKOUT5_DUTY _CYCLE CLKOUT0_PHASE, CLKOUT1_PHASE, CLKOUT2_PHASE, CLKOUT3_PHASE, CLKOUT4_PHASE, CLKOUT5_PHASE DIVCLK_DIVIDE Type 3 significant digit FLOAT Allowed Values 0.001 to 0.999 Default 0.500 3 significant -360.000 to digit 360.000 FLOAT 0.000 DECIMAL 1 to 56 1 REF_JITTER1 3 significant 0.000 to 0.999 digit FLOAT 0.010 STARTUP_WAIT STRING "FALSE", "TRUE" "FALSE" Description Specifies the Duty Cycle of the associated CLKOUT clock output in percentage (i.e., 0.500 will generate a 50% duty cycle). Specifies the phase offset in degrees of the clock feedback output. Shifting the feedback clock results in a negative phase shift of all output clocks to the PLL. Specifies the division ratio for all output clocks with respect to the input clock. Effectively divides the CLKIN going into the PFD. Allows specification of the expected jitter on CLKIN1 in order to better optimize PLL performance. A bandwidth setting of OPTIMIZED will attempt to choose the best parameter for input clocking when unknown. If known, then the value provided should be specified in terms of the UI percentage (the maximum peak to peak value) of the expected jitter on the input clock. When "TRUE", wait for the PLLE2(s) that have this attribute attached to them will delay DONE from going high until a LOCK is achieved. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- PLLE2_BASE: Base Phase Locked Loop (PLL) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 PLLE2_BASE_inst : PLLE2_BASE generic map ( BANDWIDTH => "OPTIMIZED", -- OPTIMIZED, HIGH, LOW CLKFBOUT_MULT => 5, -- Multiply value for all CLKOUT, (2-64) CLKFBOUT_PHASE => 0.0, -- Phase offset in degrees of CLKFB, (-360.000-360.000). CLKIN1_PERIOD => 0.0, -- Input clock period in ns to ps resolution (i.e. 33.333 is 30 MHz). -- CLKOUT0_DIVIDE - CLKOUT5_DIVIDE: Divide amount for each CLKOUT (1-128) CLKOUT0_DIVIDE => 1, CLKOUT1_DIVIDE => 1, CLKOUT2_DIVIDE => 1, CLKOUT3_DIVIDE => 1, CLKOUT4_DIVIDE => 1, CLKOUT5_DIVIDE => 1, Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 359 Chapter 4: About Design Elements -- CLKOUT0_DUTY_CYCLE - CLKOUT5_DUTY_CYCLE: Duty cycle for each CLKOUT (0.001-0.999). CLKOUT0_DUTY_CYCLE => 0.5, CLKOUT1_DUTY_CYCLE => 0.5, CLKOUT2_DUTY_CYCLE => 0.5, CLKOUT3_DUTY_CYCLE => 0.5, CLKOUT4_DUTY_CYCLE => 0.5, CLKOUT5_DUTY_CYCLE => 0.5, -- CLKOUT0_PHASE - CLKOUT5_PHASE: Phase offset for each CLKOUT (-360.000-360.000). CLKOUT0_PHASE => 0.0, CLKOUT1_PHASE => 0.0, CLKOUT2_PHASE => 0.0, CLKOUT3_PHASE => 0.0, CLKOUT4_PHASE => 0.0, CLKOUT5_PHASE => 0.0, DIVCLK_DIVIDE => 1, -- Master division value, (1-56) REF_JITTER1 => 0.0, -- Reference input jitter in UI, (0.000-0.999). STARTUP_WAIT => "FALSE" -- Delay DONE until PLL Locks, ("TRUE"/"FALSE") ) port map ( -- Clock Outputs: 1-bit (each) output: User configurable clock outputs CLKOUT0 => CLKOUT0, -- 1-bit output: CLKOUT0 CLKOUT1 => CLKOUT1, -- 1-bit output: CLKOUT1 CLKOUT2 => CLKOUT2, -- 1-bit output: CLKOUT2 CLKOUT3 => CLKOUT3, -- 1-bit output: CLKOUT3 CLKOUT4 => CLKOUT4, -- 1-bit output: CLKOUT4 CLKOUT5 => CLKOUT5, -- 1-bit output: CLKOUT5 -- Feedback Clocks: 1-bit (each) output: Clock feedback ports CLKFBOUT => CLKFBOUT, -- 1-bit output: Feedback clock LOCKED => LOCKED, -- 1-bit output: LOCK CLKIN1 => CLKIN1, -- 1-bit input: Input clock -- Control Ports: 1-bit (each) input: PLL control ports PWRDWN => PWRDWN, -- 1-bit input: Power-down RST => RST, -- 1-bit input: Reset -- Feedback Clocks: 1-bit (each) input: Clock feedback ports CLKFBIN => CLKFBIN -- 1-bit input: Feedback clock ); -- End of PLLE2_BASE_inst instantiation Send Feedback 360 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // PLLE2_BASE: Base Phase Locked Loop (PLL) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 PLLE2_BASE #( .BANDWIDTH("OPTIMIZED"), // OPTIMIZED, HIGH, LOW .CLKFBOUT_MULT(5), // Multiply value for all CLKOUT, (2-64) .CLKFBOUT_PHASE(0.0), // Phase offset in degrees of CLKFB, (-360.000-360.000). .CLKIN1_PERIOD(0.0), // Input clock period in ns to ps resolution (i.e. 33.333 is 30 MHz). // CLKOUT0_DIVIDE - CLKOUT5_DIVIDE: Divide amount for each CLKOUT (1-128) .CLKOUT0_DIVIDE(1), .CLKOUT1_DIVIDE(1), .CLKOUT2_DIVIDE(1), .CLKOUT3_DIVIDE(1), .CLKOUT4_DIVIDE(1), .CLKOUT5_DIVIDE(1), // CLKOUT0_DUTY_CYCLE - CLKOUT5_DUTY_CYCLE: Duty cycle for each CLKOUT (0.001-0.999). .CLKOUT0_DUTY_CYCLE(0.5), .CLKOUT1_DUTY_CYCLE(0.5), .CLKOUT2_DUTY_CYCLE(0.5), .CLKOUT3_DUTY_CYCLE(0.5), .CLKOUT4_DUTY_CYCLE(0.5), .CLKOUT5_DUTY_CYCLE(0.5), // CLKOUT0_PHASE - CLKOUT5_PHASE: Phase offset for each CLKOUT (-360.000-360.000). .CLKOUT0_PHASE(0.0), .CLKOUT1_PHASE(0.0), .CLKOUT2_PHASE(0.0), .CLKOUT3_PHASE(0.0), .CLKOUT4_PHASE(0.0), .CLKOUT5_PHASE(0.0), .DIVCLK_DIVIDE(1), // Master division value, (1-56) .REF_JITTER1(0.0), // Reference input jitter in UI, (0.000-0.999). .STARTUP_WAIT("FALSE") // Delay DONE until PLL Locks, ("TRUE"/"FALSE") ) PLLE2_BASE_inst ( // Clock Outputs: 1-bit (each) output: User configurable clock outputs .CLKOUT0(CLKOUT0), // 1-bit output: CLKOUT0 .CLKOUT1(CLKOUT1), // 1-bit output: CLKOUT1 .CLKOUT2(CLKOUT2), // 1-bit output: CLKOUT2 .CLKOUT3(CLKOUT3), // 1-bit output: CLKOUT3 .CLKOUT4(CLKOUT4), // 1-bit output: CLKOUT4 .CLKOUT5(CLKOUT5), // 1-bit output: CLKOUT5 // Feedback Clocks: 1-bit (each) output: Clock feedback ports .CLKFBOUT(CLKFBOUT), // 1-bit output: Feedback clock .LOCKED(LOCKED), // 1-bit output: LOCK .CLKIN1(CLKIN1), // 1-bit input: Input clock // Control Ports: 1-bit (each) input: PLL control ports .PWRDWN(PWRDWN), // 1-bit input: Power-down .RST(RST), // 1-bit input: Reset // Feedback Clocks: 1-bit (each) input: Clock feedback ports .CLKFBIN(CLKFBIN) // 1-bit input: Feedback clock ); // End of PLLE2_BASE_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 361 Chapter 4: About Design Elements PULLDOWN Primitive: Resistor to GND for Input Pads, Open-Drain, and 3-State Outputs Introduction This resistor element is connected to input, output, or bidirectional pads to guarantee a logic Low level for nodes that might float. Port Descriptions Port O Direction Output Width 1 Function Pulldown output (connect directly to top level port) Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards No Macro support No VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- PULLDOWN: I/O Buffer Weak Pull-down -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 PULLDOWN_inst : PULLDOWN port map ( O => O -- Pulldown output (connect directly to top-level port) ); -- End of PULLDOWN_inst instantiation Send Feedback 362 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // PULLDOWN: I/O Buffer Weak Pull-down // 7 Series // Xilinx HDL Libraries Guide, version 14.7 PULLDOWN PULLDOWN_inst ( .O(O) // Pulldown output (connect directly to top-level port) ); // End of PULLDOWN_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 363 Chapter 4: About Design Elements PULLUP Primitive: Resistor to VCC for Input PADs, Open-Drain, and 3-State Outputs Introduction This design element allows for an input, 3-state output or bi-directional port to be driven to a weak high value when not being driven by an internal or external source. This element establishes a High logic level for open-drain elements and macros when all the drivers are off. Port Descriptions Port O Direction Output Width 1 Function Pullup output (connect directly to top level port) Design Entry Method Instantiation Yes Inference No CORE Generator™ and wizards No Macro support No VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- PULLUP: I/O Buffer Weak Pull-up -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 PULLUP_inst : PULLUP port map ( O => O -- Pullup output (connect directly to top-level port) ); -- End of PULLUP_inst instantiation Send Feedback 364 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // PULLUP: I/O Buffer Weak Pull-up // 7 Series // Xilinx HDL Libraries Guide, version 14.7 PULLUP PULLUP_inst ( .O(O) // Pullup output (connect directly to top-level port) ); // End of PULLUP_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 365 Chapter 4: About Design Elements RAM128X1D Primitive: 128-Deep by 1-Wide Dual Port Random Access Memory (Select RAM) Introduction This design element is a 128-bit deep by 1-bit wide random access memory and has a read/write port that writes the value on the D input data pin when the write enable (WE) is high to the memory cell specified by the A address bus. This happens shortly after the rising edge of the WCLK and that same value is reflected in the data output SPO. When WE is low, an asynchronous read is initiated in which the contents of the memory cell specified by the A address bus is output asynchronously to the SPO output. The read port can perform asynchronous read access of the memory by changing the value of the address bus DPRA, and by outputting that value to the DPO data output. Port Descriptions Port SPO DPO D A DPRA WE WCLK Direction Output Output Input Input Input Input Input Width 1 1 1 7 7 1 1 Function Read/Write port data output addressed by A Read port data output addressed by DPRA Write data input addressed by A Read/Write port address bus Read port address bus Write Enable Write clock (reads are asynchronous) If instantiated, the following connections should be made to this component: • Tie the WCLK input to the desired clock source, the D input to the data source to be stored and the DPO output to an FDCE D input or other appropriate data destination. • Optionally, the SPO output can also be connected to the appropriate data destination or else left unconnected. • Connect the WE clock enable pin to the proper write enable source in the design. • Connect the 7-bit A bus to the source for the read/write addressing and the 7-bit DPRA bus to the appropriate read address connections. You can use the INIT attribute to specify the initial contents of the RAM. If left unspecified, the initial contents default to all zeros. Send Feedback 366 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Type Hexadecimal Allowed Values Any 128-bit value Default All zeros Description Specifies the initial contents of the RAM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAM128X1D: 128-deep by 1-wide positive edge write, asynchronous read -- dual-port distributed LUT RAM (Mapped to two SliceM LUT6s) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAM128X1D_inst : RAM128X1D generic map ( INIT => X"00000000000000000000000000000000") port map ( DPO => DPO, -- Read/Write port 1-bit output SPO => SPO, -- Read port 1-bit output A => A, -- Read/Write port 7-bit address input D => D, -- RAM data input DPRA => DPRA, -- Read port 7-bit address input WCLK => WCLK, -- Write clock input WE => WE -- RAM data input ); -- End of RAM128X1D_inst instantiation Verilog Instantiation Template // RAM128X1D: 128-deep by 1-wide positive edge write, asynchronous read // dual-port distributed LUT RAM // 7 Series // Xilinx HDL Libraries Guide, version 14.7 (Mapped to two SliceM LUT6s) RAM128X1D #( .INIT(128'h00000000000000000000000000000000) ) RAM128X1D_inst ( .DPO(DPO), // Read port 1-bit output .SPO(SPO), // Read/write port 1-bit output .A(A), // Read/write port 7-bit address input .D(D), // RAM data input .DPRA(DPRA), // Read port 7-bit address input .WCLK(WCLK), // Write clock input .WE(WE) // Write enable input ); // End of RAM128X1D_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 367 Chapter 4: About Design Elements For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 368 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements RAM128X1S Primitive: 128-Deep by 1-Wide Random Access Memory (Select RAM) Introduction This design element is a 128-bit deep by 1-bit wide random access memory with synchronous write and asynchronous read capability. This RAM is implemented using the LUT resources of the device (also known as Select RAM), and does not consume any of the block RAM resources of the device. If a synchronous read capability is preferred, a register can be attached to the output and placed in the same slice as long as the same clock is used for both the RAM and the register. The RAM128X1S has an active-High write enable, WE, so that when that signal is High, and a rising edge occurs on the WCLK pin, a write is performed recording the value of the D input data pin into the memory array. The output O displays the contents of the memory cell addressed by A, regardless of the WE value. When a write is performed, the output is updated to the new value shortly after the write completes. Port Descriptions Port O D A WE WCLK Direction Output Input Input Input Input Width 1 1 7 1 1 Function Read/Write port data output addressed by A Write data input addressed by A Read/Write port address bus Write Enable Write clock (reads are asynchronous) Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 369 Chapter 4: About Design Elements If instantiated, the following connections should be made to this component: • Tie the WCLK input to the desired clock source, the D input to the data source to be stored, and the O output to an FDCE D input or other appropriate data destination. • Connect the WE clock enable pin to the proper write enable source in the design. • Connect the 7-bit A bus to the source for the read/write. You can use the INIT attribute to specify the initial contents of the RAM. If left unspecified, the initial contents default to all zeros. Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 128-bit value Default Description All zeros Specifies the initial contents of the RAM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAM128X1S: 128-deep x 1 positive edge write, asynchronous read -- single-port distributed RAM (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAM128X1S_inst : RAM128X1S generic map ( INIT => X"00000000000000000000000000000000") port map ( O => O, -- 1-bit data output A0 => A0, -- Address[0] input bit A1 => A1, -- Address[1] input bit A2 => A2, -- Address[2] input bit A3 => A3, -- Address[3] input bit A4 => A4, -- Address[4] input bit A5 => A5, -- Address[5] input bit A6 => A6, -- Address[6] input bit D => D, -- 1-bit data input WCLK => WCLK, -- Write clock input WE => WE -- RAM data input ); -- End of RAM128X1S_inst instantiation Send Feedback 370 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // RAM128X1S: 128 x 1 positive edge write, asynchronous read single-port distributed RAM (Mapped to two SliceM LUT6s) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 RAM128X1S #( .INIT(128'h00000000000000000000000000000000) // Initial contents of RAM ) RAM128X1S_inst ( .O(O), // 1-bit data output .A0(A0), // Address[0] input bit .A1(A1), // Address[1] input bit .A2(A2), // Address[2] input bit .A3(A3), // Address[3] input bit .A4(A4), // Address[4] input bit .A5(A5), // Address[5] input bit .A6(A6), // Address[6] input bit .D(D), // 1-bit data input .WCLK(WCLK), // Write clock input .WE(WE) // Write enable input ); // End of RAM128X1S_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 371 Chapter 4: About Design Elements RAM256X1S Primitive: 256-Deep by 1-Wide Random Access Memory (Select RAM) Introduction This design element is a 256-bit deep by 1-bit wide random access memory with synchronous write and asynchronous read capability. This RAM is implemented using the LUT resources of the device (also known as Select RAM), and does not consume any of the block RAM resources of the device. If a synchronous read capability is preferred, a register can be attached to the output and placed in the same slice as long as the same clock is used for both the RAM and the register. The RAM256X1S has an active-High write enable, WE, so that when that signal is High, and a rising edge occurs on the WCLK pin, a write is performed recording the value of the D input data pin into the memory array. The output O displays the contents of the memory cell addressed by A, regardless of the WE value. When a write is performed, the output is updated to the new value shortly after the write completes. Port Descriptions Port O D A WE WCLK Direction Output Input Input Input Input Width 1 1 8 1 1 Function Read/Write port data output addressed by A Write data input addressed by A Read/Write port address bus Write Enable Write clock (reads are asynchronous) Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No If instantiated, the following connections should be made to this component: • Tie the WCLK input to the desired clock source, the D input to the data source to be stored, and the O output to an FDCE D input or other appropriate data destination. • Connect the WE clock enable pin to the proper write enable source in the design. • Connect the 8-bit A bus to the source for the read/write. You can use the INIT attribute to specify the initial contents of the RAM. If left unspecified, the initial contents default to all zeros. Send Feedback 372 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 256-bit value Default Description All zeros Specifies the initial contents of the RAM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAM256X1S: 256-deep by 1-wide positive edge write, asynchronous read -- single-port distributed LUT RAM (Mapped to four SliceM LUT6s) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAM256X1S_inst : RAM256X1S generic map ( INIT => X"0000000000000000000000000000000000000000000000000000000000000000") port map ( O => O, -- Read/Write port 1-bit output A => A, -- Read/Write port 8-bit address input D => D, -- RAM data input WCLK => WCLK, -- Write clock input WE => WE -- Write enable input ); -- End of RAM256X1S_inst instantiation Verilog Instantiation Template // RAM256X1S: 256-deep by 1-wide positive edge write, asynchronous read // single-port distributed LUT RAM // 7 Series // Xilinx HDL Libraries Guide, version 14.7 (Mapped to four SliceM LUT6s) RAM256X1S #( .INIT(256'h0000000000000000000000000000000000000000000000000000000000000000) ) RAM256X1S_inst ( .O(O), // Read/write port 1-bit output .A(A), // Read/write port 8-bit address input .WE(WE), // Write enable input .WCLK(WCLK), // Write clock input .D(D) // RAM data input ); // End of RAM256X1S_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 373 Chapter 4: About Design Elements RAM32M Primitive: 32-Deep by 8-bit Wide Multi Port Random Access Memory (Select RAM) Introduction This design element is a 32-bit deep by 8-bit wide, multi-port, random access memory with synchronous write and asynchronous independent, 2-bit, wide-read capability. This RAM is implemented using the LUT resources of the device known as SelectRAM™, and does not consume any of the Block RAM resources of the device. The RAM32M is implemented in a single slice and consists of one 8-bit write, 2-bit read port and three separate 2-bit read ports from the same memory, which allows for byte-wide write and independent 2-bit read access RAM. • If the DIA, DIB, DIC, and DID inputs are all tied to the same data inputs, the RAM can become a 1 read/write port, 3 independent read port, 32x2 quad port memory. • If DID is grounded, DOD is not used. • If ADDRA, ADDRB, and ADDRC are tied to the same address, the RAM becomes a 32x6 simple dual port RAM. • If ADDRD is tied to ADDRA, ADDRB, and ADDRC, then the RAM is a 32x8 single port RAM. There are several other possible configurations for this RAM. Port Descriptions Port DOA DOB DOC DOD DIA Direction Output Output Output Output Input DIB Input DIC Input Width 2 2 2 2 2 2 2 Function Read port data outputs addressed by ADDRA Read port data outputs addressed by ADDRB Read port data outputs addressed by ADDRC Read/Write port data outputs addressed by ADDRD Write data inputs addressed by ADDRD (read output is addressed by ADDRA) Write data inputs addressed by ADDRD (read output is addressed by ADDRB) Write data inputs addressed by ADDRD (read output is addressed by ADDRC) Send Feedback 374 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port DID ADDRA ADDRB ADDRC ADDRD WE WCLK Direction Input Input Input Input Input Input Input Width 2 5 5 5 5 1 1 Function Write data inputs addressed by ADDRD Read address bus A Read address bus B Read address bus C 8-bit data write port, 2-bit data read port address bus D Write Enable Write clock (reads are asynchronous) Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No This element can be inferred by some synthesis tools by describing a RAM with a synchronous write and asynchronous read capability. Consult your synthesis tool documentation for details on RAM inference capabilities and coding examples. You should instantiate this component if you have a need to implicitly specify the RAM function, or if you need to manually place or relationally place the component. If a synchronous read capability is desired, the outputs can be connected to an FDRSE (FDCPE if asynchronous reset is needed) in order to improve the output timing of the function. However, this is not necessary for the proper operation of the RAM. If you want to have the data clocked on the negative edge of a clock, an inverter can be described on the clock input to this component. This inverter will be absorbed into the block giving the ability to write to the RAM on falling clock edges. If instantiated, the following connections should be made to this component: • Connect the WCLK input to the desired clock source • Connect the DIA, DIB, DIC, and DID inputs to the data source to be stored • Connect the DOA, DOB, DOC, and DOD outputs to an FDCE D input or other appropriate data destination, or leave unconnected if not used • Connect the WE clock enable pin to the proper write enable source in the design • Connect the ADDRD bus to the source for the read/write addressing • Connect the ADDRA, ADDRB, and ADDRC buses to the appropriate read address connections The optional INIT_A, INIT_B, INIT_C and INIT_D attributes let you specify the initial memory contents of each port using a 64-bit hexadecimal value. The INIT value correlates to the RAM addressing by the following equation: ADDRy[z] = INIT_y[2*z+1:2*z]. For instance, if the RAM ADDRC port is addressed to 00001, then the INIT_C[3:2] values would be the initial values shown on the DOC port before the first write occurs at that address. If left unspecified, the initial contents will be all zeros. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 375 Chapter 4: About Design Elements Available Attributes Attribute INIT_A Data Type Hexadecimal Allowed Values Any 64-bit value INIT_B Hexadecimal Any 64-bit value INIT_C Hexadecimal Any 64-bit value INIT_D Hexadecimal Any 64-bit value Default All zeros All zeros All zeros All zeros Description Specifies the initial contents of the RAM on port A. Specifies the initial contents of the RAM on port B. Specifies the initial contents of the RAM on port C. Specifies the initial contents of the RAM on port D. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAM32M: 32-deep by 8-wide Multi Port LUT RAM (Mapped to four SliceM LUT6s) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAM32M_inst : RAM32M generic map ( INIT_A => X"0000000000000000", -- Initial contents of A port INIT_B => X"0000000000000000", -- Initial contents of B port INIT_C => X"0000000000000000", -- Initial contents of C port INIT_D => X"0000000000000000) -- Initial contents of D port port map ( DOA => DOA, -- Read port A 2-bit output DOB => DOB, -- Read port B 2-bit output DOC => DOC, -- Read port C 2-bit output DOD => DOD, -- Read/Write port D 2-bit output ADDRA => ADDRA, -- Read port A 5-bit address input ADDRB => ADDRB, -- Read port B 5-bit address input ADDRC => ADDRC, -- Read port C 5-bit address input ADDRD => ADDRD, -- Read/Write port D 5-bit address input DIA => DIA, -- RAM 2-bit data write input addressed by ADDRD, -- read addressed by ADDRA DIB => DIB, -- RAM 2-bit data write input addressed by ADDRD, -- read addressed by ADDRB DIC => DIC, -- RAM 2-bit data write input addressed by ADDRD, -- read addressed by ADDRC DID => DID, -- RAM 2-bit data write input addressed by ADDRD, -- read addressed by ADDRD WCLK => WCLK, -- Write clock input WE => WE -- Write enable input ); -- End of RAM32M_inst instantiation Send Feedback 376 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // RAM32M: 32-deep by 8-wide Multi Port LUT RAM (Mapped to four SliceM LUT6s) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 RAM32M #( .INIT_A(64'h0000000000000000), // Initial contents of A Port .INIT_B(64'h0000000000000000), // Initial contents of B Port .INIT_C(64'h0000000000000000), // Initial contents of C Port .INIT_D(64'h0000000000000000) // Initial contents of D Port ) RAM32M_inst ( .DOA(DOA), // Read port A 2-bit output .DOB(DOB), // Read port B 2-bit output .DOC(DOC), // Read port C 2-bit output .DOD(DOD), // Read/write port D 2-bit output .ADDRA(ADDRA), // Read port A 5-bit address input .ADDRB(ADDRB), // Read port B 5-bit address input .ADDRC(ADDRC), // Read port C 5-bit address input .ADDRD(ADDRD), // Read/write port D 5-bit address input .DIA(DIA), // RAM 2-bit data write input addressed by ADDRD, // read addressed by ADDRA .DIB(DIB), // RAM 2-bit data write input addressed by ADDRD, // read addressed by ADDRB .DIC(DIC), // RAM 2-bit data write input addressed by ADDRD, // read addressed by ADDRC .DID(DID), // RAM 2-bit data write input addressed by ADDRD, // read addressed by ADDRD .WCLK(WCLK), // Write clock input .WE(WE) // Write enable input ); // End of RAM32M_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 377 Chapter 4: About Design Elements RAM32X1D Primitive: 32-Deep by 1-Wide Static Dual Port Synchronous RAM Introduction This design element is a 32-bit deep by 1-bit wide static dual port random access memory with synchronous write capability. The device has two separate address ports: the read address (DPRA4:DPRA0) and the write address (A4:A0). These two address ports are completely asynchronous. The read address controls the location of the data driven out of the output pin (DPO), and the write address controls the destination of a valid write transaction. When the write enable (WE) is Low, transitions on the write clock (WCLK) are ignored and data stored in the RAM is not affected. When WE is High, any positive transition on WCLK loads the data on the data input (D) into the memory cell selected by the 5-bit write address. For predictable performance, write address and data inputs must be stable before a Low-to-High WCLK transition. This RAM block assumes an active-High WCLK. WCLK can be active-High or active-Low. Any inverter placed on the WCLK input net is absorbed into the block. You can initialize RAM32X1D during configuration using the INIT attribute. Mode selection is shown in the following logic table. The SPO output reflects the data in the memory cell addressed by A4:A0. The DPO output reflects the data in the memory cell addressed by DPRA4:DPRA0. The write process is not affected by the address on the read address port. You can use the INIT attribute to specify the initial contents of the RAM. If left unspecified, the initial contents default to all zeros. Logic Table Inputs WE (Mode) WCLK D 0 (read) X X 1 (read) 0 X 1 (read) 1 X 1 (write) ↑ D 1 (read) ↓ X Outputs SPO data_a data_a data_a D data_a DPO data_d data_d data_d data_d data_d Send Feedback 378 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 32-bit value Default All zeros Descriptions Specifies the initial contents of the RAM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAM32X1D: 32 x 1 positive edge write, asynchronous read -- dual-port distributed RAM (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAM32X1D_inst : RAM32X1D generic map ( INIT => X"00000000") -- Initial contents of RAM port map ( DPO => DPO, -- Read-only 1-bit data output SPO => SPO, -- R/W 1-bit data output A0 => A0, -- R/W address[0] input bit A1 => A1, -- R/W address[1] input bit A2 => A2, -- R/W address[2] input bit A3 => A3, -- R/W address[3] input bit A4 => A4, -- R/W address[4] input bit D => D, -- Write 1-bit data input DPRA0 => DPRA0, -- Read-only address[0] input bit DPRA1 => DPRA1, -- Read-only address[1] input bit DPRA2 => DPRA2, -- Read-only address[2] input bit DPRA3 => DPRA3, -- Read-only address[3] input bit DPRA4 => DPRA4, -- Read-only address[4] input bit WCLK => WCLK, -- Write clock input WE => WE -- Write enable input ); -- End of RAM32X1D_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 379 Chapter 4: About Design Elements Verilog Instantiation Template // RAM32X1D: 32 x 1 positive edge write, asynchronous read dual-port distributed RAM (Mapped to a SliceM LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 RAM32X1D #( .INIT(32'h00000000) // Initial contents of RAM ) RAM32X1D_inst ( .DPO(DPO), // Read-only 1-bit data output .SPO(SPO), // Rw/ 1-bit data output .A0(A0), // Rw/ address[0] input bit .A1(A1), // Rw/ address[1] input bit .A2(A2), // Rw/ address[2] input bit .A3(A3), // Rw/ address[3] input bit .A4(A4), // Rw/ address[4] input bit .D(D), // Write 1-bit data input .DPRA0(DPRA0), // Read-only address[0] input bit .DPRA1(DPRA1), // Read-only address[1] input bit .DPRA2(DPRA2), // Read-only address[2] input bit .DPRA3(DPRA3), // Read-only address[3] input bit .DPRA4(DPRA4), // Read-only address[4] input bit .WCLK(WCLK), // Write clock input .WE(WE) // Write enable input ); // End of RAM32X1D_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 380 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements RAM32X1S Primitive: 32-Deep by 1-Wide Static Synchronous RAM Introduction This design element is a 32-bit deep by 1-bit wide static random access memory with synchronous write capability. When the write enable is Low, transitions on the write clock (WCLK) are ignored and data stored in the RAM is not affected. When (WE) is High, any positive transition on (WCLK) loads the data on the data input (D) into the memory cell selected by the 5-bit address (A4-A0). For predictable performance, address and data inputs must be stable before a Low-to-High (WCLK) transition. This RAM block assumes an active-High (WCLK). However, (WCLK) can be active-High or active-Low. Any inverter placed on the (WCLK) input net is absorbed into the block. The signal output on the data output pin (O) is the data that is stored in the RAM at the location defined by the values on the address pins. You can use the INIT attribute to specify the initial contents of the RAM. If left unspecified, the initial contents default to all zeros. Logic Table Inputs WE (Mode) WCLK D 0 (read) X X 1 (read) 0 X 1 (read) 1 X 1 (write) ↑ D 1 (read) ↓ X Outputs O Data Data Data D Data Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 381 Chapter 4: About Design Elements Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 32-bit value Default All zeros Descriptions Specifies initial contents of the RAM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAM32X1S: 32 x 1 posedge write distributed (LUT) RAM (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAM32X1S_inst : RAM32X1S generic map ( INIT => X"00000000") port map ( O => O, -- RAM output A0 => A0, -- RAM address[0] input A1 => A1, -- RAM address[1] input A2 => A2, -- RAM address[2] input A3 => A3, -- RAM address[3] input A4 => A4, -- RAM address[4] input D => D, -- RAM data input WCLK => WCLK, -- Write clock input WE => WE -- Write enable input ); -- End of RAM32X1S_inst instantiation Verilog Instantiation Template // RAM32X1S: 32 x 1 posedge write distributed (LUT) RAM (Mapped to a SliceM LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 RAM32X1S #( .INIT(32'h00000000) // Initial contents of RAM ) RAM32X1S_inst ( .O(O), // RAM output .A0(A0), // RAM address[0] input .A1(A1), // RAM address[1] input .A2(A2), // RAM address[2] input .A3(A3), // RAM address[3] input .A4(A4), // RAM address[4] input .D(D), // RAM data input .WCLK(WCLK), // Write clock input .WE(WE) // Write enable input ); // End of RAM32X1S_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 382 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements RAM32X1S_1 Primitive: 32-Deep by 1-Wide Static Synchronous RAM with Negative-Edge Clock Introduction This design element is a 32-bit deep by 1-bit wide static random access memory with synchronous write capability. When the write enable is Low, transitions on the write clock (WCLK) are ignored and data stored in the RAM is not affected. When (WE) is High, any negative transition on (WCLK) loads the data on the data input (D) into the memory cell selected by the 5-bit address (A4:A0). For predictable performance, address and data inputs must be stable before a High-to-Low (WCLK) transition. This RAM block assumes an active-Low (WCLK). However, (WCLK) can be active-High or active-Low. Any inverter placed on the (WCLK) input net is absorbed into the block. The signal output on the data output pin (O) is the data that is stored in the RAM at the location defined by the values on the address pins. You can use the INIT attribute to specify the initial contents of the RAM. If left unspecified, the initial contents default to all zeros. Logic Table Inputs WE (Mode) WCLK D 0 (read) X X 1 (read) 0 X 1 (read) 1 X 1 (write) ↓ D 1 (read) ↑ X Data = memory cell addressed by bits A4:A0 Outputs O Data Data Data D Data Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 383 Chapter 4: About Design Elements Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 32-bit value Default All zeros Descriptions Specifies the initial contents of the RAM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAM32X1S_1: 32 x 1 negedge write distributed (LUT) RAM (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAM32X1S_1_inst : RAM32X1S_1 generic map ( INIT => X"00000000") port map ( O => O, -- RAM output A0 => A0, -- RAM address[0] input A1 => A1, -- RAM address[1] input A2 => A2, -- RAM address[2] input A3 => A3, -- RAM address[3] input A4 => A4, -- RAM address[4] input D => D, -- RAM data input WCLK => WCLK, -- Write clock input WE => WE -- Write enable input ); -- End of RAM32X1S_1_inst instantiation Verilog Instantiation Template // RAM32X1S_1: 32 x 1 negedge write distributed (LUT) RAM (Mapped to a SliceM LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 RAM32X1S_1 #( .INIT(32'h00000000) // Initial contents of RAM )RAM32X1S_1_inst ( .O(O), // RAM output .A0(A0), // RAM address[0] input .A1(A1), // RAM address[1] input .A2(A2), // RAM address[2] input .A3(A3), // RAM address[3] input .A4(A4), // RAM address[4] input .D(D), // RAM data input .WCLK(WCLK), // Write clock input .WE(WE) // Write enable input ); // End of RAM32X1S_1_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 384 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements RAM32X2S Primitive: 32-Deep by 2-Wide Static Synchronous RAM Introduction This design element is a 32-bit deep by 2-bit wide static random access memory with synchronous write capability. When the write enable (WE) is Low, transitions on the write clock (WCLK) are ignored and data stored in the RAM is not affected. When (WE) is High, any positive transition on (WCLK) loads the data on the data input (D1-D0) into the word selected by the 5-bit address (A4-A0). For predictable performance, address and data inputs must be stable before a Low-to-High (WCLK) transition. This RAM block assumes an active-High (WCLK). However, (WCLK) can be active-High or active-Low. Any inverter placed on the (WCLK) input net is absorbed into the block. The signal output on the data output pins (O1-O0) is the data that is stored in the RAM at the location defined by the values on the address pins. You can use the INIT_00 and INIT_01 properties to specify the initial contents of RAM32X2S. Logic Table Inputs WE (Mode) WCLK 0 (read) X 1 (read) 0 1 (read) 1 1 (write) ↑ 1 (read) ↓ Data = word addressed by bits A4:A0 D X X X D1:D0 X Outputs O0-O1 Data Data Data D1:D0 Data Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 385 Chapter 4: About Design Elements Available Attributes Attribute INIT_00 INIT_01 Data Type Hexadecimal Hexadecimal Allowed Values Any 32-bit value Any 32-bit value Default All zeros All zeros Descriptions INIT for bit 0 of RAM. INIT for bit 1 of RAM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAM32X2S: 32 x 2 posedge write distributed (LUT) RAM (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAM32X2S_inst : RAM32X2S generic map ( INIT_00 => X"00000000", -- INIT for bit 0 of RAM INIT_01 => X"00000000") -- INIT for bit 1 of RAM port map ( O0 => O0, -- RAM data[0] output O1 => O1, -- RAM data[1] output A0 => A0, -- RAM address[0] input A1 => A1, -- RAM address[1] input A2 => A2, -- RAM address[2] input A3 => A3, -- RAM address[3] input A4 => A4, -- RAM address[4] input D0 => D0, -- RAM data[0] input D1 => D1, -- RAM data[1] input WCLK => WCLK, -- Write clock input WE => WE -- Write enable input ); -- End of RAM32X2S_inst instantiation Verilog Instantiation Template // RAM32X2S: 32 x 2 posedge write distributed (LUT) RAM (Mapped to a SliceM LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 RAM32X2S #( .INIT_00(32'h00000000), // INIT for bit 0 of RAM .INIT_01(32'h00000000) // INIT for bit 1 of RAM ) RAM32X2S_inst ( .O0(O0), // RAM data[0] output .O1(O1), // RAM data[1] output .A0(A0), // RAM address[0] input .A1(A1), // RAM address[1] input .A2(A2), // RAM address[2] input .A3(A3), // RAM address[3] input .A4(A4), // RAM address[4] input .D0(D0), // RAM data[0] input .D1(D1), // RAM data[1] input .WCLK(WCLK), // Write clock input .WE(WE) // Write enable input ); // End of RAM32X2S_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 386 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements RAM64M Primitive: 64-Deep by 4-bit Wide Multi Port Random Access Memory (Select RAM) Introduction This design element is a 64-bit deep by 4-bit wide, multi-port, random access memory with synchronous write and asynchronous independent bit wide read capability. This RAM is implemented using the LUT resources of the device (also known as SelectRAM™) and does not consume any of the block RAM resources of the device. The RAM64M component is implemented in a single slice, and consists of one 4-bit write, 1-bit read port, and three separate 1-bit read ports from the same memory allowing for 4-bit write and independent bit read access RAM. • If the DIA, DIB, DIC, and DID inputs are all tied to the same data inputs, the RAM can become a 1 read/write port, 3 independent read port 64x1 quad port memory. • If DID is grounded, DOD is not used. • If ADDRA, ADDRB, and ADDRC are tied to the same address, the RAM becomes a 64x3 simple dual port RAM. • If ADDRD is tied to ADDRA, ADDRB, and ADDRC, the RAM is a 64x4 single port RAM. There are several other possible configurations for this RAM. Port Descriptions Port DOA DOB DOC DOD DIA Direction Output Output Output Output Input DIB Input Width 1 1 1 1 1 1 Function Read port data outputs addressed by ADDRA Read port data outputs addressed by ADDRB Read port data outputs addressed by ADDRC Read/Write port data outputs addressed by ADDRD Write data inputs addressed by ADDRD (read output is addressed by ADDRA) Write data inputs addressed by ADDRD (read output is addressed by ADDRB) Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 387 Chapter 4: About Design Elements Port DIC DID ADDRA ADDRB ADDRC ADDRD WE WCLK Direction Input Input Input Input Input Input Input Input Width 1 1 6 6 6 6 1 1 Function Write data inputs addressed by ADDRD (read output is addressed by ADDRC) Write data inputs addressed by ADDRD Read address bus A Read address bus B Read address bus C 4-bit data write port, 1-bit data read port address bus D Write Enable Write clock (reads are asynchronous) Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No This element can be inferred by some synthesis tools by describing a RAM with a synchronous write and asynchronous read capability. Consult your synthesis tool documentation for details on RAM inference capabilities and coding examples. Xilinx suggests that you instantiate this component if you have a need to implicitly specify the RAM function, or if you need to manually place or relationally place the component. If a synchronous read capability is desired, the outputs can be connected to an FDRE (FDCE if asynchronous reset is needed) in order to improve the output timing of the function. However, this is not necessary for the proper operation of the RAM. If you want to have the data clocked on the negative edge of a clock, an inverter can be described on the clock input to this component. This inverter will be absorbed into the block giving the ability to write to the RAM on falling clock edges. If instantiated, the following connections should be made to this component: • Connect the WCLK input to the desired clock source, the DIA, DIB, DIC • Connect the DIA, DIB, DIC, and DID inputs to the data source to be stored • Connect the DOA, DOB, DOC, and DOD outputs to an FDCE D input or other appropriate data destination, or leave unconnected if not used • Connect the WE clock enable pin to the proper write enable source in the design • Connect the ADDRD bus to the source for the read/write addressing • Connect the ADDRA, ADDRB, and ADDRC buses to the appropriate read address connections The optional INIT_A, INIT_B, INIT_C and INIT_D attributes let you specify the initial memory contents of each port using a 64-bit hexadecimal value. The INIT value correlates to the RAM addressing by the following equation: ADDRy[z] = INIT_y[z]. For instance, if the RAM ADDRC port is addressed to 00001, then the INIT_C[1] values would be the initial values shown on the DOC port before the first write occurs at that address. If left unspecified, the initial contents will default to all zeros. Send Feedback 388 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute INIT_A Data Type Hexadecimal INIT_B Hexadecimal INIT_C Hexadecimal INIT_D Hexadecimal Allowed Values Default Any 64-bit value All zero Any 64-bit value All zero Any 64-bit value All zero Any 64-bit value All zero Description Specifies the initial contents of the RAM on port A. Specifies the initial contents of the RAM on port B. Specifies the initial contents of the RAM on port C. Specifies the initial contents of the RAM on port D. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAM64M: 64-deep by 4-wide Multi Port LUT RAM (Mapped to four SliceM LUT6s) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAM64M_inst : RAM64M generic map ( INIT_A => X"0000000000000000", -- Initial contents of A port INIT_B => X"0000000000000000", -- Initial contents of B port INIT_C => X"0000000000000000", -- Initial contents of C port INIT_D => X"0000000000000000) -- Initial contents of D port port map ( DOA => DOA, -- Read port A 1-bit output DOB => DOB, -- Read port B 1-bit output DOC => DOC, -- Read port C 1-bit output DOD => DOD, -- Read/Write port D 1-bit output ADDRA => ADDRA, -- Read port A 6-bit address input ADDRB => ADDRB, -- Read port B 6-bit address input ADDRC => ADDRC, -- Read port C 6-bit address input ADDRD => ADDRD, -- Read/Write port D 6-bit address input DIA => DIA, -- RAM 1-bit data write input addressed by ADDRD, -- read addressed by ADDRA DIB => DIB, -- RAM 1-bit data write input addressed by ADDRD, -- read addressed by ADDRB DIC => DIC, -- RAM 1-bit data write input addressed by ADDRD, -- read addressed by ADDRC DID => DID, -- RAM 1-bit data write input addressed by ADDRD, -- read addressed by ADDRD WCLK => WCLK, -- Write clock input WE => WE -- Write enable input ); -- End of RAM64M_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 389 Chapter 4: About Design Elements Verilog Instantiation Template // RAM64M: 64-deep by 4-wide Multi Port LUT RAM (Mapped to four SliceM LUT6s) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 RAM64M #( .INIT_A(64'h0000000000000000), // Initial contents of A Port .INIT_B(64'h0000000000000000), // Initial contents of B Port .INIT_C(64'h0000000000000000), // Initial contents of C Port .INIT_D(64'h0000000000000000) // Initial contents of D Port ) RAM64M_inst ( .DOA(DOA), // Read port A 1-bit output .DOB(DOB), // Read port B 1-bit output .DOC(DOC), // Read port C 1-bit output .DOD(DOD), // Read/write port D 1-bit output .DIA(DIA), // RAM 1-bit data write input addressed by ADDRD, // read addressed by ADDRA .DIB(DIB), // RAM 1-bit data write input addressed by ADDRD, // read addressed by ADDRB .DIC(DIC), // RAM 1-bit data write input addressed by ADDRD, // read addressed by ADDRC .DID(DID), // RAM 1-bit data write input addressed by ADDRD, // read addressed by ADDRD .ADDRA(ADDRA), // Read port A 6-bit address input .ADDRB(ADDRB), // Read port B 6-bit address input .ADDRC(ADDRC), // Read port C 6-bit address input .ADDRD(ADDRD), // Read/write port D 6-bit address input .WE(WE), // Write enable input .WCLK(WCLK) // Write clock input ); // End of RAM64M_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 390 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements RAM64X1D Primitive: 64-Deep by 1-Wide Dual Port Static Synchronous RAM Introduction This design element is a 64-bit deep by 1-bit wide static dual port random access memory with synchronous write capability. The device has two separate address ports: the read address (DPRA5:DPRA0) and the write address (A5:A0). These two address ports are completely asynchronous. The read address controls the location of the data driven out of the output pin (DPO), and the write address controls the destination of a valid write transaction. When the write enable (WE) is Low, transitions on the write clock (WCLK) are ignored and data stored in the RAM is not affected. When WE is High, any positive transition on WCLK loads the data on the data input (D) into the memory cell selected by the 6-bit (A0:A5) write address. For predictable performance, write address and data inputs must be stable before a Low-to-High WCLK transition. This RAM block assumes an active-High WCLK. WCLK can be active-High or active-Low. Any inverter placed on the WCLK input net is absorbed into the block. The SPO output reflects the data in the memory cell addressed by A5:A0. The DPO output reflects the data in the memory cell addressed by DPRA5:DPRA0. The write process is not affected by the address on the read address port. You can use the INIT attribute to specify the initial contents of the RAM. If left unspecified, the initial contents default to all zeros. Logic Table Inputs WE (mode) WCLK D 0 (read) X X 1 (read) 0 X 1 (read) 1 X 1 (write) ↑ D 1 (read) ↓ X data_a = memory cell addressed by bits A5:A0 data_d = memory cell addressed by bits DPRA5:DPRA0 Outputs SPO data_a data_a data_a D data_a DPO data_d data_d data_d data_d data_d Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 391 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Default Any 64-bit value All zeros Description Specifies the initial contents of the RAM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAM64X1D: 64 x 1 negative edge write, asynchronous read -- dual-port distributed RAM (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAM64X1D_1_inst : RAM64X1D_1 generic map ( INIT => X"0000000000000000") -- Initial contents of RAM port map ( DPO => DPO, -- Read-only 1-bit data output SPO => SPO, -- R/W 1-bit data output A0 => A0, -- R/W address[0] input bit A1 => A1, -- R/W address[1] input bit A2 => A2, -- R/W address[2] input bit A3 => A3, -- R/W address[3] input bit A4 => A4, -- R/W address[4] input bit A5 => A5, -- R/W address[5] input bit D => D, -- Write 1-bit data input DPRA0 => DPRA0, -- Read-only address[0] input bit DPRA1 => DPRA1, -- Read-only address[1] input bit DPRA2 => DPRA2, -- Read-only address[2] input bit DPRA3 => DPRA3, -- Read-only address[3] input bit DPRA4 => DPRA4, -- Read-only address[4] input bit DPRA5 => DPRA5, -- Read-only address[5] input bit WCLK => WCLK, -- Write clock input WE => WE -- Write enable input ); -- End of RAM64X1D_1_inst instantiation Send Feedback 392 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // RAM64X1D: 64 x 1 positive edge write, asynchronous read dual-port distributed RAM (Mapped to a SliceM LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 RAM64X1D #( .INIT(64'h0000000000000000) // Initial contents of RAM ) RAM64X1D_inst ( .DPO(DPO), // Read-only 1-bit data output .SPO(SPO), // Rw/ 1-bit data output .A0(A0), // Rw/ address[0] input bit .A1(A1), // Rw/ address[1] input bit .A2(A2), // Rw/ address[2] input bit .A3(A3), // Rw/ address[3] input bit .A4(A4), // Rw/ address[4] input bit .A5(A5), // Rw/ address[5] input bit .D(D), // Write 1-bit data input .DPRA0(DPRA0), // Read-only address[0] input bit .DPRA1(DPRA1), // Read-only address[1] input bit .DPRA2(DPRA2), // Read-only address[2] input bit .DPRA3(DPRA3), // Read-only address[3] input bit .DPRA4(DPRA4), // Read-only address[4] input bit .DPRA5(DPRA5), // Read-only address[5] input bit .WCLK(WCLK), // Write clock input .WE(WE) // Write enable input ); // End of RAM64X1D_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 393 Chapter 4: About Design Elements RAM64X1S Primitive: 64-Deep by 1-Wide Static Synchronous RAM Introduction This design element is a 64-bit deep by 1-bit wide static random access memory (RAM) with synchronous write capability. When the write enable is set Low, transitions on the write clock (WCLK) are ignored and data stored in the RAM is not affected. When WE is set High, any positive transition on WCLK loads the data on the data input (D) into the memory cell selected by the 6-bit address (A5:A0). This RAM block assumes an active-High WCLK. However, WCLK can be active-High or active-Low. Any inverter placed on the WCLK input net is absorbed into the block. The signal output on the data output pin (O) is the data that is stored in the memory cell defined by the values on the address pins. You can use the INIT attribute to specify the initial contents of the RAM. If left unspecified, the initial contents default to all zeros. Logic Table Mode selection is shown in the following logic table Inputs WE (mode) WCLK D 0 (read) X X 1 (read) 0 X 1 (read) 1 X 1 (write) ↑ D 1 (read) ↓ X Data = memory cell addressed by bits A5:A0 Outputs O Data Data Data D Data Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 394 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Default Any 64-bit value All zeros Description Specifies the initial contents of the RAM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAM64X1S: 64 x 1 positive edge write, asynchronous read single-port distributed RAM (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAM64X1S_inst : RAM64X1S generic map ( INIT => X"0000000000000000") port map ( O => O, -- 1-bit data output A0 => A0, -- Address[0] input bit A1 => A1, -- Address[1] input bit A2 => A2, -- Address[2] input bit A3 => A3, -- Address[3] input bit A4 => A4, -- Address[4] input bit A5 => A5, -- Address[5] input bit D => D, -- 1-bit data input WCLK => WCLK, -- Write clock input WE => WE -- Write enable input ); -- End of RAM64X1S_inst instantiation Verilog Instantiation Template // RAM64X1S: 64 x 1 positive edge write, asynchronous read single-port distributed RAM (Mapped to a SliceM LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 RAM64X1S #( .INIT(64'h0000000000000000) // Initial contents of RAM ) RAM64X1S_inst ( .O(O), // 1-bit data output .A0(A0), // Address[0] input bit .A1(A1), // Address[1] input bit .A2(A2), // Address[2] input bit .A3(A3), // Address[3] input bit .A4(A4), // Address[4] input bit .A5(A5), // Address[5] input bit .D(D), // 1-bit data input .WCLK(WCLK), // Write clock input .WE(WE) // Write enable input ); // End of RAM64X1S_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 395 Chapter 4: About Design Elements RAM64X1S_1 Primitive: 64-Deep by 1-Wide Static Synchronous RAM with Negative-Edge Clock Introduction This design element is a 64-bit deep by 1-bit wide static random access memory with synchronous write capability. When the write enable is Low, transitions on the write clock (WCLK) are ignored and data stored in the RAM is not affected. When (WE) is High, any negative transition on (WCLK) loads the data on the data input (D) into the memory cell selected by the 6-bit address (A5:A0). For predictable performance, address and data inputs must be stable before a High-to-Low (WCLK) transition. This RAM block assumes an active-Low (WCLK). However, (WCLK) can be active-High or active-Low. Any inverter placed on the (WCLK) input net is absorbed into the block. The signal output on the data output pin (O) is the data that is stored in the memory cell defined by the values on the address pins. You can use the INIT attribute to specify the initial contents of the RAM. If left unspecified, the initial contents default to all zeros. Logic Table Inputs WE (mode) WCLK D 0 (read) X X 1 (read) 0 X 1 (read) 1 X 1 (write) ↓ D 1 (read) ↑ X Data = memory cell addressed by bits A5:A0 Outputs O Data Data Data D Data Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Send Feedback 396 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Available Attributes Attribute INIT Data Type Allowed Values Default Hexadecimal Any 64-bit value All zeros Description Specifies the initial contents of the RAM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAM64X1S_1: 64 x 1 negative edge write, asynchronous read single-port distributed RAM (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAM64X1S_1_inst : RAM64X1S_1 generic map ( INIT => X"0000000000000000") port map ( O => O, -- 1-bit data output A0 => A0, -- Address[0] input bit A1 => A1, -- Address[1] input bit A2 => A2, -- Address[2] input bit A3 => A3, -- Address[3] input bit A4 => A4, -- Address[4] input bit A5 => A5, -- Address[5] input bit D => D, -- 1-bit data input WCLK => WCLK, -- Write clock input WE => WE -- Write enable input ); -- End of RAM64X1S_1_inst instantiation Verilog Instantiation Template // RAM64X1S_1: 64 x 1 negative edge write, asynchronous read single-port distributed RAM (Mapped to a SliceM LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 RAM64X1S_1 #( .INIT(64'h0000000000000000) // Initial contents of RAM ) RAM64X1S_1_inst ( .O(O), // 1-bit data output .A0(A0), // Address[0] input bit .A1(A1), // Address[1] input bit .A2(A2), // Address[2] input bit .A3(A3), // Address[3] input bit .A4(A4), // Address[4] input bit .A5(A5), // Address[5] input bit .D(D), // 1-bit data input .WCLK(WCLK), // Write clock input .WE(WE) // Write enable input ); // End of RAM64X1S_1_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 397 Chapter 4: About Design Elements RAMB18E1 Primitive: 18K-bit Configurable Synchronous Block RAM Introduction 7 series devices contain several block RAM memories that can be configured as FIFOs, automatic error correction RAM, or general-purpose 36Kb or 18Kb RAM/ROM memories. These block RAM memories offer fast and flexible storage of large amounts of on-chip data. The RAMB18E1 allows access to the block RAM in the 18Kb configuration. This element can be configured and used as a 1-bit wide by 16K deep to an 18-bit wide by 1024-bit deep true dual port RAM. This element can also be configured as a 36-bit wide by 512 deep simple dual port RAM. Both read and write operations are fully synchronous to the supplied clock(s) to the component. However, the READ and WRITE ports can operate fully independent and asynchronous to each other, accessing the same memory array. When configured in the wider data width modes, byte-enable write operations are possible, and an optional output register can be used to reduce the clock-to-out times of the RAM. Port Descriptions Port ADDRARDADDR <13:0> ADDRBWRADDR <13:0> CLKARDCLK Type Input Input Input Width 14 14 1 Function Port A address input bus/Read address input bus. Port B address input bus/Write address input bus. Rising edge port A clock input/Read clock input. Send Feedback 398 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port CLKBWRCLK DIADI<15:0> DIBDI<15:0> DIPADIP<1:0> DIPBDIP<1:0> DOADO<15:0> DOBDO<15:0> DOPADOP<1:0> DOPBDOP<1:0> ENARDEN ENBWREN REGCEAREGCE REGCEB RSTRAMARSTRAM RSTRAMB RSTREGARSTREG RSTREGB Type Input Input Input Input Width 1 16 16 2 Input 2 Output 16 Output 16 Output 2 Output 2 Input 1 Input 1 Input 1 Input 1 Input 1 Input 1 Input 1 Input 1 Function Rising edge port B clock input/Write clock input. Port A data input bus/Data input bus addressed by WRADDR. When RAM_MODE="SDP", DIADI is the logical DI<15:0>. Port B data input bus/Data input bus addressed by WRADDR. When RAM_MODE="SDP", DIBDI is the logical DI<31:16>. Port A parity data input bus/Data parity input bus addressed by WRADDR. When RAM_MODE="SDP", DIPADIP is the logical DIP<1:0>. Port B parity data input bus/Data parity input bus addressed by WRADDR. When RAM_MODE="SDP", DIPBDIP is the logical DIP<3:2>. Port A data output bus/Data output bus addressed by RDADDR. When RAM_MODE="SDP", DOADO is the logical DO<15:0>. Port B data output bus/Data output bus addressed by RDADDR. When RAM_MODE="SDP", DOBDO is the logical DO<31:16>. Port A parity data output bus/Data parity output bus addressed by RDADDR. When RAM_MODE="SDP", DOPADOP is the logical DOP<1:0>. Port B parity data output bus/Data parity output bus addressed by RDADDR. When RAM_MODE="SDP", DOPBDOP is the logical DOP<3:2>. Port A RAM enable/Read enable. Port B RAM enable/Write enable. Port A output register clock enable input/Output register clock enable input (valid only when DOA_REG=1). Port B output register clock enable (valid only when DOB_REG=1 and RAM_MODE="TDP"). Synchronous data latch set/reset to value indicated by SRVAL_A. RSTRAMARSTRAM sets/resets the BRAM data output latch when DO_REG=0 or 1. If DO_REG=1 there is a cycle of latency between the internal data latch node that is reset by RSTRAMARSTRAM and the DO output of the BRAM. This signal resets port A RAM output when RAM_MODE="TDP" and the entire RAM output when RAM_MODE="SDP". Synchronous data latch set/reset to value indicated by SRVAL_B. RSTRAMB sets/resets the BRAM data output latch when DO_REG=0 or 1. If DO_REG=1 there is a cycle of latency between the internal data latch node that is reset by RSTRAMB and the DO output of the BRAM. Not used when RAM_MODE="SDP". Synchronous output register set/reset to value indicated by SRVAL_A. RSTREGARSTREG sets/resets the output register when DO_REG=1. RSTREG_PRIORITY_A determines if this signal gets priority over REGCEAREGCE. This signal resets port A output when RAM_MODE="TDP" and the entire output port when RAM_MODE="SDP". Synchronous output register set/reset to value indicated by SRVAL_B. RSTREGB sets/resets the output register when DO_REG=1. RSTREG_PRIORITY_B determines if this signal gets priority over REGCEB. Not used when RAM_MODE="SDP". Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 399 Chapter 4: About Design Elements Port WEA<1:0> WEBWE<3:0> Type Input Input Width 2 4 Function Port A byte-wide write enable. Not used when RAM_MODE="SDP". See User Guide for WEA mapping for different port widths. Port B byte-wide write enable/Write enable. See User Guide for WEBWE mapping for different port widths. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended Yes Yes Available Attributes Attribute RDADDR _COLLISION _HWCONFIG Type STRING SIM_COLLISION STRING _CHECK Allowed Values Default Description "DELAYED_WRITE", "PERFORMANCE" "DELAYED_WRITE" When set to "PERFORMANCE" allows for higher clock performance (frequency) in READ_FIRST mode. If using the same clock on both ports of the RAM with "PERFORMANCE" mode, the address overlap collision rules apply where in "DELAYED_WRITE" mode, you can safely use the BRAM without incurring collisions. "ALL", "ALL" "GENERATE_X_ONLY", "NONE", "WARNING_ONLY" Allows modification of the simulation behavior so that if a memory collision occurs • "ALL" = warning produced and affected outputs/memory go unknown (X) • "WARNING_ONLY" = warning produced and affected outputs/memory retain last value • "GENERATE_X_ONLY" = no warning and affected outputs/memory go unknown (X) • "NONE" = no warning and affected outputs/memory retain last value Note Use this setting carefully. Setting it to a value other than "ALL" can mask design problems during simulation. Send Feedback 400 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Attribute DOA_REG, DOB_REG Type Allowed Values DECIMAL 0, 1 Default 0 INIT_A, INIT_B HEX 18 bit HEX 18'h00000 INIT_00 to INIT_3F HEX 256 bit HEX All zeros INIT_FILE INITP_00 to INITP_07 STRING HEX String representing file name and location 256 bit HEX None All zeros RAM_MODE STRING "TDP", "SDP" "TDP" READ_WIDTH_A DECIMAL 0, 1, 2, 4, 9, 18, 36, 72 0 READ_WIDTH_B DECIMAL 0, 1, 2, 4, 9, 18 0 RSTREG_PRIORITY STRING _A, RSTREG_PRIORITY _B SIM_DEVICE STRING "RSTREG", "REGCE" "7SERIES" "RSTREG" ""7SERIES"" SRVAL_A, SRVAL_B HEX 18 bit HEX 18'h00000 Description A value of 1 enables the output registers to the RAM enabling quicker clock-to-out from the RAM at the expense of an added clock cycle of read latency. A value of 0 allows a read in one clock cycle but will result in slower clock-to-out timing. Applies to port A/B in TDP mode and up to 18 lower bits (including parity bits) in SDP mode. Specifies the initial value on the port output after configuration. Applies to Port A/B in TDP mode and up to 18 lower bits (including parity bits) in SDP mode. Allows specification of the initial contents of the 16KB data memory array. File name of file used to specify initial RAM contents. Allows specification of the initial contents of the 2KB parity data memory array. Selects simple dual port (SDP) or true dual port (TDP) mode. Specifies the desired data width for a read on Port A, including parity bits. This value must be 0 if the Port A is not used. Otherwise, it should be set to the desired port width. In "SDP" mode, this is the read width including parity bits. Specifies the desired data width for a read on Port B including parity bits. This value must be 0 if the Port B is not used. Otherwise, it should be set to the desired port width. Not used for "SDP" mode. Selects register priority for RSTREG or REGCE. Applies to port A/B in TDP mode and up to 18 lower bits (including parity bits) in SDP mode. Must be set to "7SERIES" in order to exhibit proper simulation behavior under all conditions. Specifies the output value of the RAM upon assertion of the synchronous reset (RSTREG) signal. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 401 Chapter 4: About Design Elements Attribute Type WRITE_MODE_A, STRING WRITE_MODE_B Allowed Values "WRITE_FIRST", "NO_CHANGE", "READ_FIRST" Default "WRITE_FIRST" WRITE_WIDTH_A DECIMAL 0, 1, 2, 4, 9, 18 0 WRITE_WIDTH_B DECIMAL 0, 1, 2, 4, 9, 18, 36, 72 0 Description Specifies output behavior of the port being written to. • "WRITE_FIRST" = written value appears on output port of the RAM • "READ_FIRST" = previous RAM contents for that memory location appear on the output port • "NO_CHANGE" = previous value on the output port remains the same. When RAM_MODE="SDP", WRITE_MODE can not be set to "NO_CHANGE". For simple dual port implementations you should set this attribute to "READ_FIRST" if using the same clock on both ports, or set it to "WRITE_FIRST" if using different clocks. This generally yields an improved collision or address overlap behavior. Specifies the desired data width for a write to Port A including parity bits. This value must be 0 if the port is not used. Otherwise should be set to the desired write width. Not used in SDP mode. Specifies the desired data width for a write to Port B including parity bits. This value must be 0 if the port is not used. Otherwise should be set to the desired write width. In SDP mode, this is the write width including parity bits. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- RAMB18E1: 18K-bit Configurable Synchronous Block RAM -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAMB18E1_inst : RAMB18E1 generic map ( -- Address Collision Mode: "PERFORMANCE" or "DELAYED_WRITE" RDADDR_COLLISION_HWCONFIG => "DELAYED_WRITE", -- Collision check: Values ("ALL", "WARNING_ONLY", "GENERATE_X_ONLY" or "NONE") SIM_COLLISION_CHECK => "ALL", -- DOA_REG, DOB_REG: Optional output register (0 or 1) DOA_REG => 0, DOB_REG => 0, -- INITP_00 to INITP_07: Initial contents of parity memory array INITP_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_03 => X"0000000000000000000000000000000000000000000000000000000000000000", Send Feedback 402 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements INITP_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_07 => X"0000000000000000000000000000000000000000000000000000000000000000", -- INIT_00 to INIT_3F: Initial contents of data memory array INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000", -- INIT_A, INIT_B: Initial values on output ports INIT_A => X"00000", INIT_B => X"00000", -- Initialization File: RAM initialization file Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 403 Chapter 4: About Design Elements INIT_FILE => "NONE", -- RAM Mode: "SDP" or "TDP" RAM_MODE => "TDP", -- READ_WIDTH_A/B, WRITE_WIDTH_A/B: Read/write width per port READ_WIDTH_A => 0, -- 0-72 READ_WIDTH_B => 0, -- 0-18 WRITE_WIDTH_A => 0, -- 0-18 WRITE_WIDTH_B => 0, -- 0-72 -- RSTREG_PRIORITY_A, RSTREG_PRIORITY_B: Reset or enable priority ("RSTREG" or "REGCE") RSTREG_PRIORITY_A => "RSTREG", RSTREG_PRIORITY_B => "RSTREG", -- SRVAL_A, SRVAL_B: Set/reset value for output SRVAL_A => X"00000", SRVAL_B => X"00000", -- Simulation Device: Must be set to "7SERIES" for simulation behavior SIM_DEVICE => "7SERIES", -- WriteMode: Value on output upon a write ("WRITE_FIRST", "READ_FIRST", or "NO_CHANGE") WRITE_MODE_A => "WRITE_FIRST", WRITE_MODE_B => "WRITE_FIRST" ) port map ( -- Port A Data: 16-bit (each) output: Port A data DOADO => DOADO, -- 16-bit output: A port data/LSB data DOPADOP => DOPADOP, -- 2-bit output: A port parity/LSB parity -- Port B Data: 16-bit (each) output: Port B data DOBDO => DOBDO, -- 16-bit output: B port data/MSB data DOPBDOP => DOPBDOP, -- 2-bit output: B port parity/MSB parity -- Port A Address/Control Signals: 14-bit (each) input: Port A address and control signals (read port -- when RAM_MODE="SDP") ADDRARDADDR => ADDRARDADDR, -- 14-bit input: A port address/Read address CLKARDCLK => CLKARDCLK, -- 1-bit input: A port clock/Read clock ENARDEN => ENARDEN, -- 1-bit input: A port enable/Read enable REGCEAREGCE => REGCEAREGCE, -- 1-bit input: A port register enable/Register enable RSTRAMARSTRAM => RSTRAMARSTRAM, -- 1-bit input: A port set/reset RSTREGARSTREG => RSTREGARSTREG, -- 1-bit input: A port register set/reset WEA => WEA, -- 2-bit input: A port write enable -- Port A Data: 16-bit (each) input: Port A data DIADI => DIADI, -- 16-bit input: A port data/LSB data DIPADIP => DIPADIP, -- 2-bit input: A port parity/LSB parity -- Port B Address/Control Signals: 14-bit (each) input: Port B address and control signals (write port -- when RAM_MODE="SDP") ADDRBWRADDR => ADDRBWRADDR, -- 14-bit input: B port address/Write address CLKBWRCLK => CLKBWRCLK, -- 1-bit input: B port clock/Write clock ENBWREN => ENBWREN, -- 1-bit input: B port enable/Write enable REGCEB => REGCEB, -- 1-bit input: B port register enable RSTRAMB => RSTRAMB, -- 1-bit input: B port set/reset RSTREGB => RSTREGB, -- 1-bit input: B port register set/reset WEBWE => WEBWE, -- 4-bit input: B port write enable/Write enable -- Port B Data: 16-bit (each) input: Port B data DIBDI => DIBDI, -- 16-bit input: B port data/MSB data DIPBDIP => DIPBDIP -- 2-bit input: B port parity/MSB parity ); -- End of RAMB18E1_inst instantiation Verilog Instantiation Template // RAMB18E1: 18K-bit Configurable Synchronous Block RAM // 7 Series // Xilinx HDL Libraries Guide, version 14.7 RAMB18E1 #( // Address Collision Mode: "PERFORMANCE" or "DELAYED_WRITE" .RDADDR_COLLISION_HWCONFIG("DELAYED_WRITE"), // Collision check: Values ("ALL", "WARNING_ONLY", "GENERATE_X_ONLY" or "NONE") .SIM_COLLISION_CHECK("ALL"), // DOA_REG, DOB_REG: Optional output register (0 or 1) .DOA_REG(0), .DOB_REG(0), // INITP_00 to INITP_07: Initial contents of parity memory array .INITP_00(256'h0000000000000000000000000000000000000000000000000000000000000000), Send Feedback 404 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements .INITP_01(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_02(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_03(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_04(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_05(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_06(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_07(256'h0000000000000000000000000000000000000000000000000000000000000000), // INIT_00 to INIT_3F: Initial contents of data memory array .INIT_00(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_01(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_02(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_03(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_04(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_05(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_06(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_07(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_08(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_09(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_10(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_11(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_12(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_13(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_14(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_15(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_16(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_17(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_18(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_19(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_20(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_21(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_22(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_23(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_24(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_25(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_26(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_27(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_28(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_29(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_30(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_31(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_32(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_33(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_34(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_35(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_36(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_37(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_38(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_39(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3F(256'h0000000000000000000000000000000000000000000000000000000000000000), // INIT_A, INIT_B: Initial values on output ports Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 405 Chapter 4: About Design Elements .INIT_A(18'h00000), .INIT_B(18'h00000), // Initialization File: RAM initialization file .INIT_FILE("NONE"), // RAM Mode: "SDP" or "TDP" .RAM_MODE("TDP"), // READ_WIDTH_A/B, WRITE_WIDTH_A/B: Read/write width per port .READ_WIDTH_A(0), // 0-72 .READ_WIDTH_B(0), // 0-18 .WRITE_WIDTH_A(0), // 0-18 .WRITE_WIDTH_B(0), // 0-72 // RSTREG_PRIORITY_A, RSTREG_PRIORITY_B: Reset or enable priority ("RSTREG" or "REGCE") .RSTREG_PRIORITY_A("RSTREG"), .RSTREG_PRIORITY_B("RSTREG"), // SRVAL_A, SRVAL_B: Set/reset value for output .SRVAL_A(18'h00000), .SRVAL_B(18'h00000), // Simulation Device: Must be set to "7SERIES" for simulation behavior .SIM_DEVICE("7SERIES"), // WriteMode: Value on output upon a write ("WRITE_FIRST", "READ_FIRST", or "NO_CHANGE") .WRITE_MODE_A("WRITE_FIRST"), .WRITE_MODE_B("WRITE_FIRST") ) RAMB18E1_inst ( // Port A Data: 16-bit (each) output: Port A data .DOADO(DOADO), // 16-bit output: A port data/LSB data .DOPADOP(DOPADOP), // 2-bit output: A port parity/LSB parity // Port B Data: 16-bit (each) output: Port B data .DOBDO(DOBDO), // 16-bit output: B port data/MSB data .DOPBDOP(DOPBDOP), // 2-bit output: B port parity/MSB parity // Port A Address/Control Signals: 14-bit (each) input: Port A address and control signals (read port // when RAM_MODE="SDP") .ADDRARDADDR(ADDRARDADDR), // 14-bit input: A port address/Read address .CLKARDCLK(CLKARDCLK), // 1-bit input: A port clock/Read clock .ENARDEN(ENARDEN), // 1-bit input: A port enable/Read enable .REGCEAREGCE(REGCEAREGCE), // 1-bit input: A port register enable/Register enable .RSTRAMARSTRAM(RSTRAMARSTRAM), // 1-bit input: A port set/reset .RSTREGARSTREG(RSTREGARSTREG), // 1-bit input: A port register set/reset .WEA(WEA), // 2-bit input: A port write enable // Port A Data: 16-bit (each) input: Port A data .DIADI(DIADI), // 16-bit input: A port data/LSB data .DIPADIP(DIPADIP), // 2-bit input: A port parity/LSB parity // Port B Address/Control Signals: 14-bit (each) input: Port B address and control signals (write port // when RAM_MODE="SDP") .ADDRBWRADDR(ADDRBWRADDR), // 14-bit input: B port address/Write address .CLKBWRCLK(CLKBWRCLK), // 1-bit input: B port clock/Write clock .ENBWREN(ENBWREN), // 1-bit input: B port enable/Write enable .REGCEB(REGCEB), // 1-bit input: B port register enable .RSTRAMB(RSTRAMB), // 1-bit input: B port set/reset .RSTREGB(RSTREGB), // 1-bit input: B port register set/reset .WEBWE(WEBWE), // 4-bit input: B port write enable/Write enable // Port B Data: 16-bit (each) input: Port B data .DIBDI(DIBDI), // 16-bit input: B port data/MSB data .DIPBDIP(DIPBDIP) // 2-bit input: B port parity/MSB parity ); // End of RAMB18E1_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 406 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements RAMB36E1 Primitive: 36K-bit Configurable Synchronous Block RAM Introduction 7 series devices contain a million block RAM memories that can be configured as FIFOs, automatic error correction RAM, or general-purpose 36Kb or 18Kb RAM/ROM memories. These block RAM memories offer fast and flexible storage of large amounts of on-chip data. The RAMB36E1 allows access to the block RAM in the 36Kb configuration. This element can be cascaded to create a larger ram. This element can be configured and used as a 1-bit wide by 32K deep to a 36-bit wide by 1K deep true dual port RAM. This element can also be configured as a 72-bit wide by 512 deep simple dual port RAM. Both read and write operations are fully synchronous to the supplied clock(s) to the component. However, the READ and WRITE ports can operate fully independent and asynchronous to each other, accessing the same memory array. When configured in the wider data width modes, byte-enable write operations are possible, and an optional output register can be used to Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 407 Chapter 4: About Design Elements reduce the clock-to-out times of the RAM. Error detection and correction circuitry can also be enabled to uncover and rectify possible memory corruptions. Port Descriptions Port Type ADDRARDADDR <15:0> Input ADDRBWRADDR <15:0> Input CASCADEINA Input CASCADEINB Input CASCADEOUTA Output CASCADEOUTB Output CLKARDCLK Input CLKBWRCLK Input DBITERR Output DIADI<31:0> DIBDI<31:0> DIPADIP<3:0> Input Input Input DIPBDIP<3:0> Input DOADO<31:0> DOBDO<31:0> DOPADOP<3:0> Output Output Output DOPBDOP<3:0> Output ECCPARITY<7:0> Output ENARDEN ENBWREN INJECTDBITERR INJECTSBITERR RDADDRECC<8:0> REGCEAREGCE Input Input Input Input Output Input Width 16 16 1 1 1 1 1 1 1 32 32 4 4 32 32 4 4 8 1 1 1 1 9 1 Function Port A address input bus/Read address input bus. Port B address input bus/Write address input bus. Port A cascade input. Never use when RAM_MODE="SDP". Port B cascade input. Never use when RAM_MODE="SDP". Port A cascade output. Never use when RAM_MODE="SDP". Port B cascade output. Never use when RAM_MODE="SDP". Rising edge port A clock input/Read clock input. Rising edge port B clock input/Write clock input. Status output from ECC function to indicate a double bit error was detected. EN_ECC_READ needs to be TRUE in order to use this functionality. Not used when RAM_MODE="TDP". Port A data input bus/Data input bus addressed by WRADDR. When RAM_MODE="SDP", DIADI is the logical DI<31:0>. Port B data input bus/Data input bus addressed by WRADDR. When RAM_MODE="SDP", DIBDI is the logical DI<63:32>. Port A parity data input bus/Data parity input bus addressed by WRADDR. When RAM_MODE="SDP", DIPADIP is the logical DIP<3:0>. Port B parity data input bus/Data parity input bus addressed by WRADDR. When RAM_MODE="SDP", DIPBDIP is the logical DIP<7:4>. Port A data output bus/Data output bus addressed by RDADDR. When RAM_MODE="SDP", DOADO is the logical DO<31:0>. Port B data output bus/Data output bus addressed by RDADDR. When RAM_MODE="SDP", DOBDO is the logical DO<63:32>. Port A parity data output bus/Data parity output bus addressed by RDADDR. When RAM_MODE="SDP", DOPADOP is the logical DOP<3:0>. Port B parity data output bus/Data parity output bus addressed by RDADDR. When RAM_MODE="SDP", DOPBDOP is the logical DOP<7:4>. 8-bit data generated by the ECC encoder used by the ECC decoder for memory error detection and correction. Not used if RAM_MODE="TDP". Port A RAM enable/Read enable. Port B RAM enable/Write enable. Inject a double bit error if ECC feature is used. Inject a single bit error if ECC feature is used. ECC read address. Not used when RAM_MODE="TDP". Port A output register clock enable input/Output register clock enable input (valid only when DO_REG=1). Send Feedback 408 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port REGCEB RSTRAMARSTRAM RSTRAMB RSTREGARSTREG RSTREGB SBITERR WEA<3:0> WEBWE<7:0> Type Input Input Input Input Input Output Input Input Width 1 1 1 1 1 1 4 8 Function Port B output register clock enable (valid only when DO_REG=1 and RAM_MODE="TDP"). Synchronous data latch set/reset to value indicated by SRVAL_A. RSTRAMARSTRAM sets/resets the BRAM data output latch when DO_REG=0 or 1. If DO_REG=1 there is a cycle of latency between the internal data latch node that is reset by RSTRAMARSTRAM and the DO output of the BRAM. This signal resets port A RAM output when RAM_MODE="TDP" and the entire RAM output when RAM_MODE="SDP". Synchronous data latch set/reset to value indicated by SRVAL_B. RSTRAMB sets/resets the BRAM data output latch when DO_REG=0 or 1. If DO_REG=1 there is a cycle of latency between the internal data latch node that is reset by RSTRAMB and the DO output of the BRAM. Not used when RAM_MODE="SDP". Synchronous output register set/reset to value indicated by SRVAL_A. RSTREGARSTREG sets/resets the output register when DO_REG=1. RSTREG_PRIORITY_A determines if this signal gets priority over REGCEAREGCE. This signal resets port A output when RAM_MODE="TDP" and the entire output port when RAM_MODE="SDP". Synchronous output register set/reset to value indicated by SRVAL_B. RSTREGB sets/resets the output register when DO_REG=1. RSTREG_PRIORITY_B determines if this signal gets priority over REGCEB. Not used when RAM_MODE="SDP". Status output from ECC function to indicate a single bit error was detected. EN_ECC_READ needs to be TRUE in order to use this functionality. Not used when RAM_MODE="TDP". Port A byte-wide write enable. Not used when RAM_MODE="SDP". See User Guide for WEA mapping for different port widths. Port B byte-wide write enable/Write enable. See User Guide for WEBWE mapping for different port widths. Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended Yes Yes Available Attributes Attribute RDADDR _COLLISION _HWCONFIG Type STRING Allowed Values "DELAYED_WRITE", "PERFORMANCE" Default Description "DELAYED_WRITE" When set to "PERFORMANCE" allows for higher clock performance (frequency) in READ_FIRST mode. If using the same clock on both ports of the RAM with "PERFORMANCE" mode, the address overlap collision rules apply where in "DELAYED_WRITE" mode, you can safely use the BRAM without incurring collisions. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 409 Chapter 4: About Design Elements Attribute SIM_COLLISION _CHECK Type STRING Allowed Values Default "ALL", "ALL" "GENERATE_X_ONLY", "NONE", "WARNING_ONLY" DOA_REG, DOB_REG DECIMAL 0, 1 0 EN_ECC_READ EN_ECC_WRITE INIT_A, INIT_B BOOLEAN FALSE, TRUE BOOLEAN FALSE, TRUE HEX 36 bit HEX FALSE FALSE 36'h000000000 INIT_00 to INIT_7F HEX 256 bit HEX All zeros INIT_FILE STRING INITP_00 to INITP_0F HEX String representing file None name and location 256 bit HEX All zeros Description Allows modification of the simulation behavior so that if a memory collision occurs • "ALL" = warning produced and affected outputs/memory go unknown (X) • "WARNING_ONLY" = warning produced and affected outputs/memory retain last value • "GENERATE_X_ONLY" = no warning and affected outputs/memory go unknown (X) • "NONE" = no warning and affected outputs/memory retain last value Note Use this setting carefully. Setting it to a value other than "ALL" can mask design problems during simulation. A value of 1 enables the output registers to the RAM, which gives you quicker clock-to-out from the RAM at the expense of an added clock cycle of read latency. A value of 0 allows a read-in-one clock cycle but will result in slower clock-to-out timing. The number of registers activated is the same as the port width and includes parity bits. In SDP mode, DOA_REG and DOB_REG should always be set to the same value. Enable the ECC decoder circuitry. Enable the ECC encoder circuitry. Specifies the initial value on the port output after configuration. In SDP mode, INIT_A and INIT_B should always be set to the same value. Allows specification of the initial contents of the 32KB data memory array. File name of file used to specify initial RAM contents. Allows specification of the initial contents of the 4KB parity data memory array. Send Feedback 410 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Attribute RAM_EXTENSION _A, RAM_EXTENSION _B Type STRING Allowed Values "NONE", "LOWER", "UPPER" Default "NONE" RAM_MODE STRING "TDP", "SDP" "TDP" READ_WIDTH_A, DECIMAL 0, 1, 2, 4, 9, 18, 36, 72 0 READ_WIDTH_B, WRITE_WIDTH_A, WRITE_WIDTH_B RSTREG_PRIORITY _A, RSTREG_PRIORITY _B STRING "RSTREG", "REGCE" "RSTREG" SIM_DEVICE STRING "7SERIES" ""7SERIES"" SRVAL_A, SRVAL_B HEX 36 bit HEX 36'h000000000 WRITE_MODE_A, WRITE_MODE_B STRING "WRITE_FIRST", "NO_CHANGE", "READ_FIRST" "WRITE_FIRST" Description Selects cascade mode. If not cascading two BlockRAMs to form a 64K x 1 RAM set to "NONE". If cascading RAMs, set to either "UPPER" or "LOWER" to indicate relative RAM location for proper configuration of the RAM. Not used if RAM_MODE="SDP". Selects simple dual port (SDP) or true dual port (TDP) mode. Specifies the desired data width for a read/write on port A/B, including parity bits. This value must be 0 if the port is not used. Otherwise, it should be set to the desired port width. Selects register priority for "RSTREG" or "REGCE". In SDP mode, STREG_PRIORITY_A and RSTREG_PRIORITY_B should always be set to the same value. Must be set to "7SERIES" in order to exhibit proper simulation behavior under all conditions. Specifies the output value of the RAM upon assertion of the synchronous reset (RSTREG) signal. In SDP mode, SRVAL_A and RVAL_B should always be set to the same value. Specifies output behavior of the port being written to. • "WRITE_FIRST" = written value appears on output port of the RAM • "READ_FIRST" = previous RAM contents for that memory location appears on the output port • "NO_CHANGE" = previous value on the output port remains the same When RAM_MODE="SDP", WRITE_MODE can not be set to "NO_CHANGE". For simple dual port implementations, it is generally suggested to set WRITE_MODE to "READ_FIRST" if using the same clock on both ports and to set it to "WRITE_FIRST" if using different clocks. This generally yields an improved collision or address overlap behavior when using the BRAM in this configuration. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 411 Chapter 4: About Design Elements Library UNISIM; use UNISIM.vcomponents.all; -- RAMB36E1: 36K-bit Configurable Synchronous Block RAM -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 RAMB36E1_inst : RAMB36E1 generic map ( -- Address Collision Mode: "PERFORMANCE" or "DELAYED_WRITE" RDADDR_COLLISION_HWCONFIG => "DELAYED_WRITE", -- Collision check: Values ("ALL", "WARNING_ONLY", "GENERATE_X_ONLY" or "NONE") SIM_COLLISION_CHECK => "ALL", -- DOA_REG, DOB_REG: Optional output register (0 or 1) DOA_REG => 0, DOB_REG => 0, EN_ECC_READ => FALSE, -- Enable ECC decoder, -- FALSE, TRUE EN_ECC_WRITE => FALSE, -- Enable ECC encoder, -- FALSE, TRUE -- INITP_00 to INITP_0F: Initial contents of the parity memory array INITP_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INITP_0F => X"0000000000000000000000000000000000000000000000000000000000000000", -- INIT_00 to INIT_7F: Initial contents of the data memory array INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", Send Feedback 412 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_40 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_41 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_42 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_43 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_44 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_45 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_46 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_47 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_48 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_49 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_4F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_50 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_51 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_52 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_53 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_54 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_55 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_56 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_57 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_58 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_59 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_5F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_60 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_61 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_62 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_63 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_64 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_65 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_66 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_67 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_68 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_69 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6A => X"0000000000000000000000000000000000000000000000000000000000000000", Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 413 Chapter 4: About Design Elements INIT_6B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_6F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_70 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_71 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_72 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_73 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_74 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_75 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_76 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_77 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_78 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_79 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_7F => X"0000000000000000000000000000000000000000000000000000000000000000", -- INIT_A, INIT_B: Initial values on output ports INIT_A => X"000000000", INIT_B => X"000000000", -- Initialization File: RAM initialization file INIT_FILE => "NONE", -- RAM Mode: "SDP" or "TDP" RAM_MODE => "TDP", -- RAM_EXTENSION_A, RAM_EXTENSION_B: Selects cascade mode ("UPPER", "LOWER", or "NONE") RAM_EXTENSION_A => "NONE", RAM_EXTENSION_B => "NONE", -- READ_WIDTH_A/B, WRITE_WIDTH_A/B: Read/write width per port READ_WIDTH_A => 0, -- 0-72 READ_WIDTH_B => 0, -- 0-36 WRITE_WIDTH_A => 0, -- 0-36 WRITE_WIDTH_B => 0, -- 0-72 -- RSTREG_PRIORITY_A, RSTREG_PRIORITY_B: Reset or enable priority ("RSTREG" or "REGCE") RSTREG_PRIORITY_A => "RSTREG", RSTREG_PRIORITY_B => "RSTREG", -- SRVAL_A, SRVAL_B: Set/reset value for output SRVAL_A => X"000000000", SRVAL_B => X"000000000", -- Simulation Device: Must be set to "7SERIES" for simulation behavior SIM_DEVICE => "7SERIES", -- WriteMode: Value on output upon a write ("WRITE_FIRST", "READ_FIRST", or "NO_CHANGE") WRITE_MODE_A => "WRITE_FIRST", WRITE_MODE_B => "WRITE_FIRST" ) port map ( -- Cascade Signals: 1-bit (each) output: BRAM cascade ports (to create 64kx1) CASCADEOUTA => CASCADEOUTA, -- 1-bit output: A port cascade CASCADEOUTB => CASCADEOUTB, -- 1-bit output: B port cascade -- ECC Signals: 1-bit (each) output: Error Correction Circuitry ports DBITERR => DBITERR, -- 1-bit output: Double bit error status ECCPARITY => ECCPARITY, -- 8-bit output: Generated error correction parity RDADDRECC => RDADDRECC, -- 9-bit output: ECC read address SBITERR => SBITERR, -- 1-bit output: Single bit error status -- Port A Data: 32-bit (each) output: Port A data DOADO => DOADO, -- 32-bit output: A port data/LSB data DOPADOP => DOPADOP, -- 4-bit output: A port parity/LSB parity -- Port B Data: 32-bit (each) output: Port B data DOBDO => DOBDO, -- 32-bit output: B port data/MSB data DOPBDOP => DOPBDOP, -- 4-bit output: B port parity/MSB parity -- Cascade Signals: 1-bit (each) input: BRAM cascade ports (to create 64kx1) CASCADEINA => CASCADEINA, -- 1-bit input: A port cascade CASCADEINB => CASCADEINB, -- 1-bit input: B port cascade -- ECC Signals: 1-bit (each) input: Error Correction Circuitry ports INJECTDBITERR => INJECTDBITERR, -- 1-bit input: Inject a double bit error INJECTSBITERR => INJECTSBITERR, -- 1-bit input: Inject a single bit error -- Port A Address/Control Signals: 16-bit (each) input: Port A address and control signals (read port -- when RAM_MODE="SDP") ADDRARDADDR => ADDRARDADDR, -- 16-bit input: A port address/Read address CLKARDCLK => CLKARDCLK, -- 1-bit input: A port clock/Read clock Send Feedback 414 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements ENARDEN => ENARDEN, -- 1-bit input: A port enable/Read enable REGCEAREGCE => REGCEAREGCE, -- 1-bit input: A port register enable/Register enable RSTRAMARSTRAM => RSTRAMARSTRAM, -- 1-bit input: A port set/reset RSTREGARSTREG => RSTREGARSTREG, -- 1-bit input: A port register set/reset WEA => WEA, -- 4-bit input: A port write enable -- Port A Data: 32-bit (each) input: Port A data DIADI => DIADI, -- 32-bit input: A port data/LSB data DIPADIP => DIPADIP, -- 4-bit input: A port parity/LSB parity -- Port B Address/Control Signals: 16-bit (each) input: Port B address and control signals (write port -- when RAM_MODE="SDP") ADDRBWRADDR => ADDRBWRADDR, -- 16-bit input: B port address/Write address CLKBWRCLK => CLKBWRCLK, -- 1-bit input: B port clock/Write clock ENBWREN => ENBWREN, -- 1-bit input: B port enable/Write enable REGCEB => REGCEB, -- 1-bit input: B port register enable RSTRAMB => RSTRAMB, -- 1-bit input: B port set/reset RSTREGB => RSTREGB, -- 1-bit input: B port register set/reset WEBWE => WEBWE, -- 8-bit input: B port write enable/Write enable -- Port B Data: 32-bit (each) input: Port B data DIBDI => DIBDI, -- 32-bit input: B port data/MSB data DIPBDIP => DIPBDIP -- 4-bit input: B port parity/MSB parity ); -- End of RAMB36E1_inst instantiation Verilog Instantiation Template // RAMB36E1: 36K-bit Configurable Synchronous Block RAM // 7 Series // Xilinx HDL Libraries Guide, version 14.7 RAMB36E1 #( // Address Collision Mode: "PERFORMANCE" or "DELAYED_WRITE" .RDADDR_COLLISION_HWCONFIG("DELAYED_WRITE"), // Collision check: Values ("ALL", "WARNING_ONLY", "GENERATE_X_ONLY" or "NONE") .SIM_COLLISION_CHECK("ALL"), // DOA_REG, DOB_REG: Optional output register (0 or 1) .DOA_REG(0), .DOB_REG(0), .EN_ECC_READ("FALSE"), // Enable ECC decoder, // FALSE, TRUE .EN_ECC_WRITE("FALSE"), // Enable ECC encoder, // FALSE, TRUE // INITP_00 to INITP_0F: Initial contents of the parity memory array .INITP_00(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_01(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_02(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_03(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_04(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_05(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_06(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_07(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_08(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_09(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INITP_0F(256'h0000000000000000000000000000000000000000000000000000000000000000), // INIT_00 to INIT_7F: Initial contents of the data memory array .INIT_00(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_01(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_02(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_03(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_04(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_05(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_06(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_07(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_08(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_09(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0A(256'h0000000000000000000000000000000000000000000000000000000000000000), Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 415 Chapter 4: About Design Elements .INIT_0B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_0F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_10(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_11(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_12(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_13(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_14(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_15(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_16(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_17(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_18(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_19(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_1F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_20(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_21(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_22(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_23(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_24(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_25(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_26(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_27(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_28(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_29(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_2F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_30(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_31(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_32(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_33(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_34(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_35(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_36(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_37(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_38(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_39(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_3F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_40(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_41(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_42(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_43(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_44(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_45(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_46(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_47(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_48(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_49(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_4F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_50(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_51(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_52(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_53(256'h0000000000000000000000000000000000000000000000000000000000000000), Send Feedback 416 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements .INIT_54(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_55(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_56(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_57(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_58(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_59(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_5F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_60(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_61(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_62(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_63(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_64(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_65(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_66(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_67(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_68(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_69(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_6F(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_70(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_71(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_72(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_73(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_74(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_75(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_76(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_77(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_78(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_79(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7A(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7B(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7C(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7D(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7E(256'h0000000000000000000000000000000000000000000000000000000000000000), .INIT_7F(256'h0000000000000000000000000000000000000000000000000000000000000000), // INIT_A, INIT_B: Initial values on output ports .INIT_A(36'h000000000), .INIT_B(36'h000000000), // Initialization File: RAM initialization file .INIT_FILE("NONE"), // RAM Mode: "SDP" or "TDP" .RAM_MODE("TDP"), // RAM_EXTENSION_A, RAM_EXTENSION_B: Selects cascade mode ("UPPER", "LOWER", or "NONE") .RAM_EXTENSION_A("NONE"), .RAM_EXTENSION_B("NONE"), // READ_WIDTH_A/B, WRITE_WIDTH_A/B: Read/write width per port .READ_WIDTH_A(0), // 0-72 .READ_WIDTH_B(0), // 0-36 .WRITE_WIDTH_A(0), // 0-36 .WRITE_WIDTH_B(0), // 0-72 // RSTREG_PRIORITY_A, RSTREG_PRIORITY_B: Reset or enable priority ("RSTREG" or "REGCE") .RSTREG_PRIORITY_A("RSTREG"), .RSTREG_PRIORITY_B("RSTREG"), // SRVAL_A, SRVAL_B: Set/reset value for output .SRVAL_A(36'h000000000), .SRVAL_B(36'h000000000), // Simulation Device: Must be set to "7SERIES" for simulation behavior .SIM_DEVICE("7SERIES"), // WriteMode: Value on output upon a write ("WRITE_FIRST", "READ_FIRST", or "NO_CHANGE") .WRITE_MODE_A("WRITE_FIRST"), .WRITE_MODE_B("WRITE_FIRST") ) RAMB36E1_inst ( // Cascade Signals: 1-bit (each) output: BRAM cascade ports (to create 64kx1) Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 417 Chapter 4: About Design Elements .CASCADEOUTA(CASCADEOUTA), // 1-bit output: A port cascade .CASCADEOUTB(CASCADEOUTB), // 1-bit output: B port cascade // ECC Signals: 1-bit (each) output: Error Correction Circuitry ports .DBITERR(DBITERR), // 1-bit output: Double bit error status .ECCPARITY(ECCPARITY), // 8-bit output: Generated error correction parity .RDADDRECC(RDADDRECC), // 9-bit output: ECC read address .SBITERR(SBITERR), // 1-bit output: Single bit error status // Port A Data: 32-bit (each) output: Port A data .DOADO(DOADO), // 32-bit output: A port data/LSB data .DOPADOP(DOPADOP), // 4-bit output: A port parity/LSB parity // Port B Data: 32-bit (each) output: Port B data .DOBDO(DOBDO), // 32-bit output: B port data/MSB data .DOPBDOP(DOPBDOP), // 4-bit output: B port parity/MSB parity // Cascade Signals: 1-bit (each) input: BRAM cascade ports (to create 64kx1) .CASCADEINA(CASCADEINA), // 1-bit input: A port cascade .CASCADEINB(CASCADEINB), // 1-bit input: B port cascade // ECC Signals: 1-bit (each) input: Error Correction Circuitry ports .INJECTDBITERR(INJECTDBITERR), // 1-bit input: Inject a double bit error .INJECTSBITERR(INJECTSBITERR), // 1-bit input: Inject a single bit error // Port A Address/Control Signals: 16-bit (each) input: Port A address and control signals (read port // when RAM_MODE="SDP") .ADDRARDADDR(ADDRARDADDR), // 16-bit input: A port address/Read address .CLKARDCLK(CLKARDCLK), // 1-bit input: A port clock/Read clock .ENARDEN(ENARDEN), // 1-bit input: A port enable/Read enable .REGCEAREGCE(REGCEAREGCE), // 1-bit input: A port register enable/Register enable .RSTRAMARSTRAM(RSTRAMARSTRAM), // 1-bit input: A port set/reset .RSTREGARSTREG(RSTREGARSTREG), // 1-bit input: A port register set/reset .WEA(WEA), // 4-bit input: A port write enable // Port A Data: 32-bit (each) input: Port A data .DIADI(DIADI), // 32-bit input: A port data/LSB data .DIPADIP(DIPADIP), // 4-bit input: A port parity/LSB parity // Port B Address/Control Signals: 16-bit (each) input: Port B address and control signals (write port // when RAM_MODE="SDP") .ADDRBWRADDR(ADDRBWRADDR), // 16-bit input: B port address/Write address .CLKBWRCLK(CLKBWRCLK), // 1-bit input: B port clock/Write clock .ENBWREN(ENBWREN), // 1-bit input: B port enable/Write enable .REGCEB(REGCEB), // 1-bit input: B port register enable .RSTRAMB(RSTRAMB), // 1-bit input: B port set/reset .RSTREGB(RSTREGB), // 1-bit input: B port register set/reset .WEBWE(WEBWE), // 8-bit input: B port write enable/Write enable // Port B Data: 32-bit (each) input: Port B data .DIBDI(DIBDI), // 32-bit input: B port data/MSB data .DIPBDIP(DIPBDIP) // 4-bit input: B port parity/MSB parity ); // End of RAMB36E1_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 418 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 ROM128X1 Primitive: 128-Deep by 1-Wide ROM Chapter 4: About Design Elements Introduction This design element is a 128-word by 1-bit read-only memory. The data output (O) reflects the word selected by the 7-bit address (A6:A0). The ROM is initialized to a known value during configuration with the INIT=value parameter. The value consists of 32 hexadecimal digits that are written into the ROM from the most-significant digit A=FH to the least-significant digit A=0H. An error occurs if the INIT=value is not specified. Logic Table Input I0 I1 I2 I3 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 Output O INIT(0) INIT(1) INIT(2) INIT(3) INIT(4) INIT(5) INIT(6) INIT(7) INIT(8) INIT(9) INIT(10) INIT(11) INIT(12) INIT(13) INIT(14) INIT(15) Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 419 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 128-Bit Value Default All zeros Description Specifies the contents of the ROM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- ROM128X1: 128 x 1 Asynchronous Distributed (LUT) ROM -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 ROM128X1_inst : ROM128X1 generic map ( INIT => X"00000000000000000000000000000000") port map ( O => O, -- ROM output A0 => A0, -- ROM address[0] A1 => A1, -- ROM address[1] A2 => A2, -- ROM address[2] A3 => A3, -- ROM address[3] A4 => A4, -- ROM address[4] A5 => A5, -- ROM address[5] A6 => A6 -- ROM address[6] ); -- End of ROM128X1_inst instantiation Verilog Instantiation Template // ROM128X1: 128 x 1 Asynchronous Distributed (LUT) ROM (Mapped to two SliceM LUT6s) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ROM128X1 #( .INIT(128'h00000000000000000000000000000000) // Contents of ROM ) ROM128X1_inst ( .O(O), // ROM output .A0(A0), // ROM address[0] .A1(A1), // ROM address[1] .A2(A2), // ROM address[2] .A3(A3), // ROM address[3] .A4(A4), // ROM address[4] .A5(A5), // ROM address[5] .A6(A6) // ROM address[6] ); // End of ROM128X1_inst instantiation Send Feedback 420 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 421 Chapter 4: About Design Elements ROM256X1 Primitive: 256-Deep by 1-Wide ROM Introduction This design element is a 256-word by 1-bit read-only memory. The data output (O) reflects the word selected by the 8-bit address (A7:A0). The ROM is initialized to a known value during configuration with the INIT=value parameter. The value consists of 64 hexadecimal digits that are written into the ROM from the most-significant digit A=FH to the least-significant digit A=0H. An error occurs if the INIT=value is not specified. Logic Table Input I0 I1 I2 I3 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 Output O INIT(0) INIT(1) INIT(2) INIT(3) INIT(4) INIT(5) INIT(6) INIT(7) INIT(8) INIT(9) INIT(10) INIT(11) INIT(12) INIT(13) INIT(14) INIT(15) Send Feedback 422 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 256-Bit Value Default All zeros Description Specifies the contents of the ROM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- ROM256X1: 256 x 1 Asynchronous Distributed (LUT) ROM -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 ROM256X1_inst : ROM256X1 generic map ( INIT => X"0000000000000000000000000000000000000000000000000000000000000000") port map ( O => O, -- ROM output A0 => A0, -- ROM address[0] A1 => A1, -- ROM address[1] A2 => A2, -- ROM address[2] A3 => A3, -- ROM address[3] A4 => A4, -- ROM address[4] A5 => A5, -- ROM address[5] A6 => A6, -- ROM address[6] A7 => A7 -- ROM address[7] ); -- End of ROM256X1_inst instantiation Verilog Instantiation Template // ROM256X1: 256 x 1 Asynchronous Distributed (LUT) ROM (Mapped to four SliceM LUT6s) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ROM256X1 #( .INIT(256'h0000000000000000000000000000000000000000000000000000000000000000) // Contents of ROM ) ROM256X1_inst ( .O(O), // ROM output .A0(A0), // ROM address[0] .A1(A1), // ROM address[1] .A2(A2), // ROM address[2] .A3(A3), // ROM address[3] .A4(A4), // ROM address[4] .A5(A5), // ROM address[5] .A6(A6), // ROM address[6] .A7(A7) // ROM address[7] ); // End of ROM256X1_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 423 Chapter 4: About Design Elements For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 424 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 ROM32X1 Primitive: 32-Deep by 1-Wide ROM Chapter 4: About Design Elements Introduction This design element is a 32-word by 1-bit read-only memory. The data output (O) reflects the word selected by the 5-bit address (A4:A0). The ROM is initialized to a known value during configuration with the INIT=value parameter. The value consists of eight hexadecimal digits that are written into the ROM from the most-significant digit A=1FH to the least-significant digit A=00H. For example, the INIT=10A78F39 parameter produces the data stream: 0001 0000 1010 0111 1000 1111 0011 1001. An error occurs if the INIT=value is not specified. Logic Table Input I0 I1 I2 I3 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 Output O INIT(0) INIT(1) INIT(2) INIT(3) INIT(4) INIT(5) INIT(6) INIT(7) INIT(8) INIT(9) INIT(10) INIT(11) INIT(12) INIT(13) INIT(14) INIT(15) Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 425 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Type Hexadecimal Allowed Values Any 32-Bit Value Default All zeros Description Specifies the contents of the ROM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- ROM32X1: 32 x 1 Asynchronous Distributed (LUT) ROM -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 ROM32X1_inst : ROM32X1 generic map ( INIT => X"00000000") port map ( O => O, -- ROM output A0 => A0, -- ROM address[0] A1 => A1, -- ROM address[1] A2 => A2, -- ROM address[2] A3 => A3, -- ROM address[3] A4 => A4 -- ROM address[4] ); -- End of ROM32X1_inst instantiation Verilog Instantiation Template // ROM32X1: 32 x 1 Asynchronous Distributed (LUT) ROM (Mapped to a SliceM LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ROM32X1 #( .INIT(32'h00000000) // Contents of ROM ) ROM32X1_inst ( .O(O), // ROM output .A0(A0), // ROM address[0] .A1(A1), // ROM address[1] .A2(A2), // ROM address[2] .A3(A3), // ROM address[3] .A4(A4) // ROM address[4] ); // End of ROM32X1_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 426 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 ROM64X1 Primitive: 64-Deep by 1-Wide ROM Chapter 4: About Design Elements Introduction This design element is a 64-word by 1-bit read-only memory. The data output (O) reflects the word selected by the 6-bit address (A5:A0). The ROM is initialized to a known value during configuration with the INIT=value parameter. The value consists of 16 hexadecimal digits that are written into the ROM from the most-significant digit A=FH to the least-significant digit A=0H. An error occurs if the INIT=value is not specified. Logic Table Input Output I0 I1 I2 I3 O 0 0 0 0 INIT(0) 0 0 0 1 INIT(1) 0 0 1 0 INIT(2) 0 0 1 1 INIT(3) 0 1 0 0 INIT(4) 0 1 0 1 INIT(5) 0 1 1 0 INIT(6) 0 1 1 1 INIT(7) 1 0 0 0 INIT(8) 1 0 0 1 INIT(9) 1 0 1 0 INIT(10) 1 0 1 1 INIT(11) 1 1 0 0 INIT(12) 1 1 0 1 INIT(13) 1 1 1 0 INIT(14) 1 1 1 1 INIT(15) Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 427 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 64-Bit Value Default All zeros Description Specifies the contents of the ROM. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- ROM64X1: 64 x 1 Asynchronous Distributed (LUT) ROM -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 ROM64X1_inst : ROM64X1 generic map ( INIT => X"0000000000000000") port map ( O => O, -- ROM output A0 => A0, -- ROM address[0] A1 => A1, -- ROM address[1] A2 => A2, -- ROM address[2] A3 => A3, -- ROM address[3] A4 => A4, -- ROM address[4] A5 => A5 -- ROM address[5] ); -- End of ROM64X1_inst instantiation Verilog Instantiation Template // ROM64X1: 64 x 1 Asynchronous Distributed (LUT) ROM (Mapped to a SliceM LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 ROM64X1 #( .INIT(64'h0000000000000000) // Contents of ROM ) ROM64X1_inst ( .O(O), // ROM output .A0(A0), // ROM address[0] .A1(A1), // ROM address[1] .A2(A2), // ROM address[2] .A3(A3), // ROM address[3] .A4(A4), // ROM address[4] .A5(A5) // ROM address[5] ); // End of ROM64X1_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 428 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements SRL16E Primitive: 16-Bit Shift Register Look-Up Table (LUT) with Clock Enable Introduction This design element is a shift register look-up table (LUT). The inputs A3, A2, A1, and A0 select the output length of the shift register. The shift register can be of a fixed, static length or it can be dynamically adjusted. • To create a fixed-length shift register -Drive the A3 through A0 inputs with static values. The length of the shift register can vary from 1 bit to 16 bits, as determined by the following formula: Length = (8 x A3) +(4 x A2) + (2 x A1) + A0 +1 If A3, A2, A1, and A0 are all zeros (0000), the shift register is one bit long. If they are all ones (1111), it is 16 bits long. • To change the length of the shift register dynamically -Change the values driving the A3 through A0 inputs. For example, if A2, A1, and A0 are all ones (111) and A3 toggles between a one (1) and a zero (0), the length of the shift register changes from 16 bits to 8 bits. Internally, the length of the shift register is always 16 bits and the input lines A3 through A0 select which of the 16 bits reach the output. The shift register LUT contents are initialized by assigning a four-digit hexadecimal number to an INIT attribute. The first, or the left-most, hexadecimal digit is the most significant bit. If an INIT value is not specified, it defaults to a value of four zeros (0000) so that the shift register LUT is cleared during configuration. When CE is High, the data (D) is loaded into the first bit of the shift register during the Low-to-High clock (CLK) transition. During subsequent Low-to-High clock transitions, when CE is High, data shifts to the next highest bit position as new data is loaded. The data appears on the Q output when the shift register length determined by the address inputs is reached. When CE is Low, the register ignores clock transitions. Logic Table Inputs Am CE Am 0 Am 1 m= 0, 1, 2, 3 CLK D X X ↑ D Output Q Q(Am) Q(Am - 1) Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 429 Chapter 4: About Design Elements Port Descriptions Port Q D CLK CE A0 A1 A2 A3 Direction Output Input Input Input Input Input Input Input Width 1 1 1 1 1 1 1 1 Function Shift register data output Shift register data input Clock Active high clock enable Select[0] input Select[1] input Select[2] input Select[3] input Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No Available Attributes Attribute INIT Data Type Hexadecimal Allowed Values Any 16-Bit Value Default All zeros Description Sets the initial value of content and output of shift register after configuration. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- SRL16E: 16-bit shift register LUT with clock enable operating on posedge of clock (Mapped to SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 SRL16E_inst : SRL16E generic map ( INIT => X"0000") port map ( Q => Q, -- SRL data output A0 => A0, -- Select[0] input A1 => A1, -- Select[1] input A2 => A2, -- Select[2] input A3 => A3, -- Select[3] input CE => CE, -- Clock enable input CLK => CLK, -- Clock input D => D -- SRL data input ); -- End of SRL16E_inst instantiation Send Feedback 430 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // SRL16E: 16-bit shift register LUT with clock enable operating on posedge of clock (Mapped to a SliceM LUT6) // 7 Series // Xilinx HDL Libraries Guide, version 14.7 SRL16E #( .INIT(16'h0000) // Initial Value of Shift Register ) SRL16E_inst ( .Q(Q), // SRL data output .A0(A0), // Select[0] input .A1(A1), // Select[1] input .A2(A2), // Select[2] input .A3(A3), // Select[3] input .CE(CE), // Clock enable input .CLK(CLK), // Clock input .D(D) // SRL data input ); // End of SRL16E_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 431 Chapter 4: About Design Elements SRLC32E Primitive: 32 Clock Cycle, Variable Length Shift Register Look-Up Table (LUT) with Clock Enable Introduction This design element is a variable length, 1 to 32 clock cycle shift register implemented within a single look-up table (LUT). The shift register can be of a fixed length, static length, or it can be dynamically adjusted by changing the address lines to the component. This element also features an active-high clock enable and a cascading feature in which multiple SRLC32Es can be cascaded in order to create greater shift lengths. Port Descriptions Port Q Q31 Direction Output Output D CLK CE A Input Input Input Input Width 1 1 1 1 1 5 Function Shift register data output Shift register cascaded output (connect to the D input of a subsequent SRLC32E) Shift register data input Clock Active high clock enable Dynamic depth selection of the SRL A=00000 ==> 1-bit shift length A=11111 ==> 32-bit shift length Send Feedback 432 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes Recommended No No If instantiated, the following connections should be made to this component: • Connect the CLK input to the desired clock source, the D input to the data source to be shifted/stored and the Q output to either an FDCE or an FDRE input or other appropriate data destination. • The CE clock enable pin can be connected to a clock enable signal in the design or else tied to a logic one if not used. • The 5-bit A bus can either be tied to a static value between 0 and 31 to signify a fixed 1 to 32 bit static shift length, or else it can be tied to the appropriate logic to enable a varying shift depth anywhere between 1 and 32 bits. • If you want to create a longer shift length than 32, connect the Q31 output pin to the D input pin of a subsequent SRLC32E to cascade and create larger shift registers. • It is not valid to connect the Q31 output to anything other than another SRLC32E. • The selectable Q output is still available in the cascaded mode, if needed. • An optional INIT attribute consisting of a 32-bit Hexadecimal value can be specified to indicate the initial shift pattern of the shift register. • (INIT[0] will be the first value shifted out.) Available Attributes Attribute INIT Type Hexadecimal Allowed Values Any 32-Bit Value Default All zeros Description Specifies the initial shift pattern of the SRLC32E. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- SRLC32E: 32-bit variable length shift register LUT -- with clock enable (Mapped to a SliceM LUT6) -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 SRLC32E_inst : SRLC32E generic map ( INIT => X"00000000") port map ( Q => Q, -- SRL data output Q31 => Q31, -- SRL cascade output pin A => A, -- 5-bit shift depth select input CE => CE, -- Clock enable input CLK => CLK, -- Clock input D => D -- SRL data input ); -- End of SRLC32E_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 433 Chapter 4: About Design Elements Verilog Instantiation Template // SRLC32E: 32-bit variable length cascadable shift register LUT // with clock enable // 7 Series // Xilinx HDL Libraries Guide, version 14.7 (Mapped to a SliceM LUT6) SRLC32E #( .INIT(32'h00000000) // Initial Value of Shift Register ) SRLC32E_inst ( .Q(Q), // SRL data output .Q31(Q31), // SRL cascade output pin .A(A), // 5-bit shift depth select input .CE(CE), // Clock enable input .CLK(CLK), // Clock input .D(D) // SRL data input ); // End of SRLC32E_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 434 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 STARTUPE2 Primitive: STARTUP Block Chapter 4: About Design Elements Introduction This design element is used to interface device pins and logic to the global asynchronous set/reset (GSR) signal, the global 3-state (GTS) dedicated routing or the internal configuration signals or a few of the dedicated configuration pins. Port Descriptions Port CFGCLK CFGMCLK CLK EOS GSR GTS KEYCLEARB PACK PREQ USRCCLKO USRCCLKTS USRDONEO USRDONETS Type Output Output Input Output Input Input Input Input Output Input Input Input Input Width 1 1 1 1 1 1 1 1 1 1 1 1 1 Function Configuration main clock output Configuration internal oscillator clock output User start-up clock input Active high output signal indicating the End Of Startup. Global Set/Reset input (GSR cannot be used for the port name) Global 3-state input (GTS cannot be used for the port name) Clear AES Decrypter Key input from Battery-Backed RAM (BBRAM) PROGRAM acknowledge input PROGRAM request to fabric output User CCLK input User CCLK 3-state enable input User DONE pin output control User DONE 3-state enable output Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 435 Chapter 4: About Design Elements Available Attributes Attribute PROG_USR Type STRING Allowed Values "FALSE", "TRUE" SIM_CCLK_FREQ FLOAT(nS) 0.0 to 10.0 Default "FALSE" 0.0 Description Activate program event security feature. Requires encrypted bitstreams. Set the Configuration Clock Frequency(ns) for simulation. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- STARTUPE2: STARTUP Block -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 STARTUPE2_inst : STARTUPE2 generic map ( PROG_USR => "FALSE", -- Activate program event security feature. Requires encrypted bitstreams. SIM_CCLK_FREQ => 0.0 -- Set the Configuration Clock Frequency(ns) for simulation. ) port map ( CFGCLK => CFGCLK, -- 1-bit output: Configuration main clock output CFGMCLK => CFGMCLK, -- 1-bit output: Configuration internal oscillator clock output EOS => EOS, -- 1-bit output: Active high output signal indicating the End Of Startup. PREQ => PREQ, -- 1-bit output: PROGRAM request to fabric output CLK => CLK, -- 1-bit input: User start-up clock input GSR => GSR, -- 1-bit input: Global Set/Reset input (GSR cannot be used for the port name) GTS => GTS, -- 1-bit input: Global 3-state input (GTS cannot be used for the port name) KEYCLEARB => KEYCLEARB, -- 1-bit input: Clear AES Decrypter Key input from Battery-Backed RAM (BBRAM) PACK => PACK, -- 1-bit input: PROGRAM acknowledge input USRCCLKO => USRCCLKO, -- 1-bit input: User CCLK input USRCCLKTS => USRCCLKTS, -- 1-bit input: User CCLK 3-state enable input USRDONEO => USRDONEO, -- 1-bit input: User DONE pin output control USRDONETS => USRDONETS -- 1-bit input: User DONE 3-state enable output ); -- End of STARTUPE2_inst instantiation Verilog Instantiation Template // STARTUPE2: STARTUP Block // 7 Series // Xilinx HDL Libraries Guide, version 14.7 STARTUPE2 #( .PROG_USR("FALSE"), // Activate program event security feature. Requires encrypted bitstreams. .SIM_CCLK_FREQ(0.0) // Set the Configuration Clock Frequency(ns) for simulation. ) STARTUPE2_inst ( .CFGCLK(CFGCLK), // 1-bit output: Configuration main clock output .CFGMCLK(CFGMCLK), // 1-bit output: Configuration internal oscillator clock output .EOS(EOS), // 1-bit output: Active high output signal indicating the End Of Startup. .PREQ(PREQ), // 1-bit output: PROGRAM request to fabric output .CLK(CLK), // 1-bit input: User start-up clock input .GSR(GSR), // 1-bit input: Global Set/Reset input (GSR cannot be used for the port name) .GTS(GTS), // 1-bit input: Global 3-state input (GTS cannot be used for the port name) .KEYCLEARB(KEYCLEARB), // 1-bit input: Clear AES Decrypter Key input from Battery-Backed RAM (BBRAM) .PACK(PACK), // 1-bit input: PROGRAM acknowledge input .USRCCLKO(USRCCLKO), // 1-bit input: User CCLK input .USRCCLKTS(USRCCLKTS), // 1-bit input: User CCLK 3-state enable input .USRDONEO(USRDONEO), // 1-bit input: User DONE pin output control .USRDONETS(USRDONETS) // 1-bit input: User DONE 3-state enable output Send Feedback 436 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements ); // End of STARTUPE2_inst instantiation For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 437 Chapter 4: About Design Elements USR_ACCESSE2 Primitive: Configuration Data Access Introduction This design element enables you to access a 32-bit register within the configuration logic. This enables fabric to access data that can be set from the bitstream. Port Descriptions Port CFGCLK DATA<31:0> DATAVALID Type Output Output Output Width 1 32 1 Function Configuration Clock output Configuration Data output Active high data valid output Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Recommended No No No VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Library UNISIM; use UNISIM.vcomponents.all; -- USR_ACCESSE2: Configuration Data Access -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 USR_ACCESSE2_inst : USR_ACCESSE2 port map ( CFGCLK => CFGCLK, -- 1-bit output: Configuration Clock output DATA => DATA, -- 32-bit output: Configuration Data output DATAVALID => DATAVALID -- 1-bit output: Active high data valid output ); -- End of USR_ACCESSE2_inst instantiation Send Feedback 438 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // USR_ACCESSE2: Configuration Data Access // 7 Series // Xilinx HDL Libraries Guide, version 14.7 USR_ACCESSE2 USR_ACCESSE2_inst ( .CFGCLK(CFGCLK), // 1-bit output: Configuration Clock output .DATA(DATA), // 32-bit output: Configuration Data output .DATAVALID(DATAVALID) // 1-bit output: Active high data valid output ); // End of USR_ACCESSE2_inst instantiation For More Information • See the 7 Series FPGA SelectIO Resources User Guide (UG471). • See the 7 Series FPGA User Documentation (User Guides and Data Sheets). Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 439 Chapter 4: About Design Elements XADC Primitive: Dual 12-Bit 1MSPS Analog-to-Digital Converter Introduction The XADC includes a dual 12-bit, 1 Mega sample per second (MSPS) ADC and on-chip sensors. These ADCs are fully tested and specified (see the respective 7 series FPGAs data sheet). The ADCs provide a general-purpose, high-precision analog interface for a range of applications. The dual ADCs support a range of operating modes, for example, externally triggered and simultaneous sampling on both ADCs and various analog input signal types, for example, unipolar and differential. The ADCs can access up to 17 external analog input channels. The XADC also includes a number of on-chip sensors that support measurement of the on-chip power supply voltages and die temperature. The ADC conversion data is stored in dedicated registers called status registers. These registers are accessible via the FPGA interconnect using a 16-bit synchronous read and write port called the Dynamic Reconfiguration Port (DRP). ADC conversion data is also accessible via the JTAG TAP. In the latter case, users are not required to instantiate the XADC because it is a dedicated interface that uses the existing FPGA JTAG infrastructure. If the XADC is not instantiated in a design, the device operates in a predefined mode (called default mode) that monitors on-chip temperature and supply voltages. XADC operation is user defined by writing to the control registers using either the DRP or JTAG interface. It is also possible to initialize these register contents when the XADC is instantiated in a design using the block attributes. Port Descriptions Port ALM<7:0> Type Output BUSY Output CHANNEL<4:0> Output Width 8 1 5 Function Output alarm for temperature, Vccint, Vccaux and Vccbram. • ALM[0] - XADC temperature sensor alarm output. • ALM[1] - XADC Vccint sensor alarm output. • ALM[2] - XADC Vccaux sensor alarm output. • ALM[3] - XADC Vccbram sensor alarm output. • ALM[6:4] - Not defined. ADC busy signal. This signal transitions High during an ADC conversion. This signal also transitions High for an extended period during an ADC or sensor calibration. Channel 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. Send Feedback 440 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Port CONVST Type Input CONVSTCLK Input DADDR<6:0> DCLK DEN DI<15:0> DO<15:0> DRDY DWE EOC Input Input Input Input Output Output Input Output EOS Output JTAGBUSY JTAGLOCKED Output Output JTAGMODIFIED Output MUXADDR<4:0> Output OT RESET VAUXN<15:0> VAUXP<15:0> VN VP Output Input Input Input Input Input Width 1 1 7 1 1 16 16 1 1 1 1 1 1 1 5 1 1 16 16 1 1 Function Convert start input. This input controls the sampling instant on the ADC(s) input and is only used in event mode timing. This input comes from the general-purpose interconnect in the FPGA logic. Convert start clock input. This input is connected to a clock net. Like CONVST, this input controls the sampling instant on the ADC(s) inputs and is only used in event mode timing. This input comes from the local clock distribution network in the FPGA logic. Thus, for the best control over the sampling instant (delay and jitter), a global clock input can be used as the CONVST source. Address bus for the dynamic reconfiguration port. Clock input for the dynamic reconfiguration port. Enable signal for the dynamic reconfiguration port. Input data bus for the dynamic reconfiguration port. Output data bus for dynamic reconfiguration port. Data ready signal for the dynamic reconfiguration port. Write enable for the dynamic reconfiguration port. End of Conversion signal. This signal transitions to an active High at the end of an ADC conversion when the measurement is written to the status registers. End of Sequence. This signal transitions to active High when the measurement data from the last channel in an automatic channel sequence is written to the status registers. Used to indicate that a JTAG DRP transaction is in progress. Indicates that a DRP port lock request has been made by the JTAG interface. This signal is also used to indicate that the DRP is ready for access (when Low). Used to indicate that a JTAG Write to the DRP has occurred. These outputs are used in external multiplexer mode. They indicate the address of the next channel in a sequence to be converted. They provide the channel address for an external multiplexer. Over-Temperature alarm Reset signal for the XADC control logic. N-side auxiliary analog input P-side auxiliary analog input N-side analog input P-side analog input Design Entry Method Instantiation Inference CORE Generator™ and wizards Macro support Yes No Recommended No Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 441 Chapter 4: About Design Elements Available Attributes Attribute INIT_4A INIT_4B INIT_4C INIT_4D INIT_4E INIT_4F INIT_5C INIT_40 INIT_41 INIT_42 INIT_43 INIT_44 INIT_45 INIT_46 INIT_47 INIT_48 INIT_49 INIT_50 INIT_51 INIT_52 INIT_53 INIT_54 INIT_55 INIT_56 INIT_57 INIT_58 INIT_59, INIT_5A, INIT_5B, INIT_5D, INIT_5E, INIT_5F SIM_DEVICE Type HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX STRING Allowed Values 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff 16'h0000 to 16'hffff "7SERIES", "ZYNQ" Default 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0800 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 16'h0000 "7SERIES" SIM_MONITOR STRING _FILE String representing file "design.txt" name and location Description Sequence register 2 Sequence register 3 Sequence register 4 Sequence register 5 Sequence register 6 Sequence register 7 Vbram lower alarm threshold Configuration register 0 Configuration register 1 Configuration register 2 Test register 0 Test register 1 Test register 2 Test register 3 Test register 4 Sequence register 0 Sequence register 1 Alarm limit register 0 Alarm limit register 1 Alarm limit register 2 Alarm limit register 3 Alarm limit register 4 Alarm limit register 5 Alarm limit register 6 Alarm limit register 7 Vbram upper alarm threshold Reserved for future use Selects target device to allow for proper simulation. Specify the file name (and directory if different from simulation directory) of file containing analog voltage and temperature data for XADC simulation behavior. VHDL Instantiation Template Unless they already exist, copy the following two statements and paste them before the entity declaration. Send Feedback 442 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Library UNISIM; use UNISIM.vcomponents.all; -- XADC: Dual 12-Bit 1MSPS Analog-to-Digital Converter -- 7 Series -- Xilinx HDL Libraries Guide, version 14.7 XADC_inst : XADC generic map ( -- INIT_40 - INIT_42: XADC configuration registers INIT_40 => X"0000", INIT_41 => X"0000", INIT_42 => X"0800", -- INIT_48 - INIT_4F: Sequence Registers INIT_48 => X"0000", INIT_49 => X"0000", INIT_4A => X"0000", INIT_4B => X"0000", INIT_4C => X"0000", INIT_4D => X"0000", INIT_4F => X"0000", INIT_4E => X"0000", -- Sequence register 6 -- INIT_50 - INIT_58, INIT5C: Alarm Limit Registers INIT_50 => X"0000", INIT_51 => X"0000", INIT_52 => X"0000", INIT_53 => X"0000", INIT_54 => X"0000", INIT_55 => X"0000", INIT_56 => X"0000", INIT_57 => X"0000", INIT_58 => X"0000", INIT_5C => X"0000", -- Simulation attributes: Set for proper simulation behavior SIM_DEVICE => "7SERIES", -- Select target device (values) SIM_MONITOR_FILE => ""design.txt"" -- Analog simulation data file name ) port map ( -- ALARMS: 8-bit (each) output: ALM, OT ALM => ALM, -- 8-bit output: Output alarm for temp, Vccint, Vccaux and Vccbram OT => OT, -- 1-bit output: Over-Temperature alarm -- Dynamic Reconfiguration Port (DRP): 16-bit (each) output: Dynamic Reconfiguration Ports DO => DO, -- 16-bit output: DRP output data bus DRDY => DRDY, -- 1-bit output: DRP data ready -- STATUS: 1-bit (each) output: XADC status ports BUSY => BUSY, -- 1-bit output: ADC busy output CHANNEL => CHANNEL, -- 5-bit output: Channel selection outputs EOC => EOC, -- 1-bit output: End of Conversion EOS => EOS, -- 1-bit output: End of Sequence JTAGBUSY => JTAGBUSY, -- 1-bit output: JTAG DRP transaction in progress output JTAGLOCKED => JTAGLOCKED, -- 1-bit output: JTAG requested DRP port lock JTAGMODIFIED => JTAGMODIFIED, -- 1-bit output: JTAG Write to the DRP has occurred MUXADDR => MUXADDR, -- 5-bit output: External MUX channel decode -- Auxiliary Analog-Input Pairs: 16-bit (each) input: VAUXP[15:0], VAUXN[15:0] VAUXN => VAUXN, -- 16-bit input: N-side auxiliary analog input VAUXP => VAUXP, -- 16-bit input: P-side auxiliary analog input -- CONTROL and CLOCK: 1-bit (each) input: Reset, conversion start and clock inputs CONVST => CONVST, -- 1-bit input: Convert start input CONVSTCLK => CONVSTCLK, -- 1-bit input: Convert start input RESET => RESET, -- 1-bit input: Active-high reset -- Dedicated Analog Input Pair: 1-bit (each) input: VP/VN VN => VN, -- 1-bit input: N-side analog input VP => VP, -- 1-bit input: P-side analog input -- Dynamic Reconfiguration Port (DRP): 7-bit (each) input: Dynamic Reconfiguration Ports DADDR => DADDR, -- 7-bit input: DRP address bus DCLK => DCLK, -- 1-bit input: DRP clock DEN => DEN, -- 1-bit input: DRP enable signal DI => DI, -- 16-bit input: DRP input data bus DWE => DWE -- 1-bit input: DRP write enable ); -- End of XADC_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 443 Chapter 4: About Design Elements Send Feedback 444 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013 Chapter 4: About Design Elements Verilog Instantiation Template // XADC: Dual 12-Bit 1MSPS Analog-to-Digital Converter // 7 Series // Xilinx HDL Libraries Guide, version 14.7 XADC #( // INIT_40 - INIT_42: XADC configuration registers .INIT_40(16'h0000), .INIT_41(16'h0000), .INIT_42(16'h0800), // INIT_48 - INIT_4F: Sequence Registers .INIT_48(16'h0000), .INIT_49(16'h0000), .INIT_4A(16'h0000), .INIT_4B(16'h0000), .INIT_4C(16'h0000), .INIT_4D(16'h0000), .INIT_4F(16'h0000), .INIT_4E(16'h0000), // Sequence register 6 // INIT_50 - INIT_58, INIT5C: Alarm Limit Registers .INIT_50(16'h0000), .INIT_51(16'h0000), .INIT_52(16'h0000), .INIT_53(16'h0000), .INIT_54(16'h0000), .INIT_55(16'h0000), .INIT_56(16'h0000), .INIT_57(16'h0000), .INIT_58(16'h0000), .INIT_5C(16'h0000), // Simulation attributes: Set for proper simulation behavior .SIM_DEVICE("7SERIES"), // Select target device (values) .SIM_MONITOR_FILE(""design.txt"") // Analog simulation data file name ) XADC_inst ( // ALARMS: 8-bit (each) output: ALM, OT .ALM(ALM), // 8-bit output: Output alarm for temp, Vccint, Vccaux and Vccbram .OT(OT), // 1-bit output: Over-Temperature alarm // Dynamic Reconfiguration Port (DRP): 16-bit (each) output: Dynamic Reconfiguration Ports .DO(DO), // 16-bit output: DRP output data bus .DRDY(DRDY), // 1-bit output: DRP data ready // STATUS: 1-bit (each) output: XADC status ports .BUSY(BUSY), // 1-bit output: ADC busy output .CHANNEL(CHANNEL), // 5-bit output: Channel selection outputs .EOC(EOC), // 1-bit output: End of Conversion .EOS(EOS), // 1-bit output: End of Sequence .JTAGBUSY(JTAGBUSY), // 1-bit output: JTAG DRP transaction in progress output .JTAGLOCKED(JTAGLOCKED), // 1-bit output: JTAG requested DRP port lock .JTAGMODIFIED(JTAGMODIFIED), // 1-bit output: JTAG Write to the DRP has occurred .MUXADDR(MUXADDR), // 5-bit output: External MUX channel decode // Auxiliary Analog-Input Pairs: 16-bit (each) input: VAUXP[15:0], VAUXN[15:0] .VAUXN(VAUXN), // 16-bit input: N-side auxiliary analog input .VAUXP(VAUXP), // 16-bit input: P-side auxiliary analog input // CONTROL and CLOCK: 1-bit (each) input: Reset, conversion start and clock inputs .CONVST(CONVST), // 1-bit input: Convert start input .CONVSTCLK(CONVSTCLK), // 1-bit input: Convert start input .RESET(RESET), // 1-bit input: Active-high reset // Dedicated Analog Input Pair: 1-bit (each) input: VP/VN .VN(VN), // 1-bit input: N-side analog input .VP(VP), // 1-bit input: P-side analog input // Dynamic Reconfiguration Port (DRP): 7-bit (each) input: Dynamic Reconfiguration Ports .DADDR(DADDR), // 7-bit input: DRP address bus .DCLK(DCLK), // 1-bit input: DRP clock .DEN(DEN), // 1-bit input: DRP enable signal .DI(DI), // 16-bit input: DRP input data bus .DWE(DWE) // 1-bit input: DRP write enable ); // End of XADC_inst instantiation Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs UG768 (v14.7) October 2, 2013 www.xilinx.com Send Feedback 445 Chapter 4: About Design Elements For More Information See the 7 series FPGA User Documentation (User Guides and Data Sheets). Send Feedback 446 Xilinx 7 Series FPGA and Zynq-7000 All Programmable SoC Libraries Guide for HDL Designs www.xilinx.com UG768 (v14.7) October 2, 2013

    Top_arrow
    回到顶部
    EEWORLD下载中心所有资源均来自网友分享,如有侵权,请发送举报邮件到客服邮箱bbs_service@eeworld.com.cn 或通过站内短信息或QQ:273568022联系管理员 高进,我们会尽快处理。