Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
knowledge_base:professional:dram [2023/02/13 21:42] – Normal User | knowledge_base:professional:dram [2023/02/13 23:18] (current) – [DRAM Basics] Normal User | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== DRAM Basics ====== | ====== DRAM Basics ====== | ||
- | [[https:// | + | [[https:// |
- | ===== High Level ===== | + | [[https:// |
- | {{: | + | [[https:// |
+ | |||
+ | [[https:// | ||
+ | |||
+ | ===== Top Level ===== | ||
+ | |||
+ | {{: | ||
+ | Figure 1: Top Level | ||
^Symbol ^Type ^Function^ | ^Symbol ^Type ^Function^ | ||
Line 17: | Line 24: | ||
|BG0-1, BA0-1 |Input |Bank Group, Bank Address| | |BG0-1, BA0-1 |Input |Bank Group, Bank Address| | ||
|A0-13 |Input |Address inputs| | |A0-13 |Input |Address inputs| | ||
+ | |||
+ | ===== BankGroup, Bank, Row, Column ===== | ||
+ | |||
+ | {{: | ||
+ | Figure 2: BankGroup & Bank | ||
+ | |||
+ | {{: | ||
+ | Figure 3: Row & Column Decoding | ||
+ | |||
+ | {{: | ||
+ | Figure 4: Bit Level | ||
+ | |||
+ | ===== DRAM Sizing & Addressing ===== | ||
+ | |||
+ | DRAMs come in standard sizes and this is specified in the JEDEC spec. JEDEC is the standards committee that decides the design and roadmap of DDR memories. This is from section 2.7 of the DDR4 JEDEC specification (JESD79-4B). | ||
+ | |||
+ | {{: | ||
+ | Figure 5: Addressing | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ==== DRAM Page Size ==== | ||
+ | |||
+ | In the table above, there' | ||
+ | |||
+ | ==== Rank (Depth Cascading) ==== | ||
+ | |||
+ | {{: | ||
+ | Figure 6: Rank | ||
+ | |||
+ | ==== Width Cascading ==== | ||
+ | |||
+ | {{: | ||
+ | Figure 7: DRAMs Width Cascading | ||
+ | |||
+ | ===== Accessing Memory ===== | ||
+ | |||
+ | ==== Command Truth Table ==== | ||
+ | |||
+ | I'm constantly referring to something called " | ||
+ | |||
+ | Well, the DRAM interprets the ACT_n, RAS_n, CAS_n & WE_n inputs as commands based on the truth table below. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | The table above is only a subset of commands you can issue to the DRAM. The entire DDR4 command truth table is specified in section 4.1 of the JEDEC spec JESD79-4B. | ||
+ | |||
+ | ==== Read ==== | ||
+ | |||
+ | {{: | ||
+ | Figure 8: READ Operation | ||
+ | |||
+ | ==== Write ==== | ||
+ | |||
+ | {{: | ||
+ | Figure 9: WRITE Operation | ||
+ | |||
+ | ===== DRAM sub-system ===== | ||
+ | |||
+ | Now that we've had a sufficiently long discussion about the DRAM, it is time to talk about what the ASIC or FPGA needs in-order to talk to the DRAM. This is called the DRAM sub-system and it's made up of 3 components: | ||
+ | |||
+ | - The DRAM memory itself, which comprises of everything described above | ||
+ | - A DDR PHY | ||
+ | - A DDR Controller | ||
+ | |||
+ | {{: | ||
+ | Figure 10: DRAM Sub-System | ||
+ | |||
+ | ====== In a Nutshell ====== | ||
+ | |||
+ | Let's wrap this up | ||
+ | |||
+ | The DRAM is organized as Bank Groups, Bank, Row & Columns | ||
+ | The address issued by the user is called Logical Address and it is converted to a Physical Address by the DRAM controller, before it presented to the memory | ||
+ | DDR4 DRAMs are classified as x4, x8 or x16 based on the width of the DQ data bus | ||
+ | You can depth cascade or width cascade DRAMs to achieve the required size | ||
+ | Read and write operations are a 2-step process. 1st step activates a row, 2nd step reads or write to the memory. | ||
+ | The DRAM sub system comprises of the memory, a PHY layer and a controller | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ |