

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


ECE 337 Fall 2008
HW 3 Solution
Memory address decoding problem solution has been given in the class. It is omitted here.
Problems on Textbook:
Exercises 6, 7, 11, 14, 15, 17, 20, 22, 23, 25, 26, 30, 34, 35 in Chapter 3
6. Inputs D 1, D 2, D 4, and D 7 are all connected to ground. The other four inputs are tied to Vcc. 7. Input line D 0 supplies the output for truth table rows 0000 and 0001. Input line D 1 supplies the output for truth table rows 0010 and 0011, and so on. For each case, the function values for the two rows can be 00, 01, 10, and 11. If they are 00, just wire the input to ground; if they are 11, just wire it to Vcc. If they are 01, notice that they are just the same as the fourth input variable, D , so wire it to D. If they are 10, wire it to D’. The truth table values for the example, from 0000 to 1111, are 0111001110100001, so the circuit is as follows. 11. It is a half adder with C as the sum and D as the carry. 14. The timing of the circuit can be found by writing a 0 on each of the input
lines and then tracing them through the circuit, adding 1 at each gate. The A input takes 2 nsec to become available, so the output of the logic unit takes 4 nsec and the final output for a Boolean operation takes 5 nsec. The decode lines that drive the logic unit each have two gate delays, so the enable lines are set in plenty of time. The adder also takes 3 nsec to produce its contribution to the output gate after it has A. Worst case through the whole circuit is 6 nsec.
15. The ALU is already capable of subtraction. Note that in 2’s complement, B - A = B + (- A ). To get - A , we can use A’ + 1. Thus to subtract A from B we need to add B , A’ and then increment the sum. The circuit can already do this by asserting INVA and INC and then adding the two inputs. 17. One way is to negate ENB, forcing B to 0, then choosing function code 10 to select B’ as the ALU function. The 1’s complement of 0 is -1 in 2’s complement (all 1 bits). As long as INC is negated, the control lines for A do not matter. A second way is to negate and invert A , putting all 1s on the A input. Then negate ENB to force B to 0. With A equal to -1 and B equal to 0, we can either add or OR them together. 20. The design uses two AND gates for chip enable logic plus two AND gates per word select line plus one AND gate per data bit. For a 256 ×8 memory this comes to 2 + 512 + 2048 = 2562 AND gates. The circuit also uses one OR gate for each bit in the word; hence eight of them would be needed. 22. The pins can be multiplexed in time. For example, with n / 2 pins, half the bits are presented in one cycle, and the other half in a succeeding cycle. Many dynamic RAMs work this way. Even more extreme is to feed the address serially into the chip a bit at a time using a single pin. 23. A 32-bit-wide data bus means that 32 chips must be used in parallel, each chip providing 1 bit. Thus the smallest memory consists of 32 chips, which is 32 megabits or 4 Mbytes. 25. The memory would now have 20 − 3 −4 =13 nsec to respond after MREQ’ and RD’ are asserted. There is not a lot of margin left, but if all the memory chips can always respond in 10 nsec, the system will still work. 26. If CPU assert MREQ’ before the address was stable (TML is negative). On a write timing, the CPU will change the data in an arbitrary address which is not the destination address. On a read timing, the data saved in the memory is not changed, but CPU may read a wrong data. 30. The interrupt acknowledge cycle is needed so that the interrupting device (or the interrupt controller) can see that the interrupt has been accepted and the