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.

XMC on C6678

Hi guys,

I have observed a strange behavior with the XMC MPAX registers on the C6678. I used it to remap my memory mapping and erverthing works fine so far.

But when shift the memory map for a value smaller than the segSize of the MPAX it does not work. What I did is:

    mpaxh[2].segSize = MPAX_SEGSIZE_256KB;
    mpaxh[2].bAddr = XMC_BADDR_MAKE(0x0c200000);
    mpaxl[2].rAddr = XMC_RADDR_MAKE(0x00C20000+0x4000) ;

=> works fine!

    mpaxh[2].segSize = MPAX_SEGSIZE_256KB;
    mpaxh[2].bAddr = XMC_BADDR_MAKE(0x0c200000);
    mpaxl[2].rAddr = XMC_RADDR_MAKE(0x00C20000+0x2000) ;

Does not work at all! All transactions are simply not remapped, but happen to the original addres. E.g. When I write to 0x0c200000 it is written to 0:0c200000 and not to 0:0c220000!

Does anyone have an idea what's the reason for this?

Regards Fabian

  • Fabian,

    I think the "issue" is about how the SEGSZ is used in the MPAX address matching (BADDR) and address extension (RADDR).

    You may already notice the statement in section 7.3.2.1 "Address Range Lookup" in the CorePac User Guide that "the number of bits compared is a function of the SEGSZ". In this example (256KB segments), all 14 bits of the BADDR field must match the upper 14 bits of the C66x CorePac address.

    Similarly, in section 7.3.2.2 "Address extension", it states "MPAX address extension works by replacing the upper address bits of the logical  address with corresponding bits from the replacement address (RADDR)."

    So only the upper 4 bits (32bit-to-36bit) + 14 bits (SEGSZ=256KB) in the RADDR will be used for the address extension. In your case, you program RADDR=0x00C22000. So only 0x00C2+00b (upper two bits in 0x2=0010b) will be used to replace the address, which is still 0x0_0C200000 after extension.

    In your original setup, RADDR=0x00C24000, the 0x00C+01b(upper two bits 0x4=0100b) will be used, then the BADDR could be replaced with the correct address as 0x0_0C240000. So it was working previously.

    I think you should change the SEGSZ to be 128KB if you would like to map the 0x0c200000 to 0x0c220000 region. In that case, the MPAX will look up for more bits for the address matching and extension.

     

  • Thanks for the good explanation. That solved it.

    Regards Fabian