UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 39649

Design Assistant for XST - Help applying constraints within the RTL

Description

Please refer to this answer record for help applying constraints within the RTL.

Note: This Answer Record is a part of the Xilinx Solution Center for XST (Xilinx Answer 38927). The Xilinx Solution Center for XST is available to address all questions related to XST. Whether you are starting a new design or troubleshooting a problem, use the Solution Center for XST to guide you to the right information.

Solution

Some XST constraints can beapplied not only globally but also specifically tocertain modules,instances or signals within the RTL code. Followingisa general description of the constraints syntax applied in RTL code.

  • VHDL

Constraints can be specified in VHDL code with VHDL attributes. It consists of two parts, attributes declaration and attributes specification.

attribute constraint_name : string;

attribute constraint_name of object_name :{component|label|entity|signal|variable} is constraint_value;

Examples:

Entity example1 is

port (......);

attributekeep_hierarchy string;

attributekeep_hierarchyofexample1 : entity isyes;

end example1;

architecturearch1 ofexample1 is

......

attribute keep string;

attributekeepofsignal1 :signal istrue;

attribute keep_hierarchy of component1 : component is yes;

begin
......

end arch1;

  • Verilog

Verilog attributes are bounded by brackets and asterisks.

(* attribute_name = "attribute_value" *)

Examples:

(*keep_hierarchy = "yes"*)

module top (......);

......

(*keep = "true"*) reg [1:0] a_reg;

......

endmodule

For more informationabout any XST constraints syntax in RTL code, please refer to UG627/687-XST User Guide (Xilinx Answer 38931).

For more information of Constraints entry method in VHDL and Verilog code, please refer to "Chapter 2-Entry Strategies for Xilinx Constraints" in UG625-Constraints Guide.

Linked Answer Records

Master Answer Records

Answer Number Answer Title Version Found Version Resolved
38927 Xilinx Solution Center for XST N/A N/A

Associated Answer Records

Answer Number Answer Title Version Found Version Resolved
39749 Design Assistant for XST - Help with XST Options/Constraints/Attributes N/A N/A
AR# 39649
Date Created 03/14/2011
Last Updated 12/15/2012
Status Active
Type General Article