Web_Answers_10 - 10.7 See FLD p. 644 for solution. Notes:...

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

View Full Document Right Arrow Icon
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.
Background image of page 1
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, &quot; 00&quot;&amp;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 &lt;= '0' &amp; E + Bus; Sum &lt;= Addout(3 downto 0); Cout &lt;= Addout(4);...
View Full Document

Ask a homework question - tutors are online