Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
xst.pdf
Скачиваний:
141
Добавлен:
11.06.2015
Размер:
5.64 Mб
Скачать

R

XST General Constraints

Optimization Goal Syntax Examples

Following are syntax examples using Optimization Goal with particular tools or methods. If a tool or method is not listed, Optimization Goal may not be used with it.

Optimization Goal VHDL Syntax Example

Before using Optimization Goal, declare it with the following syntax:

attribute opt_mode: string;

After declaring Optimization Goal, specify the VHDL constraint:

attribute opt_mode of entity_name: entity is "{speed|area}";

Optimization Goal Verilog Syntax Example

Place this attribute immediately before the module declaration or instantiation:

(* opt_mode = "{speed|area}" *)

Optimization Goal XCF Syntax Example

MODEL "entity_name" opt_mode={speed|area};

Optimization Goal XST Command Line Syntax Example

Define Optimization Goal globally with the opt_mode command line option of the run command:

-opt_mode {area|speed}

The default is speed.

Optimization Goal Project Navigator Syntax Example

Define Optimization Goal globally in Project Navigator > Process Properties > Synthesis Options > Optimization Goal.

The default is speed.

Parallel Case (PARALLEL_CASE)

Parallel Case (PARALLEL_CASE) is valid for Verilog designs only. Parallel Case forces a case statement to be synthesized as a parallel multiplexer and prevents the case statement from being transformed into a prioritized if...elsif cascade. For more information, see “Multiplexers HDL Coding Techniques.”

Parallel Case Architecture Support

Parallel Case is architecture independent.

Parallel Case Applicable Elements

Parallel Case applies to case statements in Verilog meta comments only.

Parallel Case Propagation Rules

Not applicable

XST User Guide

www.xilinx.com

347

10.1

Chapter 5: XST Design Constraints

R

Parallel Case Syntax Examples

Following are syntax examples using Parallel Case with particular tools or methods. If a tool or method is not listed, Parallel Case may not be used with it.

Parallel Case Verilog Syntax Examples

The Parallel Case Verilog 2001 syntax is:

(* parallel_case *)

Since Parallel Case does not contain a target reference, the attribute immediately precedes the selector.

(* parallel_case *) casex select

4'b1xxx: res = data1; 4'bx1xx: res = data2; 4'bxx1x: res = data3; 4'bxxx1: res = data4;

endcase

Parallel Case is also available as a meta comment in the Verilog code. The syntax differs from the standard meta comment syntax as shown in the following:

// synthesis parallel_case

Since Parallel Case does not contain a target reference, the meta comment immediately follows the selector:

casex select // synthesis parallel_case 4'b1xxx: res = data1;

4'bx1xx: res = data2; 4'bxx1x: res = data3; 4'bxxx1: res = data4;

endcase

Parallel Case XST Command Line Syntax Example

Define Parallel Case globally with the -vlgcase command line option of the run command:

-vlgcase {full|parallel|full-parallel}

RLOC

RLOC is a basic mapping and placement constraint. RLOC groups logic elements into discrete sets and allows you to define the location of any element within the set relative to other elements in the set, regardless of eventual placement in the overall design. For more information, see “RLOC” in the Xilinx Constraints Guide.

Save (S / SAVE)

Save (S or its alias SAVE) is an advanced mapping constraint. When the design is mapped, some nets may be absorbed into logic blocks, and some elements such as LUTs can be optimized away. When a net is absorbed into a block, or a block is optimized away, it can no longer be seen in the physical design database. The S (SAVE) constraint prevents this from happening. Several optimization techniques such as nets or blocks replication and register balancing are also disabled by the S (SAVE) constraint.

348

www.xilinx.com

XST User Guide

 

 

10.1

R

XST General Constraints

If the S (SAVE) constraint is applied to a net, XST preserves the net with all elements directly connected to it in the final netlist. This includes nets connected to these elements.

If the S (SAVE) constraint is applied to a block such as a LUT, XST preserves the LUT with all signals connected to it.

For more information, see the Xilinx Constraints Guide.

Synthesis Constraint File (–uc)

Synthesis Constraint File (-uc) specifies a synthesis constraint file for XST to use. The XST Constraint File (XCF) has an extension of .xcf. If the extension is not .xcf, XST errors out and stops processing. For more information, see “XST Constraint File (XCF).”

Synthesis Constraint File Architecture Support

Synthesis Constraint File is architecture independent.

Synthesis Constraint File Applicable Elements

Synthesis Constraint File applies to files.

Synthesis Constraint File Propagation Rules

Not applicable

Synthesis Constraint File Syntax Examples

Following are syntax examples using Synthesis Constraint File with particular tools or methods. If a tool or method is not listed, Synthesis Constraint File may not be used with it.

Synthesis Constraint File XST Command Line Syntax Example

Specify a file name with the –uc command line option of the run command:

-uc filename

Synthesis Constraint File Project Navigator Syntax Example

Define Synthesis Constraint File globally in Project Navigator > Process Properties > Synthesis Options > Use Synthesis Constraints File.

Translate Off (TRANSLATE_OFF) and Translate On

(TRANSLATE_ON)

Translate Off (TRANSLATE_OFF) and Translate On (TRANSLATE_ON) instruct XST to ignore portions of your VHDL or Verilog code that are not relevant for synthesis, such as simulation code.

TRANSLATE_OFF marks the beginning of the section to be ignored.

TRANSLATE_ON instructs XST to resume synthesis from that point.

Translate Off and Translate On are also Synplicity and Synopsys directives that that XST supports in Verilog. Automatic conversion is also available in VHDL and Verilog.

XST User Guide

www.xilinx.com

349

10.1

Chapter 5: XST Design Constraints

R

Translate Off and Translate On can be used with the following words:

synthesis

synopsys

pragma

Translate Off and Translate On Architecture Support

Translate Off and Translate On are architecture independent.

Translate Off and Translate On Applicable Elements

Translate Off and Translate On apply locally.

Translate Off and Translate On Propagation Rules

Instructs the synthesis tool to enable or disable portions of code

Translate Off and Translate On Syntax Examples

Following are syntax examples using Translate Off and Translate On with particular tools or methods. If a tool or method is not listed, Translate Off and Translate On may not be used with it.

Translate Off and Translate On VHDL Syntax Example

In VHDL, write Translate Off and Translate On as follows:

--synthesis translate_off

...code not synthesized...

--synthesis translate_on

Translate Off and Translate On Verilog Syntax Example

Translate Off and Translate On are available as VHDL or Verilog meta comments. The Verilog syntax differs from the standard meta comment syntax presented earlier, as shown in the following coding example:

//synthesis translate_off

...code not synthesized...

//synthesis translate_on

Use Synthesis Constraints File (–iuc)

Use Synthesis Constraints File (-iuc) allows you to ignore the constraint file during synthesis.

Use Synthesis Constraints File Architecture Support

Use Synthesis Constraints File is architecture independent.

Use Synthesis Constraints File Applicable Elements

Use Synthesis Constraints File applies to files.

Use Synthesis Constraints File Propagation Rules

Not applicable

350

www.xilinx.com

XST User Guide

 

 

10.1

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]