M7 Digital Memory Systems Module
M7 Digital Memory Systems Module
M7 Digital Memory Systems Module
COLLEGE OF ENGINEERING
Electronics Engineering Department
Module 7
Digital Memory Systems
Almarinez, Mherby C.
Banao, Laureana Joy S.
Daily, Rex Robert A.
Ete, Frances Desiree D.
Formalejo, Ivy Joy I.
Gallo, John Laurence B.
Hermano, Angelo A.
Miguel, Richell Mark B. Rating
Peregrino, Carl Sonmuel M.
BSECE 3A
Where:
n data input lines - provide the information
n data output lines - supply the information
k address lines - specify the particular word chosen among the
many available
Write - binary data to be transferred to memory
Read – transferred out of memory
Address - each word in memory is assigned an identification
number. Starting from 0 up to 2k-1, where k is the number of
address lines.
• Memories vary greatly in size and may range from 1,024 words.
• It is essential to refer to the number of words (or bytes) in memory
with one of the letters K (kilo or 2^10), M (mega or 2^20), and G (giga
or 2^30).
Example:
- How many address lines and data lines are needed in the following
memory unit?
Formula M = 2n
a. 2 kb
1 Byte = 8 bits = Data Lines
1K = 1024 bits = 210 n = 11 = number of Address Line
2K = 210 x 21 = 211
b. 4 M x 4 bits
4 bits = Data Lines
1M = 220 n = 22 = number of Address Lines
22 x 220 = 222
c. 2 GB
1 Byte = 8 bits = Data Lines
1G = 230 n =31 = number of Address Lines
21 x 230 = 231
Integrated Circuit RAM Units: Static RAM (SRAM) vs. Dynamic RAM
(DRAM)
• Static RAM (SRAM):
SRAM DRAM
It stores information as long It stores information as
as the power is supplied long as the power is
supplied or a few
milliseconds when the
power is switched off.
Transistors are used to store Capacitors are used to
information in SRAM. store data in DRAM.
Capacitors are not used To store information for
hence no refreshing is a longer time, the
required. contents of the capacitor
need to be refreshed
periodically.
SRAM is faster compared to DRAM provides slow
DRAM. access speeds.
It does not have a refreshing It has a refreshing unit.
unit.
These are expensive. These are cheaper.
SRAMs are low-density DRAMs are high-density
devices. devices.
In this bits are stored in In this bits are stored in
voltage form. the form of electric
energy.
These are used in cache These are used in main
memories. memories.
Consumes less power and Uses more power and
generates less heat. generates more heat.
SRAMs has lower latency DRAM has more latency
than SRAM
SRAMs are more resistant to DRAMs are less resistant
radiation than DRAM to radiation than SRAMs
SRAM has higher data DRAM has lower data
transfer rate transfer rate
SRAM is used in high-speed DRAM is used in lower-
cache memory speed main memory
SRAM is used in high DRAM is used in general
performance applications purpose applications
• Non-Volatile Memory:
Memory Decoding
• To store buts, we use something called Binary Cells, which can store
1 bit of information.
If Read/Write == 0
Else:
• During the read operation, the four bits of the selected word go
through OR gates to output terminals.
• During the write operation, the data available in the input lines are
transferred into the four binary cells of the selected word.
• Input: (0110010100)
• X = (01100)2, Y = (10100)2
Refresh Cycles
Address Multiplexing
SRAM DRAM
Stored in latches Stored in
Bit Storage
and flip-flops capacitors
Bistable circuits
that consist of 4 – 6 Single MOS
Structure transistors, transistor and a
latches, and flip- capacitor.
flops
Reduced power
consumption,
Easier to use and higher storage
Advantages has shorter write density, lower
cycles cost per bit, and
larger storage
capacity.
Single Data
Rate DRAM,
Asynchronous Double Data
SRAM, Synchronous Rate (DDR)
Types Burst SRAM, series DRAM,
Pipeline-Burst Synchronous
SRAM DRAM, Error
Correction Code
DRAM
- type of random access memory that gives fast access to data but
is physically relatively large. Random access memory (RAM) is
computer main memory in which specific contents can be accessed
(read or written) directly by the central processing unit (CPU) in a
very short time regardless of the sequence (and hence location) in
which they were recorded. SRAM consists of flip-flops, bistable
circuits composed of four to six transistors. Once a flip-flop stores
a bit, it keeps that value until the opposite value is stored in it.
SRAM is used primarily for small amounts of memory called
registers in a computer’s CPU and for fast “cache” memory.
Types of SRAM:
Types of DRAM:
• SDR (Single Data Rate), DDR (Double Data Rate), DDR2 (Double Data
Rate 2), DDR3 (Double Data Rate 3), and DDR4 (Double Data Rate 4):
These types of DRAM are the most common. They all have their own
advantages and disadvantages depending on how much space they
take up, how fast they process data, and how much power they use.
SDR is the oldest type of DRAM and is not very popular anymore
because it does not support high-speed data transfer rates.
DDR is much faster than SDR but also uses more power. It's still
widely used in many electronic devices such as computers, laptops,
tablets, cell phones, etc. DDR2 is twice as fast as DDR but consumes
more power than its predecessor. DDR3 has higher speeds than both
DDR2 and DDR but uses less power than its predecessors. Finally,
DDR4 has higher speeds than all previous versions of DRAM but also
requires less power than them too.
• ECC DRAM: This type of DRAM stands for Error Correction Code
which means that it checks for errors during data transfers in
order to ensure that no data is corrupted or lost during
transmission between two components within a system or when
sending/receiving information from external sources such as hard
drives or USB devices. This makes it ideal for mission-critical
applications where any kind of data corruption could cause
serious problems down the line due to lack of accuracy or integrity
when processing large amounts of information over long periods
of time.
Hamming Code
• Redundant Bits - These are the extra binary bits added externally
into the original data bit to prevent damage to the transmitted
data and are also needed to recover the original data.
• Parity Bits - The parity bit is the method to append binary bits to
ensure that the total count of 1’s in the original data is even bit or
odd. It is also applied to detect errors on the receiver side and
correct them.
1. Find the lowest number required for r to satisfy the given formula:
2r where n is the number of data bits, and r is the number of parity
bits.
2. Assign each data bit to a position in the code word. The data bits
are placed in positions that are not powers of 2 in the same order
they are in the original word. The remaining positions are reserved
for the parity bits.
4. Place the parity bits in the code word, generating the hamming
code, to which will be transmitted, and received and verified by
the receiver.
Example:
Hamming Code Generation
Generate a hamming code for the bit stream: 1001110. The system is
using an even parity generator.
1.
2r≥n+r+1 → 22≥7+2+1 → 4 ≱10
∴r=4. There are 4 parity bits required for this bit stream
2.
1 2 3 4 5 6 7 8 9 10 11
P1 P2 1 P3 0 0 1 P4 1 1 0
3. For P1,
P1 3 5 7 9 11 Even Parity 1
- 1 0 1 1 0 = 1
For P2,
P2 3 6 7 10 11 Even Parity 2
- 1 0 1 1 0 = 1
For P3,
P3 5 6 7 Even Parity 3
- 0 0 1 = 1
For P4,
P4 9 10 11 Even Parity 4
- 1 1 0 = 0
4.
1 2 3 4 5 6 7 8 9 10 11
1 1 1 1 0 0 1 0 1 1 0
1. Assign each bit of the received bit stream to their expected position
during Hamming code generation.
2. Ignoring the bit assigned as parity bit, follow the pattern: the
parity number checked is the number of bits that will be checked
and skipped, calculate the value of each parity bit in accordance
with the type of parity generator used.
1 2 3 4 5 6 7 8 9 10 11
1 0 1 1 0 0 1 0 1 1 0
P1 P2 D1 P3 D2 D3 D4 P4 D5 D6 D7
2.
For P1,
P1 3 5 7 9 11 Even Parity 1
- 1 0 1 1 0 = 1
For P2,
P2 3 6 7 10 11 Even Parity 2
- 1 0 1 1 0 = 1
For P3,
P3 5 6 7 Even Parity 3
- 0 0 1 = 1
For P4,
P4 9 10 11 Even Parity 4
- 1 1 0 = 0
- Data can be read by the CPU in any order, so ROM is also direct
access
• Some newer types of ROMs do allow for easier writing, although the
speeds still don’t compare with regular RAMs.
• N input bits
Sample Problems:
1. F = AB + A’BC’
G = A’B’C + C’
4. Flash ROM
- Programmable ROMs
- EPROM, EEPROM,
Figure 2.7
Operation of EPROM
Development of the EPROM memory cell started with
investigation of faulty integrated circuits where the gate connections
of transistors had broken. Stored charge on these isolated gates
changed their properties. The EPROM was invented by Dov Frohman of
Intel in 1971, who was awarded US patent 3660819 in 1972. Each storage
location of an EPROM consists of a single field-effect transistor. Each
field-effect transistor consists of a channel in the semiconductor body
of the device. Source and drain contacts are made to regions at the
end of the channel. An insulating layer of oxide is grown over the
channel, then a conductive (silicon or aluminum) gate electrode is
deposited, and a further thick layer of oxide is deposited over the
gate electrode. The floating gate electrode has no connections to other
parts of the integrated circuit and is completely insulated by the
surrounding layers of oxide. A control gate electrode is deposited,
and further oxide covers it
Flash Memory
Stores information in an array of memory cells made from
floating-gate transistors. In traditional single-level cell (SLC) devices,
each cell stores only one bit of information. Some newer flash memory,
known as multi-level cell (MLC) devices, including triple-level cell (TLC)
devices, can store more than one bit per cell by choosing between
multiple levels of electrical charge to apply to the floating gates of
its cells. The floating gate may be conductive (typically polysilicon in
most kinds of flash memory) or non-conductive (as in SONOS flash
memory).
DRAM
Most computing systems use DRAM (Dynamic Random Access
Memory) as the technology of choice to implement main memory due
to DRAM’s higher density compared to SRAM (Static Random Access
Memory), and due to its lower latency and higher bandwidth
compared to nonvolatile memory technologies such as PCM (phase
change memory), Flash, and magnetic disks.
• Refresh Rate
• RAS-Only Refresh.
• Hidden Refresh.
• Auto-Refresh (AR):
• Self-Refresh (SR):
Refresh Timings:
Memory Hierarchy
• CPU Registers: The fastest and smallest memory located within the
CPU itself, used for quick data access during processing.
Components:
Main Memory (RAM): Volatile memory that provides the working space
for the operating system, applications, and currently executing
processes. It is directly accessible by the CPU but is slower compared
to registers and cache.
Characteristics:
Function:
Components:
Hard Disk Drives (HDDs) and Solid State Drives (SSDs): Common forms
of secondary storage that provide non-volatile, high-capacity storage
for long-term data retention. They are accessed by the CPU through I/O
(Input/Output) modules.
Function:
- It serves as a backup for data that is not actively being used by the
CPU.
Characteristics:
- Expensive to manufacture.
Level 1: Cache Memory
Characteristics:
Characteristics:
Characteristics:
Optical disks (e.g., DVDs, CDs) and magnetic tapes are external
storage devices used for archival and backup purposes. They have
large storage capacities but slower access times compared to
magnetic disks.
Characteristics:
• Ability: The total quantity of data the memory hierarchy can store
is its capability because its capacity grows as we move from top to
bottom.
• Cost per bit: When we move from the bottom to the top of the
memory hierarchy, the cost of each bit increases, implying that
internal memory is more expensive than external memory.
• Access Time: In the memory hierarchy, the access time is the time
delay between data availability and requests to read or write
because the access time increases as we move from the top to the
bottom of the memory hierarchy.
• Exploitation of locality
Figure 3.2 Typical Memory Hierarchy (With Two Levels of Cache) With
Two Levels of Cache)
Level 0: Registers
- First level of cache, located between the CPU and main memory
(RAM).
Cache Memory
- small-sized
- volatile provides
• When the CPU must perform an operation and it needs data, it will
check the cache first. Basically, if the CPU successfully finds the
required data in the cache, that is called a “cache hit”.
• But if the CPU fails to find the required data in the cache, then it
will have to retrieve it from the main memory. This is called a “cache
miss”. This will introduce a slight delay since the latency will
increase and the CPU will have to fetch the data from a farther
and slower memory level, which will further impact the overall
system speed.
L1 Cache
L2 Cache
L3 Cache
Benefits of Cache
- Reduced Latency - reduces the time it takes for the CPU to access
data
• Elastic Refresh
• Coordinated Refresh
• Speed
• Data Retention
• Cost
• Energy Consumption
• Hard disks
• Magnetic Tapes
• Floppy Disks
• etc.
- Optical disks
- Flash memory (e.g., NOR and NAND flash memory and solid-
state drives (SSD))
Due to its property PCM can store data by altering the phase of
the chalcogenide material, providing high endurance, ultra-low
power consumption, and fast read and write speeds. PCM is made
using a Germanium Antimony Tellurium (GST) alloy.
To write data to a PCM cell, an electrical current is applied to
the cell. The amount and duration of the current determine whether
the material in the cell transitions to the amorphous phase
(representing one binary state) or the crystalline phase (representing
the other binary state.
References:
Admin. (2022, October 26). Design and Characteristics of Memory Hierarchy
| GATE Notes. Retrieved from https://byjus.com/gate/design-and-
characteristics-of-memory-hierarchy-notes/
DRAM refresh Mechanisms, Penalties, and Trade-Offs. (2016, January 1). IEEE
Journals & Magazine | IEEE Xplore.
https://ieeexplore.ieee.org/document/7070756
Ellero, F., Palese, G., Tomat, E., & Vatta, F. (2021). Computational complexity
analysis of hamming codes polynomial co-decoding. 2021
International Conference on Software, Telecommunications and
Computer Networks (SoftCOM).
https://doi.org/10.23919/softcom52868.2021.9559071
Siemens. (2007, January 31). How does address multiplexing work?. SIOS.
https://support.industry.siemens.com/cs/document/24509028/how-
does-address-multiplexing-work-?dti=0&lc=en-PH
Stokes, J. (n.d.). Ram Guide: Part I DRAM and SRAM Basics. Ars Technica.
https://archive.arstechnica.com/paedia/r/ram_guide/ram_guide.
part1-4.html