Tải bản đầy đủ (.pptx) (314 trang)

Slide Bài giảng Kiến trúc máy tính (Tạ Kim Huệ)

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (12.4 MB, 314 trang )

Kiến trúc máy tính
Computer architecture
To improve is to change; to be perfect is to change often.
Winston Churchill

10/31/21

SET - HUST

1


Nội dung mơn học








10/31/21

Chương 1: Giới thiệu
Chương 2: Kiến trúc tập lệnh MIPS – 32 bits
Chương 3: Bộ xử lý MIPS – 32 bits
Chương 4: Xử lý đường ống
Chương 5: Bộ nhớ máy tính
Chương 6: Tổ chức Vào/ra

SET - HUST



2


Tài liệu tham khảo






/>Computer Organization and Design, 5th Edition : The Hardware/Software
Interface

10/31/21

SET - HUST

3


Lịch sử phát triển của máy tính

ENIAC
ENIAC (1946)
(1946)





• Blaise
Blaise Pascal
Pascal (1642)
(1642)
• 1642
1642 -- 1945
1945

18.000
18.000 bóng
bóng đèn
đèn

Transistor
Transistor (1958)
(1958)

IC(Integrated
IC(Integrated Circuit)
Circuit)

• Burroughs
Burroughs 6500
6500
• NCR,
NCR, CDC
CDC 6600
6600

• LSI

LSI –– VLSI
VLSI
• Xử
Xử lý
lý song
song song
song

1500
1500 rơle
rơle
30
30 tấn
tấn
140
140 kw
kw

1970s to mid 1980s:

2000s:

1950s : Máy tính số học

Có thiết kế tập lệnh và trình biên dịch.

1960s: Có hệ điều hành, quản lý bộ nhớ mức thấp

Bộ nhớ chia sẻ đa xử lý.
1990s: CPU, bộ nhớ , I/O system, Multi-processors, kết nối mạng, Thiết kế mức VLSI


10/31/21

SET - HUST

Kiến trúc đặc trưng, có khả năng cấu hình lại, di động, tiêu thụ ít
năng lượng, xử lý song song.

4


Máy tính hiện đại

Personal Mobile
Devices
5


    Máy tính hiện đại

6


    Máy tính hiện đại

7


Quan niệm truyền thống về cấu trúc máy tính
Phần

Phần mềm
mềm
hệ
hệ thống
thống
Phần
Phần mềm
mềm ứng
ứng
dụng
dụng

Phần

Phân loại

Chức năng

Máy tính chuyên
dụng

Cấu trúc bộ xử lý

Máy tính nhúng

RISC

Cấu tạo

CISC


ARM, SuperH, MIPS, SPARC, DEC Alpha,
PA-RISC-V, PIC, PowerPC IBM.

10/31/21

cứng

SET - HUST

Von newmann

Harvard

PDP-11, VAX,
Motorola 68k, x86
intel.
intel.

8


Quan niệm truyền thống về cấu trúc máy tính

Application (ex: browser)
Operating
Compiler

Software


System
(Mac OSX)

Assembler

Instruction Set

Hardware

Processor

Memory

I/O system

Architecture

Datapath & Control
Digital Design
Circuit Design
transistors

9


Cấu trúc máy tính
Graphical Interface
Application

Application


Programming

Libraries
Operating System
System Programming

Programming Language
Assembler Language
Instruction Set Architecture - “Machine Language”
Processor

IO System
Firmware

Computer Design

Microprogramming

Datapath and Control
Digital Design
Logic Design
Circuit Design

Fabrication

Circuits and devices

Semiconductors
Materials


10/31/21

SET - HUST

10


Kiến trúc máy tính?
Computer Architecture = Instruction Set Architecture + Machine Organization




Application Programming
System Programming

software
instruction set
hardware




10/31/21

SET - HUST

Processor Architecture
Computer Organization


11


Bắt đầu từ : Nguyên lý thiết kế và cấu trúc máy tính truyền thống

Hiểu nguyên lý thiết kế

Thiết kế máy tính theo yêu cầu

Cấu trúc bộ xử lý MIPS – 32
MIPS = Microprocessor without Interlocked Pipeline Stages

10/31/21

SET - HUST

12


To change

10/31/21

SET - HUST

13


Định luật Moore: Moore’s Law


# of transistors on an integrated circuit (IC)

Predicts:
2X Transistors / chip
every 2 years

Gordon Moore
Intel Cofounder
B.S. Cal 1950!

Year

14


Định luật Moore
Định luật Moore là một bước ngoặt lớn trong ngành cơng nghệ
điện tử, giải thích tại sao nhà sản xuất có thể giảm giá thành
trong khi vẫn tiếp tục nâng cao hiệu suất của phần cứng.

