IT/강의

Computer Architecture : Introduction & MIPS ISA

zzun 2007. 3. 28. 23:29
반응형
Computer Architecture
SNU CSE / 2007 Spring / Prof. 민상렬

* Design Techniques (ex. Pipelining, Cache, Multiprocessor)
1. Engineering methodology
- common case를 optimize / rare case를 correct하게
2. Correctness criteria
- pipeline, cache 등의 테크닉을 사용하더라도 가장 simple한 디자인(테크닉 없는)에서와 같은 결과가 나오게
3. Evaluation methods
- Time(Resoponse time)과 Rate(throughput)
4. Technology trends
- VLSI에서 트랜지스터가 작아질 경우 : 집적도 향상 / signal path가 짧아짐 / switch 시간이 짧아짐(clock rate 향상)
- VLSI 기술 향상 속도에 비해 몇 배의 속도로 Computer Architecture가 발전하고 있음.

ISA design goals : max(Performance), min(Cost), min(Power Consumptioon)
ISA design constraint : Compiler 지원, OS 지원

CISC to RISC
- 과거엔 Memory 속도가 느렸기 때문에 하나의 instruction으로 최대한 많은 작업을 해야 했음(CISC)
- Cache, Pipelining, Single Chilp Processor의 등장으로 RISC로 발전함.

IBM System/360 : 최초로 한 ISA에 여러 Implemenatation : 다양한 성능의 욕구를 충족시킬 수 있게 됨

MIPS instructions
- addu (add unsigned) : overflow가 발생할 수 없음
- addi addiu는 있으나 subi subiu가 없는 이유 : addi addiu로 가능하고, I-format의 개수가 제한되어 있으므로(2^6)
- sll srl sra : logical shift는 0으로 채우고, arithmatic shift는 sign bit로 채움
- sh sb lh lb : Register의 4 byte 중 Least Significant Byte를 보내고 받음
- lhu (load halfword unsinged) : 읽어온 정보를 bit stream으로 취급하여 남은 16bit를 0으로 채움

MIPS Addressing Modes
- PC-relative branch : PC +- immediate
- Pseudo-direct addressing jump : PC 4bit + immediate 26bit + 00(2 bit)
- Addressing Mode가 복잡하면 pipelining이 어려우므로 RISC에서는 Load/Store Architecture

MIPS Register Convention
- for Interoperability between different compilers on the same ISA : seperate compilation
- $fp (frame pointer) : 같은 function 내에서도 $sp는 시간에 따라 바뀌므로 reliable pointer가 필요함

MIPS Calling Convention
- Hybrid between Caller-Save and Callee-Save : why? Evaluation method : min(Load/Store instructions)
- $a0-3, $v0-1, $ra는 무조건 caller-save : call(jal) 순간에 해당 레지스터의 값이 덮어써지므로 callee는 불가능
반응형