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.

ARM968 to C64x+ IPC cause C64x+ exception

Hi,

I'm developping a H264 decoder on DM6467. In order to liberate C64x+ from waiting the HDVICP acceleators, I used ARM968 to start and wait HDVICP accelerators, when all accelerators have finished their work, ARM968 will send a command to C64x+, which trigger an interrupt in C64x+, and a semaphore is posted in the Interrupt Service Routine(ISR), so C64x+ waits all accelerators by pending the semaphore.

However, sometimes this mechanism can work, somtimes it can't. After carful debugging, I find that sometimes when C64x+ has finished the "process" function, ARM926 calls "process" function again, this trigger an exception in C64x+ before the next execution of "process" function in C64x+. From registers, it's said the excpetion is caused by fetch instructions in data section, so the feteched "instruction" is invalid, it should be a pointer problem.

When the "process" function is executed in ARM926, I don't know what happens in C64x+ before entering the "process" function, because I know so little about CE. I can't solve the problem although I can locate it. Does the usage of interrupt or semapore contradict with CE? Or the usage of interrupt or semaphore violate some principle of Davinci software architectures? As you know, there're so much principles you have to follow to develop on Davinci platforms.

Thanks!

  • When call the decoder from ARM926 with CE_DEBUG=3, the last time when ARM926 enters VIDDEC1_process, the log message is shown as follows, after that, the exception in C64x+ arises:

    entering VIDDEC1_process         <==This message is added by me, it will be printed before ARM926 executes "VIDDEC1_process".
    @42,471,046us: [+0 T:0x4001ee40 S:0xbe8727d4] ti.sdo.ce.video1.VIDDEC1 - VIDDEC1_process> Enter (handle=0x492b8, inBufs=0xbe8728a8, outBufs=0xbe87289c, inArgs=0xbe872890, outArgs=0x48220)
    @42,471,257us: [+5 T:0x4001ee40 S:0xbe87275c] CV - VISA_allocMsg> Allocating message for messageId=0x0002004b
    @42,471,433us: [+0 T:0x4001ee40 S:0xbe87272c] OM - Memory_getBufferPhysicalAddress> Enter(virtAddr=0x402ec000, size=65536)
    @42,471,590us: [+1 T:0x4001ee40 S:0xbe87272c] OM - Memory__getPhysicalAddress> Enter(virtAddr=0x402ec000, size=65536)
    @42,471,738us: [+1 T:0x4001ee40 S:0xbe87272c] OM - Memory__getPhysicalAddress> found in cb(Sc=0x402ec000, Ec=0x402fc000, Ss=0x402ec000, Es=0x402fc000, PSc=0x87f52000)
    @42,471,897us: [+1 T:0x4001ee40 S:0xbe87272c] OM - Memory__getPhysicalAddress> returning physAddr=0x87f52000
    @42,472,037us: [+0 T:0x4001ee40 S:0xbe87272c] OM - Memory_getBufferPhysicalAddress> return (0x87f52000)
    @42,472,181us: [+0 T:0x4001ee40 S:0xbe87272c] OM - Memory_getBufferPhysicalAddress> Enter(virtAddr=0x4030d000, size=1)
    @42,472,331us: [+1 T:0x4001ee40 S:0xbe87272c] OM - Memory__getPhysicalAddress> Enter(virtAddr=0x4030d000, size=1)
    @42,472,513us: [+1 T:0x4001ee40 S:0xbe87272c] OM - Memory__getPhysicalAddress> found in cb(Sc=0x4030d000, Ec=0x411e1e00, Ss=0x4030d000, Es=0x4030d001, PSc=0x8a62a000)
    @42,472,678us: [+1 T:0x4001ee40 S:0xbe87272c] OM - Memory__getPhysicalAddress> returning physAddr=0x8a62a000
    @42,472,816us: [+0 T:0x4001ee40 S:0xbe87272c] OM - Memory_getBufferPhysicalAddress> return (0x8a62a000)
    @42,472,961us: [+0 T:0x4001ee40 S:0xbe872774] CV - VISA_call(visa=0x492b8, msg=0x42334880): messageId=0x0002004b, command=0x0
    @42,473,119us: [+0 T:0x4001ee40 S:0xbe87273c] OC - Comm_put> Enter(queue=0x2, msg=0x42334880)
    @42,473,320us: [+0 T:0x4001ee40 S:0xbe87273c] OC - Comm_put> return (0)
    @42,473,472us: [+0 T:0x4001ee40 S:0xbe872734] OC - Comm_get> Enter(queue=0x10001, msg=0xbe87280c, timeout=-1)
    @42,545,942us: [+0 T:0x4001ee40 S:0xbe872734] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    @42,546,153us: [+0 T:0x4001ee40 S:0xbe8726c4] OC - Comm_put> Enter(queue=0x0, msg=0x42333880)
    @42,546,365us: [+0 T:0x4001ee40 S:0xbe8726c4] OC - Comm_put> return (0)
    @42,546,518us: [+0 T:0x4001ee40 S:0xbe8726bc] OC - Comm_get> Enter(queue=0x10000, msg=0xbe87277c, timeout=-1)