DDR4 “ROW_BANK_COLUMN” Mapping - 1.0 English

Versal Adaptive SoC Soft DDR4 SDRAM Memory Controller LogiCORE IP Product Guide (PG353)

Document ID
PG353
Release Date
2023-10-18
Version
1.0 English
Table 1. DDR4 “ROW_BANK_COLUMN” Mapping
SDRAM app_addr Mapping
Rank (RANK == 1) ? 1’b0:

(S_HEIGHT == 1) ? app_addr[COL_WIDTH + ROW_WIDTH + BANK_WIDTH + BANK_GROUP_WIDTH +: RANK_WIDTH:

app_addr[COL_WIDTH + ROW_WIDTH + BANK_WIDTH + BANK_GROUP_WIDTH + LR_WIDTH +: RANK_WIDTH]

Logical Rank (3DS) (S_HEIGHT == 1) ? 1’b0:

app_addr[COL_WIDTH + ROW_WIDTH + BANK_WIDTH + BANK_GROUP_WIDTH +: LR_WIDTH]

Row app_addr[COL_WIDTH + BANK_WIDTH + BANK_GROUP_WIDTH +: ROW_WIDTH]
Column app_addr[0 +: COL_WIDTH]
Group app_addr[COL_WIDTH + BANK_WIDTH +: BANK_GROUP_WIDTH]
Bank app_addr[COL_WIDTH +: BANK_WIDTH]
Table 2. DDR4 4 GB (512 MB x8) Single-Rank Mapping Example
SDRAM Bus Row[14:0] Column[9:0] Bank[1:0] Bank Group[1:0]
app_addr Bits 28 through 14 13 through 7, and 2, 1, 0 6, 5 4, 3

The “ROW_COLUMN_BANK” setting maps app_addr[4:3] to the DDR4 bank group bits used by the controller to interleave between its group FSMs. The lower order address bits equal to app_addr[5] and above map to the remaining SDRAM bank and column address bits. The highest order address bits map to the SDRAM row. This mapping is ideal for workloads that have address streams that increment linearly by a constant step size of hex 8 for long periods. With this configuration and workload, transactions sent to the user interface are evenly interleaved across the controller group FSMs, making the best use of the controller resources.

In addition, this arrangement tends to generate hits to open pages in the SDRAM. The combination of group FSM interleaving and SDRAM page hits results in very high SDRAM data bus usage.

Address streams other than the simple increment pattern tend to have lower SDRAM bus usage. You can recover this performance loss by tuning the mapping of your design flat address space to the app_addr input port of the user interface. If you have knowledge of your address sequence, you can add logic to map your address bits with the highest toggle rate to the lowest app_addr bits, starting with app_addr[3] and working up from there.

For example, if you know that your workload address Bits[4:3] toggle much less than Bits[10:9], which toggle at the highest rate, you could add logic to swap these bits so that your address Bits[10:9] map to app_addr[4:3]. The result is an improvement in how the address stream interleaves across the controller group FSMs, resulting in better controller throughput and higher SDRAM data bus usage.