This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:multiasm:cs:chapter_3_6 [2026/02/27 14:14] – [Table] jtokarz | en:multiasm:cs:chapter_3_6 [2026/03/01 13:57] (current) – [Memory, Types and Their Functions] ktokarz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Memory, Types and Their Functions====== | ||
| + | The computer cannot work without memory. The processor fetches instructions from memory, and data is stored there as well. In this chapter, we will discuss memory types, technologies and their properties. | ||
| + | The overall view of computer memory can be represented by the memory hierarchy triangle shown in Fig. {{ref> | ||
| + | |||
| + | <figure memtriangle> | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | In the table {{ref> | ||
| + | |||
| + | <table memhierarchy> | ||
| + | < | ||
| + | ^ Memory type ^ Average size ^ Access time ^ | ||
| + | | Registers | ||
| + | | Cache | few megabytes | ||
| + | | RAM | few gigabytes | ||
| + | | Disk | few terabytes | ||
| + | | Network | ||
| + | </ | ||
| + | |||
| + | ===== Address space ===== | ||
| + | |||
| + | Before we start talking about memory details, we will mention the term //address space//. The processor can access both instructions and data in the program to process. The question is: how many instructions and data elements can it reach? The number of possible elements (usually bytes) represents the address space available for the program and data. We know from the chapter about von Neumann and Harvard architectures that these spaces can overlap or be separate. | ||
| + | |||
| + | The size of the program address space is determined by the number of bits of the Instruction Pointer register. In many 8-bit microprocessors, | ||
| + | |||
| + | The size of the possible data address space is determined by addressing modes and the size of index registers used for indirect addressing. In 8-bit microprocessors, | ||
| + | |||
| + | ===== Program memory ===== | ||
| + | |||
| + | In this kind of memory, programs' | ||
| + | |||
| + | ===== Data memory ===== | ||
| + | |||
| + | In data memory, all kinds of data can be stored. Here we can find numbers, tables, pictures, audio samples and everything that is processed by the software. Usually, the data memory is implemented as RAM, allowing read and write access. RAM is a volatile memory, so its content is lost if the computer is powered off. | ||
| + | |||
| + | ===== Memory technologies ===== | ||
| + | There are different technologies for creating memory elements. The technology determines if memory is volatile or non-volatile, | ||
| + | * non-volatile, | ||
| + | * volatile. | ||
| + | Non-volatile memories are implemented as: | ||
| + | * ROM | ||
| + | * PROM | ||
| + | * EPROM | ||
| + | * EEPROM | ||
| + | * Flash EEPROM | ||
| + | * FRAM | ||
| + | Volatile memories have two main technologies: | ||
| + | * Static RAM | ||
| + | * Dynamic RAM | ||
| + | |||
| + | ===== Non-volatile memories ===== | ||
| + | Non-volatile memories are used to store data that should be preserved when power is off. Their main application is to store the program' | ||
| + | |||
| + | ===== ROM ===== | ||
| + | ROM (Read-Only Memory) is the type of memory that is programmed by the chip manufacturer during chip production. This memory has fixed content which can't be changed in any way. It was popular as a program memory in microcontrollers a few years ago because of the low price of a single chip, but due to the need for replacement of the whole chip in case of an error in the software and lack of possibility of a software update, it was replaced with technologies which allow reprogramming the memory content. Currently, ROM is sometimes used to store a chip's serial number. | ||
| + | |||
| + | ===== PROM ===== | ||
| + | PROM (Programmable Read Only Memory) is the kind of memory that can be programmed by the user but can't be reprogrammed further. It is sometimes called OTP - One Time Programming. Some microcontrollers implement such memory, but because software updates are not possible, it is a choice for simple devices with a short product lifetime. OTP technology is used in some protection mechanisms to prevent unauthorised changes to software or reconfiguration of the device. | ||
| + | |||
| + | ===== EPROM ===== | ||
| + | EPROM (Erasable Programmable Read-Only Memory) is a memory that can be erased and programmed many times. The data can be erased by shining an intense ultraviolet light through a special glass window into the memory chip for a few minutes. After erasing, the chip can be programmed again. This kind of memory was very popular a few years ago, but because of a complicated erase procedure that required a UV light source, it was replaced by EEPROM. | ||
| + | ===== EEPROM ===== | ||
| + | EEPROM - Electrically Erasable Programmable Read Only Memory is a type of non-volatile memory that can be erased and reprogrammed many times with electric signals only. They replaced EPROMs because of their ease of use and the ability to reprogram them without removing the chip from the device. It is designed as an array of MOSFET transistors with so-called floating gates, which can be charged or discharged and keep the stable state for a long time (at least 10 years). In EEPROM memory, every byte can be individually reprogrammed. | ||
| + | |||
| + | ===== Flash EEPROM ===== | ||
| + | Flash EEPROM is a type of non-volatile memory that is similar to EEPROM. Whilst in the EEPROM, a single byte can be erased and reprogrammed, | ||
| + | |||
| + | ===== FRAM ===== | ||
| + | FRAM (Ferroelectric Random Access Memory) is a type of memory where the information is stored with the effect of a change of polarity of ferroelectric material. The main advantage is that power efficiency, access time, and density are comparable to DRAM, without the need for refreshing and with data retention while power is off. The main drawback is the price, which limits the popularity of FRAM applications. Currently, due to their high reliability, | ||
| + | |||
| + | ===== Volatile memories ===== | ||
| + | Volatile memory is used to store temporary data while the computer system is running. Their content is lost after the power is off. Their main application is to store the data while the program processes it. Their main applications are operational memory (known as RAM), cache memory, and data buffers. | ||
| + | |||
| + | ===== SRAM ===== | ||
| + | SRAM (Static Random Access Memory) is the memory used as operational memory in smaller computer systems and as cache memory in larger machines. Its main benefit is very high operational speed. The access time can be as short as a few nanoseconds, | ||
| + | |||
| + | ===== DRAM ===== | ||
| + | DRAM (Dynamic Random Access Memory) is the memory used as operational memory in bigger computer systems. Its main benefit is very high density. The information is stored as a charge in a capacitance created under the MOSFET transistor. Because every bit is implemented as a single transistor, it is possible to implement a few gigabytes in a small area. Another benefit is the reduced power required to store data compared to static memory. But there are also drawbacks. DRAM memory is slower than SRAM. The addressing method and the complex internal construction prolong the access time. Additionally, | ||