انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

معمارية المعالج

الكلية كلية العلوم للبنات     القسم قسم الحاسبات     المرحلة 3
أستاذ المادة نور كاظم ايوب مهدي المهدي       12/11/2016 11:25:06
1.1 Introduction
Computer architecture is concerned with the structure and behavior of the computer as seen by the user. It includes those attributes of the system that are visible to a programmer and have a direct impact on the execution of a program:
• Instruction sets
• Data representation – number of bits used to represent data
• Input/Output mechanisms
• Memory addressing techniques

Computer architecture is concerned with all aspects of the design and organization of the central processing unit and the integration of the CPU into the computer system itself. Architecture extends upward into computer software because a processor’s architecture must cooperate with the operating system and system software. It is impossible to design an operating system well without a knowledge of the underlying architecture. Moreover, the computer designer has to have an intimate understanding of software in order to implement the optimum architecture.

1.2 CPU Unit
In this Lecture, we focus our attention on the main component of any computer system, the central processing unit (CPU). The primary function of the CPU is to execute a set of instructions stored in the computer’s memory.

A typical CPU has three major components:
(1) register set,
(2) arithmetic logic unit (ALU),
(3) control unit (CU).

Figure 1: CPU main components and interactions with the memory and I/O
The CPU can be divided into a data section and a control section. The data section, which is also called the datapath, contains the registers and the ALU. The datapath is capable of performing certain operations on data items. The control section is basically the control unit, which issues control signals to the datapath.
Internal to the CPU, data move from one register to another and between ALU and registers. Internal data movements are performed via local buses(using different organizations including one-bus, two-bus, or three-bus organizations.), which may carry data, instructions, and addresses. Externally, data move from registers to memory and I/O devices, often by means of a system bus. In the next section we ascertain (نتعرف على) register set.

1.2.1 Register set

Registers are essentially extremely fast memory locations within the CPU that are used to create and store the results of CPU operations and other calculations. Different computers have different register sets. They differ in the number of registers (The number of registers in a particular architecture affects the instruction set design. A very small number of registers may result in an increase in memory references), register types, and the length of each register.

A) Data Registers
The general purpose registers, are used for arithmetic and data movement. Each register can be addressed as either 16-bit or 8 bit value. Example, AX register is a 16-bit register, its upper 8-bit is called AH, and its lower 8-bit is called AL. Bit 0 in AL corresponds to bit 0 in AX and bit 0 in AH corresponds to bit 8 in AX. See Figure 2.

Figure 2: 16 bit AX register
Instructions can address either 16-bit data register as AX, BX, CX,and DX or 8-bit register as AL, AH, BL, BH, CL, CH, Dl, and DH. Each general purpose register has special attributes:

1- AX (Accumulator): AX is the accumulator register because it is favored by the CPU for arithmetic operations. Other operations are also slightly (بعض الشئ) more efficient when performed using AX.

2- BX (Base): the BX register can hold the address of a procedure or variable. Three other registers with this ability are SI, DI and BP. The BX register can also perform arithmetic and data movement.

3- CX (Counter): the CX register acts as a counter for repeating or looping instructions. These instructions automatically repeat and decrement CX.

4- DX (Data): the DX register has a special role in multiply and divide operation. When multiplying for example DX hold the high 16 bit of the product.

B) Segment Registers
The CPU contain four segment registers,used as base location for program instruction, and for the stack.
1- CSR (Code Segmen Register): The code segment register holds the base location of all executable instructions (code) in a program.

2- DSR (Data Segment Register): the data segment register is the default base location for variables. The CPU calculates their location using the segment value in DS.

3- SSR (Stack Segment Register): the stack segment register contain the base location of the stack.

4- ESR (Extra Segment Register): The extra segment register is an additional base location for memory variables.

C) Index registers
Index registers contain the offset of data and instructions. The term offset refers to the distance of a variable,label, or instruction from its base segment. The index registers are:

1- BP (Base Pointer): the BP register contain an assumed offset from the stack segment register, as does the stack pointer. The base pointer register is often used by a subroutine to locate variables that were passed on the stack by a calling program.

2- SP (Stack Pointer): the stack pointer register contain the offset of the top of the stack. The stack pointer and the stack segment register combine to form the complete address of the top of the stack.

3- SI (Source Index): This register takes its name from the string movement instruction, in which the source string is pointed to by the source index register.

4- DI (Destination Index): the DI register acts as the destination for string movement instruction.

D) Status and Control register:
1- IP (Instruction Pointer): The instruction pointer register always contain the offset of the next instruction to be executed within the current code segment. The instruction pointer and the code segment register combine to form the complete address of the next instruction.

2- The Flag Register: is a special register with individual bit positions assigned to show the status of the CPU or the result of arithmetic operations. The Figure 4 describe the 8086/8088 flags register:



Figure 4: Flag Register.

It must be pointed to two registeres :
- MDR(Memory Data Register)
- MAR(Memory Address Register)
They are the interface of communication between the memory and the processor.
MDR is responsible for keeping any data go to or come from the memory (via the write and read operations), while MAR is responsible for holding the memory address requested by the processor, whether reading or writing process.

Q uestions for YOU
Q1 / Can you explain the difference between the processes of reading and writing through what you studied in previous years?
Answer/----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Q2/ What are the changes in the values of MDR&MAR after reading and writing?
Answer/------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Search for an answer to the following question …
What is the difference between the (processor) and (microprocessor) ?


المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .