# Web_Answers_10 - 10.7 See FLD p 644 for solution Notes In...

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

Unit 10 Problem Solutions 10.1 See FLD p. 642 for solution. 10.2 See FLD p. 642 for solution. 10.3 See FLD p. 643 for solution. 10.4 See FLD p. 643 for solution. 10.5 See FLD p. 643 for solution. Notes: The function vec2int is found in bit_pack , which is in the library bitlib , so the following declarations are needed to use vec2int : library bitlib; use bitlib.bit_pack. all ; If std_logic is used instead of bits, then the index can be computed as: index <= conv_integer(A&B&Cin); where A, B, and Cin are std_logic . conv_integer is found in the std_logic_arith package. 10.6 See FLD p. 643 for solution.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 10.7 See FLD p. 644 for solution. Notes: In line 8, " 00"&a converts a to a 18-bit std_logic_vector . The overloaded “+” operators automatically extend b , c , and d to 18 bits so that the sum is 18 bits. In line 9, sum(17 downto 2) drops the lower 2 bits of sum , which effectively divides by 4 to give the average. Adding sum(1) rounds up the value of f if sum(1) = 1. 10.8 See FLD p. 644 for solution. Add the following to the answer given on FLD p. 644: Addout <= '0' & E + Bus; Sum <= Addout(3 downto 0); Cout <= Addout(4);...
View Full Document

## This note was uploaded on 09/03/2008 for the course EE 316 taught by Professor Brown during the Fall '08 term at University of Texas.

Ask a homework question - tutors are online