ps4-sol - ECE 468 & 573 Problem Set 4:...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: ECE 468 & 573 Problem Set 4: Instruction scheduling & loop transformations Instruction scheduling 1. Assume that your machine has two ALUs, which can execute ADDs in a single cycle, SUBs in two cycles, and one of the two ALUs can execute MULs in two cycles. There is also a single LD/ST unit. LOADs take up the ALU for 1 cycle and the LD/ST the next, while STs take up the LD/ST for one cycle. Draw the reservation tables for this machine. Answer: ADD 1: ALU1 ALU2 LD/ST X ADD 2: ALU1 ALU2 LD/ST X SUB 1: ALU1 ALU2 LD/ST X X SUB 2: ALU1 ALU2 LD/ST X X MUL 1: ALU1 ALU2 LD/ST X X LOAD 1: ALU1 ALU2 LD/ST X X LOAD 2: ALU1 ALU2 LD/ST X X 1 STORE: ALU1 ALU2 LD/ST X 2. (ECE 573 only): How many states would the scheduling automaton for this machine have? Answer: This is somewhat tricky. The states in the automaton need two cycles worth of state, because some of the instructions have a latency of two cycles. However, not every possible combination of functional unit occupancy can occur in the automaton. For example, if the LD/ST unit is occupied in the second cycle of a state, that is because a LOAD has been issued to get to that state. However, this means that one of the ALUs will be taken up with the LOAD instruction in the first cycle, so there is no way for that ALU to be occupied in the second cycle (which can only happen if a MUL or a SUB is scheduled). We can break down the possible states through the following two cases: Case 1: The LD/ST unit is occupied in the second cycle. The LD/ST unit can haveCase 1: The LD/ST unit is occupied in the second cycle....
View Full Document

Page1 / 7

ps4-sol - ECE 468 & 573 Problem Set 4:...

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

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