1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Lecture Digital logic design - Lecture 29: Random access memory (RAM)

34 84 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 34
Dung lượng 786,28 KB

Nội dung

A memory unit is a collection of storage cells together with associated circuits needed to transfer information in and out of the device. Memory cells can be accessed for information transfer to or from any desired random location and hence the name Random Access Memory, abbreviated as RAM.

Lecture 29 Random Access Memory (RAM) Random Access Memory (RAM) A memory unit is a collection of storage cells together with associated circuits needed to transfer information in and out of the device Memory cells can be accessed for information transfer to or from any desired random location and hence the name Random Access Memory, abbreviated as RAM Overvie w ° Memory is a collection of storage cells with associated input and output circuitry • Possible to read and write cells ° Random access memory (RAM) contains words of information ° Data accessed using a sequence of signals • Leads to timing waveforms ° Decoders are an important part of memories • Selects specific data in the RAM ° Static RAM loses values when circuit power is removed Preliminaries ° RAMs contain a collection of data bytes • A collection of bytes is called a word • A sixteen bit word contains two bytes • Capacity of RAM device is usually described in bytes (e.g 16 MB) ° Write operations write data to specific words ° Read operations read data from specific words ° Note: new notation for OR gate RAM Interface Signals ° Data input and output lines carry data ° Memory contains 2k words • k address lines select one word out of 2k ° Read asserted when data to be transferred to output ° Write asserted when data input to be stored Random Access Memory Fundamentals ° Lets consider a simple RAM chip • words of bytes each (each word is 16 bits) • How many address bits we need? Pick one of locations Dec Binary 000 001 010 011 100 101 110 111 01010000 11001100 00000000 01010110 11111111 00000001 01010101 00000000 11100110 11111111 10101010 00111111 00000000 10000000 11001100 11111111 16 Data and Input signals address signals word Each bit stored in a binary cell RAM Size ° If memory has 2k words, k address bits are needed ° 23 words, address bits ° Address locations are labelled to 2k-1 ° Common subscripts: ° Kilo – 210 ° Mega – 220 ° Giga - 230 Write Operation Apply binary address of word to address lines Apply data bits to data input lines Activate write input Data output lines unused Read input signal should be inactive Delay associated with write Read Operation Apply binary address of word to address lines Activate read input Data input lines unused Write input signal should be inactive Delay associated with read Memory enable used to allow read and writes Memory Timing – write operation ° Memory does not use a clock • Control signals may be generated on clock edges ° Cycle time – time needed to write to memory ° If cycle time is 50 ns, clock edges required (T1, T2, T3) 10 Inside the SRAM Device Word ° Note: delay primarily depends on the number of words ° Delay not effected by size of words ° How many address bits would I need for 16 words? 20 Another Configuration (Internal Construction) It consists of words of bits each and has a total of 12 binary cells A memory with four words needs two address lines The two address inputs go through a X decoder to select one of the four words When the memory enable is 0, all outputs of the decoder are and none of the memory words are selected 21 22 Array of RAM Chips ° Integrated-circuit RAM chips are available in a variety of sizes ° If the memory unit needed for an application is larger than the capacity of one chip, it is necessary to combine a number of chips in an array to form the required memory size ° Capacity of the memory depends on two parameters: the number of words and the number of bits per word ° An increase in the number of words requires that we increase the address length ° Every bit added to the length of the address doubles the number of words in memory ° The increase in the number of bits per word requires that we increase the length of the data input and output lines, but the address length remains the same 23 Array of RAM Chips Constructing a 4K x RAM with four K x RAM K x RAM Decoder 00=> to 1023 Decoder 01=> next 1024 Decoder 10=> next 1024 Decoder 11=> next 1024 4K x RAM 24 Composite Memory • Two chips can be combined to form a composite memory containing the same number of words but with twice as many bits in each word • 16 input and output data lines are split between the two chips • Both receive the same IO-bit address and the common CS and RW control inputs 25 26 Error-Detection and Correcting Code ° Memory array may cause occasional errors in storing and retrieving the binary information ° Reliability of a memory unit may be improved by employing error-detecting and correcting codes Error Detection ° The most common error-detection scheme is the parity bit ° A parity bit is generated and stored along with the data word in memory The parity of the word is checked after reading it from memory The data word is accepted if the parity sense is correct If the parity checked results in an inversion, an error is detected, but it cannot be corrected 27 Error-Detection and Correcting Code Error Correction °An error-correcting code generates multiple check bits that are stored with the data word in memory °Each check bit is a parity over a group of bits in the data word °When the word is read from memory, the associated parity bits are also read from memory and compared with a new set of check bits generated from the read data ° If the check bits compare, it signifies that no error has occurred If the check bits not compare with the stored parity, they generate a unique pattern, called a syndrome, that can be used to identify the bit in error °A single error occurs when a bit changes in value from I to or from to during the write or read operation ° If the specific bit in error is identified, then the error can be corrected by complementing the erroneous bit 28 Error-Detection and Correcting Code Error Correcting Code (Hamming Code) ° k parity bits are added to an n-bit data word, forming a new word of n + k bits °The bit positions are numbered in sequence from to n + k °Those positions numbered as a power of are reserved for the parity bits °The remaining bits are the data bits For an 8-bit data word 11000100 We include four parity bits with the 8-bit word and arrange the 12 bits as follows: °Four parity bits, P1, P2 P3, and P4 are in positions 1,2, 4, and 8, respectively 29 Error-Detection and Correcting Code (Hamming Code) The eight bits of the data word are in the remaining positions Each parity bit is calculated as follows: ° Exclusive-OR operation performs the odd function It is equal to for an odd number of I's in the variables and to for an even number of 1's Thus, each parity bit is set so that the total number of 1's in the checked positions, including the parity bit, is always even 30 Error-Detection and Correcting Code (Hamming Code) The 8-bit data word is stored in memory together with the parity bits as a 12-bit composite word Substituting the four P bits in their proper positions, we obtain the 12-bit composite word stored in memory: When the 12 bits are read from memory, they are checked again for possible errors The parity is checked over the same combination of bits including the parity bit The four check bits are evaluated as follows: A check bit designates an even parity over the checked bits and a designates an odd parity Since the bits were stored with even parity, the result, C = C1C2C4C8 = 0000, indicates that no error has occurred However, if C ≠ 0, then the 4-bit binary number formed by the check bits gives the position of the erroneous bit For example, consider the following three cases: 31 Error-Detection and Correcting Code (Hamming Code) In the first case, there is no error in the 12-bit word In the second case, there is an error in bit position number I because it changed from to I The third case shows an error in bit position with a change from I to O Evaluating the XOR of the corresponding bits, we determine the four check bits to be as follows: for no error, we have C = 0000; with an error in bit 1, we obtain C = 0001; and with an error in bit 5, we get C = 0101 The binary number of C, when it is not equal to 0000, gives the position of the bit in error The error can be corrected by complementing the corresponding bit Note that an error can occur in the data word or in one of the parity bits 32 33 Summary ° Memories provide storage for computers ° Memories are organized in words • Selected by addresses ° SRAMs store data in latches • Accessed by surrounding circuitry ° RAM waveforms indicate the control signals needed for access ° Words in SRAMs are accessed with decoders • Only one word selected at a time ° Error correction and detection codes (Hamming) 34 .. .Random Access Memory (RAM) A memory unit is a collection of storage cells together with associated circuits needed to transfer information in and out of the device Memory cells can be accessed... for the cycle time on writes • Processor waits for the access time for reads 12 Types of Random Access Memories ° Static random access memory (SRAM) • Operates like a collection of latches •... input and output circuitry • Possible to read and write cells ° Random access memory (RAM) contains words of information ° Data accessed using a sequence of signals • Leads to timing waveforms

Ngày đăng: 13/02/2020, 00:35

TỪ KHÓA LIÊN QUAN