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.

CCS/66AK2H14: EMIF16 access by GEL file

Part Number: 66AK2H14

Tool/software: Code Composer Studio

Hi,

My customer is using EVMK2H and connects CPLD on EMIF16 CE2.
When he read from EMIF16, always two 16bits accesses are made even only one access is attempted.

Please see attached excel sheet.
GEL_MapAddStr.xlsx
We confirmed CCS memory map is properly configured as AS2(16bits).

Thanks and regards,
Koichiro Tashiro

  • Hi Tashiro-san,

    See this relevant thread:
    e2e.ti.com/.../2842294

    I would have expected unsigned short pointer to perform only a 16-bit access.
    Can the customer try unsigned char as a test?

    Does a similar waveform occur for writes as well as reads?

    What core is the GEL running from?

    Can he probe EMIFBE0 and EMIFBE1 to see if the byte enables are masking one of the accesses?

    Does the EMIF behave the same when using compiled C code instead of the GEL?
    If he runs the C code, he can hit a breakpoint and read the disassembly to see what assembly instructions are used.

    Do you know if there are any MMU or cache settings? These could play a role.
    We recommend these MMU settings for A15:
    mmuAttr0.accPerm = 0U; // 0: R/W at PL1
    mmuAttr0.noExecute = 1U;
    mmuAttr0.attrIndx = 0U; //0U: non-cacheable normal memory
    mmuAttr0.shareable = 0U; //0: not shareable

    Regards,
    Mark
  • Hi Tashiro-san,
    Accessing external memories is always tricky with CCS gel files. I suggest that you also set up the EMIF portion of the memory map using the GEL_MapAddStr() command. That command is described in the document linked below. This command allows you to set the memory access size to 16bits rather than the default 32bits.
    Regards, Bill
    www.ti.com/.../spraa74a.pdf
  • Hi Mark, Bill,

    Thanks for your reply. Please find my answers.

    >Does a similar waveform occur for writes as well as reads?

    Yes. Write access is the similar.

    >What core is the GEL running from?

    A15 core.

    >Does the EMIF behave the same when using compiled C code instead of the GEL?
    >If he runs the C code, he can hit a breakpoint and read the disassembly to see what assembly instructions are used.

    Access using C code is not tried.

    >Do you know if there are any MMU or cache settings? These could play a role.

    No MMU setting is done. Customer is using GEL file modified from “xtcievmk2x_arm.gel”.
    MMU and Cache are disabled by the GEL.

    And I have additional information about GEL_MapAddStr().

    A) When customer configure only EMIF16 region as “AS2”, two 16bits accesses are made (as explained in my previous post, GEL_MapAddStr.xlsx).
    GEL_MapAddStr(0x0000000, 0, 0x2FFFFFFF, "R|W|AS4", 0);
    GEL_MapAddStr(0x3000000, 0, 0x0FFFFFFF, "R|W|AS2", 0);
    GEL_MapAddStr(0x4000000, 0, 0x5FFFFFFF, "R|W|AS4", 0);

    B) When customer configure all region as “AS2”, only one 16bits access is made.
    GEL_MapAddStr(0x0000000, 0, 0xFFFFFFFF, "R|W|AS2", 0);

    C) When customer configure all region as “AS4”, two 16bits accesses are made.
    GEL_MapAddStr(0x0000000, 0, 0xFFFFFFFF, "R|W|AS4", 0);

    I think B) and C) are expected behavior, but why A) does not work?

    Thanks and regards,
    Koichiro Tashiro

  • Hi,

    I think you have a typo in A). You wrote the following. In the second statement you list the address as 0x03000000 while the EMIF address range starts at 0x30000000. The same is true for the last statement. Try the following

    GEL_MapAddStr(0x00000000, 0, 0x2FFFFFFF, "R|W|AS4", 0);
    GEL_MapAddStr(0x30000000, 0, 0x3FFFFFFF, "R|W|AS2", 0);
    GEL_MapAddStr(0x40000000, 0, 0x5FFFFFFF, "R|W|AS4", 0);

    Regards, Bill

  • Hi Bill,

    You are absolutely correct!

    Thanks,
    Koichiro Tashiro