[computer hardware, architecture and network] zebo pengzebpe83/teaching/dtn/lec1.pdf · 2 zebo...

20
2005-10-27 1 Datorteknik och datornät [Computer Hardware, Architecture and Network] Zebo Peng Institutionen för datavetenskap (IDA) Linköpings universitet www.ida.liu.se/~HIIC62 2 Zebo Peng, IDA, LiTH Zebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar I Datorteknik — Föreläsningsanteckningar I Objectives Objectives How does a computer work and communicate? 0 Hardware 0 Operating system 0 Computer network Terminology and basic concepts of computer systems and networks. How does a computer work and communicate? 0 Hardware 0 Operating system 0 Computer network Terminology and basic concepts of computer systems and networks.

Upload: others

Post on 16-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

1

Datorteknik och datornät[Computer Hardware, Architecture and Network]

Zebo PengInstitutionen för datavetenskap (IDA)

Linköpings universitet

www.ida.liu.se/~HIIC62

22Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

ObjectivesObjectives

How does a computer work and communicate?0 Hardware0 Operating system0 Computer network

Terminology and basic concepts of computer systems and networks.

How does a computer work and communicate?0 Hardware0 Operating system0 Computer network

Terminology and basic concepts of computer systems and networks.

Page 2: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

2

33Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

KursinnehKursinnehåållll II

Datorhårdvara och maskininstruktion0 Centralenheten och instruktionsutförande.

0 Primärminnet och sekundärminnen.

0 Maskinnära språk och assemblyspråk.

0 Datorarkitektur.

Operativsystem0 Grundläggande principer för operativsystem.

0 Minneshantering.

0 Multiusersystem, time-sharing.

Datorhårdvara och maskininstruktion0 Centralenheten och instruktionsutförande.

0 Primärminnet och sekundärminnen.

0 Maskinnära språk och assemblyspråk.

0 Datorarkitektur.

Operativsystem0 Grundläggande principer för operativsystem.

0 Minneshantering.

0 Multiusersystem, time-sharing.

44Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

KursinnehKursinnehåållll IIII

Datornät (Johan Fagerström)0 Introduktion till datakommunikation.

0 Grundläggande principer för datornät.

0 Protokoll: TCP/IP och OSI-modellen.

0 Internet.

Datornät (Johan Fagerström)0 Introduktion till datakommunikation.

0 Grundläggande principer för datornät.

0 Protokoll: TCP/IP och OSI-modellen.

0 Internet.

Page 3: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

3

55Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

KursmaterialKursmaterial

HuvudlitteraturDatorteknikdelen

0 William Stallings: Computer Organization and Architecture: Designing for Performance, 6th edition, Prentice-Hall.

Datornätdelen

0 James F. Kurose and Keith W. Ross: Computer Networking: A Top-Down Approach Featuring the Internet, 3rd edition, Pearson Education.

Föreläsningsantekningar.

HuvudlitteraturDatorteknikdelen

0 William Stallings: Computer Organization and Architecture: Designing for Performance, 6th edition, Prentice-Hall.

Datornätdelen

0 James F. Kurose and Keith W. Ross: Computer Networking: A Top-Down Approach Featuring the Internet, 3rd edition, Pearson Education.

Föreläsningsantekningar.

66Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

KursmaterialKursmaterial (Cont(Cont’’d)d)

Ytterligare material0 Läsanvisningar (repetitionsfrågor).

Referenslitteratur för kursen0 S. Nachmens: Datasystem och datorsystem,

Studentlitteratur, ISBN 91-44-13153-4.

0 Gunvald Hedemalm: Nätverk från grunden, 3:e upplagan, Pagina, ISBN 91-636-0506-6.

0 V. C. Hamacher, et al.: Computers Organization, McGraw-Hill, ISBN 0-07-114323-8.

Ytterligare material0 Läsanvisningar (repetitionsfrågor).

Referenslitteratur för kursen0 S. Nachmens: Datasystem och datorsystem,

Studentlitteratur, ISBN 91-44-13153-4.

