01.07.2013 Views

Xilinx Constraints Guide

Xilinx Constraints Guide

Xilinx Constraints 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.

Chapter 2: Entry Strategies for <strong>Xilinx</strong> <strong>Constraints</strong><br />

UCF and NCF File Syntax<br />

Logical constraints are found in:<br />

• The Netlist <strong>Constraints</strong> File (NCF), an ASCII file typically generated by synthesis<br />

programs<br />

• The User <strong>Constraints</strong> File (UCF), an ASCII file generated by the user<br />

<strong>Xilinx</strong>® recommends that you place user-generated constraints in the UCF or NCF files<br />

and not in the Physical <strong>Constraints</strong> File (PCF) file.<br />

General Rules for UCF and NCF<br />

• UCF and NCF files are case sensitive. Identifier names (names of objects, such as<br />

net names) must exactly match the case of the name as it exists in the source design<br />

netlist. However, any <strong>Xilinx</strong> constraint keyword (for example, LOC, PERIOD,<br />

HIGH, LOW) may be entered in all uppercase, all lowercase, or mixed case.<br />

• Each statement is terminated by a semicolon (;).<br />

• No continuation characters are necessary if a statement exceeds one line, since a<br />

semicolon marks the end of the statement.<br />

• <strong>Xilinx</strong> recommends that you group similar blocks, or components, as a single timing<br />

constraint, and not as separate timing constraints.<br />

• To add comments to the UCF and NCF files, begin each comment line with a pound<br />

(#) sign, as in the following example.<br />

# file TEST.UCF<br />

# net constraints for TEST design<br />

NET "$SIG_0 MAXDELAY" = 10;<br />

NET "$SIG_1 MAXDELAY" = 12 ns;<br />

• Statements need not be placed in any particular order in the UCF and NCF file.<br />

• Enclose NET and INST names in double quotes (recommended but not mandatory).<br />

• Enclose inverted signal names that contain a tilde (for example, ~OUTSIG1) in<br />

double quotes (mandatory).<br />

• You can enter multiple constraints for a given instance. For more information, see<br />

Entering Multiple <strong>Constraints</strong> below.<br />

Conflict in <strong>Constraints</strong><br />

The constraints in the UCF and NCF files and the constraints in the schematic or<br />

synthesis file are applied equally. It does not matter whether a constraint is entered in<br />

the schematic, HDL, UCF or NCF files. If the constraints overlap, UCF overrides NCF<br />

and schematic/netlist constraints. NCF overrides schematic/netlist constraints.<br />

If by mistake two or more elements are locked onto a single location, MAP detects<br />

the conflict, issues an error message, and stops processing so that you can correct the<br />

mistake.<br />

<strong>Constraints</strong> <strong>Guide</strong><br />

32 www.xilinx.com UG625 (v. 13.2) July 6, 2011

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

Saved successfully!

Ooh no, something went wrong!