본문 바로가기

ੈ✩‧₊˚Computer Science/컴퓨터구조15

[컴퓨터구조] Datapath 간단한 설계 과정 설명 1. PC 값으로부터 명령어 memory의 주소를 구한다. 2. 명령어 memory에 접근하여 명령어를 get한다. (32bit) 3. 32bit 명령어를 분석한다. (R, I, J format 마다 다름) 4. register file = 32개의 register 가 모여있는 하드웨어 모듈 5. 분석한 명령어에 따라 RS field 값은 register #1 에 넣음 , RT field 값은 register #2에 넣음 6. 넣은 값이 ALU의 input이 된다. 7. ALU가 연산을 하고 뒤로 돌아가서 Data in(쓰기 포트)에 연산 결과를 넣는다. 8.연산결과를 어디에 넣을지 Rd 가 결정하고 결과를 넣는다. I-format 일 때 (Rd 를 Rt로 생각하기) 1~5 동일 6.ALU 가.. 2020. 10. 30.
[컴퓨터구조] 데이터패스(Datapath) 명령어 실행(MIPS) Datapath로 우리가 실행해 볼 명령어 1. 메모리 접근 명령어(memory-reference instructions) : lw , sw 2. 산술 논리 연산 명령어(arithmetic-logical instructions) : add, sub, and, or, slt 3. 흐름 제어 명령어(control flow instructions) : beq, j Datapath에서 명령어를 수행하는 과정 Fetch 1.PC 값을 이용해 명령어가 들어있는 주소(instruction address)를 찾는다. 2.메모리로부터 그 주소에 들어있는 명령어를 가져온다.(get intruction from memory) Decode 3.조합회로 내에서 간단하게 어떤 명령어인지 해석한다. Execute 4.필요한 레지스.. 2020. 10. 30.
[컴퓨터구조]MIPS Instruction Format Assembly code 는 기계어 형식으로 바꾸어 써야하며 MIPS 에서 기계어 형식은 3가지 type 이 존재한다. 1.R-type : 가장 기본적인 Instruction format - Arithmetic instruction format opcode : operation (6bit) rs : first source operand (5bit) rt : second source operand (5bit) rd : destination operand (5bit) shamt : shift amount (5bit) funct : function code (6bit) 예시) ADD $t0, $s0, $s1 ($t0 rt가 destination 역할) -사용하는 opcode A/L : ADDI , ORI Br.. 2020. 10. 21.
반응형