Full Transcript

East Delta University CSE 315: Microprocessor and Interfacing Memory Organization of Microcomputer system Memory: The memory is not an actual part of the CPU itself, and is instead housed elsewhere on the motherboard. Howev...

East Delta University CSE 315: Microprocessor and Interfacing Memory Organization of Microcomputer system Memory: The memory is not an actual part of the CPU itself, and is instead housed elsewhere on the motherboard. However, it is here that the program being executed is stored, and as such is a crucial part of the overall structure involved in program execution. Instruction Execution To execute an instruction processor must follows minimum of four steps: (1) Instruction Fetch (2) Instruction Decode (3) Instruction execute (4) Store or, Store of Result Instruction Fetch: Control unit collect the instructions from main memory and put them in CPU register. This is called instruction fetch. Instruction Decode: When instruction reaches in processor register, CU decodes or interprets the instruction and sends necessary signals and data to ALU. Instruction Execute: ALU process the data with arithmetic and logic operations and gives a result according to instructions. Store Result: Finally CU stores result in Accumulator or main memory. These four steps to execute an instruction are called machine cycle. Microprocessor Architecture (Based on Instruction Set): As microprocessor is a programmable device, obviously it has an instruction set to control its operation by programming. There are two prevalent instruction set architectures: ✓ RISC (Reduced Instruction Set Computer) Architecture. ✓ CISC (Complex Instruction Set Computer) Architecture. RISC CISC Small number of instructions in the instruction CISC chips have a large amount of different set compared to CISC. and complex instructions RISC chips use simpler instructions sets to In common, CISC chips process smaller achieve higher clock frequencies and process instructions per clock cycle than RISC more instructions per clock cycle than CISC processors, but to do same task number of processors instruction is smaller in CISC than RISC. It’s hardware design is easy but software It’s hardware design is difficult but (programming) is difficult because you have to programming is easy as it has a large number write code using a small number of of instructions. instructions. Apple and SUN use RISC architecture. Intel and AMD develop CISC processors. 8086 microprocessor has CISC architecture. Typically, CISC chips have a large amount of different and complex instructions. The philosophy behind it is that hardware is always faster than software, therefore one should make a powerful instruction set, which provides programmers with assembly instructions to do a lot with short programs. There is still considerable controversy among experts about which architecture is better. Some say that RISC is cheaper and faster and therefor the architecture of the future. Others note that by making the hardware simpler, RISC puts a greater burden on the software. Software needs to become more complex. Software developers need to write more lines for the same tasks. Therefore, they argue that RISC is not the architecture of the future, since conventional CISC chips are becoming faster and cheaper anyway. Purpose of Memory: (i) Memory unit is the integral part of any microcomputer system and its primary purpose is to hold program and data (ii) The major design goal of memory unit is to allow it to operate at a speed close to that of the processor. (iii) The cost factor inhibits the design of entire memory unit with single technology that guarantees high speed. (iv) In order to seek a trade-off between the cost and operating speed, a memory system is usually designed with different technologies such as solid state, magnetic and optical. Types of Memory: In a broad sense, microcomputer memory can be divided into three groups: (a) Processor Memory (b) Primary (or main) memory Volatile memory RAM - random access memory Static RAM Dynamic RAM Non-volatile memory ROM - read only memory EPROM EEPROM FLASH (c) Secondary memory Hard disks, CD, floppy disks, tape Processor Memory refers to a set of CPU registers. These registers are useful to hold temporary results when a computation is in progress. Also, there is no speed disparity between the registers and the microprocessor because they are fabricated using the same technology. The main disadvantage is the cost involved which forces the architect to include very few registers (usually 8 to 16 only) in the microprocessor. The primary memory or, main memory is the memory that the CPU can access directly. Examples of main memory include RAM, ROM, etc. The secondary memory cannot be addressed directly (cannot access specified memory location) by the CPU. Examples of secondary include floppy disk, hard disk, CD, etc. The information in the secondary memory must be copied to the main memory so that CPU can access it. Secondary memory is much cheaper than primary memory. Types of Primary Memory: There are two types of primary memories: volatile and nonvolatile. Volatile memory is the type of memory that will lose data when the power supply to the memory is gone. Random access memory (RAM) is one type of volatile memory. Nonvolatile memory keeps the data in the memory even it is not powered up. Nonvolatile memory includes read only memory (ROM). Read Only Memory (ROM) is used to permanently save the program being executed. The size of program that can be written depends on the size of this memory. There are several types of ROM. (i) Masked ROM (MROM) is a kind of ROM the content of which is programmed by the manufacturer. The term „masked‟ comes from the manufacturing process, where regions of the chip are masked off before the process of photolithography. In case of a large-scale production, the price is very low. (ii) One time programmable ROM (OTP ROM) enables you to download a program into it, but, as its name states, one time only. If an error is detected after downloading, the only thing you can do is to download the correct program to another chip. (iii) UV Erasable Programmable ROM (UV EPROM) Both the manufacturing process and characteristics of this memory are completely identical to OTP ROM. It enables data to be erased under strong ultraviolet light. After a few minutes it is possible to download a new program into it. (iv) Flash Memory This type of memory was invented in the 80s in the laboratories of INTEL and was represented as the successor to the UV EPROM. The content of this memory can be written and cleared practically an unlimited number of times. Flash memory can only be erased block (many bytes) by block. (v) Electrically Erasable programmable ROM (EPROM) the contents of EEPROM may be changed during operation (similar to RAM), but remains permanently saved even after the loss of power (similar to ROM). EEPROM can be programmed and erased byte by byte. Random Access Memory (RAM) : Information stored in random access memories will be lost if the power is turned off. This property is known as volatility and hence, RAMs are usually called volatile memories. RAM can be made of magnetic core or by semiconductor. Semiconductor RAM‟s are two types: (i) Static RAM and (ii) Dynamic RAM. Static RAM: In a semiconductor memory constructed using bipolar transistors; the information is stored in the form of voltage levels in flip-flops. These voltage levels do not usually get drifted away. Such memories are called static RAMs because stored information remains constant for some period of time. Since the static RAM maintains information in active circuits, power is required even when the chip is inactive or standby mode. Hence, static RAMs require large power supplies. Also each static RAM cell is about four times larger in area than an equivalent dynamic cell. Dynamic RAM: On the other hand, semiconductor memories designed using MOS transistors, the information is held in the form of electrical charges in capacitors. Here the stored charge has the tendency o get leaked away. These memories are referred to as dynamic RAMs. In order to prevent any information loss, dynamic RAMS have to be refreshed at regular intervals. Refreshing means boosting the signal level and writing it back. This activity is performed using a hardware unit called “refresh logic”. Differences between static and dynamic RAMs: Static RAM Dynamic RAM This semiconductor memory is constructed This semiconductor memory is constructed using bipolar transistors using MOS transistors Information is stored in the form of voltage Information is stored in the form of electrical levels in flip-flops charges in capacitors These voltage levels do not get drifted away Has tendency of leakage No refresh logic is needed Refresh logic is necessary since leakage of electrical charges Power is required even when the chip is in Refresh login is inbuilt, so draws less power standby mode. comparatively. Four time larger in size compared to an Four times as many bits as a static RAM chip. equivalent dynamic cell

Use Quizgecko on...
Browser
Browser