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

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern