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

An introduction of Microprocessors

Share |
الكلية كلية تكنولوجيا المعلومات     القسم قسم البرامجيات     المرحلة 2
أستاذ المادة علي هادي حسن عباس       31/01/2016 07:11:34
1- introduction.
microprocessors are regarded as one of the most important devices in our everyday machines called computers. before we start, we need to understand what exactly microprocessors are, and their appropriate implementations. microprocessor is an electronic circuit that functions as the central processing unit (cpu) of a computer, providing computational control. microprocessors are also used in other advanced electronic systems, such as computer printers, automobiles, and jet airliners.
typical microprocessors incorporate arithmetic and logic functional units as well as the associated control logic, instruction processing circuitry, and a portion of the memory hierarchy. portions of the interface logic for the input/output (i/o) and memory subsystems may also be infused, allowing cheaper overall systems. while many microprocessors and single chip designs, some high-performance designs rely on a few chips to provide multiple functional units and relatively large caches.
when combined with other integrated circuits that provide storage for data and programs, often on a single semiconductor base to form a chip, the microprocessor becomes the heart of a small computer, or microcomputer.
microprocessors are classified by the semiconductor technology of their design (ttl ( transistor-transistor logic ) cmos (complementary-metal-oxide semiconductor) or ecl ( emitter-coupled logic) ), by the width of the data format (4-bit, 8-bit, 16-bit, 32-bit, or 64-bit) they process and by their instruction set (cisc, complex-instruction-set computer, or risc, reduced-instruction-set computer). ttl technology is most commonly used, while cmos is favored for portable computers and other battery-powered devices because of its low power consumption. ecl is used where the need for its greater speed offsets the fact that it consumes the most power. four-bit devices, while inexpensive, are good only for simple control applications in general, the wider the data format, the faster and more expensive the device. cisc processors, which have 70 to several hundred instructions, are easier to program than risc processors, but are slower and more expensive.
a microprocessor can do any information-processing task that can be expressed, precisely, as a plan. it is totally uncommitted as to what its plan will be. it is a truly general-purpose information-processing device. the plan, which it is to execute—which will, in other words, control its operation—is stored electronically. this is the principle of “stored program control”. without a program the microprocessor can do nothing. with one, it can do anything. furthermore, microprocessors can only perform information-processing tasks. to take action on the outside world, or to receive signals from it, a connection must be provided between the microprocessor’s representation of information (as digital electronic signals) and the real world representation.
developed during the 1970s, the microprocessor became most visible as the central processor of the personal computer. microprocessors also play supporting roles within larger computers as smart controllers for graphics displays, storage devices, and high-speed printers. however, the vast majority of microprocessors are used to control everything from consumer appliances to smart weapons. the microprocessor has made possible the inexpensive hand-held electronic calculator, the digital wrist watch, and the electronic game. microprocessors are used to control consumer electronic devices, such as the programmable microwave oven and videocassette recorder to regulate gasoline consumption and antilock brakes in automobiles to monitor alarm systems and to operate automatic tracking and targeting systems in aircraft, tanks, and missiles and to control radar arrays that track and identify aircraft, among other defense applications.

