Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1.(a) Explain the difference between a Harvard architecture and a Princeton arch

ID: 3568488 • Letter: 1

Question

1.(a) Explain the difference between a Harvard architecture and a Princeton architecture. (b) A Princeton architecture is more commonly referred to using a different name. What is this name?

2. See the single-cycle design on p. 6 of the Chapter 4 lecture notes which implements the subset of the MIPS instructions listed on p. 6. There are 16 datapath components in this design: (1) PC (register); (2) PC Adder; (3) PC Src Mux; (4) Instruction Memory; (5) Registers (the register file); (6) Sign Extend Unit; (7) ALU Control; (8) ALU Src2 Mux; (9) ALU; (10) Data Memory; (11) Result Mux; (12) Dst Reg Mux; (13) Shift Left by 2 Unit; (14) Branch Adder; (15) Branch AND Gate; and (16) Control. (a) During the execution of sw $t0, -8($fp) list and describe what each datapath component is outputting or doing (a one- or two-sentence explanation is sufficient) and why it is doing that. For Control, specify the state of each control signal, i.e., 0, 1, 10, 01, x (x = don't care), etc. For ALUControl, specify the state of the ALUOpInput signal. (b) Some of the datapath components are doing something which is not actually necessary during the execution of sw. Identify which components are performing unnecessary operations. Note: what I am looking for in this exercise is to see if you understand how the single-cycle design executes MIPS instructions, and in particular, how it executes this particular sw instruction.

3. In the single-cycle design of Chapter 4 the Control is combinational logic that examines the opcode bits of the instruction and asserts and deasserts signals that control the datapath components. We will denote the six opcode bits of an instruction by six boolean variables o 5 (msb), o 4, o 3, o 2, o 1, and o 0 (lsb). Write the logic equation (i.e., boolean equation) that would set a boolean variable r to 1 when the instruction is an R-format instruction and 0 when it is not. Note that a logic equation can be written in conjunctive normal form (also call product-of-sums) or disjunctive normal form (also called sum-of-products). Write your equation in disjunctive normal form and simplify it as much as possible. Hint: your equation will depend on all six variables.

4. On p. 14 of the Chapter 4 lecture notes is a table showing the state of each control signal for each of the implemented instructions. Assuming boolean variable r is set to 1 for R-format instructions, write the two logic equations for ALUOp 1 and ALUOp 0, i.e., the msb and lsb of the 2-bit ALUOp control signal. Write your equations in disjunctive normal form and simplify them as much as possible. Hints: note that ALUOp1 should be 1 for R-format instructions. Note that beq is the only instruction with o 2 = 1.

5. Repeat Exercise 4 for ALUSrc. Write your equation in disjunctive normal form and simplify it as much as possible. Hint: lw and sw are easily distinguished by examining only one of the o variables.

6. Explain why the logic equation for MemToReg is MemToReg = o 5 . Hint: we love don't care entries in truth tables when forming logic equations.

Explanation / Answer

1.a)

Princeton computer architecture has the ability to either read instructions or read and write data. Harvard computer architecture, on the other hand, is able to do both simultaneously.

Princeton is limited by the fact that both coding and instruction procedures utilize the same bus system. Although experts agree that the Princeton's biggest advantage lies in its simplicity, according to Princeton University, Harvard's architecture results in a quicker execution time. Its speed is due to parallelism, or the ability to fetch new instructions during the execution of current instructions.

Harvard uses two distinct address spaces for instructions and data, so that both units of information are registered correctly. A pipeline strategy fetches the instruction for execution and decodes them, then takes data from data memory using the decoded instructions. Since Princeton architecture requires two cycles to do both tasks, pipelining is not applicable. Most experts agree that Princeton architecture is more suitable for developing software, such as real-time operating systems.

b) Von Neumann architecture