0 Gunvald Hedemalm: Nätverk från grunden, 3:e upplagan, Pagina, ISBN 91-636-0506-6.

0 V. C. Hamacher, et al.: Computers Organization, McGraw-Hill, ISBN 0-07-114323-8.

Page 4: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

4

77Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

FFöörelrelääsningsning II

Maskininstruktion ochmaskininstruktionsutförande

Processenheten

Technologitrender

Sammanfattning

Dator och datorsystem

88Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

What is a computer?What is a computer?

Page 5: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

5

99Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Definition of a ComputerDefinition of a Computer

A computer is a data processing machine which is operated automatically under the control of a list of instructions (called a program) stored in its main memory.

A computer is a data processing machine which is operated automatically under the control of a list of instructions (called a program) stored in its main memory.

Process-enhet

Primär-minne

dataöverföring

komandon

Dator

1010Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

A Computer SystemA Computer SystemA computer system consists of a computer and its peripherals [periferenheter].Computer peripherals include input devices [inenheter], output devices [utenheter], and secondary memories [sekundärminnen].

A computer system consists of a computer and its peripherals [periferenheter].Computer peripherals include input devices [inenheter], output devices [utenheter], and secondary memories [sekundärminnen].

Dator

Sekundär-minne

Datorsystem

Inenhet Utenhet

Page 6: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

6

1111Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Basic Principles of ComputersBasic Principles of Computers

Virtually all modern computer designs are based on the von Neumann architecture principles:Virtually all modern computer designs are based on the von Neumann architecture principles:

Data and instructions are stored in a single read/write memory.

The contents of this memory are addressable by location, without regard to what are stored there.

Execution occurs in a sequential fashion (unless explicitly modified) from one instruction to the next.

Data and instructions are stored in a single read/write memory.

The contents of this memory are addressable by location, without regard to what are stored there.

Execution occurs in a sequential fashion (unless explicitly modified) from one instruction to the next.

CPU

Memory

1212Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Why von Neumann architecture? Why von Neumann architecture? General-purpose, programmable.Instructions can be treated as data.Instruction execution is done automatically.It can be built with very simple electronics components:0 Data processing function is

performed by gates. 0 Data storage function is provided by

memory cells.0 Data communication is achieved by

wires.

General-purpose, programmable.Instructions can be treated as data.Instruction execution is done automatically.It can be built with very simple electronics components:0 Data processing function is

performed by gates. 0 Data storage function is provided by

memory cells.0 Data communication is achieved by

wires.

CPU

Memory

Page 7: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

7

1313Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

11stst Generation of ComputersGeneration of Computers

Built with Vacuum tube [vakuumrör] .

1946-1957

Speed: ~40,000 operations per second

Built with Vacuum tube [vakuumrör] .

1946-1957

Speed: ~40,000 operations per second

Eniac, 1946

1414Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

22ndnd Generation of ComputersGeneration of Computers

Built with transistors.

1958-1964.

Speed: ~200,000 operations per second

Built with transistors.

1958-1964.

Speed: ~200,000 operations per second

The 1st transistor(Bell Labs, 1947)

Page 8: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

8

1515Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

33rdrd Generation of ComputersGeneration of Computers

Built with integrated circuits [integrerad krets].

1965-1971.0 Small scale integration -

1965 on; Up to 100 devices on a chip

0 Medium scale integration - to 1971; 100-3,000 devices on a chip

Speed: ~1,000,000 operations per second.

Built with integrated circuits [integrerad krets].

1965-1971.0 Small scale integration -

1965 on; Up to 100 devices on a chip

0 Medium scale integration - to 1971; 100-3,000 devices on a chip

Speed: ~1,000,000 operations per second.

Chi

p

1616Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

44thth Generation of ComputersGeneration of Computers

Built with large-scale integrated (LSI) circuits.

1972-1977.

3,000 - 100,000 devices on a chip.

Speed: ~10,000,000 operations per second.

Built with large-scale integrated (LSI) circuits.

1972-1977.

3,000 - 100,000 devices on a chip.