2. history overview
mechanical devices for controlling complex operations have been in existence since at least the 1500’s, when rotating pegged cylinders were used in music boxes much as they are today. machines that perform calculations, as opposed to simply repeating a predetermined melody, came in the next century. blaise pascal (1623 – 1662) developed a mechanical calculator to help in his father’s tax work. the pascal calculator “pascaline” contains eight dials that connect to a drum (figure 1), with an innovative linkage that causes a dial to rotate one notch when a carry is produced from a dial in a lower position. a window is placed over the dial to allow its position to be observed, much like the odometer in a car except that the dials are positioned horizontally, like a rotary telephone dial. some of pascal’s adding machines, which he started to build in 1642, still exist today. it would not be until the 1800’s, however, until someone would put the concepts of mechanical control and mechanical calculation together into a machine that we recognize today as having the basic parts of a digital computer. that person was charles babbage.
charles babbage (1791 – 1871) is sometimes referred to as the grandfather of the computer, rather than the father of the computer, because he never built a practical version of the machines he designed. babbage lived in england at a time when mathematical tables were used in navigation and scientific work. the tables were computed manually, and as a result, they contained numerous errors. frustrated by the inaccuracies, babbage set out to create a machine that would compute tables by simply setting and turning gears. the machine he designed could even produce a plate to be used by a printer, thus eliminating errors that might be introduced by a typesetter.
babbage’s machines had a means for reading input data, storing data, performing calculations, producing output data, and automatically controlling the operation of the machine. these are basic functions that are found in nearly every modern computer. babbage created a small prototype of his difference engine, which evaluates polynomials using the method of finite differences. the success of the difference engine concept gained him government support for the much larger analytical engine, which was a more sophisticated machine that had a mechanism for branching (making decisions) and a means for programming, using punched cards in the manner of what is known as the jacquard pattern-weaving loom.
j. presper eckert and john mauchly set out to create a machine that could be used to compute tables of ballistic trajectories for the u.s. army. the result of the eckert-mauchly effort was the electronic numerical integrator and computer (eniac). the eniac (it was the first operational general-purpose machine built using vacuum tubes) consists of 18,000 vacuum tubes, which make up the computing section of the machine. programming and data entry are performed by setting switches and changing cables. there is no concept of a stored program, and there is no central memory unit, but these are not serious limitations because all that the eniac needed to do was to compute ballistic trajectories. even though it did not become operational until 1946, after the war was over, it was considered quite a success, and was used for nine years.
after the success of eniac, eckert and mauchly, who were at the moore school at the university of pennsylvania, were joined by john von neumann (1903 – 1957), who was at the institute for advanced study at princeton. together, they worked on the design of a stored program computer called the edvac. a conflict developed, however, and the pennsylvania and princeton groups split. the concept of a stored program computer thrived, however, and a working model of the stored program computer, the edsac, was constructed by maurice wilkes, of cambridge university, in 1947.
the latter two machines introduced the concept of separate memories for instructions and data. the term harvard architecture was given to such machines to indicate the use of separate memories. it should be noted that the term harvard architecture is used today to describe machines with separate cache for instructions and data.
the first general-purpose commercial computer, the universal automatic computer (univac i), was on the market by the middle of 1951. it represented an improvement over the binac, which was built in 1949. ibm announced its first computer, the ibm701, in 1952. the early 1950s witnessed a slowdown in the computer industry. in 1964 ibm announced a line of products under the name ibm 360 series. the series included a number of models that varied in price and performance. this led digital equipment corporation (dec) to introduce the first minicomputer, the pdp-8. it was considered a remarkably low-cost machine.

intel introduced the first microprocessor, the intel 4004, in 1971. originally developed for a calculator, and revolutionary for its time, it contained 2,300 transistors on a 4-bit microprocessor that could perform only 60,000 operations per second. the first 8-bit microprocessor was the intel 8008, developed in 1972 to run computer terminals. the intel 8008 contained 3,300 transistors. the first truly general-purpose microprocessor, developed in 1974, was the 8-bit intel 8080, which contained 4,500 transistors and could execute 200,000 instructions per second. by 1989, 32-bit microprocessors containing 1.2 million transistors and capable of executing 20 million instructions per second had been introduced.
the world witnessed the birth of the first personal computer (pc) in 1977 when apple computer series were first introduced. in 1977 the world also witnessed the introduction of the vax-11/780 by dec. intel followed suit by introducing the first of the most popular microprocessor, the 80×86 series.
personal computers, which were introduced in 1977 by altair, processor technology, north star, tandy, commodore, apple, and many others, enhanced the productivity of end-users in numerous departments. personal computers from compaq, apple, ibm, dell, and many others, soon became pervasive, and changed the face of computing.
in parallel with small-scale machines, supercomputers were coming into play. the first such supercomputer, the cdc 6600, was introduced in 1961 by control data corporation. cray research corporation introduced the best cost/performance supercomputer, the cray-1, in 1976.
the 1980s and 1990s witnessed the introduction of many commercial parallel computers with multiple processors. they can generally be classified into two main categories: (1) shared memory and (2) distributed memory systems. the number of processors in a single machine ranged from several in a shared memory computer to hundreds of thousands in a massively parallel system. examples of parallel computers during this era include sequent symmetry, intel ipsc, ncube, intel paragon, thinking machines (cm-2, cm-5), mspar (mp), fujitsu (vpp500), and others.
one of the clear trends in computing is the substitution of centralized servers by networks of computers. these networks connect inexpensive, powerful desktop machines to form unequaled computing power. local area networks (lan) of powerful personal computers and workstations began to replace mainframes and minis by 1990. these individual desktop computers were soon to be connected into larger complexes of computing by wide area networks (wan).
history overview of computer development is briefly described in table (1).

