Вы находитесь на странице: 1из 18

Computer Structure

CS1251 Computer Organization Carl Hamacher

copyright 2011-2015

WWW.VidyarthiPlus.in

Computer Functional Units

Input Memory Output


I/O

Arithmetic & Logic Control


Processor

copyright 2011-2015

WWW.VidyarthiPlus.in

Processor and Memory


MEM

MAR PC IR

MDR R0 R1
. . .

Control

ALU

Rn-1

Processor

MAR - Memory Address Register MDR - Memory Data Register


copyright 2011-2015

PC - Program Counter IR - Instruction Register


3

WWW.VidyarthiPlus.in

Computer Instructions
Assembly Language
MOVE NUM1,R1 MOVE #1,R2 ADD #1,R1 ADD R1,R2

Register Transfer Notation


R1 [NUM1] R2 1 R1 1 + [R1] R2 [R1] + [R2]

copyright 2011-2015

WWW.VidyarthiPlus.in

Example Instruction
MOVE NUM1,R1

Fetch
MAR [PC] PC [PC] + 1 MDR [MEM([MAR])] IR [MDR]

Execute
MAR NUM1 MDR [MEM([MAR])] R1 [MDR]

copyright 2011-2015

WWW.VidyarthiPlus.in

Another Example
ADD #1,R1

Fetch
MAR [PC] PC [PC] + 1 MDR [MEM([MAR])] IR [MDR]

Execute
R1 1 + [R1]

copyright 2011-2015

WWW.VidyarthiPlus.in

Single-Bus Structure

Input

Output

Memory

Processor

copyright 2011-2015

WWW.VidyarthiPlus.in

Single-Bus Architecture (HW1)


BUS A

MAR MEM MDR Y

ALU R

copyright 2011-2015

WWW.VidyarthiPlus.in

Single-Bus Architecture (HW3)


BUS A 6

MAR
1

6 6

MEM MDR
MUX
2 1 2 1

PC IR
2

6 MUX

REGS
A ALU R B

copyright 2011-2015

WWW.VidyarthiPlus.in

Design Project Architecture


BUS A BUS B BUS C

PC
1

IR 2
A1 A2

1 2

REGS

MUX

ALU R
B NZVC
2 3

MDR 1

MAR

MEM
copyright 2011-2015 WWW.VidyarthiPlus.in 10

System Software
Compiler
High-level Language Machine Language

Assembler
Assembly Language Machine Language

Text Editor
Keyboard Input File

Operating System
Control Sharing & Interaction Assign & Manage Resources
Memory Disk Space

Handle I/O
copyright 2011-2015 WWW.VidyarthiPlus.in 11

Memory Performance

Main Memory

Cache Memory

Processor

copyright 2011-2015

WWW.VidyarthiPlus.in

12

Processor Clock
CLK

Period (P) Rate (R)

R = 1/P 1 GHz = 1/1ns

copyright 2011-2015

WWW.VidyarthiPlus.in

13

Performance Equation
Processor Execution Time (T) Number of Machine Language Instructions (N) Average Steps per Machine Instruction (S) Clock Rate (R)

NS T= R
Performance Measurement (Benchmarking)

copyright 2011-2015

WWW.VidyarthiPlus.in

14

Pipelining
I1 F1 E1 F2 I2 E2 F3 I3 E3

Sequential Execution I1 I2 I3 F1 E1 F2 E2 F3 E3

Pipelined Execution
copyright 2011-2015 WWW.VidyarthiPlus.in 15

Parallel Processing
Parallel Execution
Superscalar

Multiprocessors
Shared-Memory

Multicomputers
Message-Passing

copyright 2011-2015

WWW.VidyarthiPlus.in

16

CISC vs RISC
Complex Instruction Set Computers (CISC)
Smaller N Larger S

Reduced Instruction Set Computers (RISC)


Larger N Smaller S Easier to Pipeline

copyright 2011-2015

WWW.VidyarthiPlus.in

17

Review
Binary Hex 2's-complement Overflow

copyright 2011-2015

WWW.VidyarthiPlus.in

18