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.

XST <strong>User</strong> <strong>Guide</strong><br />

The following table shows pin descriptions for an unsigned 8-bit<br />

adder with carry out.<br />

IO pins Description<br />

A[7:0], B[7:0] Add Operands<br />

SUM[7:0] Add Result<br />

CO Carry Out<br />

VHDL<br />

Following is the VHDL code for an unsigned 8-bit adder with carry<br />

out.<br />

library ieee;<br />

use ieee.std_logic_1164.all;<br />

use ieee.std_logic_arith.all;<br />

use ieee.std_logic_unsigned.all;<br />

entity adder is<br />

port(A,B : in std_logic_vector(7 downto 0);<br />

SUM : out std_logic_vector(7 downto 0);<br />

CO : out std_logic);<br />

end adder;<br />

architecture archi of adder is<br />

signal tmp: std_logic_vector(8 downto 0);<br />

begin<br />

tmp

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

Saved successfully!

Ooh no, something went wrong!