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.

How to modify mcsdk_video demo for running it on another 4XC6678 platform?

Hi,

      I have another evm here which consist of 4 C6678. There are 2 main differences between it with the C6678 EVM:

1. The EVM uses EMAC0 to connect BCM54616 Ethernet PHY. So perhaps, I need do initialize of SGMII port 0 and

change setting of port0 and port1.

2. The reference clocks of DDR and SGMII is difference.

I have the evm's patch of pdk_C6678_1_0_0_15. But I find that demo (transcoder and DSP)  has it's own hardware

initialization function instead of calling pdk package. So I wonder how to do modification of transcoder demo and the

DSP demo to make it work on my evm here.

The patch to pdk_C6678_1_0_0_15 is attched here. Please help me check

how to do modification to make mcsdk-video demo work on my evm.

Thank you!

7633.patch.rar

 

Sunzhao

  • They might be using the platform_lib in the MCSDK. Can you try that. This is platform specific code and you can modify the plafor lib and still preserve the API callas.

    Thanks,

    Arun.

  • Hi ArunMani,

        Thank you for the reply. But will you please describe it specifically? I add the platform_init function(from pdk)

    to the platformInit function of SIU to fo Platform specific initializations. the platform_init function will do DDR3_init

    and SGMII_init for my evm. But when I run the transcode demo in my platform, I got the message below. It seems

    that I can not add connection between my test board with the tftp server. So can you give me some suggestion

    on this issue? Thank you very much!

    [C66xx_0] Start reading...[C66xx_0] platform: port 0 is link up!
    [C66xx_0] 貐Core 0: Adding MAC entry
    [C66xx_0] Core 0: Adding IP entry - SRC=[192, 168, 100, 100]
    [C66xx_0] Core 0: Adding UDP entry
    [C66xx_0] Adding UDP port: 2048
    [C66xx_0] ERROR: nwal_addConn returned Error Code -3
    [C66xx_0] Core 0: Error adding UDP entry: 0x800
    [C66xx_0] Core 0: Adding MAC entry
    [C66xx_0] Core 0: Adding IP entry - SRC=[10, 218, 109, 120]
    [C66xx_0] Core 0: Adding UDP entry
    [C66xx_0] Adding UDP port: 32768
    [C66xx_0] ERROR: nwal_addConn returned Error Code -3
    [C66xx_0] Core 0: Error adding UDP entry: 0x8000
    [C66xx_0] Using Existing MAC handle for Core: 0
    [C66xx_0] Using Existing IP handle for Core: 0
    [C66xx_0] Core 0: Adding UDP entry
    [C66xx_0] ERROR: nwal_addConn returned Error Code -3
    [C66xx_0] Core 0: Error adding UDP entry: 0x8002
    [C66xx_0] server mac add is 00-22-19-59-31-29
    [C66xx_0]  server ip add is 192.168.1.115
    [C66xx_0]  local mac add is 08-24-BA-79-CC-9E
    [C66xx_0]  local ip add is 192.168.1.117
    [C66xx_0] Core 0: Adding MAC entry
    [C66xx_0] Core 0: Adding IP entry - SRC=[192, 168, 1, 117]
    [C66xx_0] Core 0: Adding UDP entry
    [C66xx_0] Adding UDP port: 32768
    [C66xx_0] ERROR: nwal_addConn returned Error Code -3
    [C66xx_0] Core 0: Error adding UDP entry: 0x8000
    [C66xx_0]
    [C66xx_0] Starting TFTP Get for viperkillercuts_720p_53fr.264... Error receive from server!
    [C66xx_0]
    [C66xx_0] Creating Decoder Algorithm Instance...Num. buffs requested = 23
    [C66xx_0] algAlloc req. Buffer 0: space = 17, size = 4840
    [C66xx_0] algAlloc req. Buffer 1: space = 0, size = 8840
    [C66xx_0] algAlloc req. Buffer 2: space = 0, size = 78184
    [C66xx_0] algAlloc req. Buffer 3: space = 0, size = 8992
    [C66xx_0] algAlloc req. Buffer 4: space = 17, size = 8664
    [C66xx_0] algAlloc req. Buffer 5: space = 17, size = 176
    [C66xx_0] algAlloc req. Buffer 6: space = 17, size = 144
    [C66xx_0] algAlloc req. Buffer 7: space = 17, size = 4420
    [C66xx_0] algAlloc req. Buffer 8: space = 17, size = 24
    [C66xx_0] algAlloc req. Buffer 9: space = 17, size = 1860480
    [C66xx_0] algAlloc req. Buffer 10: space = 17, size = 15079680
    [C66xx_0] algAlloc req. Buffer 11: space = 17, size = 1966080
    [C66xx_0] algAlloc req. Buffer 12: space = 17, size = 136
    [C66xx_0] algAlloc req. Buffer 13: space = 17, size = 144
    [C66xx_0] algAlloc req. Buffer 14: space = 17, size = 8840
    [C66xx_0] algAlloc req. Buffer 15: space = 17, size = 544
    [C66xx_0] algAlloc req. Buffer 16: space = 17, size = 540
    [C66xx_0] algAlloc req. Buffer 17: space = 17, size = 264
    [C66xx_0] algAlloc req. Buffer 18: space = 17, size = 12672
    [C66xx_0] algAlloc req. Buffer 19: space = 17, size = 74880
    [C66xx_0] algAlloc req. Buffer 20: space = 17, size = 110592
    [C66xx_0] algAlloc req. Buffer 21: space = 17, size = 8160
    [C66xx_0] algAlloc req. Buffer 22: space = 17, size = 116
    [C66xx_0]
    [C66xx_0] Algorithm Instance Creation Done...
    [C66xx_0] Num. buffs requested = 13
    [C66xx_0] algAlloc req. Buffer 0: space = 17, size = 1664
    [C66xx_0] algAlloc req. Buffer 1: space = 0, size = 261376
    [C66xx_0] algAlloc req. Buffer 2: space = 17, size = 327680
    [C66xx_0] algAlloc req. Buffer 3: space = 17, size = 4480
    [C66xx_0] algAlloc req. Buffer 4: space = 17, size = 3968
    [C66xx_0] algAlloc req. Buffer 5: space = 17, size = 6144
    [C66xx_0] algAlloc req. Buffer 6: space = 17, size = 3712
    [C66xx_0] algAlloc req. Buffer 7: space = 17, size = 65536
    [C66xx_0] algAlloc req. Buffer 8: space = 17, size = 3840
    [C66xx_0] algAlloc req. Buffer 9: space = 17, size = 3247104
    [C66xx_0] algAlloc req. Buffer 10: space = 17, size = 244864
    [C66xx_0] algAlloc req. Buffer 11: space = 17, size = 65920
    [C66xx_0] algAlloc req. Buffer 12: space = 17, size = 14464
    [C66xx_0]
    [C66xx_0] Encoder Algorithm Instance Creation Done...
    [C66xx_0]
    [C66xx_0]  Bitstream Ended... 
    [C66xx_0] TFTP Get stopped.
    [C66xx_0] TFTP Statistics-------------------+
    [C66xx_0] |  RX Bytes          :          0 |
    [C66xx_0] |  TX Bytes          :          0 |
    [C66xx_0] |  Valid Packets     :          0 |
    [C66xx_0] |  Duplicate Packets :          0 |
    [C66xx_0] |  Error Packets     :          0 |
    [C66xx_0] +---------------------------------+
    [C66xx_0]
    [C66xx_0] TFTP Put stopped.
    [C66xx_0] TFTP Statistics-------------------+
    [C66xx_0] |  RX Bytes          :          0 |
    [C66xx_0] |  TX Bytes          :          0 |
    [C66xx_0] |  Valid Packets     :          0 |
    [C66xx_0] |  Duplicate Packets :          0 |
    [C66xx_0] |  Error Packets     :          0 |
    [C66xx_0] +---------------------------------+
    [C66xx_0]
    [C66xx_0]  --------------  SUMMARY --------------------
    [C66xx_0]   Total number of Frames              = 1
    [C66xx_0]   Decoder Bit Rate at 30 frames/Sec           = 0 Kbps
    [C66xx_0]   Encoder Bit Rate at 30 frames/Sec           = 0 Kbps
    [C66xx_0]  --------------    END   --------------------
    [C66xx_0]
    [C66xx_0]  End of execution
    [C66xx_0] End of Program

     

     

    Sunzhao

  • Hi Sunzhao,

    Can you please provide some details about your EVM? Is it a Quad-Shannon board from Advantech?

    Thanks,

    Hongmei

  • Hi Hongmei,

        Yes, It is DSPC-8681 PCIe card from advantech here. The web site of this card is below:

    http://www.advantech.com/products/DSPC-8681/mod_A9314996-0022-4927-9AA4-6B1060D4E5E8.aspx 

    We need to run transcoder video demo and the multi-channel dsp video demo on it now. But the tftp

    server can not be connected. Can you give me some suggestion about doing that?

    Thank you!

    Sunzhao

  • Hello Sunzhao,

    I am Sam and let me try to  help you with this.

    To make the transcoder demo work with the quad shannon card, you need to initialise:  GMII, GMAC & Serdes on the Ethernet subsystem (Which is already done by the ROM boot loader if you are using Ethernet boot on the C6678EVM).

    1055.dsp_init_binaries.zip

    I am attaching a init.out & init.hex , which incorporates the required initialization for Ethernet.

    If you load and run this init.out  ( init.out if you are loading through CCS or use init.hex  you using Advantech loader ) on core 0 of each DSP ,  before you load the transcoder demo code it should work for you.

    With this you don't need to add any code into the demo application.

    1602.dsp_init.zip

    I am also attaching here a sample project, where the Ethernet subsystem initialization is incorporated into the init.hex. ( Modified from Advantech sample code). It assumes the platform library in pdk_C6678_1_0_0_15 is patched with the Advantech platform patch.  This can be used as reference if you want to incorporate the initialisation code into your application code.  You may need to update the PDK directories on the file dsp_init\evmc6678l\macros.ini before you import the CCS project.

    Let me know if you have questions.

    with regards,

    Sam



  • Hi Sam,

       Thank you very much for you reply. I did try to the transcoder demo under your
    directions in 2 ways below. But it still didn't work:

    1. 2-stage running:
       1> Load the init.out with the emulator through CCSv5 to the quad shannon card and
    run it.
       2> Pause the program manually because it will run into an endless while loop (wait and
    start).
       3> Load my videoTranscode.out with emulator to the card.(without selecting CPU reset
    or system reset)
       4> Run the program then and I get the output message below:

    [C66xx_0]
    [C66xx_0] Starting TFTP Get for airshow_p1280x720_4Mbps.264... Error receive from server!
    [C66xx_0]
    [C66xx_0] Creating Decoder Algorithm Instance...Num. buffs requested = 23
    [C66xx_0] algAlloc req. Buffer 0: space = 17, size = 4840
    [C66xx_0] algAlloc req. Buffer 1: space = 0, size = 8840
    [C66xx_0] algAlloc req. Buffer 2: space = 0, size = 78184
    [C66xx_0] algAlloc req. Buffer 3: space = 0, size = 8992
    [C66xx_0] algAlloc req. Buffer 4: space = 17, size = 8664
    [C66xx_0] algAlloc req. Buffer 5: space = 17, size = 176
    [C66xx_0] algAlloc req. Buffer 6: space = 17, size = 144
    [C66xx_0] algAlloc req. Buffer 7: space = 17, size = 4420
    [C66xx_0] algAlloc req. Buffer 8: space = 17, size = 24
    [C66xx_0] algAlloc req. Buffer 9: space = 17, size = 1860480
    [C66xx_0] algAlloc req. Buffer 10: space = 17, size = 15079680
    [C66xx_0] algAlloc req. Buffer 11: space = 17, size = 1966080
    ... ...
        
    2. Merge your sample code into main file of the transcoder project, and re-compile it. Then load the
    output binary to the card and run it. The same error message occurs. The attached file is My main file
    after merging. You may search the key word "Merge_code" to see what I have modified to the code.

    4520.main.rar

    Opening the error log switch in dsiunwal, I still got error message below:

    ... ...
     [C66xx_0] Core 0: Adding MAC entry
    [C66xx_0] Core 0: Adding IP entry - SRC=[192, 168, 100, 100]
    [C66xx_0] Core 0: Adding UDP entry
    [C66xx_0] Core 0: Error adding UDP entry: 0x800
    [C66xx_0] Core 0: Adding MAC entry
    [C66xx_0] Core 0: Adding IP entry - SRC=[10, 218, 109, 120]
    [C66xx_0] Core 0: Adding UDP entry
    [C66xx_0] Core 0: Error adding UDP entry: 0x8000
    [C66xx_0] Using Existing MAC handle for Core: 0
    [C66xx_0] Using Existing IP handle for Core: 0
    [C66xx_0] Core 0: Adding UDP entry
    [C66xx_0] Core 0: Error adding UDP entry: 0x8002
    [C66xx_0] Core 0: Adding MAC entry
    [C66xx_0] Core 0: Adding IP entry - SRC=[192, 168, 1, 117]
    [C66xx_0] Core 0: Adding UDP entry
    [C66xx_0] Core 0: Error adding UDP entry: 0x8000
    [C66xx_0]
    [C66xx_0] Starting TFTP Get for airshow_p1280x720_4Mbps.264... Error receive from server!
    [C66xx_0]
    [C66xx_0] Creating Decoder Algorithm Instance...Num. buffs requested = 23

    ... ...

    I can make sure that
    1. My tftp serve is OK, because I can do file downloading from another computer
    with it.
    2. The network is OK, because I can run other web related demos on the card.
    3. The card and my tftp server are both connected to a GiGa bits switch .
    4. The pdk version is 1_0_0_15. And it has already patched with advantech's patch.

    So can you give me some suggestion about this issue or What's wrong with my operation?

    And also will you please to provide the transcoder demo binary file you compiled for me to

    test if something wrong with my test environment?


    Thanks a lot!

    Sunzhao

     

  • Hi Sam,

        Will you please help me check this issue? Thanks a lot!

    Sunzhao

  • Sunzhao,

    Can you run the webserver demo, reset the DSP and run the transcode demo? By reset, I mean just resetting through CCS and not powercycling the board. In your first log, it appears that the PHY is not properly configured and thus not allowing the TFTP packets to go out of the board. If we run the webserver demo that should configure PHY to be in the correct state. Please try this and let us know if it works. Then we will think about the next steps about how to get the PHY configuration into your code.

    Regards,

    Vivek