table 1: history overview of computer development
note description date name type
first operation program controlled computer with fixed-point arithmetic 1938 z1 mechanical
first operation program controlled computer with fixed-point arithmetic 1939 z2
iowa state university campus first university built computer 1940
germany complete design of fully functional programmable special-purpose machine 1941 z3
university of pennsylvania first operational general purpose machine (it was programmable through manual setting of switches and plugging of cables) 1944 eniac electronic (vacuum tube)
institute for advanced study 10 times faster than eniac 1946 ias
cambridge university build a stored program computer 1946-1949 edsac
harvard architecture separate memories for instructions and data 1949 mark i,ii,iii, and iv
first general-purpose commercial computer 1951 univac i
university of pennsylvania improve the way programs are entered and explore the concept of stored program 1952 edvac
ibm first computer 1952 ibm 701
ibm general –purpose commercial computer 1964 ibm 360 series
digital equipment corporation (dec) first minicomputer sixties of twenty century pdp-8 digital
parallel
intel first microprocessor 1971 intel 4004
apple apple computer series 1977 pc
control data corporation supercomputer 1961 cdc 6600

3. central processing unit
central processing unit (cpu) is the main component of any computer system and the primary function is to execute a set of instructions stored in the computer’s memory. the cpu fetches instructions from memory, reads and writes data from and to memory, and transfers data from and to input/output devices.

a simple cpu consists of a set of registers, an arithmetic logic unit (alu), and a control unit (cu). the main component of cpu is shown in figure (1).

figure 1: the main component of cpu
• the register set can divide to :
? general–purpose set registers which use for any purpose
? special–purpose set registers have specific function within cpu such as program counter (pc), instruction register (ir), segment register, stack pointer ….ect.
• alu performs the arithmetic, logic and shift operations
• cu is responsible for fetch the instruction to be executed from main memory and decoding and executing it.

4. 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, register types, and the length of each register. they also differ in the usage of each register. general-purpose registers can be used for multiple purposes and assigned to a variety of functions by the programmer. special- purpose registers are restricted to only specific functions. in some cases, some registers are used only to hold data and cannot be used in the calculations of operand addresses. address registers may be dedicatedمكرس to a particularمعين addressing mode or may be used as address general purpose. address registers must be long enough to hold the largest address.
memory access registers:
two registers are essential in memory write and read operations, the memory data register (mdr) and memory address register (mar). the mdr and mar are used exclusively by the cpu and are not directly accessible to programmers.
in order to perform a write operation into a specified memory location, the mdr and mar are used as follows:
1. the word to be stored into the memory location is first loaded by the cpu into mdr.
2. the address of the location into which the word is to be stored is loaded by the cpu into a mar.
3. a write signal is issuedتصدر by the cpu.
similarly, to perform a memory read operation, the mdr and mar are used as follows:
1. the address of the location from which the word is to be read is loaded into the mar.
2. a read signal is issued by the cpu.
3. the required word will be loaded by the memory into the mdr ready for use by the cpu.
instruction fetching registers:
two main registers are involved in fetching an instruction for execution: the program counter (pc) and the instruction register (ir). the pc is the register that contains the address of the next instruction to be fetched. the fetched instruction is loaded in the ir for execution. after a successful instruction fetch, the pc is updatingd to point to the next instruction to be executed. in the case of a branch operation, the pc is updatingd to point to the branch target instruction after the branch is resolved, that is, the target address is known.
condition registers:
condition registers, or flags, are used to maintain status information. some architectures contain a special program status word (psw) register. the psw contains bits that are set by the cpu to indicate the current status of an executing program. these indicators are typically for arithmetic operations, interrupts, memory protection information, or processor status.

