Unit I - WordPress

Transcription

Unit I80386DX Architecture

Session 1History of 8086microprocessor

Microprocessor –Microprocessor is a single silicon chip used for performs the operations. It act as a brain ofcomputer.History of 8086 microprocessor –A microprocessor is a sequential digital circuit which provides the flexibility to perform differenttasks upon execution of corresponding instruction sequence.The world’s first microprocessor, the Intel 4004, was a 4-bit microprocessor.Intel 40041971: Intel launches the world's first microprocessor, the 4-bit 4004, designed by FedericoFaggin.The Intel 4004The 2,000-transistor chip is made for a Japanese calculator, but a farsighted Intel ad calls it "amicro-programmable computer on a chip."Year of introduction 1971 4-bit microprocessor 4 KB main memory 45 instructions PMOS technology It was first programmable device which was used in calculatorsIntel 80081972: Intel announces the 8-bit 8008 processor. Teenagers Bill Gates and Paul Allen try todevelop a programming language for the chip, but it is not powerful enough.

In 1972, Intel launched the 8008, the first 8-bit microprocessor. It implemented an instruction setdesigned by Data point corporation with programmable CRT terminals in mind, which alsoproved to be fairly general purpose. The device needed several additional ICs to produce afunctional computer, in part due to it being packaged in a small 18-pin "memory package",which ruled out the use of a separate address bus (Intel was primarily a DRAM manufacturer atthe time).Year of introduction 1972 8-bit version of 4004 16 KB main memory 48 instructions PMOS technology SlowIntel 80801974: Intel introduces the 8-bit 8080 processor, with 4,500 transistors and 10 times theperformance of its predecessor.1975: The 8080 chip finds its first PC application in the Altair 8800, launching the PCrevolution. Gates and Allen succeed in developing the Altair Basic language, which will laterbecome Microsoft Basic, for the 8080.Two years later, Intel launched the 8080, employing the new 40-pin DIL packages originallydeveloped for calculator ICs to enable a separate address bus. It had an extended instruction setthat was source (not binary) compatible with the 8008 and also included some 16-bit instructionsto make programming easier. The 8080 device, often described as "the first truly usefulmicroprocessor”, was eventually replaced by the depletion-load based 8085 (1977) whichsufficed with a single 5 V power supply instead of the three different operating voltages ofearlier chips. Other well known 8-bit microprocessors that emerged during these years wereMotorola 6800 (1974), General Instrument PIC16X (1975), MOS Technology 6502 (1975),Zilog Z80 (1976), and Motorola 6809 (1978).Year of introduction 1973 8-bit microprocessor 64 KB main memory z microseconds clock cycle time

500,000 instructions/sec ioX faster than 8008 NMOS technology Drawback was that it needed three power supplies. Small computers (Microcomputers) were designed in mid 1970's using 8080 as CPU.Intel 8085 Year of introduction 1975 8-bit microprocessor-upgraded version of 8o8o 64 KB main memory 1.3 microseconds clock cycle time 246 instructions Intel sold l00 million copies of this 8-bit microprocessor uses only one 5v power supply.Intel 8086/80881978: Intel introduces the 16-bit 8086 microprocessor. It will become an industry standard.Year of introduction 1978 for 8o86 and 1979 for 8o88 16-bit microprocessors Data bus width of 8o86 is 16 bit and 8 bit for 8o88 1 MB main memory 400 nanoseconds clock cycle time 6 byte instruction cache for 8o86 and 4 byte for 8o88 Other improvements included more registers and additional instructions In 1981 IBM decided to use 8o88 in its personal computer

Features of 8086 Processor – Intel 8086 was launched in 1978.It was the first 16-bit microprocessor.This microprocessor had major improvement over the execution speed of 8085.It is available as 40-pin Dual-Inline-Package (DIP).It is available in three versions:o 8086 (5 MHz)o 8086-2 (8 MHz)o 8086-1 (10 MHz)It consists of 29,000 transistors.- A data width of 2 byte is attained by the de multiplexing of AD0 to AF15 pins.- The instruction queue is of 6 bytes.- From the memory the fetching of a program is performed only once there are 2 byteempty in queue.- The BIU of 8086 is not as same as in the 8088 but the EU is similar.Block Diagram of Intel 8086The 8086 CPU is divided into two independent functional units: Bus Interface Unit (BIU)Execution Unit (EU)

