Computer Organization and Design: The Hardware/Software Interface

Info iconThis preview shows page 1. 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 #4 Solutions 1. [1 point] One. On a taken branch, the inst after the branch must be flushed from the IF/DE stage. 2. [2 points] Control must assert IF.FLUSH when the current inst is a branch and the comparator indicates that the branch should be taken. Note that we took off a point if you did not mention that the behavior depends on the comparator. The IF.FLUSH signal will zer out the instruction to be flushed.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Either by translating the inst into a nop, or marking the instruction as invalid. 3. [1 piont] No forwarding path to comparator for branches. 4. [2 points] No. The forwarding problem relates to how instructions before the branch propagate their values to the branch. The delay slot addresses how instructions AFTER the branch are fetched. 5. [4 points] The easy way is to add forwarding logic to the values that are used by the comparator. This will almost certainly cause an increase in the critical path, however....
View Full Document

Ask a homework question - tutors are online