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.

[TDA4M] Linear addressing and Circular addressing in FMTFLAG of TR

Hello.

I've read about Linear addressing and Circular addressing in TRM(ver1.0)

But I can't understand something.

There are sample codes in "10.1.2.3.1 Linear Addressing(Foward)" and "10.1.2.3.6.1.2 Circular Addressing".

From what I understand, that codes are fixed by hardware or software in the SoC. Right ?

   If fixed by software, Where can I check the code to address for each types of TR?

   If not fixed, Where can I change the code ?

Best regards

Yongsig.

  • Hi Yongsig,

    This code is fixed, but you could change most of the parameters. 

    Are you looking for any other way to do copy? Could you please help us to understand your requirement?

    Rgds,

    Brijesh

  • Hello. Brijesh.

    First of all, thank you for your reply.

    You said that I could change most of the paraeters. Do those parameters mean ICNTx, SDIMx and DDIMX ?

    Actually, I don't know exactly when the linear addressing like TI's(*) would be needed.

    I was wondering If I have to use this addressing when the DMA would read/write from/to continueous address incremented by 1 on block copy mode.

    In other words, In 4D block copy(TR Type is 8 or 9), I can configure those parameters to access address incremented by 1, but I think those loop of ICNx are too complex for that works.

    It would be helpful for me if you could explain some advantages of linear and circular addressing in 4D block copy.

    Best regards

    Yongsig.

    (*) TI's linear addressing is follows :

    for (i3 = 0; i3 < ICNT3; i3++)
    {
    sptr3 = sptr; // save current position before entering next level
    dptr3 = dptr; // save current position before entering next level
    // Check for trigger of TYPE1
    if (TR_TRIG0_TYPE == TYPE1) while(!TR_TRIG0);
    If (TR_TRIG1_TYPE == TYPE1) while(!TR_TRIG1);
    for (i2 = 0; i2 < ICNT2; i2++) {
    sptr2 = sptr; // save current position before entering next level
    dptr2 = dptr; // save current position before entering next level
    // Check for trigger of TYPE2
    if (TR_TRIG0_TYPE == TYPE2) while(!TR_TRIG0);
    if (TR_TRIG1_TYPE == TYPE2) while(!TR_TRIG1);
    for (i1 = 0; i1 < ICNT1; i1++) {
    sptr1 = sptr; // save current position before entering next level
    dptr1 = dptr; // save current position before entering next level
    // Check for trigger of TYPE3
    if(TR_TRIG0_TYPE == TYPE3) while(!TR_TRIG0);
    if(TR_TRIG1_TYPE == TYPE3) while(!TR_TRIG1);
    for (i0 = 0; i0 < ICNT0; i0++) {
    // UTC can combine these in optimized burst aligned accesses.
    *dptr = *sptr;
    sptr = sptr++;
    dptr = dptr++;
    }
    // Update based on saved pointer for this level
    sptr = sptr1 + SDIM1;
    dptr = dptr1 + DDIM1;
    }
    // Update based on saved pointer for this level
    sptr = sptr2 + SDIM2;
    dptr = dptr1 + DDIM2;
    }
    // Update based on saved pointer for this level
    sptr = sptr3 + SDIM3;
    dptr = dptr1 + DDIM3;
    }

  • Hi Yongsig,

    Linear addressing would typically be used when we want to read/write video frames. Typically it would just be 2D transfer, but in some cases, like in LDC, it could potentially use 4D addressing also.

    Circular addressing could be used when we could have limited address space and would like reuse memory space. So we could just loop around the memory..

    Rgds,

    Brijesh

  • Hi Yongsig,

    Yes, i meant icnts, dimentions and addresses.

    I think i explained about linear and circular addresses usage on the other thread.

    Regards,

    Brijesh