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.

Change memory map in DVSDK for OMAPL138

Hi all,

DVSDK's default Codec Engine examples memory map is as bellow

0xC0000000 .. 0xC1FFFFFF ( size 32MB): Linux: booted with MEM = 32M
0xC2000000 .. 0xC2BFFFFF ( size 12MB): CMEM: shared ARM/DSP I/O buffers
0xC2C00000 .. 0xC2EFFFFF ( size 3MB): SDRAM
0xC2F00000 .. 0xC2F00FFF ( size 4KB): RESET_VECTOR: reset vectors
0xC2F01000 .. 0xC2FFFFFF ( size 1020KB): DSPLINKMEM: memory for DSPLINK
0xC3000000 .. 0xC3FFFFFF ( size 16MB): RESET_VECTOR: reset vectors

And my g729 encoder and decoder works well with this memory map.

But I want to partition it as below to fit my DVEVM board:

0xC0000000 .. 0xC5FFFFFF ( size 96MB): Linux: booted with MEM = 96M
0xC6000000 .. 0xC6BFFFFF ( size 12MB): CMEM: shared ARM/DSP I/O buffers
0xC6C00000 .. 0xC6EFFFFF ( size 3MB): SDRAM
0xC6F00000 .. 0xC6F00FFF ( size 4KB): RESET_VECTOR: reset vectors
0xC6F01000 .. 0xC6FFFFFF ( size 1020KB): DSPLINKMEM: memory for DSPLINK
0xC7000000 .. 0xC7FFFFFF ( size 16MB): RESET_VECTOR: reset vectors

As suggested,

1. First, I change the boot argument in my linux bootloader.

2. Then modified dsp server memory map file ti/sdo/ce/examples/servers/all_codecs/all_evmOMAPL138.tci and rebuild my dsp server.

3. Last, change the phys_start and phys_end addr when load cmemk.ko module.


And result is when I run two instances of g729 encoder and decoder, the audio with jitter and is not hear clearly. When I run one instance of g729 encoder and decoder, the audio is ok.

I don't know why.

Is there anything else I need to modify about memory map?

My nfs file system: arago-base-tisdk-image-da850-omapl138-evm

Best regards,

Buga

  • Hi Buga,

    This looks like the correct procedure to change the memory map (more details on this page: http://processors.wiki.ti.com/index.php/Changing_the_DVEVM_memory_map). I think you'd need to do some debugging to root-cause the jitter: is it because the DSP is running too slow and cannot keep up, or is it data being corrupted somewhere in the pipeline? You may also want to be careful about caching the right memory areas, if you had cache turned on for the DSP. Changing the memory map means everything has moved around so the intended areas may not be cached anymore, whereas other areas may be inadvertently cached.

    Best regards,

    Vincent

  • Hi Vincent,

    Appreciate your help very much.

    My DSPLink is used within Codec Engine. The link Troubleshooting DSPLink configuration issues says "if DSPLink is used within Codec Engine, the method of configuration is different, and modifying the default configuration file within DSPLink will not have any impact."

    And the fact is if I just change my CE server's memory map only, do nothing about dsplink, I would get error "DSP-side memory map does not match configuration.Compare DSP-side TCF/MAP file with /dsplink/config/all/CFG_<PLATFORM>.c" when running the app. If modifying the default configuration file within DSPLink will not have any impact, how could this happen?

    Best regards,

    Buga

  • Hi Buga,

    Which version of Codec Engine and DSPLINK are you using? If you are using a 'recent' version of DSPLINK (1.40 or above) and CE 2.x, then when you create the Engine the ARM should have automatically picked up the new memory map from the DSP server package1. Are you calling Engine.createFromServer() in your ARM side .cfg file? There should be a generated file in all_codecs/package/info/bin/all.x74.info.js that the ARM side-side application picks up when it is rebuilt (remember to rebuild the ARM application after rebuilding the server).

    Best regards,

    Vincent

  • Hi Vincent,

    DVSDK version: dvsdk_omapl138-evm_04_03_00_06

    Codec Engine version: codec-engine_2_26_02_11

    DSPLINK version: dsplink_1_65_01_05_eng

    And I didn't call Engine.createFromServer() in any .cfg file.

    I can find all.x674.info.js file. The memory map here did changed.

    (ti/sdo/ce/examples/servers/all_codecs/package/info/bin/ti_platforms_evmOMAPL138/all.x674.info.js).

    And yes, I rebuild the ARM application after rebuilding the server,each time.

    Best regards,

    Buga

     

  • Hi Buga,

    I installed the DVSDK 4.03 and made the change to the all_codecs server to use your memory map:

    0xC0000000 .. 0xC5FFFFFF ( size 96MB): Linux: booted with MEM = 96M
    0xC6000000 .. 0xC6BFFFFF ( size 12MB): CMEM: shared ARM/DSP I/O buffers
    0xC6C00000 .. 0xC6EFFFFF ( size 3MB): SDRAM
    0xC6F00000 .. 0xC6F00FFF ( size 4KB): RESET_VECTOR: reset vectors
    0xC6F01000 .. 0xC6FFFFFF ( size 1020KB): DSPLINKMEM: memory for DSPLINK
    0xC7000000 .. 0xC7FFFFFF ( size 16MB): DDRALGHEAP

    After recompiling the all_codecs server and the video_copy app, and modifying my bootargs to use mem=96M and my command line to load cmem.ko:

    CMEM_MODPARAMS="phys_start=0xC6000000 phys_end=0xC6C00000 pools=20x4096,10x13107

    insmod cmemk.ko $CMEM_MODPARAMS

    I tried it out and it works just fine. I did not see the error "DSP-side memory map does not match configuration."

    Make sure when you rebuild the application to do 'make clean' prior to running 'make', to ensure it has truly been rebuilt.

    Best regards,

    Vincent

  • Hi Vincent,

    I reinstall DVSDK, and I do not see the error "DSP-side memory map does not match configuration" now.

    And the G729 codec problem is due to that I forget to set the appropriate MAR bits. The default settings in all_evmOMAPL138.tci only 64MB of DDR2 get cached beginning at address 0xc0000000. So I just set MAR128-MAR135, and everything goes well.

    Best regards,

    Buga

  • Hi Buga,

    Good to hear that things are now working for you. Caching the wrong memory area would indeed reduce the performance of your codec, which would explain the audio issues you were having.

    Best regards,

    Vincent

  • Hi Vincent,

        Thank you for your help. Appreciate it very much!

    Best regards,

    Buga