Computer/Architecture 9

Multicycle

주요상태소자PC, 레지스터파일, 메모리 임시레지스터(매 클럭사이클마다 쓰기가 행해짐)A, B, MDR, ALUOut, IR 하나의 ALU와 두개의 덧셈기 대신, 하나의 ALU 쓰임.클럭사이클 끝에는 이후 클럭사이클에 쓰이는 모든 데이터를 저장할 상태소자(레지스터파일, PC, 메모리)가 존재.기능유닛(메모리, 레지스터파일, ALU)들 중 하나에 의해 만들어진 데이터는 후속 사이클에서 사용을 위해 임시레지스터에 저장. 명령어 읽기와 데이터 읽기를 위해 메모리출력을 저장하기 위해 각각 Instruction Register(IR)와 메모리 Memory Data Register(MDR) 추가.(IR과 MDR은 각 사이클당 동시에 필요)레지스터파일에서 읽은 레지스터 피연산자 값을 저장하기위해 A레지스터, B레지스터..

Arithmetic

명령어 실행 순서 MIPS 1. 명령어 메모리에 PC값을보내고 명령어를 가져온다2. PC가 다음 명령어를 가르키도록(Instruction Pointer) PC값을 변화시킨다3. 하나 또는 둘의 레지스터 읽기4. main alternatives:연산 또는 논리 작용데이터 메모리에 접근(주소값 계산)branch/jump의 목표물 계산5. 레지스터파일(레지스터들의 묶음)에 값저장(not for stores, branch, jump) ex)add rd, rs, rtfetch M[[PC]];PC

Program Counter -> Instruction Memory

Program CounterThe program counter is a 32bit register that contains the address of a location in the Instruction Memory.PC always points to the next instruction in the memory that is to be fetched.Before we talk about how the PC is updated, we will look into the Instruction Memory.명령어 메모리의 주소값을 가지는 32비트 레지스터.항상 다음에 가져올 명령어를 가르키는 주소값을 가짐.PC가 update되기전에 명령어 메모리를 살핌. Instruction MemoryThe instruct..

MIPS Instruction

MIPS(Microprocessor without Interlocked Pipeline Stages)RISC(Reduced Instruction Set Computer) 방식 - CPU 명령어 개수를 줄여 하드웨어 구조를 간단하게 하는 방식. 마이크로 프로세서를 설계하는 방식 32비트 기준 32개의 범용 32비트 레지스터를 가짐.프로그램은 명령어들의 집합 - CPU는 메모리 상에 올라와있는 Instruction Mem.를 찾아가서 명령어(Instruction)들을 하나씩읽어와 해독, 연산, 적재.명령어는 3가지 타입 - R, I, J 6 5 5 5 5 6 bits [ op | rs | rt | rd |shamt| funct] R-type [ op | rs | rt | address/immediate] I..