Tutorials
Calculate DDR3 Capacity From Rows, Columns, Banks and Rank Width
Published · Updated
A boot log reporting 256 MB can be entirely consistent with one memory package and only half of another proposed assembly. Read the geometry before deciding whether the bug is in the linker, controller or BOM.
Compute one package before multiplying by the rank

For the Alliance Memory AS4C128M16D3LG-12BCN, the organization uses fourteen row bits, ten column bits and eight banks. Multiply 2^14 rows by 2^10 columns by 8 banks and 16 data bits. Divide by eight to convert bits to bytes.
The result is 268,435,456 bytes, or 256 MiB. Burst length determines how addresses are transferred across the interface. Multiplying storage capacity by the burst length again would count the same cells twice.
Check the XC7K325T-1FBG676C package · Use the board bring-up checklist
Check a second package and a second rank separately

Two of those x16 parts on a common chip select form a 32-bit rank of 512 MiB. A second independently selected rank with the same geometry doubles the installed capacity again.
Compare that installed capacity with the memory-controller settings and the processor-visible address window. For a non-destructive bring-up, use two reserved scratch regions and first confirm they are outside the live image, stack and DMA buffers before testing whether distinct addresses alias.
Why can a 32-bit controller still expose only 256 MiB?
The bus width describes how many bits each transfer carries. Address geometry, chip-select mapping and the CPU memory window determine which storage locations software can reach.
Trace the three worksheet rows

- One x16 package · 2^14 × 2^10 × 8 × 2 B · 256 MiB
- Two packages, one rank · 2 × 256 MiB · 512 MiB
- Two such ranks · 2 × 512 MiB · 1 GiB
Compare substitution costs at board level · Calculate storage width and depth
Alliance Memory AS4C128M16D3LG-12BCN Rev 1.0, address inputs.
Photograph credit and licence
Ordercrazy (Wikimedia Commons), CC0. Site-sized copy.
Original photograph https://commons.wikimedia.org/wiki/File:Embedded_World_2014_Xilinx_ZedBoard_Developer_Board.jpg
Licence http://creativecommons.org/publicdomain/zero/1.0/deed.en
Back to Tutorials