Assignment 11, due Nov. 13

Part of the homework for 22C:60, Fall 2009
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

Always, on every assignment, please write your name legibly as it appears on your University ID and on the class list! All assignments will be due at the start of class on the day indicated (usually a Friday). The only exceptions to this rule will be by advance arrangement unless there is what insurance companies call "an act of God" - something outside your control. Homework must be turned in on paper and in class! Late work may be turned in to the teaching assistant's mailbox, but see the late work policy. Never push late work under someone's door!

Problems

  1. Background: A typical fast typist can type 60 words per minute, where a word is 5 letters, on the average, and most words are separated by spaces. A typical modern CPU can execute on the order of 1,000,000,000 instructions per second (rounded to the nearest power of 1000).

    a) How frequently must the keyboard-ready bit be polled to keep up with a fast typist? (0.3 points)

    b) How many times a second will the KBGETC routine from the Hawk Monitor poll the ready bit while it is waiting for input? (0.3 points)

    c) How do the above considerations motivate the introduction of interrupt mechanisms in CPU design. (Open ended question). (0.4 points)

  2. Background: In the early 1970's, Centronics was a major manufacturer of impact printers. Centronics printers were common enough that when IBM came out with the PC, they included a Centronics-compatible parallel port, and as a result, the terms IBM PC Parallel port and Centronics Printer Port are synonyms. This interface defines the following connections (somewhat simplified): Note: If you hunt for documentation on the Internet, you will find lots of stuff specific to the PC. This is a bit confused because the PC gratuitously inverts some of the signal lines, more or less at random. (Actually, the inversions aren't gratuitous; they make it so that, when you turn the power to the PC, it comes up not trying to output anything.)

    a) Give a timing diagram showing Data, Strobe and Ack and Busy as a function of time as the computer sends 2 characters to the printer which then prints them. You can show just two data values, call them valid and invalid. (0.5 points)

    b) Give pseudocode -- it need not be in a real programming language -- for the parallel port print ppprint(ch) routine, focusing on waiting for the right conditions reported by the printer and setting the outputs appropriately at the right times. (0.5 points)

  3. Background: Consider a logic circuit with the following structure:

    This circuit is a memory device, a kind of flipflop. It can be made to remember one bit.

    a) Draw this circuit as a logic diagram. (0.4 points)

    b) Give a table showing the 4 input combinations, identifying the combinations that set and reset the flipflop and the combination that allows it to remember. The final combination is the one that should usually be avoided. (0.4 points)

    c) When it is remembering a stored value, are the outputs of this flipflop the same or different? (0.2 points)