Project

General

Profile

use of IRAM in the project based on MDK_2014-01-13

Added by Vivek Ponnani almost 6 years ago

Hi,

I have a custom board with
-- MityDspl-138F module (with FPGA)
-- No Ethernet port
-- UART,USB,SD CARD interface
-- uPP transfer for data process
We are using MMC card for booting linux and to copy application software files to board.

I have developed a C++ CCS 6.1.3 project with compiler version 7.4.16 which uses base of MDK_2014-01-13. I am using \MDK_2014-01-13\sw\DSP\templates\criticallink\platforms\MityDSP-L138\platform.tci. In .map file generated, I can see IRAM section as below

MEMORY CONFIGURATION

name            origin    length      used     unused   attr    fill
---------------------- -------- --------- -------- -------- ---- --------
IRAM 11800000 00020000 00000000 00020000 RWIX

I received data from uPP. To process this data faster I want to use IRAM for some of my buffers. For that I used #pragma DATA_SECTION ("IRAM"); before buffer. For ex.

#pragma DATA_SECTION ("IRAM");
float test_array16000;

After that I can see used IRAM as below.

MEMORY CONFIGURATION

name            origin    length      used     unused   attr    fill
---------------------- -------- --------- -------- -------- ---- --------
IRAM 11800000 00020000 0000fa00 00010600 RWIX

But If I put my buffer in IRAM , the process time reduced and the output get distorted.

following things I observed in .map file is as below.

SECTION ALLOCATION MAP

output                                  attributes/
section page origin length input sections
-------- ---- ---------- ---------- ----------------
.vers 0 00000000 00000044 COPY SECTION
00000000 00000044 HelloworldDSPcfg.obj (.vers)
.prd 0 11800000 00000000 UNINITIALIZED

11800000 PRD_A_TABBEG
11800000 PRD_A_TABEND
00000000 PRD_A_TABLEN

I can not understand the .prd section and its address is same as IRAM i.e 11800000.

My queries are as below

1) Is this the correct way to use IRAM as I defined with pragma?

2) If I want to copy one buffer to another, and one buffer is in DDR2 and another one in IRAM, Is there any specific process I need to take care?

3) copy from/to IRAM/DDR2 is ok? Because IRAM and DDR2 operates on different speed.

4) Anything else is using IRAM as in .map file it is showing .prd section at same memory location 11800000.

If my all buffer is in DDR2, my output is smooth but it takes more time to process data. I am not able to understand the reason of distorted output when I put one of the buffer (which copies data from uPP buffer) in IRAM. Please suggest.

Thanks,
Vivek.


Replies (2)

RE: use of IRAM in the project based on MDK_2014-01-13 - Added by Michael Williamson almost 6 years ago

Check the cache settings for the L2 in the BIOS section for the DSP project. The cache can be configured to use up some of the IRAM, you may need to reduce it.

RE: use of IRAM in the project based on MDK_2014-01-13 - Added by Vivek Ponnani almost 6 years ago

Thanks Michael for your tour reply. Actually I am not much familiar with all the settings. To setup my project I followed the link

https://support.criticallink.com/redmine/projects/arm9-platforms/wiki/DSP_Hello_World

and as suggested in the page I used platform.tci which is in MDK_2014-01-13 folder as mentioned before.

Could you please help me by showing each step of how to check the settings for L2 in the BIOS section for the DSP project and How can I reduce it?

I generally check .map file to check the memory settings. In my case below is the .map file generated.

MEMORY CONFIGURATION

name            origin    length      used     unused   attr    fill
---------------------- -------- --------- -------- -------- ---- --------
IRAM 11800000 00020000 0000fa00 00010600 RWIX
CACHE_L2 11820000 00020000 00000000 00020000 RWIX
CACHE_L1P 11e00000 00008000 00000000 00008000 RWIX
CACHE_L1D 11f00000 00008000 00000000 00008000 RWIX
L3_CBA_RAM 80000000 00020000 00000000 00020000 RWIX
RESET_VECTOR c6000000 00000080 00000000 00000080 RWIX
DDR c6000080 007fff80 002170a0 005e8ee0 RWIX
DSPLINKMEM c6800000 00030000 00000000 00030000 RWIX
POOLMEM c6830000 00800000 00000000 00800000 RWIX

In above memory config, I can not see any L2 is used.

I am also attaching platform.tci file for your reference.

Thanks,
Vivek

    (1-2/2)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)