CPU organization
CPU organization
CO - Dr S.Elango
Three types of CPU Organization
CO - Dr S.Elango
Single Accumulator Organization
CO - Dr S.Elango
General Registers Organization
GeneralCORegisters
- Dr S.Elango Organization
General Registers Organization
CO - Dr S.Elango
Stack Organization
A stack can be organized as a collection
of a finite number of registers or memory
words. Figure shows the organization of a
64-word stack. The stack pointer register
SP consists of address of top of the stack
(TOS).
CO - Dr S.Elango
Register Stack Organization
CO - Dr S.Elango
The Polish mathematician Lukasiewicz showed that arithmetic expressions can be
represented in prefix notation, often referred to as Polish notation, which places
the operator before the operands. The postfix notation, referred to as reverse
Polish notation (RPN), places the operator after the operands. The following
examples demonstrate the three representations:
The reverse Polish notation is in a form suitable for stack manipulation in Stack
organization.
The expression
(A * B) + (C * D)
is written in reverse Polish notation as
AB * CD * +
CO - Dr S.Elango
Instruction Format
3. A mode field that specifies the way the operand or the effective address
is determined.
CO - Dr S.Elango
The number of address fields in the instruction format of a computer
depends on the internal organization of its registers inside the CPU. Most
computers fall into one of three types of CPU organizations:
CO - Dr S.Elango
One Address Instruction (Single Accumulator Organization) :
ADD X
where X is the address of the operand. The ADD instruction in this case results in
the operation AC AC + M [X]. AC is the accumulator register and M [X]
symbolizes the memory word located at address X.
CO - Dr S.Elango
Evaluation of expression X = (A + B) * (C + D) using different address instructions
CO - Dr S.Elango
Addressing Mode
It specifies the way the operands are to be accessed. The Addressing mode
offers the following advantages
CO - Dr S.Elango
Implied Mode: In this mode the operands are specified implicitly in the
instruction. For example, the instruction "complement accumulator“ is an
implied-mode instruction because the operand in the accumulator register is
implied in the definition of the instruction.
Immediate Mode: In this mode the operand is specified in the instruction itself.
In other words, an immediate-mode instruction has an operand field rather than
an address of operand.
Direct Address Mode: In this mode the effective address of operand is specified
in the address part of the instruction.
Indirect Address Mode: In this mode the address field contains address of
address of the operand.
CO - Dr S.Elango
Register Direct Mode: In this mode the operands are in registers that reside
within the CPU.
Register Indirect Mode: In this mode the instruction specifies a register in the
CPU whose contents give the address of the operand in memory. In other
words, the selected register contains the address of the operand rather than
the operand itself.
CO - Dr S.Elango
A few addressing modes require that the address field of the instruction be
added to the content of a specific register in the CPU. The CPU register
used in the computation may be the program counter, an index register, or
a base register. The effective address in these modes is obtained from the
following computation:
Effective address = Address part of instruction + Content of CPU register
Relative Address Mode: In this mode the content of the program counter is
added to the address part of the instruction in order to obtain the effective
address.
CO - Dr S.Elango
PROGRAM CONTROL
Program control instruction, when executed, may change the
address value in the program counter and cause the flow of
execution control to be altered.
CO - Dr S.Elango
PROGRAM CONTROL - PSW (Program Status Word)
ALU circuit in the CPU is supplemented with a status register
where status bits can be stored for further analysis. Status bits are
also called condition-code bits or flag bits.
The four status bits are symbolized by C. S, Z, and V. The bits are
set or cleared as a result of an operation performed in the ALU.
SP <- SP - 1
M [SP] <-PC
PC <- Interrupt vector address
The last instruction of every ISR, commonly called return instruction, transfers
the return address from the temporary location into the program counter.
PC <-M [SP]
SP <- SP + 1
CO - Dr S.Elango
RISC Vs CISC
Computers with large number of instructions as well as
complex instruction formats is classified as a complex
instruction set computer, abbreviated CISC.
6. Microprogrammed control
CO - Dr S.Elango
RISC Characteristics
7. Hardwired control
CO - Dr S.Elango