마이크로프로세서응용 마이크로프로세서응용
B i Mi
Basic Microprocessor :
Architectural Concept
2
What is the microprocessor architecture ? p
2
건축가 architect 의 역할
추위를 막고 윤택한 생활을 할 수 있는 공간을 마련해 주는 것(?)( )
건축 소재를 이용해 만든다.
Architecture design
Microprocessor 의 목표
Processing data
VLSI 기술을 이용하여 microprocessor 를 만든다.
Architecture design
Architecture design
Architectural Differences
3
Data word 의 길이
직접적인 Address range
Speed
Th b f i (레지스터의 수)
The number of registers (레지스터의 수)
The types of registers (다른 종류의 레지스터)
The types of instructions (명령어)
The types of instructions (명령어)
The types of addressing mode (주소 지정방식)
The types of support circuitsyp pp
Compatibility with system and application S/W
Compatibility with H/W development systems
Word Lengthg
4
Word length 가 늘어나면 다른 특징들도 영향을 많이 받 는다.
성능이 향상된 고가의 microprocessor 를 지향
Word Lengthg
5
4 bit microprocessor
저가 모델에 사용
간단한 기능의 제어 장난감, 계산기, 간단한 가전제품 제어기, 저 가 컴퓨터 주변장치
8 bit microprocessor
다소 다기능의 컨트롤러로 활용
다소 다기능의 컨트롤러로 활용
다소 복잡한 장남감, 비디오 게임, 복잡한 가전제품 제어기, 중가 컴퓨터 주변장치, 산업용 컨트롤러, 기기 제어기, ,
보통 64K 의 address range 를 갖는다.
Word Lengthg
6
16 bit microprocessor
고가형 제품
1981년 출시된 IBM PC
8088 : 내부 16 bit, 외부 8 bit microprocessor
80286 : 16 bit
32 bit i
32 bit microprocessor
Intel 80386, 80486, Pentium
Windows 98 ME 2000 XP Vista 7 등에 이용
Windows 98, ME, 2000, XP, Vista, 7 등에 이용
고성능에 저가격으로 월등한 성능 활용
Motorola : MC680x0
Big-Endian and Little-Endiang
7
x : word address
각 address 는 byte 까지 지칭가능y
C 언어로 확인가능
HW : C 언어로 프로그래밍 하여 PC는 Big-Endian 인지 Little- Endian 인지 알아보자.
Embedded System y
8
산업용으로 운영체제를 갖춘 독자적인 컴퓨터 시스템
프로세서 관리기능
메모리 관리 기능
네트워크 관리기능
인터넷
PC 를 사용하기에는 불편
PC 를 사용하기에는 불편
안정성/내구성의 보장이 없다.
불필요한 기능이 많다
불필요한 기능이 많다.
크기가 크다.
32/64 data word 를 갖는 microprocessor 를 갖는 p
9
computing speed 가 빠르다
큰 수치를 한번에 처리할 수 있다.
복잡한 상업, 산업, 과학, 멀티미디어 연산에 유리
8 bit data word 로는 여러 번 계산해야 한다.
Data handling speed 가 빠르다.
한번에 메모리로 부터 8 bit data word microprocessor 보다 4배/8
한번에 메모리로 부터 8 bit data word microprocessor 보다 4배/8 배의 양을 한번에 읽기/쓰기 할 수 있다.
Addressable Memoryy
10
디지털 알람시계용 microprocessor
소규모 ROM : program 용p g
왜 ?
소규모 RAM : data 용 왜 ?
왜 ?
저가격으로 대량생산
Addressable Memoryy
11
고성능 microprocessor
Multi-Taskingg
한 CPU 에서 동시에 여러 task 가 수행된다.
Time sharing
Task scheduling 정책이 필요하다
Task scheduling 정책이 필요하다.
context-switching
Multi-user programming 이 가능
제목 : 고3이 이러고 논다
RAM 과 ROM 의 역할 역할
12
Boot Program
Boot : a type of shoe that covers the whold foot and the lower yp part of the leg.
ROM 에서
Boot Sector ?
BIOS ( Basic Input Output System)
Memory map
메모리 공간을 어떻게 사용하는 지 다이아그램으로 나타낸 그림
Speedp
13
Speed 측정
Clock Speedp
The number of instructions per second
MIPS (Million Instructions per Second) FLOPS
FLOPS
Clock 주파수의 증가보다 data word length 의 증가가 더
Clock 주파수의 증가보다 data word length 의 증가가 더 빠른 Speed 를 얻을 수 있다.
data word length : 8 bit => 16 bitg
프로그램을 fetch 하는 데 2배 더 빠르게 할 수 있다.
Speedp
14
CMOS Technology
Lower powerp
Lower cost
Wide temperature and voltage
NMOS 보다 높은 clock 주파수
20 ~ 100 MHz
내부 PLL 회로를 이용한 내부 클럭 분주
내부 PLL 회로를 이용한 내부 클럭 분주
500 MHz 이상
수고하셨습니다
15
기타 구조적 특징적 특징
16
속도를 높이기 위하여 사용되는 다른 microprocessor 들 의 구조적 특징 :
Parallel processing
Co-processing
Cache memory technique
Cache memory technique
Pipeline technique
Pipeline technique
Wider buses
Parallel Processingg
17
Processing 부분이 두 개 이상 작동
프로그램을 두 processor 로 나누어 동시에 실행
프로그램을 두 processor 로 나누어 동시에 실행
병렬 진행부
순차 진행부
Parallel programming language 가 필요
다양한 topology
Superscalar architecture
단일 프로세서에 execution unit (실행단위)가 여럿
Co-processingp g
18
Main processor 와 함께 특수한 기능을 신속히 처리하는 processor
Floating point co-processor : 80387, 80487, ..
Sin, Cos, Log 값 계산을 빨리
80386 80486 과 직접 연결하여 사용
80386, 80486 과 직접 연결하여 사용
Video Display Disk Drive 등에 사용
Video Display, Disk Drive 등에 사용
Memory Hierarchyy y
19
속도 빠른 메모리를 CPU 근처에
속도가 빠르면 가격이 비싸다
속도 느린 보조 기억장치는 멀리에
빠른 속도의 효과로 저속의 대용량 HDD 를 사용 빠른 속 의 과 저속의 대용량 를 사용
Memory Hierarchyy y
20
Locality
Spacial localityp y
Temporal locality
한 instruction 이 실행되면 연속된 다음 instruction 이 실행될 확률 이 높다.
Cache 에 있는 instruction 의 fetch 시간이 main memory 에 있는
Cache 에 있는 instruction 의 fetch 시간이 main memory 에 있는 instruction 의 fetch 시간보다 빠르다.
Miss 하면 main memory 에서 cache 로 프로그램을 옮겨 놓아야 한다.
Data cache
Program cache
Program cache
Pipeliningp g
21
대부분의 instruction 처리단계를 동일하게 일치
Instruction 을 단순화 (RISC)
Instruction 을 단순화 (RISC)
Register (레지스터)g
Mi 구조에서 매우 중요하고 특별한 장치
22
Microprocessor 구조에서 매우 중요하고 특별한 장치
내부에서 잠시 데이터를 저장하는데 사용
General register
Data register (데이터 레지스터)
CPU 내에 연산중인 데이터를 임시 저장하는 장소
Address register (어드레스 레지스터)
CPU 내에 데이터가 담겨 있는 메모리 주소를 임시 저장하는 장소
CPU 내에 데이터가 담겨 있는 메모리 주소를 임시 저장하는 장소
Basic register
program counter (PC)
instruction register (IR)
status register (SR)
여러 개의 레지스터 군집을 register file(레지스터 파일)이라고 함
여러 개의 레지스터 군집을 register file(레지스터 파일)이라고 함
Cache 와 다른점에 유의
Instructions (명령어) 명령
23
register 와 더불어 명령어의 종류와 수는 microprocessor 의 성능을 나타내는 중요한 요소
Instruction 은 프로그래머의 입장에서 microprocessor 를 작동시 킬 수 있는 원시단위 (primitive)다.
I t ti 의 종류가 많으면 i 내에서 구현회로는
Instruction 의 종류가 많으면 microprocessor 내에서 구현회로는 복잡해진다.
Instructions
24
Instruction 의 종류가 많으면 더 좋다 ?
RISC (Reduced Instruction Set Computer)
AVR 계열 controller – ATMEGA128
ARM 계열 CPU 9 11 l 311
ARM 계열 CPU – arm9, arm11, xscale, exynos311x
CISC (Complex Instruction Set Computer)
Intel 계열 CPU – i3, i5, i7
Intel 계열 CPU i3, i5, i7
Memory Addressing Architecturey g
25
ex : A = B * C + D
Address 의 수에 따라 : Address machine
Address 의 수에 따라 : Address machine
3 Address machine
3 Address machine
mult B, C, A
add D, A, A
2 Address machine : 결과는 operand 중 하나를 중복 사용
load B A
load B, A
mult C, A
add D, A
Memory Addressing Architecturey g
26
1 Address machine : Accumulator 라는 특수 레지스터를 사용하 여 operand 로 사용하고 결과도 기록 가능
l d B
load B
mult C
add D
store A
0 Add hi St k hi
0 Address machine : Stack machine
Memory Addressing Architecturey g
27
Addressing mode : operand 를 저장된 메모리에서 참조 하는 방식
Implied addressing mode
Immediate addressing mode
Direct addressing mode
Relative addressing mode Indirect addressing mode
Indirect addressing mode
Indexed addressing mode
Microprocessor 지원 회로p 원
28
UART ( Universal Asynchronous receiver, Transciever)
PIO (Parallel I/O)
PIO (Parallel I/O)
USB (Universal Serial Bus)
DMA controller
DMA controller
DRAM controller
VDC (Video Display Controller)
VDC (Video Display Controller)
Microprocessor 개발 및 유지보수 시스템p 발 및 템
29
MDS ( Microprocessor Development System)
In-Circuit Emulator (ICE)
마이크로프로세서가 회로 내에서 동작되는 상태 관찰
마이크로프로세서가 회로 내에서 동작되는 상태 관찰
Assembly 프로그램의 수행과정 추적
Assembler
Assembly language program = (Assembler) => Machine program
Assembly language
Machine code 의 각 비트를 Mnemonic 으로 대치
Machine code 의 각 비트를 Mnemonic 으로 대치
Directive 활용
Cross assembler
어느 마이크로프로세서의 Assembly 프로그램을 다른 마이크로프로세 서용 Machine 프로그램으로 변환
PC 에서 MC68000 용 machine program 생성
수고하셨습니다
30