This presentation is the property of its rightful owner.
Sponsored Links
1 / 51

Архитектура компьютера PowerPoint PPT Presentation


  • 152 Views
  • Uploaded on
  • Presentation posted in: General

данные. управление. Архитектура компьютера. Архитектура – принципы действия и взаимосвязи основных устройств компьютера (процессора, ОЗУ, внешних устройств). Принстонская архитектура (фон Неймана):. ОЗУ (программа и данные). прямой доступ к памяти. прямой доступ к памяти.

Download Presentation

Архитектура компьютера

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


3001413

(, , ).

( ):

( )

.

( )


3001413

( )

( , )

( , )


3001413

, ,

, , , ,

, .

, .


3001413

, . :

- , , ;

- , ;

- , (, /).


3001413

, ,


3001413

, -, .. [ .. . .: , 1980. 279 ., .]: - " , : , . , , , . . . . , , , , , . , . . : , . , ( , , , ) . , ".


3001413


3001413

k c

n


3001413

,


3001413

, .

, .


3001413

adding the contents of memory locations A and B

The CPU

Consists of:

  • ALU (Arithmetic and Logic Unit),

  • The Registers (or Index Registers) - Local storage used as a scratchpad for temporary storage during calculations

  • The Control Unit


3001413

  • , .

  • :

  • ( ):

  • ( )

  • ( )

  • ( , MMX/SSE)

  • :

  • EAX, EBX, ECX, EDX, EBP, ESI, EDI, ESP 32-x x86

  • AX, BX, CX, DX 16-

  • AH, AL, BH, BL, CH, CL, DH, DL 8- ( 16- )

  • , AH - high AX - 8

  • AL - low AX - 8

  • IP, SP (instruction pointer, stack pointer)

  • EFLAGS

  • Flags (ZF, CF) , ..

  • MM0, MM1 MMX


3001413

The Arithmetic and Logic Unit (ALU)

The ALU implements a variety of operations

For example

  • ADD

  • SUB

  • NOT

  • OR

    The list of operations the ALU can perform is referred to as the Instruction Set

    Different CPUs implement different Instruction Sets

, .

:

  • ()

  • ( ).


3001413

Recall

Computers use the Fetch Execute Cycle to execute instructions

The Fetch-Execute Cycle

At a generic level, computers use a Fetch-Execute Cycle

  • Use the Program Counter, (PC) to Fetch the Next Instruction to be Executed, from Memory

  • Decode the Opcode

  • Are operands required? If so, copy Operands from Main Memory

  • Execute the Instruction

  • 5 Return result to its memory location, if required

  • Update PC

  • Go to Step 1


3001413

  • (IP = Instruction Pointer) , .

  • IP

  • , , . , IP .

  • .

  • .

  • .

  • .

  • 1-5 .

AB3D16

AB3D16


3001413

  • , ,


3001413

PC = Program Counter (stores the address of the next instruction to be executed)

IR = Instruction Register (stores the instruction to be executed)

AC = Accumulator (General Purpose Register)

Memory is 16 bits long.

Instructions are

Operation, Operand

1 = Local memory address to Accumulator

5 = Add value in memory address to Accumulator,

2 = Store value in accumulator to memory address


3001413

A simple example of how this is implemented


3001413

The list of instructions that a CPU can execute are called the Instruction Set

Obviously, CPUs implement different types of Instructions

  • Move (Load and store)

    • Memory to memory; memory to CPU

    • register to register

  • Arithmetic and Logic

    • Add; shift; Compare

  • Branch

    • change in direction of program flow

  • I/O

  • Miscellaneous

    • Flag; Wait; Start; Stop


3001413

, .

. ( ), .

:

(, MOV)

(ADD, SUB)

(OR, AND)

(SHL, SHR)

- (IN, OUT)

(JMP, CALL)

(JC, JZ, REP)

(EMMS, MOVQ, ..)


3001413

  • In general, a computer instruction consists of a function (Opcode) and one or more operands. For example,

  • ADD x, y

  • Add is the function or opcode; x and y are both operand addresses.

  • Operand addresses may refer to memory or registers.

  • We will look at how earlier machines with much smaller memories and CPUs implemented Move and Arithmetic operations.


3001413

Different Instruction Sets are classified by size of their instruction

  • 3 address instructions (ADD A,B,C)

  • 2 address instructions (ADD A,B)

  • 1 address instructions (ADD A)

    Consider the difference in coding the Expression

    A=(B x C) + D


3001413

When using three Address instruction, A = (B X C) + D

Mult B,C,A//A = B x C

ADD D,A,A//A = A + D


3001413

Two Address Instruction

Load B,A\\ A = B

Mult C,A\\ A = A x C

Add D,A\\A = A + D


3001413

When using one address instruction, a special register on the CPU called the Accumulator is used. The Accumulator implicitly stores the results of operations

Load B\\ Acc = B

Mult C\\ Acc = Acc X C

Add D\\ Acc = Acc + D

Store A\\ A = Acc


3001413

  • A further distinction between processors and therefore instruction sets - is to do with the principle of the number of instructions in the instruction set.

  • We can classify processors as being whether they are CISC or RISC.

    • Complex Instruction Set Computer

    • Reduced Instruction Set Computer

  • The RISC machine has fewer instructions and a restricted access to the Memory allows only Load and Store operations and does nearly everything via Register operations.

  • The CISC machine allows a wide range of memory operations. For example, Mult codes which could operate on both memory and register operands


3001413

. , . CISC-, omplexInstructionSetComputers. , , Intel 80x86 Motorola 68000. , , RISC-, ReducedInstructionSetComputers. RISC-: DEC Alpha, Power PC, IntelItanium.

, CISC- RISC-, . , , :


3001413

  • , , .. ;

  • ;

  • -;

  • , . , - : ( ) . , , ;

  • - (pipeline), .


3001413

, . . .

() ().

, , .

.

.


3001413

  • d = 5

  • n = 9

9-

9-

5-


3001413

(n * d) / (n + d), n , , d .


Pentium

Pentium

, ;

- , ;

;

8 ;

80x86.


Pentium ii

Pentium II


3001413

An array of processor of the ILLIAC IV type.


3001413


3001413

(a) 16 ,

(b) , 16 ,


3001413

(1)


  • Login