# UCF EEL 4768C - EEL4768-Review (28 pages)

Previewing pages 1, 2, 3, 26, 27, 28 of 28 page document
View Full Document

# EEL4768-Review

Previewing pages 1, 2, 3, 26, 27, 28 of actual document.

View Full Document
View Full Document

## EEL4768-Review

64 views

Pages:
28
School:
University of Central Florida
Course:
Eel 4768c - Computer Architecture

Unformatted text preview:

EEL 4768C Computer Architecture Review of Single Cycle Datapath and Multi Cycle Datapath Question 1 Give the values of all the control signals when the load word lw instruction is in the CPU Give the value as 1 0 or X for don t care RegDst 0 Branch 0 MemRead 1 MemtoReg 1 ALUOp 00 will do add MemWrite 0 ALUSrc 1 RegWrite 1 2 Question 2 We need to add the exclusive or xor instruction in the single cycle datapath What changes do we need to make xor is an R type instruction The datapath that we have can execute R type instructions A typical R type instruction needs to 1 fetch 2 registers 2 use the ALU and 3 write the result to a register The xor has the opcode 000000 similar to all R types format in figure below When the control unit sees this opcode it will set ALUOp 10 It means the ALU control unit will look at the FUNC field which are the rightmost 6 bits of the instruction For xor FUNC 38 26hex 38 3 The table below shows the FUNC fields for the instructions that we already have We need to give xor a FUNC value that s not used We select any value that s not used The MIPS format for xor uses the value 38 100110 so we use this value We need to redo the ALU control unit to recognize the FUNC field of the XOR operation The ALU control unit generates a 4 bit ALU control field that tells the ALU what operation should be done ALU Control opcode 000000 0 ALUOp 10 Operation funct ALU function ALU control add 100000 add 0010 subtract 100010 subtract 0110 AND 100100 AND 0000 OR 100101 OR 0001 set on less than 101010 set on less than 0111 4 Finally we need to update the ALU so it can do the xor operation For every operation the ALU takes a 4 bit ALU control field We need to give the xor operation such a field This field will be generated by the ALU control unit to request an xor ALU control Function 0000 AND 0001 OR 0010 add 0110 subtract 0111 set on less than 5 We don t need to make any change to the control unit All the control signals will be set the same as in any other R

View Full Document

Unlocking...