AnsweredAssumed Answered

ADSP - 21375 Mapping SDRAM to Multiple Banks

Question asked by dmann on Mar 16, 2011
Latest reply on Mar 17, 2011 by dmann

I'm using a 16M x 8 SDRAM x 16 bit SDRAM for external memory on a custom board with a ADSP-21375. Currently, I am able to use the SDRAM for both data and instruction memory with the following LDF modifications.....


     seg_sdram_data { TYPE(DM RAM) START(0x00200000) END(0x003FFFFF) WIDTH(16) }      //SPACE FOR EXTERNAL DATA
     seg_sdram_code { TYPE(PM RAM) START(0x00800000) END(0x008FFFFF) WIDTH(16) }     //SPACE FOR EXTERNAL CODE


     sdram_data NO_INIT
          INPUT_SECTIONS($OBJECTS(sdram_data NO_INIT) $LIBRARIES(sdram_data NO_INIT))
     } > seg_sdram_data
     } > seg_sdram_code



Row Address Width = 4096

Column Address Width = 512

Data Lines = 16

Number of Banks = 4


According to Table 2 in EE-286, the bank boundaries are defined as



BankAddress Range
Bank 00x0020 0000 - 0x03FF FFFF
Bank 1
0x0400 0000 - 0x07FF FFFF
Bank 2
0x0800 0000 - 0x0BFF FFFF
Bank 3
0x0C00 0000 - 0x0FFF FFFF


The size of my SDRAM memory is 16MB and populates memory logical (SHARC) addresses 0x0020 0000 - 0x005F FFFF. I should mention that there is aliasing past 0x0040 0000 addresses which means that the program space defined at 0x00800000 actually starts at 0x0040 0000. I defined it at 0x0080 0000 because of the note in Table 3 of EE-286 which gives the valid address range for External Bank 0 Instruction Fetches.


Because all four banks of my SDRAM (4MBx4) do not even span the first bank 0 space, does this mean that I cannot make use of the multiple banks of the SDRam Controller? I would like to be able to have pages in all four banks of the SDRAM available for access. Is there a way to make use of all 4 banks despite my total memory size being less than 64MB? If so please explain what changes need to be made.


My relevant regs are:


void initSDRAM(void)

temp = *pEPCTL;

/*bit set ustat1 B0SD;*/
temp |= B0SD | B1SD | B2SD | B3SD;

*pEPCTL = temp;

*pSDRRC = 0x816;

*pSDCTL =   SDCL2 |    
            //DSDCTL |
            DSDCLK1 |
            SDTRAS6 |
            SDTRP3 |
            SDPM |
            SDCAW9 |
            SDPSS |
            //SDSRF |
            X16DE |
            SDTWR2 |
            //SDORF |
            //FARF |
            //FPC |
            //SDBUF |
            SDTRCD3 |
            SDRAW12 |

*pAMICTL0 = 0x0;
*pAMICTL1 = 0x0;