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.

JPEGDEC demo run error on EVM6678L

Other Parts Discussed in Thread: DEMOVIDEO-MULTICORE

hi,

With the help of E2E forum, I ported jpegdec demo from CCSv4 to CCSv5, and all seems to be OK after built successful, Here is the post indicates what have done when ported to CCSv5: http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/166075.aspx#608149
But after I load the .out file to the EVM board and then run it,  the test demo run out of my expectation.

ERROR description:

when I running the demo, it just stay stopped and the console output 

[C66xx_1] *******************************************
[C66xx_1] Read Configuration Set 1
[C66xx_1] *******************************************
[C66xx_1] Running in Output Dump Mode

I wait for a long time, but it doesn't change.
Then, I debug it step by step, and find that when it runs to line 687 in TestAppDecoder.c (code  in line687 is BytesRead = fread (inputData, 1, BufferSize, finFile); ), it seems crashed: the core doesn't stop and it maybe still running, but the program stays in the line.

ENV:

Windows 7, CCSv5.0.3, C66x_jpegdec_03_01_00_01_ELF, EVM6678L and all other components are the same as the user guide points out.

I guess it may be the version of my CCS, but I am not sure of that, could anyone give me some advises?

Thanks.

  • Hi Shiqiang,

    I observed that I had to wait a long time too at the same stage, but I did however see more output on the console after several minutes. You might want to leave it running for 10-15 and see if it eventually completes. 

    I'll let someone on the Codecs team comment on whether this time lag is expected or if it might be an issue.

  • Hi Gurnani,

    I'll try it again later, and then give a feedback. Thanks.

  • Hi Gurnani,

    I tried it again and it surely cost long time to run the demo: about 70-80mins. And I debug it step by step to find that reading img from local host and writing result back to disk cost most of the time. I think it may be the usage of JTAG simulator.

    Now, I want to know the how long the jpeg decoder algorithm costs, i checked that RTA can satisfies the request. But in my CCS5, Tools->RTA is gray and cannot be selected. I want to know if I could add some system calls in the test program and count how long the kernel algorithm cost.

    Regards,
    Shiqiang 

  • Hi Shiqiang,

    To estimate the cycles used by the JPEG decoder, the following code can be added in App\Client\Test\Src\TestAppDecoder.c:

    First, declare TSCL:

    extern cregister volatile unsigned int TSCL;

    Then,  record TSCL before and after the JPEG decoder process call in DecodeTask():

    ....

    XDAS_UInt32  TSCL_Begin, TSCL_End;

    ...

    TSCL_Begin = TSCL;

    	/* Basic Algorithm process() call                                      */
    retVal = IIMGDEC1Fxns->process((IIMGDEC1_Handle)handle,
    (XDM1_BufDesc *)&inputBufDesc,
    (XDM1_BufDesc *)&outputBufDesc,
    (IIMGDEC1_InArgs *)&inArgs,
    (IIMGDEC1_OutArgs *)&outArgs);

    TSCL_End   = TSCL;

    The delta of (TSCL_End - TSCL_Begin) is then the cycles taken by the process call.

    As for the long wait time taken by fread() and fwrite(), it has been addressed by codec integration and test application which is part of our recent MCSDK Video release for C6678  (http://www.ti.com/tool/demovideo-multicore). This application provides TFTP support over Ethernet for data I/O instead of slow freads and fwrites over JTAG. It is developed to facilitate testing of standalone codecs, and can be easily extended to include JPEG decoder. Please find more details from the following wiki pages:

    MCSDK Video Getting started guide: http://processors.wiki.ti.com/index.php/MCSDK_VIDEO_2.0_Getting_Started_Guide

    MCSDK Video Codec integration and test application user guide: http://processors.wiki.ti.com/index.php/MCSDK_VIDEO_2.0_CODEC_TEST_FW_User_Guide

    Please let us know if this interests you and if any help is needed.

    Thanks,

    Hongmei

  • hi, Hongmei,
    I have solved this problem with the module "xdc.runtime.Timestamp".
    first, add a declaration in .cfg:
    var Timestamp = xdc.useModule("xdc.runtime.Timestamp");
    Timestamp.SupportProxy = xdc.useModule("xdc.runtime.TimestampStd");
    Then, in .c file which want to count the cycle, add this:
    #include <xdc/runtime/Timestamp.h>
    #include <xdc/runtime/Types.h>
    so, I can count the cycle in program:
    Types_Timestamp64 time1, time2, delta;
    Timestamp_get64(&time1);
    ......
    Timestamp_get64(&time2);
    delta.hi = time2.hi - time1.hi;
    delta.lo = time2.lo - time1.lo;
    i find the solution at :http://rtsc.eclipse.org/docs-tip/Using_xdc.runtime_Timestamps
    I think the mechanism of this is the same of which you provided, but I am not sure of that. Isn't it?
    And, i will learn more details on the TFTP demo.
    Anyway, thank very much.
    Regards, 
    Shiqiang 
     
  • Hi Shiqiang,

    Thanks for providing the details of using "xdc.runtime.Timestamp". Yes, both mechanisms are the same.

    Please let us know if you need help when using the codec integration and test application from MCSDK Video.

    Regards,

    Hongmei

  • Hi, Hongmei,

    I have some some questions on test application with its parameters.

    I' ll commit a new post later on. Thanks.

    Regars,
    Shiqiang. 

  • Hi, My name is Ryan.

    I have a question about get/set local time.

    How can I get the local time as a second and nanosecond.

    Which api do I have to use for that? event I tried to use Timestamp_get64 this api.

    But, It doesn't work.

    So, here is what i want to do.

    first, I want to get the local time as a second and nanosecond.

    Second, I have time information get from IEEE1588 PHY, it is two parts one of that is second and the other one is nanosecond. I want to update this time to local time. so How can i set this time to local time.

    Anyguys know any api for this?

    Especially I use c6671 dsp.

    Please help me.

    Thanks, a lot.ve

  • Hi Ryan, no really clear to me your question about get/set local time. However, from Hongmei's post (feb 27 2012) you can get the information on how to use TCSL and TSCH registers. Using these register could help you to translate  # of CPU cycles (knowing your CPU clock) into ns.

    Hope this helps,

    Thank you,

    Paula