SPRUJ28E November 2021 – September 2024 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
There are two separate paths an EMIF access can take from the master to EMIF slave. 1.Through RMW queue, 2. Direct path (Bypass RMW queue). Coherent master accesses go through RMW queue path and non-coherent/SoC master accesses take a direct path to EMIF, bypassing RMW queue.
region_size[4:0] | Interleave Region Size |
---|---|
0 | 0MB (no interleave region) |
1 | 128MB |
2 | 256MB |
3 | 512MB |
4 | 1 GB |
5 | 2 GB |
6 | 3 GB |
7 | 4 GB |
8 | 6 GB |
9 | 8 GB |
10 | 12GB |
11 | 16GB |
12 | 32GB |
13-31 | Reserved |
granule_size[4:0] | Interleave Granule Size | Reason for Selection |
---|---|---|
0 | 128B | Highest performance for single master |
1 | 512B | Highest performance for single master/ECC |
2 | 2 KB | Pagesize interleaving |
3 | 4 KB | Pagesize interleaving |
4 | 16KB | Mostbank efficient for 2K size |
5 | 32KB | Mostbank efficient for 4K size |
6 | 512MB | |
7 | 1 GB | Coarse memory interleaving |
8 | 1.5GB | |
9 | 2 GB | |
10 | 3 GB | |
11 | 4 GB | |
12 | 6 GB | |
13 | 8 GB | |
14 | 16GB | Full memory interleaving |
15-31 | Reserved |
emifs_active[3:0] | Description |
---|---|
0000 | Reserved |
0001 | EMIF-0active |
0010 | EMIF-1active |
0100 | EMIF-2active |
1000 | EMIF-3active |
0011 | EMIF-0,1active |
0101 | EMIF-0,2active |
1001 | EMIF-0,3active |
0110 | EMIF-1,2active |
1010 | EMIF-1,3active |
1100 | EMIF-2,3active |
0111 | EMIF-0,1,2active |
1011 | EMIF-0,1,3active |
1101 | EMIF-0,2,3active |
1110 | EMIF-1,2,3active |
1111 | EMIF-0,1,2,3active |
hybrid_select[4:0] | Description for 2 EMIFs | Description for 3 EMIFs. | Description for 4 EMIFs |
---|---|---|---|
00000 | Entire space interleaved | Entire space interleaved | Entire space interleaved |
00001 | EMIF-0 separated,EMIFs-0,1 interleaved | EMIF-0 separated,EMIFs-1,2 interleaved | EMIF-0 separated,EMIF-1,2,3 interleaved |
00010 | EMIF-1 separated,EMIFs-0,1 interleaved | EMIF-1 separated,EMIFs-0,2 interleaved | EMIF-1 separated,EMIF-0,2,3 interleaved |
00100 | Reserved | EMIF-2 separated,EMIFs-0,1 interleaved | EMIF-2 separated,EMIF-0,1,3 interleaved |
01000 | Reserved | Reserved | EMIF-3 separated,EMIF-0,1,2 interleaved |
10000 | Reserved | Reserved | Reserved |
10001 | EMIF-0 separated,EMIFs-0,1 interleaved | EMIF-0 separated,EMIFs-0,1,2 interleaved | EMIF-0 separated,EMIF-0,1,2,3 interleaved |
10010 | EMIF-1 separated,EMIFs-0,1 interleaved | EMIF-1 separated,EMIFs-0,1,2 interleaved | EMIF-1 separated, EMIF-0,1,2,3interleaved |
10100 | Reserved | EMIF-2 separated,EMIFs-0,1,2 interleaved | EMIF-2 separated, EMIF-0,1,2,3interleaved |
11000 | Reserved | Reserved | EMIF-3 separated, EMIF-0,1,2,3interleaved |
ecc_enable[3:0] | Description |
---|---|
0000 | ECC disabled on all EMIFs |
0001 | ECC enabled on EMIF-0 |
0010 | ECC enabled on EMIF-1 |
0100 | ECC enabled on EMIF-2 |
1000 | ECC enabled on EMIF-3 |
0011 | ECC enabled on EMIF-0,1 |
0101 | ECC enabled on EMIF-0,2 |
1001 | ECC enabled on EMIF-0,3 |
0110 | ECC enabled on EMIF-1,2 |
1010 | ECC enabled on EMIF-1,3 |
1100 | ECC enabled on EMIF-2,3 |
0111 | ECC enabled on EMIF-0,1,2 |
1011 | ECC enabled on EMIF-0,1,3 |
1101 | ECC enabled on EMIF-0,2,3 |
1110 | ECC enabled on EMIF-1,2,3 |
1111 | ECC enabled on EMIF-0,1,2,3 |
When ECC is enabled, the corresponding DDR size will be effectively reduced. Max_memory=(ddr_ram_size/576)*512. The div-by-576 is an integer division. If the address falls out of max_memory range, the access will land in the next EMIF.
Programming Model for 2xEMIF case:
Case-1:DDR0 = DDR1:2x {512M, 1G, 1.5G, 2G, 3G, 4G, 6G, 8G}
Separated DDRs:
region_size= DDR0+DDR1 sizes granule_size = DDR0 size emifs_active = both DDRs active
hybrid_select = Choose hybrid_select such that anything that is outside the region goes to the EMIF specified in hybrid_select. If its default(0), MSMC will route it out via its EMIF0 port.
ecc_enable= enabled/disabled on any DDR For example, if we have 2x1G DDRs then,
region_size= 2G, granule_size = 1G, emifs_active = 3, hybrid_select = x, ecc_enable = {0, 1, 2, 3}
Interleaved DDRs:
region_size= DDR0+DDR1 sizes granule_size < DDR0 size emifs_active = both DDRs active
hybrid_select = Choose hybrid_select such that anything that is outside the region goes to the EMIF specified in hybrid_select. If its default(0), MSMC will route it out via its EMIF0 port.
ecc_enable= enabled on both DDRs or disabled on both DDRs For example, if we have DDR0 = 1G and DDR1 = 1G then,
region_size= 2G, granule_size < 1G , emifs_active = 3, hybrid_select = x, ecc_enable = {0, 3}
Case-2:DDR0 < DDR1:(512M,1G) ; (512M, 2G) ; (1G, 2G) ; (1G, 3G) ; (2G, 3G)
There are two ways to accomplish separated DDRs: case-A and case-B.Separated DDRs-A:
region_size = 2xDDR0 size granule_size = DDR0 size emifs_active. = both DDRs active hybrid_select. = DDR1
ecc_enable = enabled/disabled on any DDR
For example, if we have DDR0 =1G and DDR1 = 2G then,
region_size= 2G, granule_size = 1G, emifs_active = 3, hybrid_select = 2, ecc_enable = {0, 1, 2, 3}
Separated DDRs-B:
region_size = DDR0 size granule_size = DDR0 size emifs_active. = both DDRs active hybrid_select. = DDR1
ecc_enable = enabled/disabled on any DDR
For example, if we have DDR0 =1G and DDR1 = 2G then,
region_size= 1G, granule_size = 1G, emifs_active = 3, hybrid_select = 2, ecc_enable = {0, 1, 2, 3}
Interleaved DDRs:
region_size = 2xDDR0 size granule_size < DDR0 size emifs_active. = both DDRs active hybrid_select. = DDR1
ecc_enable = enabled on both DDRs or disabled on both DDRs. For example, if we have DDR0 =1G and DDR1 = 2G then,
region_size= 2G, granule_size < 1G, emifs_active = 3, hybrid_select = 2, ecc_enable = {0, 3}
Case-3:DDR0 > DDR1: (1G,512M) ; (2G, 512M) ; (2G, 1G) ; (3G, 1G) ; (3G, 2G). *This case is not officially supported to have consistent system-level constraints for 2, 3, 4 EMIFs interleaving cases.
MSMC RTL supports it with the following programming model.Separated DDRs:
region_size = DDR0 size granule_size = DDR0 size emifs_active. = both DDRs active hybrid_select. = DDR1
ecc_enable = enabled/disabled on any DDR
For example, if we have DDR0 =2G and DDR1 = 1G then,
region_size= 2G, granule_size = 2G, emifs_active = 3, hybrid_select = 2, ecc_enable = {0, 1, 2, 3}
Interleaved DDRs:
region_size = 2xDDR1 size granule_size < DDR1 size emifs_active. = both DDRs active hybrid_select. = DDR0
ecc_enable = enabled on both DDRs or disabled on both DDRs. For example, if we have DDR0 =2G and DDR1 = 1G then,
region_size= 2G, granule_size < 1G, emifs_active = 3, hybrid_select = 1, ecc_enable = {0, 3}