Hiện nay, thời gian để tăng đơi số transistor/inch vng đã dài
hơn vì kích thước transistor khơng thể giảm nhỏ kích thước
phân tử <14nm (Hạn chế về thiết kế vật lý).

15


Đánh giá khả năng lưu trữ trên bộ nhớ tương tự của Jim Gray
How Far Away is the Data?

Dung lượng

9

10

Thời gian lưu trữ /truy cập

Chòm tiên nữ

Tape /Optical

2,000 Years

Robot
Jim Gray
Turing Award

6

10

100

B.S. Cal 1966

Disk

Memory


10

On Board Cache
2

On Chip Cache

1

Registers

2 Years

Sao diêm vương

1.5 hr

Hà Nội

Đại học BK HN

10 min

TC-406

1 min
My Head

(ns)


Ph.D. Cal 1969!


Nguyên lý về định vị và phân cấp bộ nhớ

10/31/21

17


Xử lý song song

18


Quan niệm mới
(phức tạp hơn một chút!)


Software

Hardware

Parallel Requests
Assigned to computer
e.g., Search “Katz”





Parallelism &

Assigned to core

Achieve High

Parallel Instructions
>1 instruction @ one time
e.g., 5 pipelined instructions



Parallel Data

Smart

Computer

Phone

Harness

Parallel Threads

e.g., Lookup, Ads

Warehouse-Scale

Computer


Performance


Core
Memory

Core

(Cache)

Input/Output

Core
Functional

Instruction Unit(s)

Unit(s)

>1 data item @ one time
A0+B0

e.g., Add of 4 pairs of words



Hardware descriptions
All gates functioning in parallel at same time

A1+B1


A2+B2

A3+B3

Main Memory
Logic Gates
19


Luật Amdahl: Amdahl’s Law

Gene Amdahl
Computer Pioneer

10/31/21

20


Tiến trình tìm hiểu về kiến trúc máy tính
µProc

1000

60%/yr.

CPU

(2X/1.5yr)


“Moore’s Law”

In p u t
M u l t ip l i e r

In p u t
M u l t ip l i c a n d
32

100

Performance Gap:
(grows 50% / year)

32=>34
s ig n E x
<<1

Single/multicycle

1

34

32

LoadHI

Dcd


Exec

Mem

WB

Dcd

Exec

Mem

WB

Dcd

Exec

Mem

IFetch

IFetch

2

2000

1999


1998

1997

1996

1995

1994

1993

1992

1991

1990

1989

1988

1987

1986

1985

1984


E N C [1 ]

1983

E N C [2 ]

1982

L O r e g is te r
( 1 6 x 2 b it s )

Prev

WB

2

1981

S h if tA ll

H I r e g is t e r
( 1 6 x 2 b its )

Booth
Encoder

2


(2X/10 yrs)

1

1980

2

LoadLO

32

LO[1]

Mem

DRAM

DRAM
C o n tro l
L o g ic

34

Extra
2 bits

IFetch

Exec


10

9%/yr.

R e s u lt[H I]

Dcd

M u lti x 2 / x 1

S u b /A d d

3 4 -b it A L U

32

IFetch

0

3 4x2 M U X

34

ClearHI

Datapaths

Arithmetic


32
34

34

32=>34
s ig n E x

Processor-Memory

LoadM p

Performance

M u l t i p l ic a n d
R e g is te r

E N C [0 ]

L O [1 :0 ]

Time

32

R e s u lt [ L O ]

WB


Pipelining
I/O
10/31/21

SET - HUST

Memory Systems

21


Cấu tạo của máy tính

Processor
Input
Control
Memory

Datapath

10/31/21

Output

SET - HUST

22


Cấu tạo bộ xử lý


10/31/21

SET - HUST

23


Bộ xử lý cơ bản: Bộ nhớ, Khối điều khiển,
Khối tính tốn

10/31/21

SET - HUST

24


Các cấp độ diễn tả trừu tượng
High Level Language
Program (e.g., C)
Compiler
Assembly Language Program (e.g., MIPS)

temp = v[k];
v[k] = v[k+1];
v[k+1] = temp;
lw
lw
sw

sw

$t0, 0($2)
$t1, 4($2)
$t1, 0($2)
$t0, 4($2)

Anything can be represented
as a number,
i.e., data or instructions

Assembler
0000 1001 1100 0110 1010 1111 0101 1000

Machine Language Program (MIPS)

1010 1111 0101 1000 0000 1001 1100 0110
1100 0110 1010 1111 0101 1000 0000 1001
0101 1000 0000 1001 1100 0110 1010 1111

Machine Interpretation

Hardware Architecture Description
(e.g., block diagrams)
Architecture Implementation

Logic Circuit Description
(Circuit Schematic Diagrams)

25



×