YYYEJI

[MIPS] ALU를 control하는 signal (Single-Clock) 본문

Computer architectures

[MIPS] ALU를 control하는 signal (Single-Clock)

YEJI ⍢ 2022. 11. 7. 15:33
728x90

MIPS에는 여러 Instruction이 존재하는데,
ALU control가 어떤 값이냐에 따라 실행되는 operation이 달라집니다.

 

✓  ALUcontrol에 4bits가 들어가는데

 2bits는 ALUop에서 발생시키고,

ALUop는 어떤 instruction인지에 따라 결정됩니다.

(즉, instruction의 op code를 보게 됩니다.)

lw, sw - 00

beq - 01

R type - 10

 

 나머지 2bits는 instruction format에 따라서 2bits가 결정됩니다.

R type의 경우 op code만 보고 instruction을 파악하기 힘들기 때문에, function code까지 확인해야 됩니다.

 

 

↓↓↓ 아래 결과에 따라 실행되는 instructio이 달라집니다 ↓↓↓

ALU control lines Function
0000 AND
0001 OR
0010 add
0110 subtract
0111 slt(set less than)
1100 NOR

↑↑↑ ALU with 4 control signals ↑↑↑

 

다시 확인해 보겠습니다.

  ALUop에서 instruction에 따라 2bits가 발생합니다.

lw, sw - 00

beq - 01

R-type - 10

 

  R-type의 경우 op code만 보고 instruction을 판단하기 힘들기 때문에 

function code까지 확인해야 됩니다.

 

  ALUop의 2bits와 필요할 경우 function code까지 확인해서 ALU control를 발생시켜 ALU가 실행됩니다.

Control unit - ALUOp에서 2bits를 발생시킵니다.

 


◡̈