5. special-purpose address registers:
index register, in index addressing, the address of the operand is obtained by adding a constant to the content of a register. the index register holds an address displacement.
segment pointers, in order to support segmentation, the address issued by the processor should consist of a segment number (base) and a displacement (or an offset) within the segment. a segment register holds the address of the base of the segment.
stack pointer is used to indicate the stack location that can be addressed. in the stack push operation, the sp value is used to indicate the location (called the top of the stack). after storing (pushing) this value, the sp is incremented.

6. datapath
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, 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. internal data movement among registers and between the alu and registers may be carried out using different organizations including one-bus, two-bus, or three-bus organizations. dedicated datapaths may also be used between components that transfer data between themselves.
6.1. one-bus organization
using one bus, the cpu registers and the alu use a single bus to move outgoing and incoming data. since a bus can handle only a single data movement within one clock cycle, two-operand operations will need two cycles to fetch the operands for the alu. additional registers may also be needed to buffer data for the alu.
6.2. two-bus organization
using two buses is a faster solution than the one-bus organization. in this case, general- purpose registers are connected to both buses. data can be transferred from two different registers to the input point of the alu at the same time. therefore, a two operand operation can fetch both operands in the same clock cycle. an additional buffer register may be needed to hold the output of the alu when the two buses are busy carrying the two operands.
6.3. three-bus organization
in a three-bus organization, two buses may be used as source buses while the third is used as destination. the source buses move data out of registers (out-bus), and the destination bus may move data into a register (in-bus). each of the two out-buses is connected to an alu input point. the output of the alu is connected directly to the in-bus.
a bus is a group of parallel wires that transfer data from one part of the computer to another. a computer system usually contains four bus types: data, i/o, control, and address. the data bus transfers instructions and data between the cpu and memory. the i/o bus transfers data between the cpu and the system input/output devices. the control bus uses binary signals to synchronize actions of all devices attached to the system bus. the address bus holds the addresses of instructions and data when the currently executing instruction transfers data between the cpu and memory.

clock
each operation involving the cpu and the system bus is synchronized by an internal clock pulsing at a constant rate. the basic unit of time for machine instructions is a machine cycle (or clock cycle). the length of a clock cycle is the time required for one complete clock pulse. in the following figure, a clock cycle is depicted as the time between one falling edge and the next:

the duration of a clock cycle is calculated as the reciprocal of the clock’s speed, which in turn is measured in oscillations per second. a clock that oscillates 1 billion times per second (1 ghz), for example, produces a clock cycle with a duration of one billionth of a second (1 nanosecond).
a machine instruction requires at least one clock cycle to execute, and a few require in excess of 50 clocks (the multiply instruction on the 8088 processor, for example). instructions requiring memory access often have empty clock cycles called wait states because of the differences in the speeds of the cpu, the system bus, and memory circuits.

7. control unit
the control unit is the main component that directs the system operations by sending control signals to the datapath. these signals control the flow of data within the cpu and between the cpu and external units such as memory and i/o. control buses generally carry signals between the control unit and other computer components in a clock-driven manner
there are mainly two different types of control units: microprogrammed and hardwired.
in microprogrammed control, the control signals associated with operations are stored in special memory units inaccessible by the programmer as control words. a control word is a microinstruction that specifiesيحدد one or more microoperations. a sequence of microinstructions is called a microprogram, which is stored in a rom or ram called a control memory cm.
in hardwired control, fixed logic circuits that correspondمطابق directly to the boolean expressions are used to generate the control signals. clearly hardwired control is faster than microprogrammed control. however, hardwired control could be very expensive and complicated for complex systems. hardwired control is more economical for small control units. it should also be noted that microprogrammed control could adapt easily to changes in the system design. we can easily add new instructions without changing hardware. hardwired control will require a redesign of the entire systems in the case of any change.


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