Introduction To Microprocessor
Introduction To Microprocessor
Microprocessor Report
Developed By :
Muhammad Dawood Bcs-Sp11-069
Submitted To:
MS.Maria Shamim
[2]
Acknowledgement
All the praise to Almighty Allah the most benevolent ever merciful, who gave me power and patience to complete our report successfully.
I would like to express my appreciation to my instructor respected (Mam. Maria Shamim) who encourages me to make the report and also my friend for his willingness in contributing his expertise on this, who found imaginative ways to balance my workload, had excellent ideas for realizing the goals of this report. And kept my feet to the fire of a demanding schedule. The most beautiful thing i can experience is the mysterious. It is the source of all true art and science. Every attempt has been made to ensure the accuracy of all materials in this report.Finally, I have been particularly fortunate the opportunity to work with outstanding students who my best friends.
I have benefited immensely and continue to do so both professionally and personally from my friendship and association with him.
[3]
MEMORANDUM
Here is a report emphasizing on the role of microprocessor in computer. The purpose of this report is to make the comparison between different generations of microprocessors. This report tells us that microprocessor, which one is the best for our computers. This report tells us that what is the demand of customers about different types of microprocessor in computer? If a customer wants 3G then what are the reasons behind the selection of 3G or if they want 1G then what are the reasons behind the selection of generations of microprocessors. This report was authorized by the Dawood. First of all we discussed generations of all the microprocessors than we discussed their internal parts. We also mention in this report what are the main advantages of microprocessor. After studying this report we are able to understand the importance of microprocessors. We planned to conduct a report on microprocessors; I went to my seniors of computer engineering department, and I search on net about microprocessor. My seniors shared their point of views about upcoming microprocessors and new technologies in world of microprocessors. At the end we concluded and recommended that 3G(3rd generation) or 2G(2nd generation) microprocessors.
[4]
Major Parts of Microprocessor........................................................................12 Internal Processor Architecture and Operation.13 Instruction Execution Process..14 Processor Families..20 First Generation Processors..26 Second Generation Processors..26 Third Generation Processors.27 Fourth Generation Processors...27 Fifth Generation Processors...28
[5]
Diagram of Arithmetic Logic Unit 1.2 12 Processor Families Table 1.2.26 Diagram Fourth Generation Processors1.327 Diagram of Fifth Generation Processors 1.4..28 Diagram of Sixth Generation Processors 1.5.29
[6]
Executive summary:
A microprocessor incorporates the functions of a Computer central processing unit (CPU) on a single integrated circuit. A microprocessor or processor is the heart of the computer and it performs all the computational tasks, calculations and data processing etc. The term microprocessor typically refers to the central processing unit (CPU) of a microcomputer, containing the arithmetic logic unit (ALU) and the control units. It is typically implemented on a single LSI chip. This separates the "brains" of the operation from the other units of the computer.
1:Arithmetic Logic Unit : All the arithmetic operations of a microprocessor take place in the arithmetic logic unit (ALU). Using a combination of gates and flip-flops, numbers can be added in less than a microsecond, even in small personal computers.
2:Control Unit of Microprocessor The control unit of a microprocessor directs the operation of the other units by providing timing and control signals. It is the function of the microcomputer to execute programs which are stored in memory in the form of instructions and data. The control
[7]
unit contains the necessary logic to interpret instructions and to generate the signals necessary for the execution of those instructions.
3:The Accumulator The accumulator is the principal register of the arithmetic logic unit of a microprocessor. Registers are sets of flip-flops which can hold data. The accumulator typically holds the first piece of data for a calculation.
Processor Families: This section provides detailed technical information about all the major processor families used on PC-compatible computers.
First Generation Processors: First generation processors were used on the earliest of machines, the original IBM PC, and the first clones. These machines were primitive in most ways compared to modern PCs, and the processors they used were of limited capabilities. First generation processors run at system bus speed and use the oldest processor technologies
Second Generation Processors: The only chip generally considered second generation is the 80286. Intel also made a chip between the 8088 and the 80286, called the 80186. Largely due to a lack of performance enhancements compared to the 286, in addition to compatibility problems with support chips, the 80186 was never really used in PCs.
Third Generation Processors: The third generation processors (the 386 family) represent another step forward from the second generation class.
Fourth Generation Processors: The fourth generation of processors saw rapid growth in the CPUs' power and capabilities, and the introduction of several new technologies as well. It was
[8]
here that AMD and Cyrix had their first real early successes in not just emulating Intel's designs but coming up with real value leaders of their own, at the top end of the fourth generation scale.
Fifth Generation Processors: The fifth generation of processors saw several changes from earlier CPU families, and several trends continue as well. Chips continued to get faster and faster, and architectural changes were made to increase overall system speed as well.
Sixth Generation Processors: New and innovative architectural designs are employed in these CPUs, as the easy performance improvements such as widening buses and increasing clock speeds get harder to continue. Clock speeds do increase, but new ways of getting more done in each clock cycle are also the focus.
[9]
Introduction to Microprocessor:
A microprocessor or processor is the heart of the computer and it performs all the computational tasks, calculations and data processing etc. The term microprocessor typically refers to the central processing unit (CPU) of a microcomputer, containing the arithmetic logic unit (ALU) and the control units. It is typically implemented on a single LSI chip. This separates the "brains" of the operation from the otheunits of the computer.
1.1
[10]
Instruction SetIt is the set of the instructions that the Microprocessor can execute.
Clock Speed: Clock speed is measured in the MHz and it determines that how many instructions a processor can processed.
[11]
Table:I am sure many of you who are familiar with the type of microprocessor, this time I present in table form below.
[12]
3: The Accumulator
All the arithmetic operations of a microprocessor take place in the arithmetic logic unit (ALU). Using a combination of gates and flip-flops, numbers can be added in less than a microsecond, even in small personal computers. The operation to be performed is specified by signals from the control unit. The data upon which operations are performed can come from memory or an external input. The data may be combined in some way with the contents of the accumulator and the results are typically placed in the accumulator. From there they may be transferred to memory or to an output unit.
1.2
[13]
The control unit of a microprocessor directs the operation of the other units by providing timing and control signals. It is the function of the microcomputer to execute programs which are stored in memory in the form of instructions and data. The control unit contains the necessary logic to interpret instructions and to generate the signals necessary for the execution of those instructions. The descriptive words "fetch" and "execute" are used to describe the actions of the control unit. It fetches an instruction by sending and address and a read command to the memory unit. The instruction at that memory address is transferred to the control unit for decoding. It then generates the necessary signals to execute the instruction.
3:The Accumulator
The accumulator is the principal register of the arithmetic logic unit of a microprocessor. Registers are sets of flip-flops which can hold data. The accumulator typically holds the first piece of data for a calculation. If a number from memory is added to that date, the sum replaces the original data in the accumulator. It is the repository for successive results of arithmetic operations, which may then be transferred to memory, to an output device, etc.
The architecture of a processor describes its internal structures and how it works. These are logical structures of course; all processors are made of semiconductor material, and it is how this is arranged that determines how the processor will work. This is similar to how it is with software: all software boils down to a long string of ones and zeros, but it is how you design and lay out those bits that determines whether the software is good or not.
[14]
Processors are in some ways "black boxes". They all perform the same basic function to the outside world: they process instructions. In fact, the instructions they support, at least in the PC world, haven't changed much in the last 10 years. But on the inside, the ways they use to execute instructions have grown much more powerful and complicated. In addition to improving performance by "brute force" (increasing clock speeds) chip makers have found innovative ways to wring more performance from each clock cycle. For example, the Intel 486DX-25 has over twice the performance of the Intel 386DX-25, even though they run at the same clock speed. The improvement in this 486's power is entirely due to advancements in internal architecture.
Furthermore, the architecture has an impact on how fast the processor can run. Since a faster processor means a shorter time for each clock cycle, it becomes more and more difficult to design circuitry that can work in these smaller amounts of time. Making processors run at faster clock speed necessitates changes not just to its physical characteristics but its internal logic design as well.
This section describes how the processor actually executes instructions. The execution of an instruction is not something that happens in a single step; the execution is broken into several sub steps. These differ depending on the type of processor, since some break execution into many more sub steps than others.
[15]
Pipelining
Early processors executed instructions entirely sequentially; the first instruction began execution, completed, and then the next one started. The problem with this is that it is extremely inefficient, since execution occurs in steps. Having to wait for all the steps to complete for instruction 1 before starting instruction 2 would be like having an assembly line where the worker at the start of the line had to wait for the worker at the end to complete the first part before starting on the second. At any given time, every worker on the line but one would be doing nothing.
Of course the whole purpose of an assembly line is to prevent this from happening. The worker at the start of the line performs his or her task on the part, hands it off to the worker next on the assembly line, and then starts work on the next part. A flow of parts goes down the line, with each worker always having something to do. Modern processors do exactly the same thing with instructions; the first step of execution is performed on the first instruction, and then when the instruction passes to the next step, a new instruction is started. This process is called pipelining
(After another analogy to the assembly line, a pipeline where you keep product flowing through the pipe). The steps in the pipeline are often called stages.
Pipelining leads to dramatic improvements in system performance, as you can well imagine, compared to allowing much of the processor circuitry to lie idle as with sequential execution. The more stages that you can break the pipeline into, the more theoretical speed you can get from it. For example, let's suppose it takes 12 clock cycles to handle all the steps to process an instruction. In theory, if you use a 4-stage pipeline, your maximum throughput is 1 instruction
[16]
every 3 cycles. But if you use a 6-stage pipeline, maximum throughput is 1 instruction every 2 cycles. (This is of course highly simplified).
Pipelining also has some drawbacks of course. One of these is complexity; there is a lot more work for the processor to do to keep the pipeline moving. Other problems relate to data dependencies. Let's take a very simple 2-line program as an example:
A = A + 1 (Add 1 to the value at memory location A). B = B + A (Add the value of memory location A to the value at memory location B).
Can you see how pipelining would cause a problem with this (very common kind of) code fragment? The processor will start executing the second instruction before the first one is finished, but it needs the results from the first instruction in order to execute the second one! A pipelining processor will of course detect and handle this condition, but in the worst case it must be handled by waiting for the first instruction to finish before proceeding with the second one. This condition is called a pipeline stall and leads to reduced performance. Newer processors have special performance-enhancing features to partially eliminate this sort of problem. In general, the processor wants to keep the pipeline "flowing" as much as possible, since when the pipeline stalls performance decreases.
Compiler Optimization
The internal architecture of processors varies, and therefore the way that they execute programs varies as well. Some processors handle certain types of code much better than others. In addition, some processors have special performance-enhancing features, but in order to use them the code they execute must be arranged in a compatible way. For example, the Pentium processor has two
[17]
separate integer execution units, called the U-pipe and the V-pipe. The U-pipe can execute any instruction while the V-pipe can only execute some. Programs that take this into account can structure themselves to get more performance than those that do not optimize themselves in this manner.
All instruction execution on the processor is done at the machine level, using machine language. However most code is written in higher-level languages such as C. Therefore, the important job of optimizing code is normally done by compilers, which are intricate programs that translate high-level languages into machine code.
Native execution processors are those that run standard x86 code directly, without translation to RISC-like micro-instructions. The actual stages used in execution vary by the individual processor, with some more advanced ones using more, smaller steps than others. However, they basically follow the same general path through the processor. These are the main steps followed; note that they are normally pipelined in a modern CPU:
Fetch: The first step is to load the instruction into the execution unit so it can be executed. Since memory is so slow compared to the processor, this stage doesn't involve a direct read from memory. Rather, special control circuitry loads larger blocks (16 or 32 bytes) of instruction data from memory and into the primary instruction cache. This data is then available for rapid feeding to the execution units as needed. Some processors have prefetch units that do this.
[18]
Decode: The decode stage is used to examine the instruction loaded and determine how large it is, whether or not it requires an access to memory to read data for execution, etc. Some processors employ multiple decoders to increase performance.
Address Generate: Some instructions operate on memory locations while others do not. For those that access memory, the address of the location is generated in this stage based on information given as part of the instruction.
Execute: The instruction is actually executed here, based on information processed from the earlier steps.
Write-Back: After the instruction is executed, it produces some sort of a result. In this stage, the results are written back either to an internal register or the system memory. Again, system memory is very slow so the result isn't really written to it directly but rather to a write buffer, where it is held until it can be written to system memory or the cache.
Performance Enhancing Architectural Features Advertising for modern processors often includes a barrage of buzzwords. Manufacturers like to dazzle the prospective buyer with talk about the internal features of their CPUs, using technical jargon that makes the processors sound very advanced. In some cases, they are, and in others they are not. This section describes some of these performance enhancing features, what they mean and what they do.
It is important to remember that all of the architectural features of a processor matter very little taken by themselves. They are a means to an end, namely better performance. For most users, what really matters is how the design of the processor translates to faster
[19]
execution, much the way most car drivers don't know what the displacement of their engine is, or the intricacies of fuel injection. Still, those who want to know how the processor works "under the hood", will find the descriptions of these features useful.
Out-of-Order Execution Processors that use multiple execution units can in theory complete the processing of instructions in the wrong order; instruction 2 can be executed before instruction 1 has completed. This flexibility improves performance since it allows execution with less "waiting" time. However, care must be taken to make sure that the results of execution are "reassembled" into the correct order to ensure that the program runs correctly. This is normally done by the retirement unit on translating processors
Register Renaming Register renaming is a technique used to allow multiple execution paths without conflicts between different execution units trying to use the same registers. Instead of just one set of registers being used, multiple sets are put into the processor. This allows different execution units to work simultaneously without unnecessary pipeline stalls.
Write Buffers Write buffers are used to hold the results of execution until they can be written back to registers or memory locations. More write buffers allow more execution to occur without stalling the pipelines.
[20]
Processor Families
This section provides detailed technical information about all the major processor families used on PC-compatible computers. It covers every major x86 processor on the market, from the first Intel 8088 used in the original IBM PC, to the latest released hot chips. The processors here are grouped by "families", where I consider a family of processors to be a group of processors that vary only in clock speed, not in architecture (with a couple of possible minor exceptions to keep the section from getting too large).
I organize this section by processor "generation". Which generation a processor belongs to used to be clear when it was just Intel making processors and they were coming out at a slow rate and with very obvious performance differences. Now the situation is much cloudier, with many more chips on the market and many types of technology being used to implement them. I have made the decision of which processor to include in which generation based on technology and performance considerations, along with my interpretations of how the market perceives the chip. Pentium OverDrives use fifth generation technology so they are listed as fifth-generation chips.
Processor Family
CPUmark 32 ----
[21]
-8 -10 -6 -8 -10 80286 -12 -16 -20 -16 -20 80386DX -25 -33 -40 -16 -20 80386SX -25 -33
------------------
!? !? 3.1 4.4 5.6 6.7 ~9.0 ~11.5 ~15 ~20 ~25 35 ~43 ~11 15 ~20 ~27
--------!? !? !? !? !? !? !? !? !?
------------------
[22]
-25 80486DX -33 -50 -16 -20 80486SX -25 -33 -50 80486DX2 -66 -80 -75 80486DX4 -100 -120 AMD -133 5x86 -100 -120
122 166 249 63 78 100 136 231 297 ~340 319 435 ~530
--------------
!? !? !? !? !? !? !? ~7 ~8 ~10 ~12 15 17
----
~610
~67
288
18
~160
Cyrix 5x86
~610 ~735
~67 ~81
264 316
~16 19
~150 ~180
[23]
510 567 610 735 815 1000 1110 1176 1308 ~1575 443 581
190 211 237 285 317 380 421 476 529 637 ~180 ~240 ~340 /
~120 ~140 181 219 243 270 300 308 343 382 ~110 ~140 ~210 / ~235 ~260 308 343
Pentium OverDrive
120 / 133
[24]
~640 ~770 ~890 ~480 ~570 ~640 ~670 ~770 676 750 816 907 1020 286 359 390 ~380
50.7 57.5 62 ~36 ~46 50.7 ~53 57.5 32 ~37 41 48 ~55 ~25 30 33 ~37
Pentium with
150 166
MMX OverDrive 180 200 PR120+ PR133+ 6x86 PR150+ PR166+ PR200+ PR75 PR90 K5 PR100 PR120
[25]
!? !? ----
43 47 70 78 81
-KB) 200 (512 -KB) 200 (1M) 233 266 300 333 166 200 ----------
220
--
90
553
~240
--
98
611
----------
Pentium II
K6 233 266
[26]
----
!? !? !?
----
!? !? !?
~380 !? !?
First generation processors were used on the earliest of machines, the original IBM PC and XT, and the first clones. These machines were primitive in most ways compared to modern PCs, and the processors they used were of limited capabilities. First generation processors run at system bus speed and use the oldest processor technologies.
The only chip generally considered second generation is the 80286. Intel also made a chip between the 8088 and the 80286, called the 80186. Largely due to a lack of performance enhancements compared to the 286, in addition to compatibility problems with support chips, the 80186 was never really used in PCs. It has however found a strong niche role in the design of embedded microcontrollers, even to this day.
[27]
The third generation processors (the 386 family) represent another step forward from the second generation class. Intel started with this generation of chips to create "subfamilies" of related chips with different capabilities, using the "DX" and "SX" designations.
The fourth generation of processors saw rapid growth in the CPUs' power and capabilities, and the introduction of several new technologies as well. It was here that AMD and Cyrix had their first real early successes in not just emulating Intel's designs but coming up with real value leaders of their own, at the top end of the fourth generation scale. Also, it was at this time that
[28]
the new phenomenon of upgradable processors and standardized motherboard sockets began to become prevalent.
The fifth generation of processors saw several changes from earlier CPU families, and several trends continue as well. Chips continued to get faster and faster, and architectural changes were made to increase overall system speed as well. AMD and Cyrix developed their own compatible processors instead of just trying to clone Intel's, leading to more variety and choice in the marketplace. The Pentium and the compatibles that followed it opened up the world of computers for millions of users and propelled computing to the next level.
[29]
New and innovative architectural designs are employed in these CPUs, as the easy performance improvements such as widening buses and increasing clock speeds get harder to continue. Clock speeds do increase, but new ways of getting more done in each clock cycle are also the focus.
The line between fifth and sixth generation is much blurrier here than between previous generations, due to sixth generation chips running in fifth generation motherboards, and the mixing of technologies between different chip families. I consider the AMD K6 and the Cyrix 6x86MX to be sixth generation chips despite the fact that they run in fifth generation motherboards. This is based on assessing them technologically and in terms of their performance, along with when they were released to market.
[30]
Recommendations:
I Recommend to buy 2nd generation processors because of the following reasons:
1. Its clock speed is much better as compare to others. 2. It is much cheaper than other comparing with respect to its speed and accuracy. 3. It is water proof. 4. It does not become hot quickly which is its most important significance.
References:
Computer Organization And Architechture
8Th Edition
William Stalling
http://www.pcguide.com www.google.com.pk
[31]