Outline Lecture 19: SRAM Memory Arrays SRAM Architecture SRAM Cell Decoders Column Circuitry Multiple Ports Serial Access Memories 2 Memory Arrays Memory Arrays Random Access Memory Serial Access Memory Content Addressable Memory (CAM) Array Architecture 2 n s of 2 m s each If n >> m, fold by 2 k into fewer rows of more columns Read/Write Memory (RAM) (Volatile) Read Only Memory (ROM) (Nonvolatile) Shift Registers Queues Static RAM (SRAM) Dynamic RAM (DRAM) Serial In Parallel Out (SIPO) Parallel In Serial Out (PISO) First In First Out (FIFO) Last In First Out (LIFO) Mask ROM Programmable ROM (PROM) Erasable Programmable ROM (EPROM) Electrically Erasable Programmable ROM (EEPROM) Flash ROM Good regularity easy to design Very high density if good cells are used 3 4 1
12T SRAM Cell Basic building block: SRAM Cell Holds one of information, like a latch Must be read and written 12-transistor (12T) SRAM cell Use a simple latch connected to line 46 x 75 λ unit cell write write_b read read_b 6T SRAM Cell Cell size accounts for most of array size Reduce cell size at expense of complexity 6T SRAM Cell Used in most commercial chips Data stored in cross-coupled inverters Read: Precharge, _b Raise line Write: Drive data onto, _b Raise line _b 5 6 SRAM Read Precharge both lines high Then turn on line One of the two lines will be pulled down by the cell _b Ex: A = 0, A_b = 1 P1 P2 N2 N4 discharges, _b stays high A A_b N1 N3 But A bumps up slightly A_b _b Read stability 1.5 A must not flip 1.0 N1 >> N2 0.5 0.0 A 0 100 200 300 400 500 600 time (ps) SRAM Write Drive one line high, the other low Then turn on line Bitlines overpower cell with new value Ex: A = 0, A_b = 1, = 1, _b = 0 Force A_b low, then A rises high Writability Must overpower feedback inverter N2 >> P1 1.5 1.0 0.5 _b N2 A_b A P1 N1 A P2 N3 A_b _b N4 0.0 0 100 200 300 400 500 600 700 time (ps) 7 8 2
SRAM Sizing SRAM Column Example High lines must not overpower inverters during reads But low lines must write new value into cell med A weak strong A_b _b med Read Bitline Conditioning φ 2 More Cells _q1 _v1f SRAM Cell _b_v1f H H out_b_v1r out_v1r φ 1 Write Bitline Conditioning φ 2 More Cells _q1 _v1f SRAM Cell write_q1 data_s1 _b_v1f φ 2 _q1 _v1f out_v1r 9 10 SRAM Layout Cell size is critical: 26 x 45 λ (even smaller in industry) Tile cells sharing V DD, GND, line contacts VDD GND BIT BIT_B GND Thin Cell In nanometer CMOS Avoid bends in polysilicon and diffusion Orient all transistors in one direction Lithographically friendly or thin cell layout fixes this Also reduces length and capacitance of lines WORD Cell boundary 11 12 3
Commercial SRAMs Five generations of Intel SRAM cell micrographs Transition to thin cell at 65 nm Steady scaling of cell area Decoders n:2 n decoder consists of 2 n n-input AND gates One needed for each row of memory Build AND from NAND or NOR gates Static CMOS Pseudo-nMOS 0 1 1 1 1 1 8 4 0 1 1/2 1 1 4 2 16 8 2 2 3 3 13 14 Decoder Layout Decoders must be pitch-matched to SRAM cell Requires very skinny gates Large Decoders For n > 4, NAND gates become slow Break large gates into multiple smaller gates A3 A3 A3 VDD 0 1 GND 2 NAND gate buffer inverter 3 15 15 16 4
Predecoding Many of these gates are redundant A3 Factor out common gates into predecoder Saves area Same path effort predecoders Column Circuitry Some circuitry is required for each column Bitline conditioning Sense amplifiers Column multiplexing 1 of 4 hot predecoded lines 0 1 2 3 15 17 18 Bitline Conditioning Precharge lines high before reads φ _b Equalize lines to minimize voltage difference when using sense amplifiers φ _b Sense Amplifiers Bitlines have many cells attached Ex: 32-k SRAM has 128 rows x 256 cols 128 cells on each line t pd (C/I) ΔV Even with shared diffusion contacts, 64C of diffusion capacitance (big C) Discharged slowly through small transistors (small I) Sense amplifiers are triggered on small voltage swing (reduce ΔV) 19 20 5
Differential Pair Amp Differential pair requires no clock But always dissipates static power Clocked Sense Amp Clocked sense amp saves power Requires sense_clk after enough line swing Isolation transistors cut off large line capacitance sense_b P1 N1 N2 P2 sense _b sense_clk _b isolation transistors N3 regenerative feedback sense sense_b 21 22 Twisted Bitlines Sense amplifiers also amplify noise Coupling noise is severe in modern processes Try to couple equally onto and _b Done by twisting lines Column Multiplexing Recall that array may be folded for good aspect ratio Ex: 2 k x 16 folded into 256 rows x 128 columns Must select 16 output s from the 128 columns Requires 16 8:1 column multiplexers b0 b0_b b1 b1_b b2 b2_b b3 b3_b 23 24 6
Tree Decoder Mux Column mux can use pass transistors Use nmos only, precharge outputs One design is to use k series transistors for 2 k :1 mux No external decoder logic needed Single Pass-Gate Mux Or eliminate series transistors with separate decoder B0 B1 B2 B3 B4 B5 B6 B7 B0 B1 B2 B3 B4 B5 B6 B7 B0 B1 B2 B3 Y to sense amps and write circuits Y Y 25 26 Ex: 2-way Muxed SRAM Multiple Ports φ 2 _q1 write0_q1 More Cells φ 2 data_v1 More Cells write1_q1 We have considered single-ported SRAM One read or one write on each cycle Multiported SRAM are needed for register files Examples: Multicycle MIPS must read two sources or write a result on some cycles Pipelined MIPS must read two sources and write a third result each cycle Superscalar MIPS must read and write many sources and results each cycle 27 28 7
Dual-Ported SRAM Simple dual-ported SRAM Two independent single-ended reads Or one differential write Multi-Ported SRAM Adding more access transistors hurts read stability Multiported SRAM isolates reads from state node Single-ended lines save area A B _b Do two reads and one write by time multiplexing Read during ph1, write during ph2 29 30 Large SRAMs Large SRAMs are split into subarrays for speed Ex: UltraSparc 512KB cache 4 128 KB subarrays Each have 16 8KB banks 256 rows x 256 cols / bank 60% subarray area efficiency Also space for tags & control Serial Access Memories Serial access memories do not use an address Shift Registers Tapped Delay Lines Serial In Parallel Out (SIPO) Parallel In Serial Out (PISO) Queues (FIFO, LIFO) [Shin05] 31 32 8
Shift Register Shift registers store and delay data Simple design: cascade of registers Watch your hold times! clk Din 8 Dout Denser Shift Registers Flip-flops aren t very area-efficient For large shift registers, keep data in SRAM instead Move read/write pointers to RAM rather than data Initialize read address to first entry, write to last Increment address on each cycle 00...00 11...11 clk counter counter readaddr writeaddr Din dual-ported SRAM reset Dout 33 34 Tapped Delay Line A tapped delay line is a shift register with a programmable number of stages Set number of stages with delay controls to mux Ex: 0 63 stages of delay clk Din SR32 SR16 SR8 SR4 SR2 SR1 Dout Serial In Parallel Out 1- shift register reads in serial data After N steps, presents N- parallel output clk Sin delay5 delay4 delay3 delay2 delay1 delay0 P0 P1 P2 P3 35 36 9
Parallel In Serial Out Load all N s in parallel when shift = 0 Then shift one out per cycle shift/load clk P0 P1 P2 P3 Queues Queues allow data to be read and written at different rates. Read and write each use their own clock, data Queue indicates whether it is full or empty Build with SRAM and read/write counters (pointers) Sout WriteClk ReadClk WriteData FULL Queue ReadData EMPTY 37 38 FIFO, LIFO Queues First In First Out (FIFO) Initialize read and write pointers to first element Queue is EMPTY On write, increment write pointer If write almost catches read, Queue is FULL On read, increment read pointer Last In First Out (LIFO) Also called a stack Use a single stack pointer for read and write 39 10