adder8numeric - signal cinLV: std_logic_vector(1 downto 0);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity adder8numeric is port(A, B : in std_logic_vector(7 downto 0); cin : in std_logic; SUM : out std_logic_vector(7 downto 0); cout : out std_logic); end adder8numeric; architecture numer of adder8numeric is signal tmp : unsigned(8 downto 0);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: signal cinLV: std_logic_vector(1 downto 0); begin cinLV <= '0' & cin; -- make cin into std_logic_vector for unsigned function tmp <= unsigned('0' & A) + unsigned('0' & B) + unsigned(cinLV); SUM <= std_logic_vector(tmp(7 downto 0)); cout <= tmp(8); end numer;...
View Full Document

This document was uploaded on 03/05/2012.

Ask a homework question - tutors are online