processor structure and operation principles

26
Processor structure and operation principles (1)Processor structure - the control unit and the arithmetic unit are handled in one unit and are called processor - control unit is one that controls all the operations of the computer. It retrieves, decodes and executes, one by one, in order the instructions stored in the main storage unit.

Upload: josu1

Post on 07-Apr-2015

215 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Processor Structure and Operation Principles

Processor structure and operation principles

(1) Processor structure- the control unit and the arithmetic unit are handled in one unit and are called processor- control unit is one that controls all the operations of the computer. It retrieves, decodes and executes, one by one, in order the instructions stored in the main storage unit.

Page 2: Processor Structure and Operation Principles

• Main functions of the control unit– Retrieval of the instructions in the main storage

unit– Decoding of the retrieved instructions using the

instruction decoder– According to the decoding, transmission of the

specifications required for the execution of the instructions to each unit

The system by which instructions are executed in this way, one by one, is called the sequential control system

Page 3: Processor Structure and Operation Principles

Sequential control system

Page 4: Processor Structure and Operation Principles

- arithmetic unit performs arithmetic, logical, comparison, branch and other processes on the data assigned for processing

Page 5: Processor Structure and Operation Principles

(2) Processor operation principles Instruction readout and decoding - The program is a set of instructions that indicates

the “do.. ” to the computer - Machine language instructions Instruction part: indicates instruction &

operations Address part: the address and register of

the main storage unit subject to processing

Page 6: Processor Structure and Operation Principles

• Instruction format– Zero address format• Performs operations using a dedicated register called a

stack pointer . The stack pointer is the register that stores the address to be returned to (return address) after execution completion.

– Single address format• Performs operations between the content of the main

storage unit specified in the address and the accumulator data. The accumulator stores operation values and operation results.

Page 7: Processor Structure and Operation Principles

– Two address format• Specifies two addresses and uses the address data

specified on the main storage unit

– Three address format• Specifies two addresses to be used for the operation,

and the address where the operation result is to be stored

Page 8: Processor Structure and Operation Principles

• Instruction readout – 1 word = 16 bits– 1 Instruction = 32 bits = 2 words

Page 9: Processor Structure and Operation Principles

• Instruction decoding– Decoder decodes the type of work indicated by the instruction

Page 10: Processor Structure and Operation Principles

• On the other hand, the content of the address part of the instruction is transferred to the address bus

Page 11: Processor Structure and Operation Principles

• Instruction Execution– If, as a result of decoding the instruction part and the address part using the instruction decoder,

the instruction is found to say “retrieve and transfer to the processor the contents of address 100 of the mains storage unit”

– If, as a result of decoding the instruction part and the address part of the instruction register, the instruction is found to say “Add the contents of address 100 of the main storage unit to the GR1 contents and store them in GR1”

Page 12: Processor Structure and Operation Principles

• Storage of the process result

Page 13: Processor Structure and Operation Principles

• Hardware structure from the instruction readout to its decoding and execution

Page 14: Processor Structure and Operation Principles

Various registers• Program Counter

- At the beginning, the processor specified address 101, but under whose instructions?- Also called instruction address register, instruction counter or sequential control

counter

Page 15: Processor Structure and Operation Principles

• Accumulator– Used exclusively to store operation results and

operation values

Page 16: Processor Structure and Operation Principles

• Index register– When an address in the main storage unit is

specified, the act of changing the address of the address part of the instruction is called address modification.

Page 17: Processor Structure and Operation Principles

• Base address register– Stores the program top address

Page 18: Processor Structure and Operation Principles

• Flag register – Stores information related to the operation result

(if it is positive or negative or 0), to the existence of carry, overflow, etc.

• Complement Register– Generates integer complements in order to

perform operations in the addition circuit.

Page 19: Processor Structure and Operation Principles

• PSW (Program status word)– The program counter, flag register, and other

information are registered in the PSW. In case of program interruption in the processor occurs, the program execution can be resumed using the PSW information.

Page 20: Processor Structure and Operation Principles

• (3) Address specification mode– The address part of the instruction specifies the

main storage unit address and the register subject to processing.

TYPES– Immediate Specification• The data itself is contained in the address part. It is not

necessary to access the main storage unit address.

Page 21: Processor Structure and Operation Principles

– Direct Address Specification• the address of the data subject to processing is

contained in the address part

Page 22: Processor Structure and Operation Principles

- Index Address Specification• the address part is divided into the section that

specifies the number of the index register and the constant section, and the effective address is the result of the following addition

(Content of the register content specified with the register number) + (Address constant)

Page 23: Processor Structure and Operation Principles

– Register address specification• The register number is stored in the address part and

the address is stored in the register of that number

Page 24: Processor Structure and Operation Principles

– Base address specification• The program starting address is stored in the base

register. • The result of the addition of the address contained in

this base register and the address constant becomes the effective address.

Page 25: Processor Structure and Operation Principles

– Relative address specification• The result of the addition of the address of the

instruction being executed at the present time (value of the program counter) and the address of the address part become the effective address.

Page 26: Processor Structure and Operation Principles

– Indirect address specification• The address of the data subject to processing is

contained in the address specified in the address part.