This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

What is the memory map of the LogicPD EVM and SOMs?

Other Parts Discussed in Thread: TMS320C6748, OMAP-L138, OMAPL138

I'm trying to find a memory map of the LogicPD EVM board with the TMS320C6748 SOM, so I can write code to use that memory. I can't find this information anywhere in their documentation (It's probably there, somewhere, but I can't find it).

It seems to be referenced in their linker command file (linker_dsp.cmd). Like this:

MEMORY

{

dsp_l2_ram: ORIGIN = 0x11800000 LENGTH = 0x00040000

shared_ram: ORIGIN = 0x80000000 LENGTH = 0x00020000

external_ram: ORIGIN = 0xC0000000 LENGTH = 0x08000000

arm_local_ram: ORIGIN = 0xFFFF0000 LENGTH = 0x00002000

}

I'm not confident what those represent.

I presume the "dsp_12_ram" represents the L2 cache memory on the DSP processor.

I presume the "arm_local_ram" represents the local memory on the OMAP-L138 ARM processor.

I don't know what "shared_ram" represents (perhaps it is memory shared by the DSP and the ARM processors?) -- though it appears to function properly in my programs. (The LogicPD programs all use this memory.)

I presume the "external_ram" represents the memory on the SOM that is external to the DSP/ARM chip. However, when I try to poke into this memory with the debugger, or use these memory locations with programs, it doesn't work. Thus my question. What is the address of this memory? I'm don't seem able to access this memory.

  • Walter,

    Yesterday I was looking for the same thing as you and could not find a good documentation from LogicPD about the memory map.

    However, I just realized the OMAPL138 C6748 GEL file has good and well commented memory configuration settings where all the board memory is allocated. Just download the files from LogicPD website (check this page for details), open the file <c6748.gel> and check the settings in the function hotmenu Setup_Memory_Map().

    Although this seems to be a very obscure way to know about the memory map, it is surely accurate.

    The issues with the external memory may be due to a misconfigured DDR as well. The GEL file should help properly configuring its timings.

    Hope this helps,

    Rafael

     

     

  • The mystery is deepening. 

    I am unable to access the external memory on the LogicPD SOM.

    So I ran a simple test.  I started with a LogicPD program that works properly.  And I added a new variable called testxyz:

    far int16_t testxyz = 0x5555;

    Notice it is declared as a far, in order to utilize the external memory. Then in the linker command file (linker_dsp.cmd) I declared far to use external memory, like this:

    .far > external_ram

    I didn't change anything else in the program, so the program ought to still run -- but it doesn't.  Things go weird.  First, this variable doesn't get set to 0x5555, plus when I poke any value into that memory location it always remains set to zero.  It appears I am unable to access this memory in external ram.

    As another clue, many variables somehow also got moved up to to these external memory locations (even though I didn't tell them to).

    It's a simple thing I want to do.  I want to use the external memory on the SOM.  How do I do that?

     

    [Note: The gel file contains key information about the memory map, but something seems missing.   For example, it gives the origin and size of DDR (external?) memory as 0xC0000000, 0, 0x20000000 -- which is similar to what the linker_dsp.cmd file says (which is: external_ram: ORIGIN = 0xC0000000 LENGTH = 0x08000000). So there is a slight difference between the two sources of information.  However, that should not affect the problem I described above, since I'm trying to using memory that easily fits within both those descriptions.]

  • Walter,

    From your problem description I really think you are having trouble accessing external memory. This is commonly caused by a misconfiguration of the DDR timing registers, which prevents any external memory accesses. Just as a cleanup check, did you add the the <c6748.gel> to the target configuration file (.ccxml)?

    I am asking this because I managed to access the external mDDR on my EVM (loaded with the C6748 SOM like yours). I am using CCS4.1.1.00014 and a XDS560 PCI connected to the TMS320C6748 device. I added the <c6748.gel> file to the configuration (don't pay attention to the path of the GEL file; it can be installed anywhere in your system).

    The external memory starts at 0xC0000000 and goes to 0xC7FFFFFF (128MB physically installed on the SOM).

    As you noticed, the GEL file <c6748.gel> covers the complete 512MB of external memory space, but any attempts to write to an address higher than 0xC7FFFFFF wraps back to 0xC0000000. This is a bug in the GEL file and can be easily fixed by simply adjusting the DDR2 Data memory size. The linker command file is correct.

    Let me know if this helps solving the mistery, ok?

    Rafael

     

     

     

  • Rafael,

    I made a big step in progress, and now just need to smooth out the wrinkles.

    For a gel file I had been using the OMAPL138_DSP.gel.  I presumed (incorrectly?) that the DSP portion of the OMAP-L138 is the TMS320C6748, and therefore the gel file ought be the same, or suitable.  On your advice, I switched over to the c6748.gel file, and that may well be part of the solution. 

    The other part of the solution is how to declare variables to use the external memory.  I did it like this. Let me know if there is a better, or smoother way to accomplish a similar end.

    This seems to work.  In my C code, I declared a data section called "mydata". (The A-to-D converter data is DMA'd by the UPP into this memory.)

    #pragma  DATA_SECTION ( recv_buffer, "mydata" );
    #pragma  DATA_ALIGN(recv_buffer, 64) //ensures data is aligned on 64 byte boundary
    volatile int16_t recv_buffer[2000000];

    Then in the linker command file, I assigned "mydata" to external memory, like this:

    MEMORY
    {
    dsp_l2_ram: ORIGIN = 0x11800000 LENGTH = 0x00040000
    shared_ram: ORIGIN = 0x80000000 LENGTH = 0x00020000
    external_ram: ORIGIN = 0xC0000000 LENGTH = 0x08000000
    arm_local_ram: ORIGIN = 0xFFFF0000 LENGTH = 0x00002000


    SECTIONS
    {
    .text > shared_ram
    .const > shared_ram
    .bss > shared_ram
    .far > shared_ram
    .switch > shared_ram
    .stack > shared_ram
    .data > shared_ram
    .cinit > shared_ram
    .sysmem > shared_ram
    .cio > shared_ram
    mydata > external_ram
    }

  • Walter,

    You are not incorrect in your assumption: the DSP core of OMAPL138 is a C6748 but with minor differences in the initialization procedure. Being a hybrid (SoC) device, the <OMAPL138_DSP.gel> assumes the ARM already performed the PSC and PLL initialization, thus the GEL file does not call the subroutines PSC_All_On_Experimenter(); and Core_300MHz_mDDR_132MHz(); inside OnTargetConnect()

    Note that these functions are still present in the <OMAPL138_DSP.gel> and can be accessed via the Scripts menu; they are just not automatically called when the target is connected.

    With regards to the second part of your question, that's the way to allocate variables in a specific memory section - I wouldn't have done better. 

    Hope this helps,

    Rafael