05.07.2013 Views

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Signed/Unsigned Support<br />

Registers<br />

HDL Coding Techniques<br />

When using Verilog or VHDL in XST, some macros, such as adders or<br />

counters, can be implemented for signed and unsigned values.<br />

For Verilog, to enable support for signed and unsigned values, you<br />

have to enable Verilog2001. You can enable it by selecting the Verilog<br />

2001option under the <strong>Synthesis</strong> Options tab in the Process Properties<br />

dialog box within the Project Navigator, or by setting the -verilog2001<br />

command line option to yes. See the “VERILOG2001” section in the<br />

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

For VHDL, depending on the operation and type of the operands,<br />

you have to include additional packages in your code. For example,<br />

in order to create an unsigned adder, you can use the following<br />

arithmetic packages and types that operate on unsigned values:<br />

PACKAGE TYPE<br />

numeric_std unsigned<br />

std_logic_arith unsigned<br />

std_logic_unsigned std_logic_vector<br />

In order to create a signed adder you can use arithmetic packages and<br />

types that operate on signed values.<br />

PACKAGE TYPE<br />

numeric_std signed<br />

std_logic_arith signed<br />

std_logic_signed std_logic_vector<br />

Please refer to the IEEE VHDL Manual for details on available types.<br />

XST recognizes flip-flops with the following control signals:<br />

• Asynchronous Set/Clear<br />

• Synchronous Set/Clear<br />

• Clock Enable<br />

XST <strong>User</strong> <strong>Guide</strong> 2-13

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

Saved successfully!

Ooh no, something went wrong!