Professional Documents
Culture Documents
Computer Architecture Ch1
Computer Architecture Ch1
ARCHITECTURE
Performance Measurement And
Evaluation
Many Dimensions to Performance
• CPU execution time
by instruction or sequence P
floating point
integer
branch performance $
• Cache bandwidth
• Main memory bandwidth
• I/O performance M
bandwidth
seeks
pixels or polygons per second
2. Segment Registers
• Within the 1MB of memory space,
there are four 64Kbyte memory
blocks:
• Code segment (CS): holds the
program instruction code.
• Data segment (DS): stores data for
the program.
• Extra segment (ES): an extra data
segment.
• Stack segment (SS): store the
interrupt and subroutine return
addresses.
2. Segment Registers
• The BIU contains four 16-bit segment registers.
• These segment registers are used to hold the upper 16 bits of the
starting address (point at location 0) for each of the segments.
3. Instruction Pointer (IP)
• The instruction pointer (IP) holds the 16-bit address of the next code
byte within this code segment
Execution unit (EU)
The execution unit (EU) tells the BIU where to fetch instructions or data from,
decodes instructions, and executes instructions.
The functional parts of the execution unit are:
• Control circuitry or system: performs various internal operations
• Instruction decoder: translates instructions fetched from memory to generate
different internal or external control signals that required performing the
operation
• Arithmetic logic unit (ALU): performs arithmetic operations such as add, subtract
etc. and logical operations such as AND, OR, XOR, increment, decrement.
1. Flag Register
• A 16-bit flag register indicates some condition produced by the execution of
an instruction of the EU
• They are modified automatically by CPU after mathematical operations.
2. General Purpose Registers
The EU has four 16-bit general purpose register: A, B, C, D.
Each register can be accessed as a Byte (8 bits) or a word (16 bits).
Example, AX = AH(high nibble) + AL (low nibble).
The General purpose register can be used in any manner by the person
programming the microprocessor.
Normally, they are used to hold a temporary results during the execution of
the instructions.
Accumulator Register -stores operands for arithmetic operations.
(AX ) -hold the offset address of a location in the
memory system.
Base Register (BX) - used as base index, holds the offset address of a
location in the memory
Count Register (CX) -used in loop instruction to store loop counter
- hold the offset address of memory data
Data Register (DX) -used to contain I/O port address for I/O instruction.
- holds a part of the result from a multiplication or part of the
dividend before a division
3. Pointer and Index Registers
Stack pointer contains the 16-bit offset from the start of the segment to
(SP) the memory location where a word was most recently
stored on the stack (Top of the stack)
Base pointer points to a memory location
(BP)
Source index addresses source string data for the string instructions.
(SI)
Destination addresses string destination data for the string instructions.
Index (DI)