Speed: ~10,000,000 operations per second.

LSI

Page 9: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

9

1717Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

55thth Generation of ComputersGeneration of Computers

Built with very-large-scale integrated (VLSI) circuits.

1978-.

100,000 - 100,000,000 devices on a chip

Speed: ~100,000,000 operations per second.

Ultra-large-scale integration = Over 100,000,000 devices on a chip.

Built with very-large-scale integrated (VLSI) circuits.

1978-.

100,000 - 100,000,000 devices on a chip

Speed: ~100,000,000 operations per second.

Ultra-large-scale integration = Over 100,000,000 devices on a chip.

Source: S3

1818Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

MooreMoore’’s Laws Law

Number of transistors per chipNumber of transistors per chipwould double every 1.5 yearswould double every 1.5 years

100M

25M

50M

75M

# of trans.

0080 85 90 9575year

Clock Frequency (every 2 years)Clock Frequency (every 2 years)PerformancePerformanceSoftware sizeSoftware sizeMemory capacityMemory capacity

Page 10: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

10

1919Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Intel Microprocessor EvolutionIntel Microprocessor Evolution

2020Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Processenhet

CPU [CPU [ProcessenhetProcessenhet]]

StyrenhetAritmetiskoch logisk

enhet

The Central Processing Unit (CPU), also called processor, includes two main units:

a program control unit, and an Arithmetic and Logic Unit (ALU).

The Central Processing Unit (CPU), also called processor, includes two main units:

a program control unit, and an Arithmetic and Logic Unit (ALU).

Register Klocka

Page 11: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

11

2121Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

CPU (ContCPU (Cont’’d)d)

The primary function of a CPU is to execute the instructions stored in the main memory.

An instruction tells the CPU to perform one of its basic operations.

The CPU includes also a set of registers, which aretemporary storage devices used to hold control information, key data, and intermediate results.

The operations of the components of a computer are synchronized by a clock unit which generates regular pulses of electronics signals.

Within a clock cycle time, one or several operations is performed. (Ex. clock frequency of a Pentium 3 ≈ 733 MHz.)

The primary function of a CPU is to execute the instructions stored in the main memory.

An instruction tells the CPU to perform one of its basic operations.

The CPU includes also a set of registers, which aretemporary storage devices used to hold control information, key data, and intermediate results.

The operations of the components of a computer are synchronized by a clock unit which generates regular pulses of electronics signals.

Within a clock cycle time, one or several operations is performed. (Ex. clock frequency of a Pentium 3 ≈ 733 MHz.)

2222Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Some Measurement TermsSome Measurement Terms

1 K = 1024 = 210 ≈ 103 (kilo)1 M = 106 ≈ 220 (mega)1 G = 109 ≈ 230 (giga)

1 m = 10-3 (milli)

1 µ = 10-6 (mikro)1 n = 10-9 (nano)

1 mån ≈ 2.6 X106 sekund32 år ≈ 1 X109 sekund

Speed of light ≈ 0.3 X109 meters/second

1 K = 1024 = 210 ≈ 103 (kilo)1 M = 106 ≈ 220 (mega)1 G = 109 ≈ 230 (giga)

1 m = 10-3 (milli)

1 µ = 10-6 (mikro)1 n = 10-9 (nano)

1 mån ≈ 2.6 X106 sekund32 år ≈ 1 X109 sekund

Speed of light ≈ 0.3 X109 meters/second

Page 12: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

12

2323Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Representation of DataRepresentation of Data

Inside a computer, data and control information are all represented in binary format which uses only two basic symbols, 0 and 1.

The two basic symbols are usually represented by electronics signals.

Data are represented as a sequence of bits such as 10100001.

Different coding systems have been used. One commonly used system is ASCII.

Inside a computer, data and control information are all represented in binary format which uses only two basic symbols, 0 and 1.

The two basic symbols are usually represented by electronics signals.

Data are represented as a sequence of bits such as 10100001.

Different coding systems have been used. One commonly used system is ASCII.

2424Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Representation of Numeric DataRepresentation of Numeric Data

