[Computer architecture] Memory Hierarchy
·
Computer architecture
Normally, there exists a trade-off between speed and memory size, price 지역성의 원칙 (principle of loality)프로그램은 한 번에 주소 공간의 일부분만 접근한다. 즉, 일반적으로 프로그램은 주소 공간의 일부만 사용한다. 시간적 지역성(temporal locality) :최근에 접근한 항목은 가까운 시점에 다시 접근될 가능성이 높다.예: 반복문 내의 명령어, 순환 변수(for문에서 i) 공간적 지역성(spatial locality) :최근에 접근한 항목 근처의 데이터가 곧 접근될 가능성이 높다.예 : 순차적인 명령어 접근, 배열 데이터 Memory Hierarchy▪ Store everything on disk (lowest leve..
[Computer architecture] Pipeline
·
Computer architecture
MIPS Pipeline IF: Instruction fetch from memoryID: Instruction decode & register readEX: Execute operation MEM: Access memory operandWB: Write result back to register Hazards 구조적 해저드(Structure Hazard)• Occurs when two or more instructions require the same hardware resource simultaneously.• Conflict that occurs when the required resource is busy. 단일 메모리를 사용하는 MIPS 파이프라인에서 발생구조적 해저드는 단일 리소스를 사용하는..
[Computer architecture] Data Path
·
Computer architecture
Instruction의 종류와 구조 opcode 0 : R-format (Arithmetic/Logic Operations)opcode 35 : Load Operationopcode 43 : Store Operationopcode 4 : Branch Operation Data path에서 각 multiplexer들이 하는 역할 (1) R-format (산술/논리)의 데이터패스 동작 add $t1, $t2, $t3 1. 명령어를 인출하고 PC를 증가시킨다.2. 레지스터 파일에서 두 레지스터 $t1, $t2를 읽는다. 동시에 주 제어 유닛은 제어선의 값들을 결정한다.3. ALU는 레시스터 파일에서 읽어들인 값들에 대해 연산을 하는데, 기능코드(instruction 필드인 비트 5:0)를 사용하여 ALU..
[Computer architecture] 컴퓨터의 산술 연산(Arithmetic Operations)
·
Computer architecture
(1) Multiplication - Original Version (2) Multiplication - Simplified Version (3) Division - Original Version (4) Division - Simplified Version
[Computer architecture] MIPS Instructions
·
Computer architecture
Design Principle(1) Simplicity favors Regularity(2) Smaller is Faster (3) Make the common case fast (4) Good design demands good compromises Types 1. Arithmetic Operations a = b + c + d;add a, b, cadd a, a, d f = (g+h)-(i+j);add t0, g, hadd t1, i, jsub f, t0, t1 MIPS에는 32개의 '32-비트 레지스터'(0번~31번)이 있다.워드 사이즈 : 32비트 아키텍쳐에서 프로세서는 32비트 청크로 데이터와 명령어를 처리할 수 있다.Temporary Registers (10개) : $t0, $t1, .....
[Computer architecture] 성능(Performance)
·
Computer architecture
Instruction Set Architecture (ISA)• 하드웨어와 저수준 소프트웨어 간의 인터페이스• 프로세서가 명령어를 해석하고 실행하는 방법• 개발자가 하드웨어의 자세한 내부 작동을 이해할 필요 없이 소프트웨어를 작성할 수 있도록 함.• 이식성: 하드웨어는 소프트웨어를 변경하지 않고도 진화할 수 있음.• 명령어가 실행되는 방법, 사용 가능한 레지스터, 데이터에 액세스하고 조작하는 방법에 대한 약속. * FLOPS : FLoating-point Operations Per Second* MIPS : Million Instructions Per Second 성능(Performance) - 알고리즘 실행되는 operation의 수를 결정 - 프로그래밍 언어, 컴파일러, 아키텍쳐 operat..