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.

Functions and Procedures<br />

VHDL Language Support<br />

The declaration of a function or a procedure provides a mechanism<br />

for handling blocks used multiple times in a design. Functions and<br />

procedures can be declared in the declarative part of an entity, in an<br />

architecture, or in packages. The heading part contains the<br />

parameters: input parameters for functions and input, output and<br />

inout parameters for procedures. These parameters can be<br />

unconstrained. This means that they are not constrained to a given<br />

bound. The content is similar to the combinatorial process content.<br />

Resolution functions are not supported except the one defined in the<br />

IEEE std_logic_1164 package.<br />

Example 6-23 shows a function declared within a package. The<br />

"ADD" function declared here is a single bit adder. This function is<br />

called 4 times with the proper parameters in the architecture to create<br />

a 4-bit adder. The same example described using a procedure is<br />

shown in Example 6-24.<br />

XST <strong>User</strong> <strong>Guide</strong> 6-33

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

Saved successfully!

Ooh no, something went wrong!