05.07.2013 Views

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Specifying INITs and RLOCs in HDL Code<br />

FPGA Optimization<br />

Using UNISIM library allows you to directly instantiate LUT<br />

components in your HDL code. To specify a function that a particular<br />

LUT must execute, apply an INIT constraint to the instance of the<br />

LUT. If you want to place an instantiated LUT or register in a<br />

particular slice of the chip, then attach an RLOC constraint to the<br />

same instance.<br />

It is not always convenient to calculate INIT functions and different<br />

methods to can be used to achieve this. Instead, you can describe the<br />

function that you want to map onto a single LUT in your VHDL or<br />

Verilog code in a separate block. Attaching a LUT_MAP constraint<br />

(XST is able to automatically recognize the XC_MAP constraint<br />

supported by Synplicity) to this block will indicate to XST that this<br />

block must be mapped on a single LUT. XST will automatically<br />

calculate the INIT value for the LUT and preserve this LUT during<br />

optimization. In the following VHDL example the "top" block<br />

contains the instantiation of two AND gates, described in "my_and"<br />

and "my_or" blocks. XST generates two LUT2s and does not merge<br />

them. Please refer to the LUT_MAP constraint description in the<br />

Constraint <strong>Guide</strong> for details.<br />

library ieee;<br />

use ieee.std_logic_1164.all;<br />

entity my_and is<br />

port ( A, B : in std_logic;<br />

REZ : out std_logic);<br />

attribute LUT_MAP: string;<br />

attribute LUT_MAP of my_and: entity is "yes";<br />

end my_and;<br />

architecture beh of my_and is<br />

begin<br />

REZ

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!