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.

For...Loop Statement<br />

VHDL Language Support<br />

The "for" statement is supported for :<br />

• Constant bounds<br />

• Stop test condition using operators =<br />

• Next step computation falling in one of the following<br />

specifications:<br />

♦ var = var + step<br />

♦ var = var - step<br />

(where var is the loop variable and step is a constant value).<br />

• Next and Exit statements are supported.<br />

Example 6-14 shows the use of a For...loop statement.<br />

Example 6-14 For...Loop Description<br />

library IEEE;<br />

use IEEE.std_logic_1164.all;<br />

use IEEE.std_logic_unsigned.all;<br />

entity countzeros is<br />

port (a: in std_logic_vector (7 downto 0);<br />

Count: out std_logic_vector (2 downto 0));<br />

end mux4;<br />

architecture behavior of mux4 is<br />

signal Count_Aux: std_logic_vector (2 downto 0);<br />

begin<br />

process (a)<br />

begin<br />

Count_Aux

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

Saved successfully!

Ooh no, something went wrong!