Final Lecture - Microprocessor PDF
Document Details
Uploaded by Deleted User
Tags
Related
- Digital Design and Computer Architecture 2nd Edition PDF
- (The Morgan Kaufmann Series in Computer Architecture and Design) David A. Patterson, John L. Hennessy - Computer Organization and Design RISC-V Edition_ The Hardware Software Interface-Morgan Kaufmann-24-101-42-45.pdf
- Lecture 1: Introduction to Computer Organization and Architecture PDF
- Architecture des ordinateurs PDF
- Addressing Modes (8086) PDF
- Session 2 Introduction to Computer Architecture PDF
Summary
These lecture notes cover the fundamentals of 8-bit microprocessors, including their architecture, registers (like accumulator and flags), and functions. They also touch upon instruction sets.
Full Transcript
A typical 8-bit microprocessor Microprocessor is the modern version of an old favorite called the Z80. Z80- was developed in 1978 which was itself just an improved version of the Intel 8080 Z80180- can run any programs that were written for the Z80 as well as adding new features. The group of mi...
A typical 8-bit microprocessor Microprocessor is the modern version of an old favorite called the Z80. Z80- was developed in 1978 which was itself just an improved version of the Intel 8080 Z80180- can run any programs that were written for the Z80 as well as adding new features. The group of microprocessors is referred to as a family. Accumulator - the programmer can use it any time to Inside of the Central Processing Unit (CPU) store an 8-bit binary number. - It can store numbers to used in arithmetic operations or for logic operations like AND, OR etc Flag Register - a window to see into the workings of the microprocessor. A simple communication system - an 8-bit register but it is unusual in that each bit stored is quite independent of all the others. Instruction register - a small memory able to store 8 bits of information. The information is an instruction for the microprocessor to carry out. Instruction decoder - is the part of the microprocessor that is able to actually carry out an instruction Note: X is not used, and so we don’t care Arithmetic and Logic Unit (ALU) what the voltage or binary value is. - this a simple packet calculator. It can a flag is said to be ‘set’ when its value is add, subtract, multiply, divide, and do 1 and is ‘cleared’ to 0. various tricks with logic gates AND, OR, XOR, etc. Sign flag (S) - it is just a copy of the bit 7 of the CPU register banks accumulator. - magnitude numbers use a 1 to indicate General Purpose Registers a negative number and 0 to indicate a - under the control of the user and can positive number. be used for a variety of temporary storage purposes. Note: the number zero is treated as a positive Special Purpose Register number so we cannot use the S flag to spot a - dedicated to particular functions. zero result Zero flag (Z) - spend all time watching for a result of zero. Results: 0 (zero) makes the Z flag = 1 not 0 makes Z flag = 0 Add/Subtract flag (N) - is used in situations in which we wish to - tells whether the last arithmetic perform a sequence of similar tasks one instruction was ‘add’ or ‘subtract’. after the other. - N = 0 for add, N = 1 for subtract R Counter (R) Carry flag (C) and the half-carry flag (H) - this a simple counter in which the lower seven bits are used to count the C flag copies the value of the carry from bit 7 number of instructions that have been carried out by the microprocessor. Programming- using Machine Code and Assembly H flag records the carry from bit 3 into bit 4 during additions Parity/Overflow flag (P/V) The ‘V’ on the title refers to overflow in arithmetic calculations. Some combinations of numbers cab be misinterpreted and give an apparently incorrect answer. The instruction is in a language that is Example: understood by that particular microprocessor. Parity Mode In this mode, it checks a byte of data and counts the number of 1 states, if the total is in even number, the P/V flag is set and if odd, it is cleared. Special-Purpose Registers Program Counter (PC) - is a list of instruction for the microprocessor to carry out. Machine Code - the purpose of the program counter is - the binary code that is understood by to keep track of the address that is the microprocessor. Consists of streams going to be used next. of binary bits - First generation language (low-level Stack Pointer (SP) language) - also called pushdown stack Example: The instruction necessary to add two numbers When a new data item is entered or "pushed" together. One of the number is already stored onto the top of a stack, the stack pointer in the accumulator or register (assume number increments to the next physical memory 2516). address, and the new item is copied to that address. What will we do? Type 11000110 00010101. Index registers The first byte which contains the instruction is Note: the actual mnemonics differ between called the operation code, usually abbreviated microprocessors. to ‘op code’. Instruction set- list of all codes for each of their The second byte is the number 1516 microprocessor Assembler - a program that convert assembly code to machine code. Source code- a program that allows us to type in the assembly code Sequence of action: Syntax 1. the first goes into the instruction - is the structure of statements in a decoder where it is decoded into a language sequence of internal operations. Example: 2. It then copies the number 2516 from the If we mistype the instruction LD A C as LD A V data buffer into ALU. then the assembler would be unable to convert 3. The number 2516 from the accumulator this to object code since it will not recognize the is then copied into the ALU to join the ‘V’ as a valid register. 1516 when is already there. The two numbers are added. Sample syntax 4. And the result is copied back to the ‘syntax error code not recognized’ accumulator. ‘syntax error. Invalid register. Register name may only be A,B,C,D,E,H, or L’ Label - is a word that can be used to represent an address while the program is being written Assembly - the Second Generation language - it replaced all the ones and zeros with letters that were easier to remember but still a low-level language example code: ADD A,m means ‘add any number, m to the It might encounter a problem value stored in the accumulator SLA E means ‘ shift to the left, the contents of register E. LD B 25H mean ‘load the B register with the number 25H’ LD B B’ mean ‘enable us to copy the number If we type a word over the position where the stored in the B’ register into the B register’ memory address normally resides it will be recognized by the assembler as a label. to measure the system performance in a range of situations. How to make a microprocessor go faster? 1. Increase the clock speed 2. Power dissipation Power = voltage x current Remarks - to reduce heat production, we have to - allows us to remarks or notes to acts as reduce either the voltage or the reminders but to be ignored by the current, or both. assembler Use of each clock pulse To tell the assembler program not to attempt Pipelining converting it to object code, precede the note - is the process of making better use of by a semicolon the buses. Example: Let’s assume we have some numbers to move STOP JP STOP ;this will hold the microprocessor from the memory to the arithmetic and logic in a loop unit (ALU): Machine Code and Assembly Languages are Clock Pulse 1 called procedural languages. A number is moved form a memory location to the accumulator How do we measure the speed the speed of a microprocessor? Clock Pulse 2 It is then moved from the accumulator to the MIPS (millions of instructions per second) ALU Number of clock cycles in a second x clock cycles taken to complete an instruction FLOPS (FLoating-point Operations Per Second) - makes the mathematics faster System Tests The use pipelining Benchmarks - tests are based on making the microprocessor-based system run a standard or ‘benchmark’ program. i/O operations (input/output operations) Intel versus Motorola - measures the speed of accepting 8080A – a popular processor that had a 16-bit information in and sending it out again address bus - introduced by Intel, December 1973 TPS (Transaction Per Second) - supplied by +5V, +12V and -5V - number of pins increased to 40 - this a move to model the tasks set into - became the standard package size for real-life situations. Requires the system future 8-bit microprocessor to take in information, modify it and then store it again. MC6800- introduced by Motorola SPECmark (System Performance Evaluation Co- - 8-bit microprocessor with 16 bit address pins operative’s benchmark) - supplied by +5V - an average result of carrying out 10 - slightly faster than the 8080 on average agreed benchmark tests in an attempt 8085A- improved version of 8080 What do we mean by 16-bit microprocessor? - still 8-bits with 16-bit address bus - power supply of +5V The ‘size’ of microprocessor is the width of the - increased the power supply of 5.5Mhz data registers. So a 16-bit microprocessor can handle 16-bit numbers Z80- introduced by Zilog - combined much that was good about Pentium family uses a 64-bit data bus but they the Intel designs with some good ideas have 32-bit data registers and therefore 32-bit from the MC6800. devices. - Instruction code included all the code from the 8080A but added some new The Power PC and the Digital Alpha family are ones to nearly double the total number real 64-bit devices and have 128-bit data bus. MCS650X- introduced by MOS Technology Intel 8088 was a real 16-bit microprocessor but - basically the enhancement of the had an 8-bit external data bus. Motorola MC6800 - follows the 8-bit, 16-bit address bus, +5V power supply trend - biggest contribution is pipelining - two billions of MCS6502 were sold The One-chip Microcomputer 8048- introduced by Intel - a one-chip microcomputer - its instruction code was change - has onboard memory consisted of 1kbyte of ROM and 64bytes of RAM 8049- 2kbytes of ROM and 128bytes of RAM - it could also access 4kbytes of external ROM Z8- introduced by Zilog - it has 2kbytes of ROM and 128bytes of RAM - can access 64kbytes of external ROM and 64kbytes of external RAM to allow the ‘one-chip’ to become more than one if needed. MC6801- introduced by Motorola - it included 2kbytes of ROM and 128bytes of RAM together with the time and UART - the instruction set was compatible with the MC6800 with 16-bit arithmetic