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.

Compiler/TMS320C6678: circular addressing in C using C^^&*

Part Number: TMS320C6678

Tool/software: TI C/C++ Compiler

My question is how can i use circular addressing of C6678 through C languague??? Thanx.

  • Hi Oded,

    I suggest you a tutorial explaining how circular buffering is implemented on the TMS320C6000 devices and assembler examples explained with c code.
    www.ti.com/.../spra645a.pdf

    BR
    Tsvetolin Shulev
  • Thanx Cvetolin

    I will read the article but it look to me it explain the circular addressing of the processor but not

    how to use it through C language.

    Oded

  • Hi again Cvetolin

    I was reading the article you suggested and on page 6 paragraph 4 it say that C support tools for circular buffering will be
    offered in future release. Can you tell if there is already a version that include this support and if there is what version it is???

    Thanx

    Oded
  • oded shahua said:
    Can you tell if there is already a version that include this support and if there is what version it is???

    Reading the latest TMS320C6000 Optimizing Compiler v8.2.x User's Guide from May 2017 there is still no support for circular address in the C compiler.

    E.g. section 8.3 Register Conventions says:

    For example, the compiler assumes all circular addressing-enabled registers are set for linear addressing (the AMR is used to enable circular addressing). Enabling circular addressing and then calling a C/C++ function without restoring the AMR to a default setting violates the calling convention.

    And section 8.6.14 IRP and AMR Conventions says:

    There are certain assumptions that the compiler makes about the IRP and AMR control registers. The assumptions should be enforced in all programs and are as follows:

    1. The AMR must be set to 0 upon calling or returning from a function. A function does not have to save and restore the AMR, but must ensure that the AMR is 0 before returning.

    2. The AMR must be set to 0 when interrupts are enabled, or the SAVE_AMR and STORE_AMR macros should be used in all interrupts (see Section 8.7.3).

  • Thanx Chester
    It look to me wired that still there is no support as in document from 2001 they wrote it will be in future release. It
    look like they didn't ad it eventually.
    I know about the lines you added to me about AMR but it is only instructions how to deal with the AMR in interrupts
    and it does not solve the question how do use the circular buffering from C. I know how to write to AMR from C
    but not how to make a specific circular addressing register to be used as my pointer.

    Oded