| 일 | 월 | 화 | 수 | 목 | 금 | 토 | 
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 
| 9 | 10 | 11 | 12 | 13 | 14 | 15 | 
| 16 | 17 | 18 | 19 | 20 | 21 | 22 | 
| 23 | 24 | 25 | 26 | 27 | 28 | 29 | 
| 30 | 
                            Tags
                            
                        
                          
                          - 해커톤
 - GPT-4
 - ChatGPT
 - LG
 - 딥러닝
 - LLM
 - supervised learning
 - AI
 - 지도학습
 - 오블완
 - regression
 - LG Aimers 4th
 - deep learning
 - 머신러닝
 - 회귀
 - OpenAI
 - Machine Learning
 - PCA
 - LG Aimers
 - gpt
 - 티스토리챌린지
 - 분류
 - Classification
 
                            Archives
                            
                        
                          
                          - Today
 
- Total
 
SYDev
[컴퓨터 구조] Lecture 13: The Processor - Part2 본문
경희대학교 김정욱 교수님의 컴퓨터 구조 강의 내용을 기반으로 한 정리글
Creating a Single Datapath
R-format
- ALUOp는 명령어의 "funct" 필드에 의해서 정해진다.
 


I-format
- R-format과 input이 다르다.
 


- problem) R format과 달리, [20:16]이 write reg로 쓰임 -> mux 추가를 통해 해결
 

-> 2에서 read reg2에 t0값이 들어가도, mux를 통해 걸러내기 때문에 괜찮다.
-> lw, sw에서는 먹스의 윗 값을 받아들임


Addressing in Branches and Jumps
- Target Address = (PC + 4) + Offset * 4
 

- beq $s0, $s0, branch_location
 

J-format Data path


A Simple Implementation Scheme
ALU Control
- ALUOp (2-bits) + "funct" (function field) (6-bits)
 - ALU Control은 instructions의 type에 의해 결정됨
 

- lw, sw: 00 -> ALU control input: 0010 - Add address
 - Branch Equal: 01 -> ALU control input: 0110 - Compare reg 1 & 2(subtract)
 - R-type: 10
 

Designing the Main Control Unit
R-format
- RegDst(1): R-foramt이므로
 - RegWrite(1): 연산을 수행한 결과를 Dst 레지스터에 쓰므로
 

I-format(lw)
- RegWrite(1): dst 레지스터에 쓰므로
 - ALUSrc(1): Instruction의 const/address를 더하므로
 - MemtoReg(1): Data memory로 부터의 데이터를 저장하므로
 - MemRead(1): Data memory의 데이터를 읽으므로
 

I-format(sw)
- ALUSrc(1): Instruction의 const/address를 더하므로
 - MemWrite(1): Data memory의 데이터에 쓰므로
 

I-format(beq)
- Branch(1): PCSrc + Zero signal이 결합 -> zero를 만족(1), PCSrc(1)
 


-> zero와 Branch가 And Gate로 연결됨
J-format(jump)
- signal이 별도로 존재
 


728x90
    
    
  반응형
    
    
    
  '3학년 1학기 전공 > 컴퓨터 구조' 카테고리의 다른 글
| [컴퓨터 구조] Lecture 15: The Processor - Part4 (1) | 2024.05.30 | 
|---|---|
| [컴퓨터 구조] Lecture 14: The Processor - Part3 (0) | 2024.05.20 | 
| [컴퓨터 구조] Lecture 12: The Processor (0) | 2024.05.05 | 
| [컴퓨터 구조] Lecture 11: Arithmetic for Computers (0) | 2024.04.21 | 
| [컴퓨터 구조] Lecture 10: Arithmetic for Computers (0) | 2024.04.19 |