CPUの基本知識

Download Report

Transcript CPUの基本知識

CPUの基本知識
Basic Knowledge for a CPU
• コンピュータの基本ハードウェア構成
Basic structure of a computer system
• CPU(プロセッサ)の構成要素
Structural elements of a CPU (processor)
• 命令の取り組み、解釈、実行
Fetch, decode and execution of instructions
• 算術論理計算機構(ALU)とレジスタ
Arithmetic Logical Unit(ALU) and Registers
福永 力; Chikara Fukunaga
1
コンピュータの基本ハードウェア構成
Basic hardware structure of a computer
• 中央処理装置(CPU)
Central Processor Unit(CPU)
• メモリ
Memory
(2n Byte Space=Address n bit)
• Space n=8/256, 16/64k, 32/4GB
• プログラム内蔵方式では必須
Essential for Program Storage
• ROM: Read Only Memory
• RAM: Read Access Memory
• 入出力装置
I/O Interface
• Parallel: PCI …
• Serial: USB, Video-graphic, Ethernet, Firewire …
福永 力; Chikara Fukunaga
2
プロセッサの構成要素
Principal structure of a CPU
•Processor = CPU in a single chip
•Microprocessor (Intel) = Processor
•Microcomputer = Processor+Memeory+I/O I/F
福永 力; Chikara Fukunaga
3
命令の取り組みと実行
Fetch,decode & execution of instructions
• プログラム(メモリ内収録)から命令(Instruction)の取り組み(Fetch)
• Instructionの解析(Decode)
• Instructionの実行(Execution)
福永 力; Chikara Fukunaga
4
命令形式例
Examples of instruction formats
福永 力; Chikara Fukunaga
5
演算機とレジスター
Arithmatic Logical Unit (ALU) & Registers
• CPUに用いられるさまざまなレジスタの例
Examples of Various registers used in a CPU
•
汎用(浮動小数点演算)レジスタ
General Purpose Registers: GPR0-31 (32 32-bit registers)
Floating Point Registers: FPR0-31 (32 64-bit registers)
•
状態保存, 例外検知レジスタ:
Condition Register: CR, FPCR
eXceptional Execution Reg.: XER
•
プログラムカウンタ:
Program Counter: PC
•
powerPC4の例
Example of powerPC4
•
Instr. rD,rS,rB
(rD ← rS・rB) (・= any binary calcul.)
福永 力; Chikara Fukunaga
6
CPU、Cacheとメモリのつなぎの変遷
Development of CPU, cache and Memory connection
福永 力; Chikara Fukunaga
7
最初の1 chip processor Intel 4004
First single chip processor Intel 4004
• 日本のビジコン社電卓用に開発された
Developed for a electric calculator of Busicom ltd. Japan
• 同社は小型高速プリンター付電卓の開発を目論む
The company wants to develop small calculator
with a printer
• インテルに制御用LSIの開発以来
The company asked Intel to develop
several LSIs for calculator control
• インテル、マイクロコンピュータセットの提案
Intel proposed a microcomputer set
for this control (CPU, ROM, RAM, Shift registers)
• 1969年4月ビジコン社、11月商品として発売
Apr.,1971 completed, Nov. ,1971 released
福永 力; Chikara Fukunaga
8
4004の概要
Overview of 4004
• 4 bit CPU w/ 46 instructions
• Clock 750kHz
• 命令(Instructions) with
1 word (8bit)
8 clock (3 clock for 12-bit address,
2 clock for 8-bit instruction,
3 clock for execution)
2 word (16bit) 16 clock (8clock×2word)
• Address space 4kB (12bit) for ROM/RAM
• 16 4-bit/8 8-bit general purpose registers
• Address stack for subroutine calls (depth 4)
• 現代のプロセッサとほぼ同じ内部構造
(Almost similar architecture with a
modern processor chip)
福永 力; Chikara Fukunaga
9
その後の発展(1)
After 4004
• 1971-1973(First generation)
• Intel 4004(4bit)
• Intel 8008(8bit) 文字列操作 for alphanumeric
handling
• 4-8bit
• プログラム Program with 機械語 machine
language、アセンブリ assembly
• pMOSトランジスタ Transistor(O(1k))
福永 力; Chikara Fukunaga
10
その後の発展(2)
after 8008
• 1974-1976(第2世代;2nd generation)
• 8-bit Intel 8080、Motorola 6800
• プログラム program with assembly、compiler
(assembler)
• nMOSトランジスタ Transistor
• (Development of )DRAMの発展(4kbit)
• (Floppy based) ディスクオペレーティングシステム
Disk Operating System DOS
• nMOSトランジスタ Transistor(O(3-10k))
• Zilog Z80(~8080) with new nMOS technology
福永 力; Chikara Fukunaga
11
その後の発展(3)
After Z80
• 1977-1986(第3世代;3rd generation)
•
•
•
•
•
16-bit Intel 8086、80286、Z8000、M680x0
プログラミング Assembly(assembler)、C、Basic
8086→MS/DOS、68000→Mac/Apple
Network、 Graphics
HMOS(High performance nMOS)トランジスタ
Transistor(O(100k))
• CMOS process (1980以降)
• 1987(第4世代;4th generation)32-bit
• Intel 80386、Pentium、powerPC、RISC
福永 力; Chikara Fukunaga
12