Chapter #7: Sequential Logic Case Studies 7.1, 7.2 Counters

Download Report

Transcript Chapter #7: Sequential Logic Case Studies 7.1, 7.2 Counters

Contemporary Logic Design
Sequential Case Studies
Chapter #7: Sequential Logic Case Studies
7.6 Random Access Memories
© R.H. Katz Transparency No. 21-1
Random Access Memories
Contemporary Logic Design
Sequential Case Studies
Transistor efficient methods for implementing storage elements
Small RAM: 256 words by 4-bit
Large RAM: 4 million words by 1-bit
We will discuss a 1024 x 4 organization
Static RAM
The circuit configuration holds a 1 or 0 as long as the system continues
to receive power
Static Rams are the fastest memories and the easiest to interface with.
© R.H. Katz Transparency No. 21-2
Contemporary Logic Design
Sequential Case Studies
Random Access Memories
Basic storage element of the SRAM is a 6-transistor circuit.
Data
Data j
j
Word Enable
i
Words = Rows
Static RAM Cell
Static RAM Cell
Static RAM Cell
Columns = Bits (Double Rail Encoded)
Nmos transistors provide access to the storage element from two buses, denoted Dataj and Dataj.
To write the memory element, special circuitry in the RAM drives the data bit and its complement
onto these lines while the word enable line is asserted.
To read the contents of the storage element, the word enable line is asserted. The data are sensed
by a different collection of special circuits. These circuits detect small voltage differences between
the data line and its complement.
© R.H. Katz Transparency No. 21-3
Random Access Memories
Contemporary Logic Design
Sequential Case Studies
Static RAM Organization
Chip Select Line (active lo)
Write Enable Line (active lo)
10 Address Lines to yield 1024 words
4 Bidirectional Data Lines
(used for reading and writing data)
WE determines direction:
‘0’ -- write
‘1’ -- read
10 24 x 4 SRAM
CS
WE
A9
A8
A7
IO3
A6
IO2
A5
IO1
A4
IO0
A3
A2
A1
A0
© R.H. Katz Transparency No. 21-4
Data
line
Contemporary Logic Design
Sequential Case Studies
Random Access Memories
RAM Organization
Long thin layouts are not the best organization for a RAM
A9
A8
Some Addr
bits select
row
Address
Buffers
Storage
Storage Matrix
Array
64 x 64
Square
Array
A7
A6
64 x 16
A5
A4
A3
Some Addr
bits select
within row
A2
64 x 16
64 x 16
64 x 16
Row
Decoders
Address
Buffers
Amplifers &
Mux/Demux
Sense Amplifiers
A1
A0
Column
Decoders
CS
Data Buffers
WE
I/O0
I/O1
I/O2
I/O3
© R.H. Katz Transparency No. 21-5
Random Access Memories
RAM Timing
Contemporary Logic Design
Sequential Case Studies
WE
Simplified Read Timing
CS
Address
Valid Address
Ac cess Time
Data Out
Data Out
Memory access time -- time it takes for new data to be ready to appear
at the output
© R.H. Katz Transparency No. 21-6
Contemporary Logic Design
Sequential Case Studies
Random Access Memories
RAM Timing
WE
CS
Simplified Write Timing
Memory Cy cle T ime
Address
Data In
Valid Address
Input Data
Memory cycle time -- time between subsequent memory operations.
© R.H. Katz Transparency No. 21-7
Random Access Memories
Contemporary Logic Design
Sequential Case Studies
Dynamic RAMs -- densest memories
High capacity due to efficient memory element:
Word Line
1 Transistor (+ capacitor) memory element
Read: Assert Word Line, Sense Bit Line
Write: Drive Bit Line, Assert Word Line (charge
capacitor with the desired logic voltage)
Bit Line
Destructive Read-Out (to read contents of storage
capacitor, must discharge it across the bit line)
Need for Refresh Cycles: storage decay in ms
Internal circuits read word and write back
© R.H. Katz Transparency No. 21-8
Contemporary Logic Design
Sequential Case Studies
Random Access Memories
DRAM Organization
Long rows to simplify refresh
Two new signals: RAS, CAS
Row Address Strobe
Storage Matrix
Row
Decoders
64 x 64
Column Address Strobe
replace Chip Select
Row Address
A11
. . .
A0
RAS
CAS
WE
Column Address &
Control Signals
Column Latches,
Multiplexers/Demultiplexers
Control
Logic
DOUT
DIN
© R.H. Katz Transparency No. 21-9
Contemporary Logic Design
Sequential Case Studies
Random Access Memory
RAS, CAS Addressing
Even to read 1 bit, an entire 64-bit row is read!
Separate addressing into two cycles: Row Address, Column Address
Saves on package pins, speeds RAM access for sequential bits!
Address
Row Address
Col Address
RAS
Read Cycle
CAS
Valid
Dout
Read Row
Row Address Latched
Read Bit Within Row
Column Address Latched
Tri-state
Outputs
© R.H. Katz Transparency No. 21-10
Contemporary Logic Design
Sequential Case Studies
Random Access Memory
Write Cycle Timing
Address
Row Address
Col Address
RAS
(1) Latch Row Address
Read Row
CAS
WE
(2) WE low
Din
Valid
(3) CAS low: replace data bit
(4) RAS high: write back the modified row
(5) CAS high to complete the memory cycle
© R.H. Katz Transparency No. 21-11
Contemporary Logic Design
Sequential Case Studies
Random Access Memory
RAM Refresh
Refresh Frequency:
4096 word RAM -- refresh each word once every 4 ms
Assume 120ns memory access cycle
This is one refresh cycle every 976 ns (1 in 8 DRAM accesses)!
But RAM is really organized into 64 rows
This is one refresh cycle every 62.5 µs (1 in 500 DRAM accesses)
Large capacity DRAMs have 256 rows, refresh once every 16 µs
RAS-only Refresh (RAS cycling, no CAS cycling)
External controller remembers last refreshed row
Some memory chips maintain refresh row pointer
CAS before RAS refresh: if CAS goes low before RAS, then refresh
© R.H. Katz Transparency No. 21-12
Contemporary Logic Design
Sequential Case Studies
Random Access Memory
DRAM Variations
Page Mode DRAM:
read/write bit within last accessed row without RAS cycle
RAS, CAS, CAS, . . ., CAS, RAS, CAS, ...
New column address for each CAS cycle
Static Column DRAM:
like page mode, except address bit changes signal new cycles
rather than CAS cycling
on writes, deselect chip or CAS while address lines are changing
Nibble Mode DRAM:
like page mode, except that CAS cycling implies next column
address in sequence -- no need to specify column address after
first CAS
Works for 4 bits at a time (hence "nibble")
RAS, CAS, CAS, CAS, CAS, RAS, CAS, CAS, CAS, CAS, . . .
© R.H. Katz Transparency No. 21-13
HW #19 -- Sections 7.6
Contemporary Logic Design
Sequential Case Studies
© R.H. Katz Transparency No. 21-14