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.

Example 6-10 Combinatorial Process<br />

library ASYL;<br />

use ASYL.ARITH.all;<br />

VHDL Language Support<br />

entity ADDSUB is<br />

port (A,B : in BIT_VECTOR (3 downto 0);<br />

ADD_SUB : in BIT;<br />

S : out BIT_VECTOR (3 downto 0));<br />

end ADDSUB;<br />

architecture ARCHI of ADDSUB is<br />

begin<br />

process (A, B, ADD_SUB)<br />

variable AUX : BIT_VECTOR (3 downto 0);<br />

begin<br />

if ADD_SUB = '1' then<br />

AUX := A + B ;<br />

else<br />

AUX := A - B ;<br />

end if;<br />

S

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

Saved successfully!

Ooh no, something went wrong!