MCS-284 Homework 4 (Fall 1999)

Due: October 19, 1999

  1. Design a PLA with four inputs, X3, X2, X1, and X0, and two outputs D3 and D5. The four inputs should be considered as forming a four-bit unsigned number, X3X2X1X0, with X3 as the most significant bit. The D3 output should be asserted if and only if that number is divisible by 3. Similarly, the D5 output should be asserted if and only if the input number is divisible by 5.

  2. Do exercise 5.6 on page 427.

    In the datapath, there are several places where a mux (multiplexor) is used to select which of two sources should provide a value. When you modify the datapath to add the jal instruction, you may find yourself wanting to change one or more of these two-way choices to a three-way choice. There are two options for how you can do this; either is fine. One option is to add a second two-way mux, with the output from one of the two-way muxes feeding into one of the inputs of the other. Then you will have a new control signal controlling the new mux. The other option is to modifying the existing two-way mux to be a three-way mux, with a new input labeled 2 (in addition to the existing inputs 0 and 1). If you do this, you'll need to widen the mux's control signal from a one-bit control (capable of selecting 0 or 1) to a two-bit control (capable of selecting 0 (binary 00), 1 (binary 01), or 2 (binary 10). The fourth possibility, binary 11, wouldn't be used.

    In the datapath, you may find yourself wanting to inject a constant value in at some point. You can do this just by writing the constant with an arrow leading from it, as in the example of the 4 that feeds into the adder that computes PC+4.

    In the control table from page 361, you will definitely need to add a row, for the jal instruction. However, you may also need to add one or more more columns, for any newly added or widened control signals that you introduce in the datapath. If so, you will need to show the values of these new control signals in the existing rows as well as in the new row.

  3. Do exercise 5.10 on page 428. The exercise says "consider both datapaths." By "both" they mean the single-cycle datapath from section 5.3 and the multicycle one from section 5.4. For this homework, you should only deal with the single-cycle one from section 5.3.

Instructor: Max Hailperin