ALU Usage :
1) PC update : no update beyond the normal increment
2) Source operand fetch : rs and rt
3) ALU operation : determined by the function (funct) field
4) Memory access : none
5) Register write : result from ALU written to rd
31 26
|
25 21
|
20 16
|
15 0
|
op
|
rs
|
rt
|
immediate
|
Example :
i. addi rt, rs, imm [immediate, I-type]
ALU Usage :
1) PC update : no update beyond the normal increment
2) Source operand fetch : rs and immediate field
*For all instruction except sltiu the immediate field is sign extended.
*For sltiu the immediate field is 0 extended.
3) ALU operation : determined by the opcode
4) Memory access : none
5) Register write : result from ALU written to rt
ii. beq $rs, $rt, imm [branch, I-type]
ALU Usage :
1) PC update : if the branch condition is true,
PCß PC + 4 + (sign-extended immediate) << 2
2) Source operand fetch : rs and rt
3) ALU operation : the source operand are subtracted for comparison
4) Memory access : none
5) Register write : none
iii. lw rt, imm (rs) [load, I-type]
ALU Usage :
1) PC update : no update beyond the normal increment
2) Source operand fetch : rs and the sign extended immediate field
3) ALU operation : the source operand are added to get the memory address
4) Memory access : a memory read control signal is sent to memory
*The result from the ALU is sent to memory as the address
5) Register write : the data from memory is written to rt
BY CHONG LEE MAN
B031210367
0 comments:
Post a Comment