Fig. 1: Block Diagram of Intel 8086Bus Interface Unit (BIU)The function of BIU is to: Fetch the instruction or data from memory.Write the data to memory.Write the data to the port.Read data from the port.Instruction Queue1. To increase the execution speed, BIU fetches as many as six instruction bytes ahead to time frommemory.2. All six bytes are then held in first in first out 6 byte register called instruction queue.3. Then all bytes have to be given to EU one by one.4. This pre fetching operation of BIU may be in parallel with execution operation of EU, whichimproves the speed execution of the instruction.Execution Unit (EU)The functions of execution unit are: To tell BIU where to fetch the instructions or data from.To decode the instructions.To execute the instructions.

The EU contains the control circuitry to perform various internal operations. A decoder in EUdecodes the instruction fetched memory to generate different internal or external control signalsrequired to perform the operation. EU has 16-bit ALU, which can perform arithmetic and logicaloperations on 8-bit as well as 16-bit.ConclusionThe session is concluded with some questions1. Explain the various evolution phases of different processor.2. Demonstrate the architecture of 8086 processor.Session 2

Concept ofsegmentation in 8086Concept of segmentation in 8086Two types of memory organizations are commonly used. These are linear addressing andsegmented addressing.In segmented addressing, the available memory space is divided into chunks called segments,such a memory is known as Segmented memory.

MEMORY SEGMENTATIONParagraphs:The Memory Address Space (MAS) is divided into 65,536 (i.e., 10,000H ) paragraphs.Each paragraph is 16 (i.e., 10H) consecutive bytes.Thus each paragraph starts at a physical address whose rightmost hexadecimal digit is zero:FFFFFH 10H bytesFFFF0HParagraph FFFFH FFFEFH00030H0002FH 10H bytes00020H 0001FH 10H bytes00010H 0000FH 10H bytes00000H Paragraph 2HParagraph 1HParagraph 0H

Physical Memory Segments:The address bus of the 8086/8088 is 20-bits.Hence the microprocessor uses 20-bit memory addresses; but its registers are 16 bits.The concept of memory segmentation is used to solve this problem of using 20-bit addresses in a16-bit microprocessor.The 8086/8088 partitions its memory into 65,536 physical memory segments.A physical memory segment is a block of 216 (i.e., 64K or 10,000H) consecutive bytes starting ata paragraph boundary.The segments overlap but they all begin at different paragraph boundaries.All segments from the one starting at F0000h to the one starting at FFFF0h wrap around and endat lower memory addresses.Since each segment starts at a physical address whose leftmost hexadecimal digit is zero, thisdigit need not be stored, hence a 16-bit segment register can be used to store the remaining fourdigits of the 20-bit address.Within a segment, a memory location is specified by giving an offset. This is the number ofbytes from the beginning of the segment.Since a segment is 10,000H bytes, the first byte in a segment has offset 0000h and the last bytehas offset FFFFh (Note: Offsets are unsigned numbers).Thus a memory location may be specified by providing the 16-bit segment base address, and a16-bit offset, written in the form segment:offset; this is known as a logical address for thememory location.For example, the logical address A4FB:4872h means offset 4872h within segment A4FBh, thatis, the segment starting at physical address A4FB0h. To obtain the corresponding 20-bit physical(i.e., absolute) address, the 8086/8088 microprocessor first shifts the segment base address 4 bitsto the left (this is equivalent to multiplying by 10H), and then adds the offset. Thus the physicaladdress for A4FB:4872h is:A4FB0h 4872hA9822h(20-bit physical address)

Because segments may overlap, the segment:offset form of an address is not unique for aparticular memory location as is the case for the physical address of that memory location. Forexample consider the following:Example: For the memory location whose physical address is 1256Ah, give the address insegment:offset form for segments 1256h and 1240h.Solution: Let X be the offset in segment 1256h and Y the offset in segment 1240h. We have:(a) 1256Ah 12560h X X 000Ahhence 1256Ah 1256:000Ah(1)(b) 1256Ah 12400h Y Y 016Ahhence 1256Ah 1240:016Ah(2)(1) & (2) 1256:000AH 1240:016AH 000Ah 016Ah 1256h 1240hExample: A memory location has physical address 80FD2h. In what segment does it have offsetBFD2h ?Solution:physical address segment * 10h offsetsegment * 10h physical address - offsetHence:physical address 80FD2h