The binary system [binära talsystemet] uses the same positional scheme as the decimal system.

The positional values are factors of 2: i.e., 1, 2, 4, 8, 16,... instead of 10.

Binary numbers are added, subtracted, multiplied, and divided directly (no need to convert them to decimal number first).

The binary system [binära talsystemet] uses the same positional scheme as the decimal system.

The positional values are factors of 2: i.e., 1, 2, 4, 8, 16,... instead of 10.

Binary numbers are added, subtracted, multiplied, and divided directly (no need to convert them to decimal number first).

Page 13: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

13

2525Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

The Machine InstructionsThe Machine Instructions

The CPU can only execute machine code [maskinkod] in binary format, called machine instruction [maskininstruktion].

A machine instruction specifies the following information:0 Operation code [operationskod];

0 Operands [operand]

• Where: in memory, registers, or instruction;

• Addressing mode;

0 Address of the next instruction.

The operation code specifies the type of the instructions:0 data manipulation (arithmetic, logic, etc.)

0 data moving operations (load, I/O, etc.)

0 control operations (conditional branches, etc.)

The CPU can only execute machine code [maskinkod] in binary format, called machine instruction [maskininstruktion].

A machine instruction specifies the following information:0 Operation code [operationskod];

0 Operands [operand]

• Where: in memory, registers, or instruction;

• Addressing mode;

0 Address of the next instruction.

The operation code specifies the type of the instructions:0 data manipulation (arithmetic, logic, etc.)

0 data moving operations (load, I/O, etc.)

0 control operations (conditional branches, etc.)

2626Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Ex. of an Instruction SetEx. of an Instruction Set

1ar -> UTUTUt111

1In -> ARINIn110

1A -> IAR om ar>=0, annars iar+1->IAR

PJUMP AHopp påplus

101

1A -> IAR (PC)JUMP AHopp100

2ar-m(A) -> arSUB ASubtrahera011

2ar+m(A) -> arADD AAddera010

2ar -> m(A)STORE ASkriv001

2m(A) -> ARLOAD ALäs000

Tid(µs)

VerkanInstruktions-förkortning

BetydelseOP

Page 14: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

14

2727Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

CPU

Instruction ExecutionInstruction Execution

Styrenhet

Primärminne

Adress Data

Aritmetiskoch logisk

enhet

IAR (PC)

MAR

AR

MBR

IR

2828Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Instruction ExecutionInstruction Execution

CPU

StyrenhetAritmetiskoch logisk

enhet

IAR (PC)

MAR

AR

MBR

IR

fetch decode execute

fetch cycle [hämtfas] execute cycle [exekveringsfas]

PC -> MARM[MAR] -> MBRMAR -> IRPC + 1 -> PC

Decode(IR) Perform the specified operation

(memory access may be needed)(PC may be changed)

[hämta] [avkoda] [exekvera]

Page 15: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

15

2929Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

CPU

Ex Ex ppåå instruktionsutfinstruktionsutfööranderande

Styrenhet

Primärminne

Adress Data

Aritmetiskoch logisk

enhet

IAR (PC)

MAR

AR

MBR

IR

3030Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Ex Ex ppåå instruktionsutfinstruktionsutfööranderande

Primärminne

Adress Data

CPU

Styrenhet

A := A + B – C;goto S1

LOAD 3715ADD 3716SUB 3717STORE 3715JUMP 2012

102015

XXX XXXX

ABC

S1

10131014101510161017

371537163718

2012

……

Page 16: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

16

3131Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Ex Ex ppåå instruktionsutfinstruktionsutfööranderande

CPU

Styrenhet

Primärminne

Adress Data

Aritmetiskoch logisk

enhet

IAR (PC)

MAR

AR

TR

IR

01013

11013

2

3232Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Ex Ex ppåå instruktionsutfinstruktionsutfööranderande

Primärminne

Adress Data

CPU

Styrenhet

A := A + B – C;goto S1

LOAD 3715ADD 3716SUB 3717STORE 3715JUMP 2012

102015

XXX XXXX

ABC

S1

