Quiz 3 Fall 2010 on Introduction to Digital Logic and Computer Design

# Quiz 3 Fall 2010 on Introduction to Digital Logic and Computer Design

• Test Prep
• ChefLightningHawk2957
• 2

This preview shows page 1 - 2 out of 2 pages.

- 1 - 1. (5 points) Given the following signal declarations. signal x: std_logic_vector(19 downto 0); signal y: std_logic_vector(3 to 10); What is the value of x’right ? What is the value of y’high ? What is the value of x’range ? Write a VHDL assignment statement that makes the std_logic_vector z equal to 7, without assuming any specific width for z . You may assume that the index range for z is descending ( downto ) and that z’right =0. CSE 260 – Digital Computers: Organization and Logical Design Quiz 3 Jon Turner 10/12/2010 Subscribe to view the full document.

- 2 - 2. (5 points) The VHDL code below is from the testbench for the BCD adder that was discussed in the lecture notes. Suppose that when the A and B inputs are “0101” and “0100” Unformatted text preview: and cIn =’1’ the circuit produces a sum output of “0101” and cOut =‘0’. Put an ‘X’ next to all the assertions that fail in this case. uut: bcdAdd port map(A,B,sum,cIn,cOut); process variable s: integer; begin for i in 0 to 1 loop for j in 0 to 9 loop for k in 0 to 9 loop if i = 0 then cIn &lt;= '0'; else cIn &lt;= '1'; end if; A &lt;= conv_std_logic_vector(j,4); B &lt;= conv_std_logic_vector(k,4); s := i + j + k; wait for pause; assert (x&quot;0&quot; &lt;= sum and sum &lt;= x&quot;9&quot;) report . .. assert (s &lt;= 9 or cOut = '1') report . .. assert (s &gt;= 10 or cOut = '0') report . .. assert (s &gt;= 10 or int(sum) = s) report . .. assert (s &lt;= 9 or int(sum) = s - 10) report . .. end loop; end loop; end loop;...
View Full Document

• Fall '09
• Equals sign, VHDL assignment statement, Jon Turner, following signal declarations

### 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