Top Banner
06/06/22 445_01 1 Computer Organization Course Web Site http://www.engr.uconn.edu/ ~ibrahim/hardware
32
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 1

04/09/23 445_01 1

Computer Organization

Course Web Sitehttp://www.engr.uconn.edu/~ibrahim/hardware

Page 2: Chapter 1

04/09/23 445_01 2

Textbooks

Computer Organization, 5th ed. Carl Hamacher, Zvonko Vranesic, Safwat

Zaky

Page 3: Chapter 1

04/09/23 445_01 3

Processor

Computer Functional Units

Memory

Arithmetic& Logic

Control

I/O

Input

Output

Page 4: Chapter 1

04/09/23 445_01 4

Course Organization

Computer Structure (Ch 1) Instruction Sets & Addressing Modes (Ch 2) Control Unit Design (Ch 7)

Computer Arithmetic (Ch 6) Memory (Ch 5) Input/Output (Ch 4) Pipelining (Ch 8) Embedded Systems (Ch 9)

Page 5: Chapter 1

04/09/23 445_01 5

Computer Information (Binary)

(Machine) Instructions (Machine Language) Programs

Data 2's complement BCD ASCII

Page 6: Chapter 1

04/09/23 445_01 6

Output Display Printer Speakers

I/O

Input Keyboard Mouse Microphone Camera Scanner

Serial Communications Network Modem

Page 7: Chapter 1

04/09/23 445_01 7

Memory

Primary Random Access

Memory (RAM) Read Only

Memory (ROM)

Organization Word Address Read/Write

Secondary Magnetic

Disks Tape

Optical Disks

Hierarchy Cache Main Virtual

Page 8: Chapter 1

04/09/23 445_01 8

ALU

Arithmetic Addition Subtraction Multiplication Division Comparison

Logic AND OR NOT XOR

Registers Store Shift

Page 9: Chapter 1

04/09/23 445_01 9

Control Unit

Coordinates/Directs other Units

Computer Operation Input

Program/Data stored in Memory Processing

Information fetched into RegistersProcessed by ALU

Output

Page 10: Chapter 1

04/09/23 445_01 10

History

First Generation (miliseconds) von Neumann (stored program) Vacuum Tubes Magnetic Core Memory Teletypes/Magnetic Tapes

Second Generation (microseconds) Transistor High-level Languages (Fortran)

Compilers I/O Processors

Page 11: Chapter 1

04/09/23 445_01 11

History

Third Generation Integrated Circuits Microprogramming Parallelism/Pipelining Operating Systems (sharing) Cache/VM

Fourth Generation (nanoseconds) VLSI (Single Chip Microprocessor) Personal Computers Networks

Page 12: Chapter 1

04/09/23 445_01 12

Processor

Computer Functional Units

Memory

Arithmetic& Logic

Control

I/O

Input

Output

Page 13: Chapter 1

04/09/23 445_01 13

MAR - Memory Address Register

MDR - Memory Data Register

PC - Program Counter

IR - Instruction Register

Control Unit

Arithmetic Logic Unit

Page 14: Chapter 1

04/09/23 445_01 14

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]

Page 15: Chapter 1

04/09/23 445_01 15

The “fetch-execute cycle”

Fetch the instruction whose address is in the program counter

Increment the PC so it holds the address of the next instruction

Execute the instruction just fetched Fetch the next instruction Etc.

Page 16: Chapter 1

04/09/23 445_01 16

Arithmetic/Logic Unit

Memory

Control Unit

Instruction Register

Program CounterData Register

Data Register

instruction

instruction fetch

Page 17: Chapter 1

04/09/23 445_01 17

Memory

CPU

Bus

MAR MDR

instruction address

instruction

PC IR

Memory Control

Instruction Fetch

Page 18: Chapter 1

04/09/23 445_01 18

Arithmetic/Logic Unit

Memory

Control Unit

Instruction Register

Program CounterData Register

Data Register

data

instruction execute

data

Page 19: Chapter 1

04/09/23 445_01 19

Memory

CPU

Bus

MAR MDR

operand (data) address

data

IR R1

Memory Control

Instruction Execution

Page 20: Chapter 1

04/09/23 445_01 20

Example Instruction

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

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

MOVE NUM1,R1

Page 21: Chapter 1

04/09/23 445_01 21

Another Example

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

Execute R1 1 + [R1]

ADD #1,R1

Page 22: Chapter 1

04/09/23 445_01 22

Single-Bus Structure

Memory ProcessorInput Output

Page 23: Chapter 1

04/09/23 445_01 23

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

Page 24: Chapter 1

04/09/23 445_01 24

Memory Performance

MainMemory

ProcessorCacheMemory

Page 25: Chapter 1

04/09/23 445_01 25

Processor Clock

Period (P)

Rate (R)

CLK

R = 1/P

1 GHz = 1/1ns

Page 26: Chapter 1

04/09/23 445_01 26

Performance Equation

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

MIPS: Millions of instructions per second Megaflops: Millions of floating point operations per second Megahertz: Millions of clock cycles per second

T N S

R

Page 27: Chapter 1

04/09/23 445_01 27

Pipelining

F1 E1

I1

F2 E2

I2

F3 E3

I3

Sequential Execution

F1 E1I1

F2 E2I2

F3 E3I3

Pipelined Execution

Page 28: Chapter 1

04/09/23 445_01 28

Parallel Processing

Parallel Execution Superscalar

Multiprocessors Shared-Memory

Multicomputers Message-Passing

Page 29: Chapter 1

04/09/23 445_01 29

Multiprocessing, multitasking.

A system that provides for concurrent execution

of multiple programs, i.e., manages multiple processes

Programs share use of the processor (take turns).

Multiprogramming

Page 30: Chapter 1

04/09/23 445_01 30

1) Multiprogramming

2) Parallel processing (multiple

processors)

Multiprocessing:

Multitasking:

1) Multiprogramming

2) A particular form of multiprogramming

depending on context

depending on context

Multiprogramming

Page 31: Chapter 1

04/09/23 445_01 31

Figure 1.4. User program and OS routine sharing of the processor.

Printer

Disk

Program

routinesOS

Timet 0 t 1 t 2 t 3 t 4 t 5

Figure 1.4. User program and OS routine sharing of the processor.

Page 32: Chapter 1

04/09/23 445_01 32

CISC vs RISC

Complex Instruction Set Computers (CISC) Smaller N Larger S

Reduced Instruction Set Computers (RISC) Larger N Smaller S Easier to Pipeline