10131014101510161017

371537163718

2012

……

2

1013 LOAD 3715

Page 17: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

17

3333Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Ex Ex ppåå instruktionsutfinstruktionsutfööranderande

CPU

Styrenhet

Primärminne

Adress Data

Aritmetiskoch logisk

enhet

IAR (PC)

MAR

AR

MBR

IR

01013

11013

2

2’LOAD 3715

3LOAD 3715

41014

LOAD 3715

The fetch cycle:

3434Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Ex Ex ppåå instruktionsutfinstruktionsutfööranderande

CPU

Styrenhet

Primärminne

Adress Data

Aritmetiskoch logisk

enhet

IAR (PC)

MAR

AR

MBR

IR

1013

1013 LOAD 3715

LOAD 3715

1014

Decoding5

The fetch cycle:

Page 18: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

18

3535Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Ex Ex ppåå instruktionsutfinstruktionsutfööranderande

CPU

Styrenhet

Primärminne

Adress Data

Aritmetiskoch logisk

enhet

IAR (PC)

MAR

AR

MBR

IR

1013

3715 LOAD 3715

LOAD 3715

1014

The execution cycle:

1

2

3636Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Ex Ex ppåå instruktionsutfinstruktionsutfööranderande

Primärminne

Adress Data

CPU

Styrenhet

A := A + B – C;goto S1

LOAD 3715ADD 3716SUB 3717STORE 3715JUMP 2012

102015

XXX XXXX

ABC

S1

10131014101510161017

371537163718

2012

……

3715 10

2

Page 19: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

19

3737Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Ex Ex ppåå instruktionsutfinstruktionsutfööranderande

CPU

Styrenhet

Primärminne

Adress Data

Aritmetiskoch logisk

enhet

IAR (PC)

MAR

AR

MBR

IR

1013

3715 10

LOAD 3715

1014

The execution cycle:

1

2

310

3838Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

Machine CyclesMachine Cycles

The execution of an instruction is carried out in a machine cycle (instruction cycle).

The CPU executes one instruction after the other, cycle by cycle, repeatedly.

The machine cycle time (or instruction execution time) of a computer gives an indication of its performance (speed).

Ex. a computer can have a performance of 733 MIPS (Millions of Instructions Per Second).

Since different instructions need different time to execute, the average instruction execution time [medelinstruktionstid] is used to calculate performance.

The execution of an instruction is carried out in a machine cycle (instruction cycle).

The CPU executes one instruction after the other, cycle by cycle, repeatedly.

The machine cycle time (or instruction execution time) of a computer gives an indication of its performance (speed).

Ex. a computer can have a performance of 733 MIPS (Millions of Instructions Per Second).

Since different instructions need different time to execute, the average instruction execution time [medelinstruktionstid] is used to calculate performance.

Page 20: [Computer Hardware, Architecture and Network] Zebo Pengzebpe83/teaching/dtn/lec1.pdf · 2 Zebo Peng, IDA, LiTH 3 Datorteknik — Föreläsningsanteckningar I Kursinnehåll I Datorhårdvara

2005-10-27

20

3939Zebo Peng, IDA, LiTHZebo Peng, IDA, LiTH Datorteknik — Föreläsningsanteckningar IDatorteknik — Föreläsningsanteckningar I

SummarySummary

A computer executes repeatedly a series of instructions (called programs) stored in its main memory:

0 It performs data processing operations specified by the programs.

0 It runs the programs automatically, with no need for human intervention.

0 It can perform the operations in extremely high speed.

0 It can store and manipulate a large amount of data.

0 It can communicate with each other and with users in an efficient way.

0 It represents program and data in the same way, which leads to flexibility.

A computer executes repeatedly a series of instructions (called programs) stored in its main memory:

0 It performs data processing operations specified by the programs.

0 It runs the programs automatically, with no need for human intervention.

0 It can perform the operations in extremely high speed.

0 It can store and manipulate a large amount of data.

0 It can communicate with each other and with users in an efficient way.

0 It represents program and data in the same way, which leads to flexibility.