The document describes the organization and architecture of the central processing unit (CPU). It discusses the three major parts of the CPU: the register set, arithmetic logic unit (ALU), and control unit. It also covers general register organization using a 7-register bus organization as an example. Additionally, it discusses stack organization using both register stacks and memory stacks. Finally, it examines instruction formats and addressing modes that provide versatility for programming while reducing the number of bits needed in instructions.
Bca 2nd sem-u-4 central processing unit and pipelineRai University
The document discusses the central processing unit (CPU) and pipeline. It covers major CPU components like registers, arithmetic logic unit (ALU), and control unit. It describes general register and stack organizations. Instruction formats, addressing modes, and common data transfer and manipulation instructions are explained. Different addressing modes like register, direct, indirect, and relative addressing are defined with examples. The document provides details about instruction fields and one, two, and three address instructions.
This document provides information on 8088 microprocessor instruction set. It discusses:
1) The basic components of a program including instructions and machine code.
2) Examples of instruction formats and operations for data transfer, arithmetic, logical, and shift instructions.
3) Details on multiplication and division instructions including examples of multiplying and dividing operations.
4) Key benefits of assembly language such as taking up less memory and executing faster than high-level languages.
Logical Instructions used in 8086 microprocessorRabin BK
It contains all the types of instruction required for performing logical operation in 8086 microprocessor. It is useful from the examination point of view as well.
The document discusses fundamentals of assembly language including data types, operands, data transfer instructions like MOV, arithmetic instructions like ADD and SUB, and addressing modes. It provides examples of assembly language code to perform operations like copying a string, converting between Celsius and Fahrenheit, and using various addressing modes.
The document provides an introduction to 8086 assembly language programming. It discusses simple sequence programs, jumps and flags, programming structures like decision making and loops. It also covers instruction timing, strings, procedures, and macros in 8086 assembly language.
This document discusses various strategies for register allocation and assignment in compiler design. It notes that assigning values to specific registers simplifies compiler design but can result in inefficient register usage. Global register allocation aims to assign frequently used values to registers for the duration of a single block. Usage counts provide an estimate of how many loads/stores could be saved by assigning a value to a register. Graph coloring is presented as a technique where an interference graph is constructed and coloring aims to assign registers efficiently despite interference between values.
An instruction format specifies an operation code and operands. There are three main types of instruction formats: three address instructions specify memory addresses for two operands and one destination; two address instructions specify two memory locations or registers with the destination assumed to be the first operand; and one address instructions use a single accumulator register for all data manipulation. Addressing modes further specify how the address field of an instruction is interpreted to determine the effective address of an operand. Common addressing modes include immediate, register, register indirect, auto-increment/decrement, direct, indirect, relative, indexed, and base register addressing.
The document describes the instruction set of the 8086 microprocessor. It discusses the different types of instructions including data transfer instructions like MOV, PUSH, POP, XCHG, IN, OUT, and XLAT. It also covers addressing modes, instruction formats, and the various registers used by the 8086 microprocessor like the stack pointer and flag register. In total there are 14 different data transfer instructions described that are used to move data between registers, memory, ports, and the flag and stack pointers.
Bca 2nd sem-u-4 central processing unit and pipelineRai University
The document discusses the central processing unit (CPU) and pipeline. It covers major CPU components like registers, arithmetic logic unit (ALU), and control unit. It describes general register and stack organizations. Instruction formats, addressing modes, and common data transfer and manipulation instructions are explained. Different addressing modes like register, direct, indirect, and relative addressing are defined with examples. The document provides details about instruction fields and one, two, and three address instructions.
This document provides information on 8088 microprocessor instruction set. It discusses:
1) The basic components of a program including instructions and machine code.
2) Examples of instruction formats and operations for data transfer, arithmetic, logical, and shift instructions.
3) Details on multiplication and division instructions including examples of multiplying and dividing operations.
4) Key benefits of assembly language such as taking up less memory and executing faster than high-level languages.
Logical Instructions used in 8086 microprocessorRabin BK
It contains all the types of instruction required for performing logical operation in 8086 microprocessor. It is useful from the examination point of view as well.
The document discusses fundamentals of assembly language including data types, operands, data transfer instructions like MOV, arithmetic instructions like ADD and SUB, and addressing modes. It provides examples of assembly language code to perform operations like copying a string, converting between Celsius and Fahrenheit, and using various addressing modes.
The document provides an introduction to 8086 assembly language programming. It discusses simple sequence programs, jumps and flags, programming structures like decision making and loops. It also covers instruction timing, strings, procedures, and macros in 8086 assembly language.
This document discusses various strategies for register allocation and assignment in compiler design. It notes that assigning values to specific registers simplifies compiler design but can result in inefficient register usage. Global register allocation aims to assign frequently used values to registers for the duration of a single block. Usage counts provide an estimate of how many loads/stores could be saved by assigning a value to a register. Graph coloring is presented as a technique where an interference graph is constructed and coloring aims to assign registers efficiently despite interference between values.
An instruction format specifies an operation code and operands. There are three main types of instruction formats: three address instructions specify memory addresses for two operands and one destination; two address instructions specify two memory locations or registers with the destination assumed to be the first operand; and one address instructions use a single accumulator register for all data manipulation. Addressing modes further specify how the address field of an instruction is interpreted to determine the effective address of an operand. Common addressing modes include immediate, register, register indirect, auto-increment/decrement, direct, indirect, relative, indexed, and base register addressing.
The document describes the instruction set of the 8086 microprocessor. It discusses the different types of instructions including data transfer instructions like MOV, PUSH, POP, XCHG, IN, OUT, and XLAT. It also covers addressing modes, instruction formats, and the various registers used by the 8086 microprocessor like the stack pointer and flag register. In total there are 14 different data transfer instructions described that are used to move data between registers, memory, ports, and the flag and stack pointers.
The 8086 microprocessor has three main units - the Bus Interface Unit (BIU), Execution Unit (EU), and an instruction queue. The BIU fetches instructions and data from memory and I/O devices. The EU decodes and executes instructions using the ALU and flag registers. It also contains general purpose registers like AX, BX, CX and DX. The instruction queue buffers pre-fetched opcodes to improve performance by reducing fetch latency.
The document describes a simple code generator that generates target code for a sequence of three-address statements. It tracks register availability using register descriptors and variable locations using address descriptors. For each statement, it determines the locations of operands, copies them to a register if needed, performs the operation, updates the register and address descriptors, and stores values before procedure calls or basic block boundaries. It uses a getreg function to determine register allocation. Conditional statements are handled using compare and jump instructions and condition codes.
The document discusses instruction sets and their components. It defines an instruction set as the list of instructions available for the CPU, which are encoded in binary machine language or assembly language mnemonics. Each instruction contains an operation code and may include source and destination operand references. Instruction formats can vary in the number of operands from zero to three addresses. Instruction length, encoding techniques, and types of instructions like data transfer, arithmetic, and control instructions are also covered.
The document describes the instruction formats of the 8086 microprocessor. It has 1-6 byte instruction sizes with an opcode field in the first byte. The second byte contains mode, register, and register/memory fields that specify operands. It defines register codes and explains how the mode, register, and register/memory fields are used to determine operands and effective addresses. Examples show how to encode instructions like MOV, SUB, and ADD using the instruction format. Input/output instructions like IN and OUT are also described, indicating how port numbers can be immediate values or specified with the DX register.
This document provides an overview of assembly language programming on the 8086 processor. It includes examples of assembly code using MOV, MUL, and other instructions. It then summarizes various 8086 instruction types like data transfer, arithmetic, logical, and control flow instructions. For each type, it lists some common instructions and provides brief descriptions and examples.
The instruction set of the 8086 microprocessor can be classified into several groups, including data transfer instructions, arithmetic instructions, and processor control instructions. The data transfer instructions include general purpose instructions to move bytes or words between registers and memory locations. Common instructions are MOV, PUSH, POP, and XCHG. The arithmetic instructions perform operations like addition, subtraction, and comparison and affect the processor's flags. Common instructions are ADD, SUB, INC, and CMP. The 8086 instruction set also includes instructions for bit manipulation, string operations, and transferring program execution.
Compiler code optimizations help improve the performance of generated machine code in three ways:
1) Local optimizations improve individual basic blocks without considering control or data flow between blocks. This includes constant folding, propagation, and dead code elimination.
2) Global optimizations analyze control and data flow across basic blocks through techniques like common subexpression elimination.
3) Peephole optimizations make small, machine-specific improvements by examining one or two instructions at a time, such as replacing redundant loads and stores or using architectural idioms.
The document discusses code generation in compilers. It describes the position of a code generator in the compiler model, the different types of target code that can be generated, and considerations for the target machine like instruction sets and addressing modes. It also covers important aspects of code generation like instruction selection, register allocation, evaluation order, and generating code for function calls and stack allocation of activation records.
This document describes 16 assembly language programs for the 8086 microprocessor. It includes programs that increment/decrement 8-bit and 16-bit numbers, take the 1's and 2's complement of numbers, add/subtract/multiply/divide 8-bit and 16-bit numbers, and manipulate strings. It also discusses the use of procedures, stacks, and macros in 8086 assembly language programming. Examples are provided to illustrate how to define and call procedures, use push/pop on the stack, and define macros with parameters.
instruction set of 8086 microprocessor has following categories:
-Data transfer instructions
-Arithmetic instructions
-Logical instructions
-Flag manipulation instructions
-shift and rotate instructions
-String instructions
-8086 assembler directives
The document provides information about the instruction sets of the 8086 microprocessor. It defines what an instruction set is and describes the different instruction formats used by the 8086. The main types of 8086 instructions are then outlined, including data transfer instructions, arithmetic instructions, bit manipulation instructions, branch instructions, and others. Specific instructions like MOV, ADD, SUB, and MUL are explained through examples of their syntax and operation.
The stack in the 8085 microprocessor is a group of memory locations used for temporary storage of data during program execution. Data is stored and retrieved on a last-in, first-out basis. The PUSH instruction stores data in the stack by decrementing the stack pointer and copying register contents to memory. The POP instruction retrieves data from the stack by copying memory contents back to registers and incrementing the stack pointer. Common register pairs that can be pushed and popped include BC, DE, HL, and A and flags.
The document describes the instruction set of the 8086 microprocessor. It discusses 6 types of instructions supported: 1) data transfer instructions, 2) arithmetic instructions, 3) logical instructions, 4) string manipulation instructions, 5) process control instructions, and 6) control transfer instructions. Details are provided on the various instructions under each type, including their mnemonics and functions.
The document discusses the instruction set of the 8085 microprocessor. It is divided into 5 categories: 1) Data Transfer Instructions which move data between registers and memory, 2) Arithmetic Instructions which perform addition, subtraction, incrementing and decrementing, 3) Logical Instructions which perform logical operations like AND, OR, XOR, 4) Branching Instructions which alter program flow unconditionally or conditionally, and 5) Control Instructions which control the operation of the microprocessor like halt. Examples of instructions from each category are provided.
The document discusses code generation in compilers. It covers:
- The main tasks of a code generator are instruction selection, register allocation and assignment, and instruction ordering.
- Code generators map an intermediate representation to target machine code for a specific architecture. This mapping can vary in complexity depending on the level of the intermediate representation and the target architecture.
- Key issues in code generator design include addressing in the target code, representing the program as basic blocks and flow graphs, register allocation, and selecting machine instructions to represent operations.
Addressing mode is the way of addressing a memory location in instruction. Microcontroller needs data or operands on which the operation is to be performed. The method of specifying source of operand and output of result in an instruction is known as addressing mode.
There are various methods of giving source and destination address in instruction, thus there are various types of Addressing Modes. Here you will find the different types of Addressing Modes that are supported in Micro Controller 8051. Types of Addressing Modes are explained below:
1.Register Addressing Mode
2.Direct Addressing Mode
3.Register Indirect Addressing Mode
4.Immediate Addressing Mode
5.Index Addressing Mode
Explanation:
Register Addressing Mode: In this addressing mode, the source of data or destination of result is Register. In this type of addressing mode the name of the register is given in the instruction where the data to be read or result is to be stored.
Example: ADD A, R5 ( The instruction will do the addition of data in Accumulator with data in register R5)
Direct Addressing Mode: In this type of Addressing Mode, the address of data to be read is directly given in the instruction. In case, for storing result the address given in instruction is used to store the result.
Example: MOV A, 46H ( This instruction will move the contents of memory location 46H to Accumulator)
Register Indirect Addressing Mode: In Register Indirect Addressing Mode, as its name suggests the data is read or stored in register indirectly. That is, we provide the register in the instruction, in which the address of the other register is stored or which points to other register where data is stored or to be stored.
Example: MOV A, @R0 ( This instruction will move the data to accumulator from the register whose address is stored in register R0 ).
Also Read: Architecture Of 8051
Immediate Addressing Mode : In Immediate Addressing Mode , the data immediately follows the instruction. This means that data to be used is already given in the instruction itself.
Example: MOV A, #25H ( This instruction will move the data 25H to Accumulator. The # sign shows that preceding term is data, not the address.)
Index Addressing Mode: Offset is added to the base index register to form the effective address if the memory location.This Addressing Mode is used for reading lookup tables in Program Memory. The Address of the exact location of the table is formed by adding the Accumulator Data to the base pointer.
Example: MOVC, @A+DPTR ( This instruction will move the data from the memory to Accumulator; the address is made by adding the contents of Accumulator and Data Pointer.
The document discusses the instruction set of the 8086 microprocessor. It is divided into 7 sections that cover: 1) data transfer instructions like MOV, IN, OUT, PUSH, and POP; 2) arithmetic/logical instructions; 3) branch instructions; 4) shift and rotate instructions; 5) string manipulation instructions; 6) flag manipulation and processor control instructions; and 7) machine control instructions. Examples are provided for each type of instruction to illustrate their operation and effect on registers or memory locations.
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...Hsien-Hsin Sean Lee, Ph.D.
This document discusses techniques for improving instruction fetch throughput in superscalar processors. It begins by explaining that fetch throughput defines the maximum performance and that superscalar processors need to supply more than one instruction per cycle. It then describes some challenges to high bandwidth instruction fetching including misaligned instructions, changes in control flow, and memory latency/bandwidth limitations. The document proceeds to discuss specific techniques like aligned fetching, split cache line access, predication, collapsing buffers, trace caches, and issues related to indexing and redundancy in trace caches.
This document summarizes various arithmetic and logic instructions in x86 assembly language. It discusses increment, decrement, negation, comparison, addition, subtraction, multiplication, division, logical, shift, and rotate instructions. Examples are provided to illustrate how each instruction works and its effect on flags. Application examples also demonstrate how these instructions can be used to input and output decimal numbers.
The document discusses different CPU organizations and instruction formats. It describes three main types of CPU organizations: single accumulator, general register, and stack organizations. It also discusses four main instruction formats: three-address, two-address, one-address, and zero-address formats. Finally, it covers addressing modes which allow flexibility in programming by reducing the number of bits needed to specify memory addresses or operands in instructions.
The CPU is made up of 3 major parts: the register set, control unit, and arithmetic logic unit. The register set stores intermediate values during program execution. The control unit generates control signals and selects operations for the ALU. The ALU performs arithmetic and logic operations. Computer architecture includes instruction formats, addressing modes, instruction sets, and CPU register organization. Registers are organized in a bus structure to efficiently transfer data and perform microoperations under control of the control unit. Common instruction fields are the operation code, address fields, and addressing mode fields. Instructions can be classified by the number of address fields as zero-address, one-address, two-address, or three-address instructions. Common addressing modes specify how operands
The 8086 microprocessor has three main units - the Bus Interface Unit (BIU), Execution Unit (EU), and an instruction queue. The BIU fetches instructions and data from memory and I/O devices. The EU decodes and executes instructions using the ALU and flag registers. It also contains general purpose registers like AX, BX, CX and DX. The instruction queue buffers pre-fetched opcodes to improve performance by reducing fetch latency.
The document describes a simple code generator that generates target code for a sequence of three-address statements. It tracks register availability using register descriptors and variable locations using address descriptors. For each statement, it determines the locations of operands, copies them to a register if needed, performs the operation, updates the register and address descriptors, and stores values before procedure calls or basic block boundaries. It uses a getreg function to determine register allocation. Conditional statements are handled using compare and jump instructions and condition codes.
The document discusses instruction sets and their components. It defines an instruction set as the list of instructions available for the CPU, which are encoded in binary machine language or assembly language mnemonics. Each instruction contains an operation code and may include source and destination operand references. Instruction formats can vary in the number of operands from zero to three addresses. Instruction length, encoding techniques, and types of instructions like data transfer, arithmetic, and control instructions are also covered.
The document describes the instruction formats of the 8086 microprocessor. It has 1-6 byte instruction sizes with an opcode field in the first byte. The second byte contains mode, register, and register/memory fields that specify operands. It defines register codes and explains how the mode, register, and register/memory fields are used to determine operands and effective addresses. Examples show how to encode instructions like MOV, SUB, and ADD using the instruction format. Input/output instructions like IN and OUT are also described, indicating how port numbers can be immediate values or specified with the DX register.
This document provides an overview of assembly language programming on the 8086 processor. It includes examples of assembly code using MOV, MUL, and other instructions. It then summarizes various 8086 instruction types like data transfer, arithmetic, logical, and control flow instructions. For each type, it lists some common instructions and provides brief descriptions and examples.
The instruction set of the 8086 microprocessor can be classified into several groups, including data transfer instructions, arithmetic instructions, and processor control instructions. The data transfer instructions include general purpose instructions to move bytes or words between registers and memory locations. Common instructions are MOV, PUSH, POP, and XCHG. The arithmetic instructions perform operations like addition, subtraction, and comparison and affect the processor's flags. Common instructions are ADD, SUB, INC, and CMP. The 8086 instruction set also includes instructions for bit manipulation, string operations, and transferring program execution.
Compiler code optimizations help improve the performance of generated machine code in three ways:
1) Local optimizations improve individual basic blocks without considering control or data flow between blocks. This includes constant folding, propagation, and dead code elimination.
2) Global optimizations analyze control and data flow across basic blocks through techniques like common subexpression elimination.
3) Peephole optimizations make small, machine-specific improvements by examining one or two instructions at a time, such as replacing redundant loads and stores or using architectural idioms.
The document discusses code generation in compilers. It describes the position of a code generator in the compiler model, the different types of target code that can be generated, and considerations for the target machine like instruction sets and addressing modes. It also covers important aspects of code generation like instruction selection, register allocation, evaluation order, and generating code for function calls and stack allocation of activation records.
This document describes 16 assembly language programs for the 8086 microprocessor. It includes programs that increment/decrement 8-bit and 16-bit numbers, take the 1's and 2's complement of numbers, add/subtract/multiply/divide 8-bit and 16-bit numbers, and manipulate strings. It also discusses the use of procedures, stacks, and macros in 8086 assembly language programming. Examples are provided to illustrate how to define and call procedures, use push/pop on the stack, and define macros with parameters.
instruction set of 8086 microprocessor has following categories:
-Data transfer instructions
-Arithmetic instructions
-Logical instructions
-Flag manipulation instructions
-shift and rotate instructions
-String instructions
-8086 assembler directives
The document provides information about the instruction sets of the 8086 microprocessor. It defines what an instruction set is and describes the different instruction formats used by the 8086. The main types of 8086 instructions are then outlined, including data transfer instructions, arithmetic instructions, bit manipulation instructions, branch instructions, and others. Specific instructions like MOV, ADD, SUB, and MUL are explained through examples of their syntax and operation.
The stack in the 8085 microprocessor is a group of memory locations used for temporary storage of data during program execution. Data is stored and retrieved on a last-in, first-out basis. The PUSH instruction stores data in the stack by decrementing the stack pointer and copying register contents to memory. The POP instruction retrieves data from the stack by copying memory contents back to registers and incrementing the stack pointer. Common register pairs that can be pushed and popped include BC, DE, HL, and A and flags.
The document describes the instruction set of the 8086 microprocessor. It discusses 6 types of instructions supported: 1) data transfer instructions, 2) arithmetic instructions, 3) logical instructions, 4) string manipulation instructions, 5) process control instructions, and 6) control transfer instructions. Details are provided on the various instructions under each type, including their mnemonics and functions.
The document discusses the instruction set of the 8085 microprocessor. It is divided into 5 categories: 1) Data Transfer Instructions which move data between registers and memory, 2) Arithmetic Instructions which perform addition, subtraction, incrementing and decrementing, 3) Logical Instructions which perform logical operations like AND, OR, XOR, 4) Branching Instructions which alter program flow unconditionally or conditionally, and 5) Control Instructions which control the operation of the microprocessor like halt. Examples of instructions from each category are provided.
The document discusses code generation in compilers. It covers:
- The main tasks of a code generator are instruction selection, register allocation and assignment, and instruction ordering.
- Code generators map an intermediate representation to target machine code for a specific architecture. This mapping can vary in complexity depending on the level of the intermediate representation and the target architecture.
- Key issues in code generator design include addressing in the target code, representing the program as basic blocks and flow graphs, register allocation, and selecting machine instructions to represent operations.
Addressing mode is the way of addressing a memory location in instruction. Microcontroller needs data or operands on which the operation is to be performed. The method of specifying source of operand and output of result in an instruction is known as addressing mode.
There are various methods of giving source and destination address in instruction, thus there are various types of Addressing Modes. Here you will find the different types of Addressing Modes that are supported in Micro Controller 8051. Types of Addressing Modes are explained below:
1.Register Addressing Mode
2.Direct Addressing Mode
3.Register Indirect Addressing Mode
4.Immediate Addressing Mode
5.Index Addressing Mode
Explanation:
Register Addressing Mode: In this addressing mode, the source of data or destination of result is Register. In this type of addressing mode the name of the register is given in the instruction where the data to be read or result is to be stored.
Example: ADD A, R5 ( The instruction will do the addition of data in Accumulator with data in register R5)
Direct Addressing Mode: In this type of Addressing Mode, the address of data to be read is directly given in the instruction. In case, for storing result the address given in instruction is used to store the result.
Example: MOV A, 46H ( This instruction will move the contents of memory location 46H to Accumulator)
Register Indirect Addressing Mode: In Register Indirect Addressing Mode, as its name suggests the data is read or stored in register indirectly. That is, we provide the register in the instruction, in which the address of the other register is stored or which points to other register where data is stored or to be stored.
Example: MOV A, @R0 ( This instruction will move the data to accumulator from the register whose address is stored in register R0 ).
Also Read: Architecture Of 8051
Immediate Addressing Mode : In Immediate Addressing Mode , the data immediately follows the instruction. This means that data to be used is already given in the instruction itself.
Example: MOV A, #25H ( This instruction will move the data 25H to Accumulator. The # sign shows that preceding term is data, not the address.)
Index Addressing Mode: Offset is added to the base index register to form the effective address if the memory location.This Addressing Mode is used for reading lookup tables in Program Memory. The Address of the exact location of the table is formed by adding the Accumulator Data to the base pointer.
Example: MOVC, @A+DPTR ( This instruction will move the data from the memory to Accumulator; the address is made by adding the contents of Accumulator and Data Pointer.
The document discusses the instruction set of the 8086 microprocessor. It is divided into 7 sections that cover: 1) data transfer instructions like MOV, IN, OUT, PUSH, and POP; 2) arithmetic/logical instructions; 3) branch instructions; 4) shift and rotate instructions; 5) string manipulation instructions; 6) flag manipulation and processor control instructions; and 7) machine control instructions. Examples are provided for each type of instruction to illustrate their operation and effect on registers or memory locations.
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...Hsien-Hsin Sean Lee, Ph.D.
This document discusses techniques for improving instruction fetch throughput in superscalar processors. It begins by explaining that fetch throughput defines the maximum performance and that superscalar processors need to supply more than one instruction per cycle. It then describes some challenges to high bandwidth instruction fetching including misaligned instructions, changes in control flow, and memory latency/bandwidth limitations. The document proceeds to discuss specific techniques like aligned fetching, split cache line access, predication, collapsing buffers, trace caches, and issues related to indexing and redundancy in trace caches.
This document summarizes various arithmetic and logic instructions in x86 assembly language. It discusses increment, decrement, negation, comparison, addition, subtraction, multiplication, division, logical, shift, and rotate instructions. Examples are provided to illustrate how each instruction works and its effect on flags. Application examples also demonstrate how these instructions can be used to input and output decimal numbers.
The document discusses different CPU organizations and instruction formats. It describes three main types of CPU organizations: single accumulator, general register, and stack organizations. It also discusses four main instruction formats: three-address, two-address, one-address, and zero-address formats. Finally, it covers addressing modes which allow flexibility in programming by reducing the number of bits needed to specify memory addresses or operands in instructions.
The CPU is made up of 3 major parts: the register set, control unit, and arithmetic logic unit. The register set stores intermediate values during program execution. The control unit generates control signals and selects operations for the ALU. The ALU performs arithmetic and logic operations. Computer architecture includes instruction formats, addressing modes, instruction sets, and CPU register organization. Registers are organized in a bus structure to efficiently transfer data and perform microoperations under control of the control unit. Common instruction fields are the operation code, address fields, and addressing mode fields. Instructions can be classified by the number of address fields as zero-address, one-address, two-address, or three-address instructions. Common addressing modes specify how operands
The document discusses the central processing unit and its components. It describes the general register organization and stack organization of a CPU. It discusses the instruction formats used in CPUs, including three address, two address, one address, zero address, and RISC instruction formats. It also covers addressing modes and data transfer and manipulation instructions used in CPUs.
The document discusses the central processing unit (CPU) and its components like registers, arithmetic logic unit (ALU), control unit, and bus. It explains the general register organization of CPU with multiple registers like R1-R7 connected to the ALU, control unit, and bus. The control unit directs information flow and selects components in the CPU to perform operations like addition and shifting. The document also covers addressing modes, instruction formats, data transfer and manipulation instructions, and stack organization in a CPU.
Mca i-u-4 central processing unit and pipelineRai University
The document discusses the central processing unit (CPU) and its components like registers, arithmetic logic unit (ALU), control unit, and bus. It explains the general register organization of CPU with multiple registers like R1-R7 connected to a multiplexer and ALU. The control unit directs information flow and selects operations. The document also covers addressing modes, instruction formats, data transfer and manipulation instructions, program control instructions, subroutine calls, and interrupts.
The document discusses the central processing unit (CPU) of a computer system. It describes the major components of the CPU including registers, arithmetic logic unit (ALU), buses, and the control unit. It then explains the general register organization of a CPU and how the control unit directs information flow and selects operations for the ALU. Finally, it discusses various CPU addressing modes, data transfer and manipulation instructions, and different instruction formats used in computer organization.
B.sc cs-ii-u-4 central processing unit and pipelineRai University
The document discusses the central processing unit (CPU) and pipeline. It covers major CPU components like registers, arithmetic logic unit (ALU), control unit, and bus. It describes general register and stack organizations, instruction formats, addressing modes, and data transfer and manipulation instructions. It provides details on register selection, ALU operations, and how the control unit directs information flow through the CPU.
This document discusses different aspects of central processing unit (CPU) organization and instruction set architecture. It describes three main types of CPU organization: single register, general register, and stack. It also discusses different instruction formats including one, two, three-address formats. Additionally, it covers addressing modes such as register, direct, indirect, immediate, implied and their use in accessing operands. Finally, it briefly discusses components of a CPU like registers, ALU, control unit and their role in executing instructions.
This document discusses various aspects of computer organization including:
- The central processing unit and its major components like registers, arithmetic logic unit, control unit, and buses.
- Different CPU organizations like general register, stack, and their register file structure, instruction formats, and addressing modes.
- Data transfer and manipulation instructions, program control using techniques like subroutines and stacks.
- Details of reduced instruction set computers and how the control unit directs information flow through the ALU to perform operations.
This document discusses CPU architecture types and organization. It describes accumulator-based and register-based CPU organizations. Accumulator-based CPUs have zero-address and single-address instructions but require more memory, while register-based CPUs have shorter programs and increased efficiency but require additional memory accesses. The document also covers general register organization, stack organization, instruction formats, and addressing modes in CPUs.
The document discusses the central processing unit (CPU) of a computer. It describes the major components of a CPU including registers, arithmetic logic unit (ALU), control unit, and buses. It explains different CPU organizations like general register, stack, and their addressing modes. It also covers instruction formats, data transfer and manipulation instructions, and program control instructions.
The document provides information about the central processing unit (CPU). It discusses the major components of the CPU including storage components like registers and flip-flops, execution components like the arithmetic logic unit (ALU), and control components like the control unit. It describes different CPU organizations including general register organization, stack organization, and addressing modes. It also covers instruction formats, data transfer and manipulation instructions, program control instructions, subroutine calls and returns, and program interrupts.
Ch8_CENTRAL PROCESSING UNIT Registers ALURNShukla7
This document describes the central processing unit (CPU) of a computer. It discusses the major components of the CPU including registers, the arithmetic logic unit (ALU), control unit, and buses. It then covers various aspects of CPU organization such as register types, instruction formats, addressing modes, and common data transfer and manipulation instructions. Key aspects covered include general register organization, stack organization, one-address, two-address, and three-address instruction formats, and different addressing modes like direct, indirect, immediate, and relative addressing. It also discusses the processor status word which contains flag bits indicating the processor's state.
This document provides an overview of different processor architectures including RISC, accumulator, stack, and register-based architectures. It discusses the MIPS RISC architecture and why it is considered RISC. It then describes different processor examples like the 80x86 IA-32 architecture, the Pentium Pro, II, III, and IV, and the Java Virtual Machine stack-based architecture. It provides details on the complex IA-32 instruction set and addressing modes as well as performance enhancements in the Pentium series like out-of-order execution, deeper pipelining, caches, and hyperthreading.
The document discusses the central processing unit (CPU) and its components. It describes the major components of the CPU which include storage components like registers and flip-flops, execution components like the arithmetic logic unit (ALU), and transfer components like buses. It also discusses different CPU organizations like general register organization, stack organization, and their instruction formats. Finally, it covers addressing modes, data transfer instructions, and program control instructions.
The document discusses the central processing unit (CPU) of a computer system. It covers major CPU components like registers, arithmetic logic unit (ALU), and control unit. It also covers general concepts like instruction formats, addressing modes, data transfer instructions, and different CPU organizations including register, stack, and reduced instruction set computer (RISC). The document provides details on each of these topics through examples and diagrams to explain the inner workings of the CPU.
The document discusses the central processing unit (CPU) and its components. It covers topics like register organization, instruction formats, addressing modes, data transfer instructions, and data manipulation instructions. The key components of a CPU include storage components like registers and flags, execution components like the arithmetic logic unit (ALU), and control components like the control unit. Common addressing modes include direct, indirect, register, and immediate addressing. Data transfer instructions move data between memory and registers, while data manipulation instructions perform arithmetic, logical, and shift operations.
The document discusses CPU architecture types and organization. It covers the following key points in 3 sentences:
The CPU consists of 3 main components - the control unit, the arithmetic logic unit (ALU), and registers. Early CPUs were accumulator-based while modern CPUs use a register-based design with multiple registers to allow for shorter programs with limited instructions. CPU organization also includes register organization, data paths, stack organization using a stack pointer register, instruction formats, and various addressing modes to access operands in memory or registers.
The CPU is the central processing unit that performs most data processing operations in a computer. It is composed of three main parts: registers that store intermediate data, an ALU that performs arithmetic and logic operations, and a control unit that directs data flow and operations. Instructions determine the functions performed by the CPU. Registers are used to store intermediate values for efficiency rather than accessing memory locations. A control word specifies the registers and operations used to carry out each microoperation like addition or subtraction. Instruction formats include fields for operations, addressing modes, registers, and memory locations.
The document provides details about the architecture of SIC and SIC/XE machines. It describes the memory, registers, data formats, instruction formats, addressing modes, instruction set, and input/output for both machines. It also provides example programs to illustrate different instructions and addressing modes. Additionally, it explains CISC machines in general and provides details about the VAX and Pentium Pro architectures as examples of CISC instruction set architectures.
Ready to Unlock the Power of Blockchain!Toptal Tech
Imagine a world where data flows freely, yet remains secure. A world where trust is built into the fabric of every transaction. This is the promise of blockchain, a revolutionary technology poised to reshape our digital landscape.
Toptal Tech is at the forefront of this innovation, connecting you with the brightest minds in blockchain development. Together, we can unlock the potential of this transformative technology, building a future of transparency, security, and endless possibilities.
HijackLoader Evolution: Interactive Process HollowingDonato Onofri
CrowdStrike researchers have identified a HijackLoader (aka IDAT Loader) sample that employs sophisticated evasion techniques to enhance the complexity of the threat. HijackLoader, an increasingly popular tool among adversaries for deploying additional payloads and tooling, continues to evolve as its developers experiment and enhance its capabilities.
In their analysis of a recent HijackLoader sample, CrowdStrike researchers discovered new techniques designed to increase the defense evasion capabilities of the loader. The malware developer used a standard process hollowing technique coupled with an additional trigger that was activated by the parent process writing to a pipe. This new approach, called "Interactive Process Hollowing", has the potential to make defense evasion stealthier.
Discover the benefits of outsourcing SEO to Indiadavidjhones387
"Discover the benefits of outsourcing SEO to India! From cost-effective services and expert professionals to round-the-clock work advantages, learn how your business can achieve digital success with Indian SEO solutions.
1. CHAP. 8 CENTRAL PROCESSING UNIT
8-1 Introduction
3 major parts of CPU : Fig. 8-1
1) Register Set
2) ALU
3) Control
Design Examples of simple CPU
Hardwired Control : Chap. 5
Micro programmed Control : Chap. 7
In this chapter : Chap. 8
Describe the organization and architecture of the CPU with an emphasis on the user’s
view of the computer
User who programs the computer in machine/assembly language must be aware of
1) Instruction Formats
2) Addressing Modes
3) Register Sets
The last section presents the concept of Reduced Instruction Set Computer (RISC)
2. 8-2 General Register Organization
Register 의 필요성
Memory locations are needed for storing pointers, counters,
return address, temporary results, and partial products
during multiplication (in the programming examples of
Chap. 6)
Memory access is the most time-consuming operation in a
computer
More convenient and efficient way is to store intermediate
values in processor registers
Bus organization for 7 CPU registers : Fig. 8-2
2 MUX : select one of 7 register or external data
input by SELA and SELB
BUS A and BUS B : form the inputs to a
common ALU
ALU : OPR determine the arithmetic or logic
microoperation
The result of the microoperation is available for external
data output and also goes into the inputs of all the
registers
3 X 8 Decoder : select the register (by SELD)
that receives the information from ALU
R 1
R 2
R 4
R 3
R 6
R 7
R 5
3 × 8
d e c o d e r
M U X M U X
A r it h m e t ic lo g ic u n it
( A L U )
C lo c k In p u t
L o a d
( 7 lin e s )
S E L A S E L B
A b u s B b u s
O P R
O u t p u t
S E L D
( a ) B lo c k d ia g ra m
( b ) C o n t ro l w o r d
S E L A S E L DS E L B O P R
3 533
External Output
External Input
3. Binary selector input : 예제
1) MUX A selector (SELA) : to place the content of R2 into BUS A
2) MUX B selector (SELB) : to place the content of R3 into BUS B
3) ALU operation selector (OPR) : to provide the arithmetic addition R2 + R3
4) Decoder selector (SELD) : to transfer the content of the output bus into R1
Control Word
14 bit control word (4 fields) : Fig. 8-2(b)
SELA (3 bits) : select a source register for the A input of the ALU
SELB (3 bits) : select a source register for the B input of the ALU
SELD (3 bits) : select a destination register using the 3 X 8 decoder
OPR (5 bits) : select one of the operations in the ALU
Encoding of Register Selection Fields : Tab. 8-1
SELA or SELB = 000 (Input) : MUX selects the external input data
SELD = 000 (None) : no destination register is selected but the contents of the output
bus are available in the external output
Encoding of ALU Operation (OPR) : Tab. 8-2
Examples of Microoperations : Tab. 8-3
TSFA (Transfer A) :
XOR :
321 RRR +←
InputExternalOutputExternalROutputExternalRR ←←← ,2,17
)55(05 RRXORR ⊕←
Control Word 를 Control Memory
에 저장하여 Microprogrammed
Control 방식으로 제어 가능함
4. 8-3 Stack Organization
Stack or LIFO(Last-In, First-Out)
A storage device that stores information
The item stored last is the first item retrieved = a stack of tray
Stack Pointer (SP)
The register that holds the address for the stack
SP always points at the top item in the stack
Two Operations of a stack : Insertion and Deletion of Items
PUSH : Push-Down = Insertion
POP : Pop-Up = Deletion
Stack 의 종류
1) Register Stack (Stack Depth 가 제한 )
a finite number of memory words or register(stand alone)
2) Memory Stack (Stack Depth 가 유동적 )
a portion of a large memory
Register Stack : Fig. 8-3
PUSH :
A
B
CS P
E M T YF U L L
D R
6 4
0
1
2
3
4
A d d r e s s
Last Item
0
)1()0(
][
1
←
←=
←
+←
EMTY
FULLthenSPIf
DRSPM
SPSP : Increment SP
: Write to the stack
: Check if stack is full
: Mark not empty
* 초기 상태
SP = 0,
EMTY = 1,
FULL = 0
5. The first item is stored at address 1, and the last item is stored at address 0
POP :
Memory Stack : Fig. 8-4
PUSH :
The first item is stored at address 4000
POP :
Stack Limits
Check for stack overflow(full)/underflow(empty)
Checked by using two register
Upper Limit and Lower Limit Register
After PUSH Operation
SP compared with the upper limit register
After POP Operation
SP compared with the lower limit register
P r o g r a m
( in s t r u c t io n s )
D a t a
( o p e r a n d s )
S t a c k
S P
P C
A R
D R
1 0 0 0
2 0 0 0
4 0 0 1
3 0 0 0
4 0 0 0
3 9 9 9
3 9 9 8
3 9 9 7
A d d r e s s
M e m o r y u n it
Start Here
0
)1()0(
1
][
←
←=
−←
←
FULL
EMTYthenSPIf
SPSP
SPMDR : Read item from the top of stack
: Decrement Stack Pointer
: Check if stack is empty
: Mark not full
DRSPM
SPSP
←
−←
][
1
1
][
+←
←
SPSP
SPMDR
* Memory Stack
PUSH = Address 감소
* Register Stack
PUSH = Address 증가
* Error Condition
PUSH when FULL = 1
POP when EMTY = 1
6. RPN (Reverse Polish Notation)
The common mathematical method of writing arithmetic expressions imposes
difficulties when evaluated by a computer
A stack organization is very effective for evaluating arithmetic expressions
예제 ) A * B + C * D → AB * CD * + : Fig. 8-5
( 3 * 4 ) + ( 5 * 6 ) → 34 * 56 * +
8-4 Instruction Formats
Fields in Instruction Formats
1) Operation Code Field : specify the operation to be performed
2) Address Field : designate a memory address or a processor register
3) Mode Field : specify the operand or the effective address (Addressing Mode)
Stack 을 이용한
Arithmetic
3 1 2
6
5
4 2
3 0
1 2
5
1 21 2
4
3
43 +*65*
7. 3 types of CPU organizations
1) Single AC Org. : ADD X
2) General Register Org. : ADD R1, R2, R3
3) Stack Org. : PUSH X
The influence of the number of addresses on computer instruction
[ 예제 ] X = (A + B)*(C + D)
- 4 arithmetic operations : ADD, SUB, MUL, DIV
- 1 transfer operation to and from memory and general register : MOV
- 2 transfer operation to and from memory and AC register : STORE, LOAD
- Operand memory addresses : A, B, C, D
- Result memory address : X
1) Three-Address Instruction
Each address fields specify either a processor register or a memory operand
Short program
Require too many bit to specify 3 address
][XMACAC +←
321 RRR +←
][XMTOS ←
X = Operand Address
ADD R1, A, B
ADD R2, C, D
MUL X, R1, R2 21][
][][2
][][1
RRXM
DMCMR
BMAMR
∗←
+←
+←
8. 2) Two-Address Instruction
The most common in commercial computers
Each address fields specify either a processor register or a memory operand
3) One-Address Instruction
All operations are done between the AC register and memory operand
MOV R1, A
ADD R1, B
MOV R2, C
ADD R2, D
MUL R1, R2
MOV X, R1 1][
211
][22
][2
][11
][1
RXM
RRR
DMRR
CMR
BMRR
AMR
←
∗←
+←
←
+←
←
LOAD A
ADD B
STORE T
LOAD C
ADD D
MUL T
STORE X ACXM
TMACAC
DMACAC
CMAC
ACTM
BMCAAC
AMAC
←
∗←
+←
←
←
+←
←
][
][
][
][
][
][][
][
9. 4) Zero-Address Instruction
Stack-organized computer does not use an address field for the instructions ADD,
and MUL
PUSH, and POP instructions need an address field to specify the operand
Zero-Address : absence of address ( ADD, MUL )
RISC Instruction
Only use LOAD and STORE instruction when communicating between memory and
CPU
All other instructions are executed within the registers of the CPU without referring to
memory
RISC architecture will be explained in Sec. 8-8
PUSH A
PUSH B
ADD
PUSH C
PUSH D
ADD
MUL
POP X TOSXM
BADCTOS
DCTOS
DTOS
CTOS
BATOS
BTOS
ATOS
←
+∗+←
+←
←
←
+←
←
←
][
)()(
)(
)(
10. Program to evaluate X = ( A + B ) * ( C + D )
8-5 Addressing Modes
Addressing Mode 의 필요성
1) To give programming versatility to the user
pointers to memory, counters for loop control, indexing of data, ….
2) To reduce the number of bits in the addressing field of the instruction
Instruction Cycle
1) Fetch the instruction from memory and PC + 1
2) Decode the instruction
3) Execute the instruction
LOAD R1, A
LOAD R2, B
LOAD R3, C
LOAD R4, D
ADD R1, R1, R2
ADD R3, R3, R4
MUL R1, R1, R3
STORE X, R1 1][
311
433
211
][4
][3
][2
][1
RXM
RRR
RRR
RRR
DMR
CMR
BMR
AMR
←
∗←
+←
+←
←
←
←
←
11. Program Counter (PC)
PC keeps track of the instructions in the program stored in memory
PC holds the address of the instruction to be executed next
PC is incremented each time an instruction is fetched from memory
Addressing Mode of the Instruction
1) Distinct Binary Code
Instruction Format 에 Opcode 와 같이 별도에 Addressing Mode Field 를 갖고
있음
2) Single Binary Code
Instruction Format 에 Opcode 와 Addressing Mode Field 가 섞여 있음
Instruction Format with mode field : Fig. 8-6
Implied Mode
Operands are specified implicitly in definition of the instruction
Examples
COM : Complement Accumulator
Operand in AC is implied in the definition of the instruction
PUSH : Stack push
Operand is implied to be on top of the stack
Opcode Mode Address
12. Immediate Mode
Operand field contains the actual operand
Useful for initializing registers to a constant value
Example : LD #NBR
Register Mode
Operands are in registers
Register is selected from a register field in the instruction
k-bit register field can specify any one of 2k
registers
Example : LD R1
Register Indirect Mode
Selected register contains the address of the operand rather than the operand itself
Address field of the instruction uses fewer bits to select a memory address
Register 를 select 하는 것이 bit 수가
Example : LD (R1)
Autoincrement or Autodecrement Mode
Similar to the register indirect mode except that
the register is incremented after its value is used to access memory
the register is decrement before its value is used to access memory
1RAC ←
Implied Mode
]1[RMAC ←
13. Example (Autoincrement) : LD (R1)+
Direct Addressing Mode
Effective address is equal to the address field of the instruction (Operand)
Address field specifies the actual branch address in a branch-type instruction
Example : LD ADR
Indirect Addressing Mode
Address field of instruction gives the address where the effective address is stored in memory
Example : LD @ADR
Relative Addressing Mode
PC is added to the address part of the instruction to obtain the effective address
Example : LD $ADR
Indexed Addressing Mode
XR (Index register) is added to the address part of the instruction to obtain the effective
address
Example : LD ADR(XR)
Base Register Addressing Mode
the content of a base register is added to the address part of the instruction to obtain the
effective address
111],1[ +←← RRRMAC
ADR = Address part of Instruction
][ADRMAC ←
]][[ ADRMMAC ←
][ ADRPCMAC +←
][ XRADRMAC +←
Not Here
14. Similar to the indexed addressing mode except that the register is now called a base register
instead of an index register
index register (XR) : LD ADR(XR)
index register hold an index number that is relative to the address part of the instruction
base register (BR) : LD ADR(BR)
base register hold a base address
the address field of the instruction gives a displacement relative to this base address
Numerical Example
][ XRADRMAC +←
][ ADRBRMAC +←
ADR 기준
BR 기준
L o a d t o A C M o d e
A d d r e s s = 5 0 0
N e x t in s t r u c t io n
7 0 0
4 5 0
8 0 0
9 0 0
3 2 5
3 0 0
P C = 2 0 0
R 1 = 4 0 0
X R = 1 0 0
A C
2 0 0
7 0 2
6 0 0
5 0 0
4 0 0
3 9 9
2 0 2
2 0 1
8 0 0
A d d r e s s M e m o r y
Addressing Mode Effective Address Content of AC
Immediate Address Mode 201 500
Direct Address Mode 500 800
Indirect Address Mode 800 300
Register Mode 400
Register Indirect Mode 400 700
Relative Address Mode 702 325
Indexed Address Mode 600 900
Autoincrement Mode 400 700
Autodecrement Mode 399 450
R1 = 400
500 + 202 (PC)
500 + 100 (XR)
R1 = 400 (after)
R1 = 400 -1 (prior)
15. 8-6 Data Transfer and Manipulation
Most computer instructions can be classified into three categories:
1) Data transfer, 2) Data manipulation, 3) Program control instructions
Data Transfer Instruction
Typical Data Transfer Instruction : Tab. 8-5
Load : transfer from memory to a processor register, usually an AC (memory read)
Store : transfer from a processor register into memory (memory write)
Move : transfer from one register to another register
Exchange : swap information between two registers or a register and a memory word
Input/Output : transfer data among processor registers and input/output device
Push/Pop : transfer data between processor registers and a memory stack
8 Addressing Mode for the LOAD Instruction : Tab. 8-6
@ : Indirect Address
$ : Address relative to PC
# : Immediate Mode
( ) : Index Mode, Register Indirect, Autoincrement 에서 register 지정
Data Manipulation Instruction
1) Arithmetic, 2) Logical and bit manipulation, 3) Shift Instruction
16. Arithmetic Instructions : Tab. 8-7
Logical and Bit Manipulation Instructions : Tab. 8-8
Shift Instructions : Tab. 8-9
8-7 Program Control
Program Control Instruction : Tab. 8-10
Branch and Jump instructions are used interchangeably to mean the same thing
Status Bit Conditions : Fig. 8-8
Condition Code Bit or Flag Bit
The bits are set or cleared as a result of an operation performed in the ALU
4-bit status register
Bit C (carry) : set to 1 if the end carry C8 is 1
Bit S (sign) : set to 1 if F7 is 1
Bit Z (zero) : set to 1 if the output of the ALU contains all 0’s
Bit V (overflow) : set to 1 if the exclusive-OR of the last two carries (C8 and C7) is
equal to 1
Flag Example : A - B = A + ( 2’s Comp. Of B ) : A =11110000, B = 00010100
11110000
+ 11101100 (2’s comp. of B)
1 11011100
C = 1, S = 1, V = 0, Z = 0
17. Conditional Branch : Tab. 8-11
Subroutine Call and Return
CALL :
RETURN :
Program Interrupt
Program Interrupt
Transfer program control from a currently running program to another service
program as a result of an external or internal generated request
Control returns to the original program after the service program is executed
Interrupt Service Program 과 Subroutine Call 의 차이점
1) An interrupt is initiated by an internal or external signal (except for software
interrupt)
A subroutine call is initiated from the execution of an instruction (CALL)
2) The address of the interrupt service program is determined by the hardware
The address of the subroutine call is determined from the address field of an
instruction
3) An interrupt procedure stores all the information necessary to define the state of
the CPU
A subroutine call stores only the program counter (Return address)
AddressEffectivePC
PCSPM
SPSP
←
←
−←
][
1
: Decrement stack point
: Push content of PC onto the stack
: Transfer control to the subroutine
1
][
+←
←
SPSP
SPMPC : Pop stack and transfer to PC
: Increment stack pointer
18. Program Status Word (PSW)
The collection of all status bit conditions in the CPU
Two CPU Operating Modes
Supervisor (System) Mode : Privileged Instruction 실행
When the CPU is executing a program that is part of
the operating system
User Mode : User program 실행
When the CPU is executing an user program
Types of Interrupts
1) External Interrupts
come from I/O device, from a timing device, from a circuit monitoring the
power supply, or from any other external source
2) Internal Interrupts or TRAP
caused by register overflow, attempt to divide by zero, an
invalid operation code, stack overflow, and protection violation
3) Software Interrupts
initiated by executing an instruction (INT or RST)
used by the programmer to initiate an interrupt procedure at any desired point in the
program
CPU operating mode is determined from special bits in the PSW
In t e r r u p t
D e t e c t
D e t e r m in e t h e
a d d r e s s o f I S R
S t o r e I n f o r m a t io n
M a in b o d y o f IS R
R e s t o r e In f o r m a t i o n
In t e r r u p t
R e t u r n
ISR
External Int.
Internal Int.
Software Int.
PC, CPU Register, Status Condition
19. 8-8 Reduced Instruction Set Computer (RISC)
Complex Instruction Set Computer (CISC)
Major characteristics of a CISC architecture
1) A large number of instructions - typically from 100 to 250
instruction
2) Some instructions that perform specialized tasks and are used
infrequently
3) A large variety of addressing modes - typically from 5 to 20 different
modes
4) Variable-length instruction formats
5) Instructions that manipulate operands in memory (RISC 에서는 in
register)
Reduced Instruction Set Computer (RISC)
Major characteristics of a RISC architecture
1) Relatively few instructions
2) Relatively few addressing modes
3) Memory access limited to load and store instruction
4) All operations done within the registers of the CPU
5) Fixed-length, easily decoded instruction format
6) Single-cycle instruction execution
7) Hardwired rather than microprogrammed control
20. Other characteristics of a RISC architecture
1) A relatively large number of registers in the processor unit
2) Use of overlapped register windows to speed-up procedure call and return
3) Efficient instruction pipeline
4) Compiler support for efficient translation of high-level language programs into machine
language programs
Overlapped Register Windows
Time consuming operations during procedure call
Saving and restoring registers
Passing of parameters and results
Overlapped Register Windows
Provide the passing of parameters and avoid the need for
saving and restoring register values by hardware
Concept of overlapped register windows : Fig. 8-9
Total 74 registers : R0 - R73
R0 - R9 : Global registers
R10 - R63 : 4 windows
Window A
Window B
Window C
Window D
R 1 5
R 1 0
R 7 3
R 6 4
R 6 3
R 5 8
R 5 7
R 4 8
R 4 7
R 4 2
R 4 1
R 3 2
R 3 1
R 2 6
R 1 5
R 1 0
R 2 5
R 1 6
C o m m o n t o D a n d A
L o c a l t o D
C o m m o n t o C a n d D
L o c a l t o C
C o m m o n t o B a n d C
L o c a l t o B
C o m m o n t o A a n d B
L o c a l t o A
C o m m o n t o A a n d D
R 9
R 0
C o m m o n t o a ll
P r o c e d u r e s
G lo b a l
r e g is t e r s
P r o c A
P r o c B
P r o c C
P r o c D
Circular Window
10 Local registers
+
2 sets of 6 registers
(common to adjacent windows)
21. Example) Procedure A calls procedure B
R26 - R31
Store parameters for procedure B
Store results of procedure B
R16 - R25 : Local to procedure A
R32 - R41 : Local to procedure B
Window Size = L + 2C + G = 10 + ( 2 X 6 ) + 10 = 32 registers
Register File (total register) = (L + C) X W + G = (10 + 6 ) X 4 + 10 = 74 registers
여기서 , G : Global registers = 10
L : Local registers = 10
C : Common registers = 6
W : Number of windows = 4
Berkeley RISC I
RISC Architecture 의 기원 : 1980 년대 초
Berkeley RISC project : first project = Berkeley RISC I
Stanford MIPS project
Berkeley RISC I
32 bit CPU, 32 bit instruction format, 31 instruction
3 addressing modes : register, immediate, relative to PC
22. Instruction Set : Tab. 8-12
Instruction Format : Fig. 8-10
Register Mode : bit 13 = 0
S2 = register
Example) ADD R22, R21, R23
ADD Rs, S2, Rd : Rd = Rs + S2
Register Immediate Mode : bit 13 = 1
S2 = sign extended 13 bit constant
Example) LDL (R22)#150, R5
LDL (Rs)S2, Rd : Rd = M[R22] + 150
PC Relative Mode
Y = 19 bit relative address
Example) JMPR COND, Y
Jump to PC = PC + Y
CWP (Current Window Pointer)
CALL, RET 시 stack pointer 같이 사용됨
RISC Architecture Originator
O p c o d e R d R s 0 N o t u s e d S 2
8
3 1
58155
0451 21 31 41 81 92 32 4
( a ) R e g is t e r m o d e : ( S 2 s p e c if ie s a r e g is t e r )
O p c o d e R d R s 1 S 2
8
3 1
1 3155
01 21 31 41 81 92 32 4
( b ) R e g is t e r - im m e d ia t e m o d e : ( S 2 s p e c if ie s a n o p e r a n d )
O p c o d e C O N D Y
8
3 1
1 95
01 81 92 32 4
( c ) P C r e la t iv e m o d e :
Architecture Originator Licensees
Alpha DEC Mitsubishi, Samsung
MIPS MIPS Technologies NEC, Toshiba
PA-RISC Hewlett Packard Hitachi, Samsung
PowerPC Apple, IBM, Motorola Bul
Sparc Sun Fujitsu, Hyundai
i960 Intel Intel only (Embedded Controller)