Microprocessor and Programming
Dr. Rand Basil Alhashimie Email: [email protected]
Tishk International University
Mechatronics Engineering Department Microprocessor and Programming Lecture 1: 7-10-2021
Introduction to Microprocessor
• The brain or engine of the PC is the processor (sometimes called microprocessor), or central processing unit (CPU). The CPU performs the system‘s calculating and processing.
• A microprocessor is a programmable electronics chip that has computing and decision making capabilities similar to central processing unit of a computer.
• Any microprocessor based systems having limited number of resources are called microcomputers.
• Nowadays, microprocessor can be seen in almost all types of electronics devices like mobile phones, printers, washing machines etc. Microprocessors are also used in advanced applications like radars, satellites and flights. Due to the rapid advancements in electronic industry and large scale integration of devices results in a significant cost reduction and increase
Microprocessor
• As time went on, more and more elements were placed on each chip, so that fewer and fewer chips were needed to construct a single computer processor.
• A breakthrough was achieved in 1971, when Intel developed its 4004. The 4004 was the first chip to contain all of the components of a CPU on a single chip: The microprocessor was born.
• The 4004 can add two 4-bit numbers and can multiply only by repeated addition. By today’s standards, the 4004 is hopelessly primitive, but it marked the beginning of a continuing evolution of microprocessor capability and power.
Microprocessor Evaluation
• This evolution can be seen most easily in the number of bits that the processor deals with at a time.
• There is no clear-cut measure of this, but perhaps the best measure is the data bus width: the number of bits of data that can be brought into or sent out of the processor at a time.
• Another measure is the number of bits in the accumulator or in the set of general-purpose registers. Often, these measures coincide, but not always. For example, a number of microprocessors were developed that operate on 16-bit numbers in registers but can only read and write 8 bits at a time.
• In 1972 - Intel 8008, which was the first 8-bit microprocessor and was almost twice as complex as the 4004.
Evolution of Microprocessors
• on November 15, 1971, and originally ran at a clock speed of 108KHz (108,000 cycles per second, or just over one-tenth a megahertz). The 4004 contained 2,300 transistors and was built on a 10 micron process. Data was transferred four bits at a time, and the maximum addressable memory was only 640 bytes.
• The 4004 was designed for use in a calculator, but proved to be useful for many other functions because of its inherent programmability. In April 1972, Intel released the 8008 processor, which originally ran at a clock speed of 200KHz (0.2MHz).
Microprocessor Evaluation
• In 1974 - Intel 8080, which was the first general-purpose microprocessor. Whereas the 4004 and the 8008 had been designed for specific applications, the 8080 was designed to be the CPU of a general-purpose microcomputer.
• Like the 8008, the 8080 is an 8-bit microprocessor. The 8080, however, is faster, has a richer instruction set, and has a large addressing capability.
• About the same time, 16-bit microprocessors began to be developed. However, it was not until the end of the 1970s that powerful, general-purpose 16-bit microprocessors appeared. One of these was the 8086.
• The next step in this trend occurred in 1981, when both Bell Labs and Hewlett-Packard developed 32-bit, s ingle-chip microprocessors.
• Intel introduced its own 32-bit microprocessor, the 80386, in 1985.
History (Evolution of Microprocessors)
• The 8008 processor contained 3,500 transistors and was built on the same 10 micron process as the previous processor. The big change in the 8008 was that it had an 8-bit data bus, which meant it could move data 8 bits at a time—twice as much as the previous chip. It could also address more memory, up to 16KB. This chip was primarily used in dumb terminals and general-purpose calculators.
• The next chip in the lineup was the 8080, introduced in April 1974, running at a clock rate of 2MHz.Due mostly to the faster clock rate, the 8080 processor had 10 times the performance of the 8008. The 8080 chip contained 6,000 transistors and was built on a 6 micron process. Like the previous chip, the 8080 had an 8bit data bus, so it could transfer 8 bits of data at a time. The 8080 could address up to 64KB of memory, significantly more than the previous chip. It was the 8080 that helped start the PC revolution, as this was the processor chip used in what is generally regarded as the first personal computer, the Altair 8800.
History (Evolution of Microprocessors)
• The CP/M operating system was written for the 8080 chip, and Microsoft was founded and delivered its first product: Microsoft BASIC for the Altair. These initial tools provided the foundation for a revolution in software because thousands of programs were written to run on this platform.
• The Z-80 also incorporated a superset of 8080 instructions, meaning it could run all 8080 programs. It also included new instructions and new internal registers, so software that was designed for the Z-80 would not necessarily run on the older 8080. The Z-80 ran initially at 2.5MHz (later versions ran up to 10MHz), and contained 8,500 transistors. The Z-80 could access 64KB of memory.
Evolution of Microprocessors
• Intel released the 8085, its follow up to the 8080, in March of 1976. The 8085 ran at 5MHz and contained 6,500 transistors. It was built on a 3-micron process and incorporated an 8-bit data bus.
Along different architectural lines, MOS Technologies introduced the 6502 in 1976.
• The chip was used in Apple I and Apple II design and systems by Commodore and other system manufacturers. The 6502 and its successors were also used in computer games, including the original Nintendo Entertainment System (NES) among others. Motorola went on to create the 68000 series, which became the basis for the Apple Macintosh line of computers. The Z-80 also incorporated a superset of 8080 instructions, meaning it could run all 8080 programs. It also included new instructions and new internal registers, so software that was designed for the Z-80 would not necessarily run on the older 8080. The Z-80 ran initially at 2.5MHz (later versions ran up to 10MHz), and contained 8,500 transistors. The Z-80 could access 64KB of memory.
Evolution of Microprocessors
• Intel introduced the 8086 in June 1978.The 8086 chip brought with it the original x86 instruction set that is still present on x86-compatible chips such as the Pentium III. A dramatic improvement over the previous chips, the 8086 was a full 16-bit design with 16-bit internal registers and a 16-bit data bus. This meant that it could work on 16- bit numbers and data internally and also transfer 16-bits at a time in and out of the chip. The 8086contained 29,000 transistors and initially ran at up to 5MHz. The chip also used 20-bit addressing, meaning it could directly address up to 1MB of memory. In 1979, Intel released a crippled version of the 8086 called the 8088. The 8088 processor used the same internal core as the 8086, had the same 16-bit registers, and could address the same 1MB of memory, but the external data bus was reduced to 8 bits. This allowed support chips from the older 8-bit 8085 to be used, and far less expensive boards and systems could be made. It
Evolution of Microprocessors
• This decision would affect history in several ways. The 8088 was fully software compatible with the 8086, so it could run 16-bit software. Also, because the instruction set was very similar to the previous 8085 and 8080, programs written for those older chips could be quickly and easily modified to run. This allowed a large library of programs to be quickly released for the IBM PC, thus helping it become a success. The overwhelming blockbuster success of the IBM PC left in its wake the legacy of requiring backward compatibility with it. In order to maintain the momentum, Intel has pretty much been forced to maintain backward compatibility with the 8088/8086 in most of the processors it has released since then. In some ways the success of the PC, and the Intel architecture it contains, has limited the growth of the personal computer. In other ways, however, its success has caused a huge number of programs, peripherals, and accessories to be developed, and the PC to become a de facto standard in the industry. The original 8088 processor used in the first PC contained close to 30,000 transistors and ran at less than 5MHz. Intel recently introduced a version of the Pentium III Xeon with 2MB of on die cache that has a whopping 140 million transistors, the largest ever in a single processor chip. Both AMD and Intel are manufacturing processors that run at 1GHz (AMD has some bragging rights there; it beat Intel to 1GHz by two days), and both have demonstrated processors running in the 2GHz range. And the progress doesn‘t stop there, as according to Moore‘s Law, processing speed and transistor counts are doubling every 1.5 to 2 years.
x86 Evolution (1)
● 8080
○ first general purpose microprocessor
○ 8 bit data path
○ Used in first personal computer – Altair
● 8086 – 5MHz – 29,000 transistors
○ much more powerful
○ 16 bit
○ instruction cache, prefetch few instructions
● 8088 (8 bit external bus) used in first IBM PC
● 80286
○ 16 Mbyte memory addressable
○ up from 1Mb
● 80386
○ 32 bit
○ Support for multitasking
● 80486
○ sophisticated powerful cache and instruction pipelining
○ built in math co-processor
x86 Evolution (1)
32-bit or 64-bit Architecture?
• 32-bit and 64-bit are commonly used to describe processor architecture or design. A 32-bit processor includes a 32-bit register, which can store 232 or 4,294,967,296 values. A 64-bit processor includes a 64- bit register, which can store 264 or 18,446,744,073,709,551,616 values. Therefore, a 64-bit register is not twice as large as a 32-bit register, but is 4,294,967,296 times larger.
• The CPU register stores memory addresses, which is how the processor accesses data from RAM.
One bit in the register can reference an individual byte in memory, so a 32-bit system can address a maximum of 4 gigabytes (4,294,967,296 bytes) of RAM. The actual limit is often less – around 3.5 gigabytes – since part of the registry is used to store other temporary values besides memory addresses.
x86 Evolution (1)
Benefits of 64-bit Processor?
• A 64-bit register can theoretically reference 18,446,744,073,709,551,616 bytes, or 17,179,869,184 gigabytes (16 exabytes) of memory. This is several million times more than an average workstation would need to access. What's important is that a 64-bit computer (which means it has a 64-bit processor) can access more than 4GB of RAM. If a computer has 16GB of RAM, it better have a 64-bit processor.
Otherwise, at least 12 GB of the memory will be inaccessible by the CPU.
• While 64 bits is far more storage than what modern computers require, it removes all bottlenecks associated with 32-bit systems. For example, 64-bit systems run more efficiently since memory blocks are more easily allocated. They also support 64-bit instructions and have 64-bit data paths, which enables them to process more data at once than 32-bit systems can.
x86 Evolution (2)
● Pentium
○ Superscalar
○ Multiple instructions executed in parallel
● Pentium Pro
○ Increased superscalar organization
○ Aggressive register renaming
○ branch prediction
○ data flow analysis
○ speculative execution
● Pentium II
○ MMX technology
○ graphics, video & audio processing
● Pentium III
○ Additional floating point instructions for 3D graphics
x86 Evolution (3)
● Pentium 4
○ Note Arabic rather than Roman numerals
○ Further floating point and multimedia enhancements
● Core
○ First x86 with dual core
● Core 2
○ 64 bit architecture
● Core 2 Quad – 3GHz – 820 million transistors
○ Four processors on chip
● x86 architecture dominant outside embedded systems
● Organization and technology changed dramatically
● Instruction set architecture evolved with backwards compatibility
● ~1 instruction per month added
● 500 instructions available
Designing for Performance
Year by year, the cost of computer systems continues to drop dramatically, while the performance and capacity of those systems continue to rise equally dramatically. Today’s laptops have the computing power of an IBM mainframe from 10 or 15 years ago. Thus, we have virtually “free” computer power. Processors are so inexpensive that we now have microprocessors we throw away. The digital pregnancy test as an example (used once and then thrown away). And this continuing technological revolution has enabled the development of applications of astounding complexity and power. For example, desktop applications that require the great power of today’s microprocessor-based systems include:
• Image processing
• Speech recognition
• Videoconferencing
• Multimedia authoring
• Voice and video annotation of files
• Simulation modeling
Manufacture Technologies
Broadly two technologies have been used in the manufacturer of μPs: MOS and Bipolar. The majority of μPs available in the market use MOS technology because of its two distinct merits, namely, a higher component density and a lower manufacturing cost. The bipolar-technology based μPs are limited to special applications that call for high speeds in which respect MOS devices are inferior.
Because of the size problem the bipolar μPs are usually made in bit-slice configuration; examples being Intel‘s 3002 (2-bit slice, TTL), Transitron‘s 1601 (4-bit slice, TTL) and Texas Instrument‘s SBP 0400 (4-bit slice, TIL). The first few types of μPs to be announced (e.g., 4004, 4040, 8008) were based on PMOS technology, which is now obsolete for μPs because of its speed limitation. The NMOS is the main technology today in use for low cost μPs (e.g., 8080, 8085, Z-80, 6800 808, 6800, 8086, Z-8000, 68000). The CMOS technology based μPs (e.g., RCA‘s COSMAC) have limited application because of lower packing density and higher cost. The exceptions are the less cost- sensitive military and aerospace applications, where low power dissipation (typical of the CMOS
Computer Structure
• Digital Computer-a programmable machine that processes binary data. It includes four components:
CPU (ALU plus control unit), memory, input, and output.
• CPU-the Central Processing Unit. The group of circuits that processes data and provides control signals and timing. It includes the arithmetic/logic unit, registers, instruction decoder, and the control unit.
• ALU-the group of circuits that performs arithmetic and logic operations. The ALU is a part of the CPU.
• Control Unit-The group of circuits that provides timing and signals to all operations in the computer and controls data flow.
• Memory-a medium that stores binary information (instructions and data).
• Input -a device that transfers information from the outside world to the computer.