Svit - MODULE 3
Svit - MODULE 3
Svit - MODULE 3
BASIC CONCEPTS
• Maximum size of memory that can be used in any computer is determined by addressing mode.
1) Address-Line
2) Data-line &
→ placing the data from the addressed-location onto the data-lines and
→ confirms this action by asserting MFC signal.
• Upon receipt of MFC signal, the processor loads the data from the data-lines into MDR.
successive memory-operations.
Cache Memory
It is a small, fast memory that is inserted between
Virtual Memory
The address generated by the processor is referred to as a virtual/logical address.
The virtual-address-space is mapped onto the physical-memory where data are actually
stored.
The mapping-function is implemented by MMU. (MMU = memory management unit).
Only the active portion of the address-space is mapped into locations in the physical-memory.
The remaining virtual-addresses are mapped onto the bulk storage devices such as magnetic disk.
As the active portion of the virtual-address-space changes during program execution, the
MMU
→ changes the mapping-function &
→ transfers the data between disk and memory.
During every memory-cycle, MMU determines whether the addressed-page is in the memory. If
i) Static RAM
ii) Dynamic RAM (DRAM) which can be further classified as synchronous & asynchronous
DRAM.
2) ROM which can be further classified as follows:
i) PROM
ii) EPROM
iv) Flash Memory which can be further classified as Flash Cards & Flash Drives.
• The Sense/Write circuits are connected to data-input or output lines of the chip.
• The data-input and data-output of each Sense/Write circuit are connected to a single bidirectional
data-line.
• Data-line can be connected to a data-bus of the computer.
2) CS’ - Chip Select input selects a given chip in the multi-chip memory-system.
• The transistors act as switches that can be opened/closed under the control of the word-line.
• When the word-line is at ground level, the transistors are turned off and the latch retain its state.
Read Operation
• To read the state of the cell, the word-line is activated to close switches T1 and T2.
• If the cell is in state 1, the signal on bit-line b is high and the signal on the bit-line b‟ is low.
• Sense/Write circuit
CMOS Cell
• Transistor pairs (T3, T5) and (T4, T6) form the inverters in the latch (Figure 8.5).
• In state 1, the voltage at point X is high by having T5, T6 ON and T4, T5 are OFF.
• Thus, T1 and T2 returned ON (Closed), bit-line b and b‟ will have high and low signals respectively.
• Advantages:
1) It has low power consumption „.‟ the current flows in the cell only when the cell is active.
• Disadvantage: SRAMs are said to be volatile memories „.‟ their contents are lost when power is
interrupted.
ASYNCHRONOUS DRAM
• Less expensive RAMs can be implemented if simple cells are used.
• Such cells cannot retain their state indefinitely. Hence they are called Dynamic RAM (DRAM).
• The contents must be periodically refreshed by restoring this capacitor charge to its full value.
• In order to store information in the cell, the transistor T is turned „ON‟ (Figure 8.6).
• The appropriate voltage is applied to the bit-line which charges the capacitor.
• Hence, info. stored in cell can be retrieved correctly before threshold value of capacitor drops down.
• During a read-operation,
If (charge on capacitor) < (threshold value) - Bit-line will set to logic value „0‟.
• 21 bit address is needed to access a byte in the memory. 21 bit is divided as follows:
• During Read/Write-operation,
low.
• To ensure that the contents of DRAMs are maintained, each row of cells is accessed periodically.
• A special memory-circuit provides the necessary control signals RAS‟ & CAS‟ that govern the timing.
• The processor must take into account the delay in the response of the memory.
SYNCHRONOUS DRAM
• The operations are directly synchronized with clock signal (Figure 8.8).
• A Read-operation causes the contents of all cells in the selected row to be loaded in these latches.
• Data held in latches that correspond to selected columns are transferred into data-output register.
• First, the row-address is latched under control of RAS‟ signal (Figure 8.9).
• The memory typically takes 2 or 3 clock cycles to activate the selected row.
• After a delay of one clock cycle, the first set of data bits is placed on the data-lines.
• SDRAM automatically increments column-address to access next 3 sets of bits in the selected row.
Latency
• It refers to the amount of time it takes to transfer a word of data to or from the memory.
• For a transfer of single word, the latency provides the complete indication of memory performance.
• For a block transfer, the latency denotes the time it takes to transfer the first word of data.
Bandwidth
• It is defined as the number of bits or bytes that can be transferred in one second.
• The DDR-SDRAM transfer data on both the edges (loading edge, trailing edge).
• To make it possible to access the data at high rate, the cell array is organized into two banks.
DIMM‟s.
1) SIMM - Single Inline memory-module
• SIMM/DIMM consists of many memory-chips on small board that plugs into a socket on motherboard.
MEMORY-SYSTEM
CONSIDERATION MEMORY
CONTROLLER
• To reduce the number of pins, the dynamic memory-chips use multiplexed-address inputs.
It is provided first and latched into memory-chips under the control of RAS‟ signal.
Selects a column.
They are provided on same address pins and latched using CAS‟ signals.
• The Multiplexing of address bit is usually done by Memory Controller Circuit (Figure 5.11).
• The Controller accepts a complete address & R/W‟ signal from theprocessor.
→ forwards the row & column portions of the address to the memory.
→ generates RAS‟ & CAS‟ signals &
→ sends R/W‟ & CS‟ signals to the memory.
RAMBUS MEMORY
• The usage of wide bus is expensive.
• Rambus technology is a fast signaling method used to transfer information between chips.
• The two logical values are represented by 0.3V swings above and below Vref.
• Rambus provides a complete specification for design of communication called as Rambus Channel.
• The data are transmitted on both the edges of clock so that effective data-transfer rate is 800MHZ.
• Circuitry needed to interface to Rambus channel is included on chip. Such chips are called RDRAM.
2) Control-Line &
3) Power line.
• Communication between processor and RDRAM modules is carried out by means of packets
1) Request
2) Acknowledge &
3) Data.
• Many application requires non-volatile memory which retains the stored information if power is
turned off.
• For ex:
OS software has to be loaded from disk to memory i.e. it requires non-volatile memory.
• Non-volatile memory is used in embedded system.
• Since the normal operation involves only reading of stored data, a memory of this type is called ROM.
Transistor switch is closed & voltage on bit-line nearly drops to zero (Figure 8.11).
At Logic value ‘1’ - Transistor switch is open.
• A Sense circuit at the end of the bit-line generates the proper output value.
TYPES OF ROM
• Different types of non-volatile memory are
1) PROM
2) EPROM
3) EEPROM &
• User can insert 1‟s at required location by burning-out fuse using high current-pulse.
• Advantages:
1) It provides flexibility.
2) It is faster.
→ a normal transistor or
→ a disabled transistor that is always turned „off‟.
• Transistor can be programmed to behave as a permanently open switch, by injecting charge into it.
• Erasure requires dissipating the charges trapped in the transistor of memory-cells. This
• Disadvantages:
1) The chip must be physically removed from the circuit for reprogramming.
• Disadvantage: It requires different voltage for erasing, writing and reading the stored data.
FLASH MEMORY
• In EEPROM, it is possible to read & write the contents of a single cell.
• In Flash device, it is possible to read contents of a single cell & write entire contents of a block.
Eg. In MP3 player, the flash memory stores the data that represents sound.
• Single flash chips cannot provide sufficient storage capacity for embedded-system.
• Advantages:
1) Flash drives have greater density which leads to higher capacity & low cost per bit.
1) Flash Cards
Eg: A minute of music can be stored in 1MB of memory. Hence 64MB flash cards can store an
hour of music.
2) Flash Drives
The flash drives are designed to fully emulate the hard disk.
The flash drives are solid state electronic devices that have no movable parts.
Advantages:
1) They have shorter seek & access time which results in faster response.
2) They have low power consumption. .‟. they are attractive for battery driven
application.
3) They are insensitive to vibration.
Disadvantages:
1) The capacity of flash drive (<1GB) is less than hard disk (>1GB).
3) Flash memory will weaken after it has been written a number of times (typically at
• The memory is implemented using the dynamic components (SIMM, RIMM, DIMM).
• The access time for main-memory is about 10 times longer than the access time for L1 cache.
CACHE MEMORIES
• The effectiveness of cache mechanism is based on the property of „Locality of Reference’.
Locality of Reference
• Many instructions in the localized areas of program are executed repeatedly during some time period
1) Temporal
The recently executed instructions are likely to be executed again very soon.
2) Spatial
Instructions in close proximity to recently executed instruction are also likely to be executed soon.
• If active segment of program is placed in cache-memory, then total execution time can be reduced.
• This number of blocks is small compared to the total number of blocks available in main-memory.
• Cache control hardware decides which block should be removed to create space for the new block.
• The collection of rule for making this decision is called the Replacement Algorithm.
• The cache control-circuit determines whether the requested-word currently exists in the cache.
Write-Through Protocol
Here the cache-location and the main-memory-locations are updated simultaneously.
Write-Back Protocol
This technique is to
During Read-operation
• If the requested-word currently not exists in the cache, then read-miss will occur.
Load–Through Protocol
The block of words that contains the requested-word is copied from the memory into cache.
After entire block is loaded into cache, the requested-word is forwarded to processor.
During Write-operation
• If the requested-word not exists in the cache, then write-miss will occur.
1) If Write Through Protocol is used, the information is written directly into main-memory.
→ then block containing the addressed word is first brought into the cache &
→ then the desired word in the cache is over-written with the new information.
1) Direct Mapping
2) Associative Mapping
3) Set-Associative Mapping
DIRECT MAPPING
• The block-j of the main-memory maps onto block-j modulo-128 of the cache (Figure 8.16).
• When the memory-blocks 0, 128, & 256 are loaded into cache, the block is stored in cache-block 0.
2) When more than one memory-block is mapped onto a given cache-block position.
• As execution proceeds,
5-bit tag field of memory-address is compared with tag-bits associated with cache-location.
If they match, then the desired word is in that block of the cache.
Otherwise, the block containing required word must be first read from the memory.
And then the word must be loaded into the cache.
ASSOCIATIVE MAPPING
• The memory-block can be placed into any cache-block position. (Figure 8.17).
• Tag-bits of an address received from processor are compared to the tag-bits of each block of cache.
• A new block that has to be brought into the cache has to replace an existing block if the cache is full.
SET-ASSOCIATIVE MAPPING
• It is the combination of direct and associative mapping. (Figure 8.18).
• The mapping allows a block of the main-memory to reside in any block of the specified set.
• The cache has 2 blocks per set, so the memory-blocks 0, 64, 128…….. 4032 maps into cache set „0‟.
• The cache can occupy either of the two block position within the set.
• The cache which contains 1 block per set is called direct mapping.
• The dirty bit indicates that whether the block has been modified during its cache residency.
• Advantages:
1) Contention problem of direct mapping is solved by having few choices for block placement.
REPLACEMENT ALGORITHM
• In direct mapping method,
the position of each block is pre-determined and there is no need of replacement strategy.
• In associative & set associative method,
• This block is called Least recently Used (LRU) block & the technique is called LRU algorithm.
• The cache-controller tracks the references to all blocks with the help of block-counter.
written.
Eg:
Consider 4 blocks/set in set associative cache.
2 bit counter can be used for each block.
When a ‘hit’ occurs, then block counter=0; The counter with values originally lower than the
PERFORMANCE CONSIDERATION
• Two key factors in the commercial success are 1) performance & 2) cost.
• Performance depends on
→ how fast the machine instructions are brought to the processor &
→ how fast the machine instructions are executed.
• To achieve parallelism, interleaving is used.
• Parallelism means both the slow and fast units are accessed in the same manner.
INTERLEAVING
• The main-memory of a computer is structured as a collection of physically separate modules.
• So, memory access operations may proceed in more than one module at the same time (Fig 5.25).
• Thus, the aggregate-rate of transmission of words to/from the main-memory can be increased.
• The extra time needed to bring the desired information into the cache is called the Miss Penalty.
• High hit rates well over 0.9 are essential for high-performance computers.
• Performance is adversely affected by the actions that need to be taken when a miss occurs.
of the extra time needed to bring a block of data from a slower unit to a faster unit.
• During that period, the processor is stalled waiting for instructions or data.
• We refer to the total access time seen by the processor when a miss occurs as the miss penalty.
• Let h be the hit rate, M the miss penalty, and C the time to access information in the cache. Thus, the