Lecture 2 - RAM and ROM
Introduction to RAM and ROM
Course: EMNG 1020
Date: January 2025
Topics for this Lecture
Types of RAM
Types of ROM
Application Example
Memory Channel Configurations
Single Channel
Dual Channel
Triple Channel
Error Correction Techniques
Parity vs Non-Parity
ECC Practice
RAM – Random Access Memory
Purpose of RAM:
RAM serves as the computer's working memory, storing temporary information for applications such as spreadsheets, web browser data, images, and other active tasks. The temporary storage ensures that the CPU can access data quickly, enhancing the overall performance of tasks.
Comparison with Hard Disk:
RAM is significantly faster than hard disks, which makes it crucial for system performance. While hard disks provide long-term data storage, they operate at much lower speeds compared to RAM.
Virtual Memory: This is a memory management capability that provides an ``overflow'' capacity by using part of the hard disk as additional memory space. Although this enables larger applications to run, it functions at a slower speed than RAM, often leading to system lag during high-memory usage.
Characteristics of RAM:
Data stored in RAM is volatile, meaning that it is lost when power is removed.
The speed of RAM plays a critical role in overall computer performance; since the CPU operates at a higher speed than most RAM types, slow RAM can bottleneck system efficiency.
Speed Comparison of Storage Types
Performance Metrics: Based on tests using CrystalDiskMark
Hard Drive (Mechanical):
Read: 112.3 MB/s
Write: 109.3 MB/s
SSD (Solid State Drive):
Read: 477.9 MB/s
Write: 235.7 MB/s
RAM (DDR3):
Read: 5766 MB/s
Write: 7760 MB/s
Data Retention in Memory
Scenarios when Power is Removed:
Non-volatile memory retains data even when power is lost, making it essential for long-term storage solutions.
Volatile memory, like RAM, loses all stored data once power is removed, which is a critical aspect to consider in system design, especially for data integrity and recovery scenarios.
Common Types of RAM
SRAM (Static Random Access Memory):
Typically used in embedded systems, such as automotive toys and household appliances.
DRAM (Dynamic Random Access Memory):
Commonly found in computers, consumer electronics, and graphics cards, DRAM is characterized by its need for constant refreshing to maintain data integrity.
SRAM Characteristics
Usage:
Often utilized as cache memory for processors, improving access speed for frequently used data.
Volatile Memory:
If power is lost, the information stored in SRAM is also lost.
Advantages:
High-speed access and no refresh cycles are required for data retention.
Disadvantages:
Higher cost and physically larger size compared to DRAM, limiting its usage in large-scale applications.
DRAM Characteristics
Usage:
Most commonly used type of RAM in personal computers and various devices.
Volatile Memory:
Like SRAM, DRAM loses data once power is removed.
Maintenance:
Requires regular refreshing of data to prevent loss, complicating the design and consumption of power.
DRAM Speed Features
Types:
DDR3:
Introduced in 2007, operable at speeds of 400 to 1066 MHz, powered by 1.5 V.
DDR4:
Launched in 2014, offers higher speeds of 800 to 1600 MHz while consuming less power at around 1.2 V.
DDR5:
Released in 2020, with speeds ranging from 2400 to 3600 MHz and operates at 1.1 V. Currently the fastest consumer RAM available.
Upcoming Development:
DDR6 technology is in development, promising further increases in efficiency and speed.
Memory Channel Configurations
Single Channel:
Utilizes one memory data bus connected to the CPU, typically resulting in lower bandwidth.
Dual Channel:
Connects two memory data buses to the CPU, requiring matched RAM types to optimize performance, effectively doubling the potential bandwidth.
Triple Channel:
Involves three memory data buses connected to the CPU, again necessitating the use of identical RAM types to ensure performance consistency and maximize bandwidth.
Example: Asrock B550M Pro Se 6
Specifications:
Designed to support AMD AM4 socket and various Ryzen processors.
Memory Technology:
Supports Dual Channel DDR4, emphasizing the necessity for matching DIMM configurations during installation.
ROM – Read Only Memory
Purpose of ROM:
ROM is essential for storing permanent data, including crucial instruction sets for computers to access vital components like disks, ensuring system boot and operational integrity.
Common Types of ROM
Types:
PROM (Programmable Read-Only Memory):
Programmed once, with fixed data post-writing (utilizes burnt fuses).
Commonly found in consumer electronics and medical machinery.
EPROM (Erasable Programmable Read-Only Memory):
Can be erased with ultraviolet light; increasingly obsolete due to newer technologies like EEPROM.
EEPROM (Electrically Erasable Programmable Read-Only Memory):
Allows multiple writing and erasing cycles, though limited by cycles; often used in small storage applications.
Flash Memory:
A type of non-volatile storage that can be quickly erased and rewritten, frequently embedded in various storage solutions including USB drives and SSDs.
Introduction to ATMEL Components
Example: ATMEL 2560 Microcontroller functionalities.
Features an 8-bit architecture along with high endurance non-volatile memory, enabling diverse applications in electronics and programming.
RAM and ROM Example in Microcontrollers
Features of the ATMEL 2560:
An 8-bit microcontroller that includes high endurance non-volatile memory, showcasing the importance of RAM and ROM for efficient data management in embedded systems.
ECC (Error Checking Code) Memory
Implements codes for error validation and correction, instrumental in systems where data integrity is of utmost concern, such as servers and other sensitive computing environments.
Parity vs Non-Parity RAM
Parity:
Introduces an additional binary bit used for error checking, enhancing data integrity by detecting errors, though limited to identifying only single-bit errors.
Practice Exercise on Parity
Included examples demonstrating how to compute even and odd parity to reinforce understanding of how parity bits work in error detection.