Professional Documents
Culture Documents
5-<1>
ROM Storage
5-<2>
ROM Logic
Data2 = A1 A0
Data1 = A1 + A0
Data0 = A1A0
5-<3>
5-<4>
5-<5>
Data2 = A1 A0
Data1 = A1 + A0
Copyright 2007 Elsevier
Data0 = A1A0
5-<6>
5-<7>
5-<8>
Multi-ported Memories
Port: address/data pair
3-ported memory
2 read ports (A1/RD1, A2/RD2)
1 write port (A3/WD3, WE3 enables writing)
5-<9>
[2:0] RAM[255:0];
assign rd = RAM[a];
always @(posedge clk)
if (we)
RAM[a] <= wd;
endmodule
5-<10>
Logic Arrays
Programmable logic arrays (PLAs)
AND array followed by OR array
Perform combinational logic only
Fixed internal connections
5-<11>
PLAs
X = ABC + ABC
Y = AB
5-<12>
5-<13>
Memory Arrays
Efficiently store large amounts of data
Three common types:
Dynamic random access memory (DRAM)
Static random access memory (SRAM)
Read only memory (ROM)
An M-bit data value can be read or written at each unique Nbit address.
5-<14>
Memory Arrays
Two-dimensional array of bit cells
Each bit cell stores one bit
An array with N address bits and M data bits:
5-<15>
22 3-bit array
Number of words: 4
Word size: 3-bits
For example, the 3-bit word stored at address 10 is 100
Example:
5-<16>
Memory Arrays
5-<17>
Example:
5-<18>
Example:
5-<19>
Memory Array
Wordline:
similar to an enable
allows a single row in the memory array to be read or written
corresponds to a unique address
only one wordline is HIGH at any given time
5-<20>
Types of Memory
Random access memory (RAM): volatile
Read only memory (ROM): nonvolatile
5-<21>
5-<22>
5-<23>
5-<24>
Types of RAM
Two main types of RAM:
Dynamic random access memory (DRAM)
Static random access memory (SRAM)
5-<25>
5-<26>
DRAM
Data bits stored on a capacitor
Called dynamic because the value needs to be refreshed
(rewritten) periodically and after being read:
Charge leakage from the capacitor degrades the value
Reading destroys the stored value
5-<27>
DRAM
5-<28>
SRAM
5-<29>
Memory Arrays
5-<30>
Addressing a memory
Want square memory array
Want simple decoding logic
Problem: A 1Meg1 RAM uses
1,048,576 20-input NANDs?
d
e
c
o
d
e
r
memory
cell array
2n by 2m*k bits
m
multiplexer ( 2m :1)
k bits wide (k bits/word)
2n rows
Multiplexer
Selects a column (bit or byte)
memory
cell array
Decoded bits
multiplexer
Column selects
B3
B4
B5
B6
Dout1
Dout2
ADDR
stable
stable
stable
\CS
\OE
DOUT
max(Taa,Tacs)
Tacs
Taa
valid
Toz
valid
valid
Toe
Toz
Toe
Toh
ADDR
stable
Tas
Tcsw
\CS
\WE
stable
Tcsw
Twp
Twp
DIN
Tah
Tah
Tas
valid
valid
Tds
Tdh
Tds
Tdh
DRAM notes
Definitions
RAS row-address strobe
CAS column-address strobe
DRAM refresh
Assert RAS' to refresh row
Reads data and writes it back
Takes ~1% of DRAM cycles
ADDR
row addr
\RAS
store 1
refresh 1
Vhigh
Vlow
time
store 0