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); M e m [ W r A d r ] Å 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.
Background image of page 1

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

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

This homework help was uploaded on 01/29/2008 for the course CS 152 taught by Professor Kubiatowicz during the Spring '04 term at University of California, Berkeley.

Page1 / 2

homequiz_3 - University of California, Berkeley - College...

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

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