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.

TMS320F28P650DK: The LS8 and LS9 RAM for CLA program.

Part Number: TMS320F28P650DK

Tool/software:

Hi champs,

In example project cla_asin_ls8_9, we use LS8 and LS9 RAM as CLA program memory and we add offset 0x1E000U when copy code from FLASH to RAM, is this due to CPU executes the memory copy operation, so we need add the offset so that CPU copy RAM memory start from 0x00022000, the LS8 RAM (CPU1 mapped)?

If this is the case, does it mean it is impossible we assign LS0, LS1, LS8 and LS9 RAM as CLA program memory, because we have no idea when should we add offset 0x1E000U for memory copy? Or is there other methods can do that?

Please advise, thanks for your support.

Regards,

Luke

  • Luke,

    Due to the amount of RAM on the F28P65x the LS8/LS9 blocks had to move to address 0x22000/0x24000 in the CPU memory map.  However, the CLA address bus can't access anything above 0xFFFF, so in order for these RAM blocks to be used as program RAM by the CLA we had to map them to a lower address range(0x4000/0x6000) for that memory bus.

    Now, when we have built the project for flash load and RAM run, as part of this we have to copy the CLA program code from flash to RAM.  In all other cases for LS RAM the address between CPU and CLA is the same, so the mapping is straightforward.  However, because of the above, we have to add this offset to the CLA run time address in order to write it to LS8/LS9 as we are using the CPU to do the Flash to RAM copy.

    I'm not sure what the last statement means in your post; but using the above, the memory will get placed correctly for the CLA to execute from 0x4000/0x6000 as needed.  Keep in mind the physical memory is the same, so the 0x22000/0x24000 addresses in the CPU space can't be re-used, but this is no different than if other LSx memory was used for CLA data/program.

    Best,

    Matthew

  • Hi Matthew,

    Let me use one example to explain my last statement in my post.

    For example, if we plan to use LS0, LS1, LS8 and LS9 blocks as CLA's program RAM, how can we copy the CLA program code from flash to those RAM blocks (LS0, LS1, LS8 and LS9)?

    Regards,

    Luke

  • Luke,

    I think I understand your comment, since you are spanning non-contiguous RAM address it may not be straightforward to get the contents in the right place when we copy from flash.

    For the CLA project/link you can assume 0x4000-0x8FFF for the CLA.  Since this is not going to be executed by the C28x, we can just choose a flash memory range with the same size.

    When we run the application we can just use an immediate to take the code from flash and copy to the corresponding regions of CPU SRAM.  So we can take the 1st 0x4000 and place it at 0x22000 and then take the remainder and place it at 0x8000.  We don't need to try and only copy the used regions, since the whole area is reserved for the CLA only, nothing else will get placed here.

    Best,

    Matthew

  • Matthew,

    Do you mean we allocate 20K words flash space for CLA program, when we run the application code we copy first 16K words flash contents and place it at 0x22000 for LS8 and LS9 RAM, then copy the remainder 4K words flash contents and place it at 0x8000 for LS0 and LS1 RAM?

    Regards,

    Luke

  • Correct, instead of placing this in a generic flash region; I would create a new named section that is exactly this size to hold only the CLA information. 

    That way we don't have to rely on linker symbols to determine the start/load addresses and then try and break up the section for the copy, we can just copy the 1st 16K to the high address space and the rest to its matching low address space.

    Best,
    Matthew