-offset BFD2h75000hThus the segment is 7500hProgram (or Logical) segmentsA logical segment is part of a program that is loaded into memory beginning on a paragraphboundary (thus the base address of a logical segment has a rightmost hexadecimal digit of zero).A logical segment is contained within a particular physical segment. Since the size of a physicalsegment is 64K, the maximum size of a logical segment is 64K.Logical segments may or may not overlap.There are four types of logical segments: Code segment, Data segment, Extra segment, and Stacksegment.The Code segment contains the instructions of a program. The Data segment provides aread/write memory in which the data of a program can be stored. The Extra segment is usuallyused for data storage. Some string operations use the Extra segment to handle memoryaddressing. The Stack segment is used for temporary storage of addresses and data. It is in thissegment that the values of the IP register, the Flags register, and other registers are storedwhenever an Interrupt or subroutine call occurs.Every 8086/8088 assembly language program must contain an explicitly defined Code segment.An 8086/8088 assembly language program which generates an executable file with extension.EXE must have an explicitly defined Stack segment. Such a program may or may not containthe Data or the Extra segment. An 8086/8088 assembly language program which generates anexecutable file with extension .COM has only one explicitly defined segment: the Code segment.The Stack segment for such a program is implicit. Thus the maximum size for an 8086/8088COM format Assembly language program is 64K.An EXE format 8086/8088 Assembly language program may contain multiple segments of acertain type; however only four logical segments can be active at a time.To keep track of the various logical segments, the 8086/8088 uses each of its four segmentregisters to hold a 16-bit portion (called a segment number) of the 20-bit starting address of alogical segment. The remaining four rightmost bits of the address are implied 0000 because a

logical segment starts at a paragraph boundary. The CS, DS, SS, and ES registers contain thecode, data, stack, and extra segment numbers, respectively. The segment registers provide thesegment base address part of a logical memory address (i.e., segment:offset address):CS:IPis the segment:offset address of the next instruction to be executed.DS:offset is the segment:offset address of the byte with the given offset in the data segment.SS:SPis the segment:offset address of the top of the stack.SS:BPis the segment:offset address of the byte, in the stack, whose offset is in the BPregister.DS:SIis the segment offset:address of a byte in the data segment at which the sourceoperand of a string instruction starts.ES:DIis the segment:offset address of a byte in the extra segment at which the destinationoperand of a string instruction starts.The segment registers must be loaded with the segment numbers. Just what values are loaded isdependent in part on how the linker and loader have assigned the logical segments to memorylocations, and on how the segment registers have been initialized during the loading process.Typically, the CS register will be loaded with the proper code segment number so that, inconjunction with the IP register, the program’s first executable instruction will be referenced.The SS and SP registers will also be properly loaded if the stack segment is explicitly defined inthe program.The other segment registers, DS and ES, must be explicitly loaded by the programmer if they areused by the program.Types of SegmentationOverlapping segment A segment starts at a particular address and its maximum size can go up to 64 Kbytes. But ifanother segment starts along this 64 Kbytes location of the first segment, the two segments aresaid to be overlapping segment. The area of memory from the start of the second segment to the possible end of the firstsegment is called as overlapped segment. 2Non Overlapped Segment

A segment starts at a particular address and its maximum size can go up to 64 Kbytes. But ifanother segment starts before this 64 Kbytes location of the first segment, the two segments aresaid to be Non- overlapping segment.ConclusionThe session is concluded with some questions1. Explain the need of memory segmentation?2. What is the size of memory segment?3. How many numbers of memory segments are present?Upon completion Students will be able to: Describe the segmentation of 8086Explain the need of memory segmentation.Teaching Learning MaterialBlack board, chalk and talk, PPTs, Notes, nptel video,

Session 38086 Register blockDiagram

Session PlanTime (inmin)ContentLearningFacultyAid/Methodology Approach10Rec

4-bit microprocessor 4 KB main memory 45 instructions PMOS technology It was first programmable device which was used in calculators Intel 8008 1972: Intel announces the 8-bit 8008 processor. Teenagers Bill Gates and Paul Allen try to develop a programming language for the chip, but it is not powerful enough. In 1972, Intel launched the 8008, the first 8-bit microprocessor .