{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Computer Organization and Design: The Hardware/Software Interface

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
University of California, Berkeley - College of Engineering Electrical Engineering and Computer Science, Computer Science Division Spring 2004 J. Kubiatowicz CS152 - Computer Architecture and Engineering Homework Quiz #3 Solutions Pseudo-code for bzero looks like this (roughly) * : Count Å B; While (Count) { WrAdr Å A + (Count << 2); Mem[WrAdr] Å 0; Count--; } New components, wires, and values are highlighted bold. 1. Answer: There were three essential changes to the datapath: i. A way to load “B” into the counter, ii. A way to add “count << 2” and “A”, and iii. A way to put a constant zero as the input to Mem. Here’s an example of such an organization. i: Counter (.load( load ), .dec( dec ), .val(B), .out( cout ), .zero?( zero? )) ii: Shift<<2 (.in( cout ), .out( ALUSelBInput4 )) iii: Mux2 (.in0(B), .in1( Constant0 ), .sel( DInSel ), .out(Din)) Grading: i worth 2 pts, ii worth 2 pts, iii worth 1 pt. 2. Answer: New Fields: “Counter” New Values: Memory.Write0 = Put 0 on Din by raising DInSel SRC2.counter = Put count as input 2 to ALU by setting ALUSelb to input #4.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 2

homequiz_3 - University of California Berkeley College of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online