How Does a 6T SRAM Cell Read and Write a Bit?

A 6T SRAM cell stores a bit as the state of two cross-coupled inverters, which hold it for as long as power is on. Two access transistors, switched by the wordline, connect the cell's two nodes to a pair of bitlines. A read lets the cell pull one precharged bitline down slightly without disturbing its own state; a write drives the bitlines hard enough to overpower the inverters and flip them.

What you'll learn

  • The six transistors and what each pair does
  • Hold, read and write, step by step
  • Why the pull-down must beat the access transistor, and the access transistor must beat the pull-up
  • How fast a read is, from the bitline capacitance and cell current
  • A synchronous SRAM model in Verilog, simulated

Step 1: the six transistors

Two inverters, each a PMOS pull-up and an NMOS pull-down, are connected in a loop: node Q drives the second inverter, whose output QB drives the first. The loop has two stable states, Q = 1 with QB = 0, or the reverse, so it is a bistable latch. Two NMOS access transistors connect Q to bitline BL and QB to its complement BLB; their gates are the wordline WL, shared by every cell in a row. Every cell in a column shares BL and BLB.

The 6T SRAM cellTwo cross-coupled inverters hold Q and QB. An access transistor connects Q to bitline BL and another connects QB to BLB; the wordline WL turns both on.BLBLBInverter 1drives QBInverter 2drives QAccessAccessWordline WLcross-coupledQQB
The bit lives in the two inverters; the wordline opens the cell to its bitline pair for a read or a write.
TransistorsRoleMust be
2 pull-ups (PMOS)Hold a 1 at VDDWeakest of the three, so a write can win
2 pull-downs (NMOS)Hold a 0 at groundStrongest, so a read can't flip the cell
2 access (NMOS)Connect the cell to BL and BLB when WL is highIn between

Step 2: hold

With WL low, the access transistors are off and the cell is isolated. Each inverter keeps the other's input at a full rail, so the bit is held indefinitely with only leakage current flowing. Unlike DRAM, nothing needs refreshing; unlike flash, the bit is lost when power goes.

Step 3: read

Both bitlines are precharged to VDD and left floating, then WL goes high. Suppose Q = 0. Current now flows from BL, through the access transistor, through the pull-down holding Q at 0, to ground, so BL starts to fall; BLB stays at VDD because QB is already at VDD. A sense amplifier on the column detects the small difference between BL and BLB and amplifies it to a full logic level. Waiting for a full swing would be far too slow, because each bitline carries the capacitance of every cell in the column.

The danger is on node Q. During the read, the access transistor and the pull-down form a voltage divider between the precharged BL and ground, so Q rises a little above 0 V. If it rose past the switching threshold of the other inverter, the cell would flip and the read would destroy the data. The fix is sizing: make the pull-down stronger (wider) than the access transistor, so Q stays low. The ratio of their strengths is called the cell ratio, and read stability is measured as the static noise margin of the cell with WL high.

How fast is a read?

The bitline is a capacitor discharged by roughly the cell's read current, so the time to develop the swing the sense amplifier needs is t = C × ΔV / I. With a 100 fF bitline, a 100 mV sense margin and 20 µA of cell current, t = 100 fF × 0.1 V / 20 µA = 0.5 ns. Longer columns mean more capacitance and slower reads, which is one reason large SRAMs are split into many small sub-arrays.

Step 4: write

To write a 1 into a cell holding 0, the write driver pulls BLB to ground and holds BL at VDD, then WL goes high. Through the access transistor on the QB side, the grounded BLB pulls QB down against that side's pull-up PMOS. If the access transistor is stronger than the pull-up, QB falls below the switching threshold, the inverter driving Q flips Q to 1, and the loop latches the new state. So the second sizing rule is that the access transistor must beat the pull-up (the pull-up ratio). The two rules pull in opposite directions on the access transistor, and the cell is a careful compromise between read stability and writability.

Why SRAM costs so much area

Six transistors per bit add up fast. A 32 KiB cache holds 262,144 bits, so its data array alone is 262,144 × 6 = 1,572,864 transistors, before tags, sense amplifiers and decoders. DRAM stores a bit in one transistor and one capacitor, so it is far denser, but it is slower and must be refreshed. That trade is why SRAM is used for caches and register files close to the processor, and DRAM for main memory.

Step 5: a synchronous SRAM in Verilog

In RTL you don't model transistors: you describe the memory's behavior and let synthesis map it to an SRAM macro or FPGA block RAM. This single-port model does one read or write per clock. It is read-first: a read in the same cycle as a write to the same address returns the old data, one of the behaviors a memory's datasheet must state.

sram_sp.v
`timescale 1ns/1ps
// Single-port synchronous SRAM model: one read or write per clock.
// Read-first: a read in the same cycle as a write to that address returns
// the old data. DEPTH words of WIDTH bits.
module sram_sp #(parameter WIDTH = 8, parameter DEPTH = 16, parameter AW = 4) (
  input  wire             clk,
  input  wire             we,
  input  wire [AW-1:0]    addr,
  input  wire [WIDTH-1:0] wdata,
  output reg  [WIDTH-1:0] rdata
);
  reg [WIDTH-1:0] mem [0:DEPTH-1];
  always @(posedge clk) begin
    if (we) mem[addr] <= wdata;
    rdata <= mem[addr];            // old contents: read-first
  end
endmodule

The testbench writes all 16 addresses, reads them back, then writes 0xAA to address 3 while reading it. Icarus Verilog 12 printed:

Simulation output
16 words checked, read-during-write returned 33 then aa, errors = 0

Common mistakes

  • Thinking a read fully discharges the bitline. It only needs a small difference; the sense amplifier does the rest.
  • Forgetting that the read can flip the cell. The pull-down must be stronger than the access transistor.
  • Making the access transistor so weak that writes fail. It must still beat the pull-up.
  • Assuming read-during-write behavior. Read-first, write-first and undefined are all real choices, and the memory's documentation says which.
  • Comparing SRAM and DRAM on speed alone. Area per bit and refresh matter just as much.

Check your understanding

  • Q1. In a read with Q = 0, which bitline falls? Answer: BL, the one connected to the node holding 0.
  • Q2. Which transistor must be the strongest of the three kinds? Answer: the pull-down, for read stability.
  • Q3. A bitline has 200 fF and the cell sinks 25 µA. How long to develop 100 mV? Answer: 200 fF × 0.1 V / 25 µA = 0.8 ns.

Related

Sources

Rabaey, Chandrakasan and Nikolić, Digital Integrated Circuits: A Design Perspective, 2nd edition, chapter 12 (memory cells, read stability and write ability); Weste and Harris, CMOS VLSI Design, 4th edition, chapter 12 (SRAM).

Last verified

The SRAM model was simulated in Icarus Verilog 12 and linted with Verilator 5.036 (-Wall, no warnings) on 16 November 2026; the output above is from that run. The read-time and transistor-count figures are computed in the site's tests (lib/memoryNumbers.test.js). The files are in the site's repository under scripts/memory.