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.

cycle optimization on tms320dm355 dvevm

Hi all.

There is any so called "performance library" somewhere that i can use to optimize my code?

I wish to build up a code for "image evalueation", that divide the image in blocks and on every block compute the "correlogram", but that's not important. The important thing is that i perform a lot of "for cicles" and i need them to be optimized to obtain the best results in framerate terms.

1)So i definitly need information about DDR usage, memory resources needed, cpu usage, clock cicles, neck bottles and all that typical dsp stuff. Where can i fInd the instructions to get them?

 

2)Plus i want to ask you what software do you use to write and debug the c-code that you wants to run on the board. I use eclipse, but i don't know how to display on my monitor what the card will display on the tv is that possibile?

Thanks.

P.S.

3)I'm also quite interested in viewing an x11 application run on my dvevm, where can i find all steps decribed to do it?

  • Andrea Lancia said:

    1)So i definitly need information about DDR usage, memory resources needed, cpu usage, clock cicles, neck bottles and all that typical dsp stuff. Where can i fInd the instructions to get them?

    2)Plus i want to ask you what software do you use to write and debug the c-code that you wants to run on the board. I use eclipse, but i don't know how to display on my monitor what the card will display on the tv is that possibile?

    3)I'm also quite interested in viewing an x11 application run on my dvevm, where can i find all steps decribed to do it?

    1) First, I should point out that DM355 has no DSP; it has am ARM processor and an MJCP (MPEG JPEG co-processor).  Therefore you will need to implement your design using ARM source code; the optimization of the algorithm will depend on your software design and the compiler optimization flags you enable and may vary with your choice of operating system (e.g. Linux, winCE, integrity...).  The bottle-necks, cpu usage, memory resources... will also be heavily dependant on your software design.

    2) With regards to software development tools, again this will depend on your choice of OS; if you choose Linux, the DVSDK software comes with gdb; this means that you can connect from your host using a variety of free open source tools (gdb, ddd, ...).  If you need a more professional IDE tool, than you can buy a comercial IDE such as MontaVista's DevRocket or GHS's MULTI IDE.  With regards to how to display on tv, what are you displaying?  The DM355 EVM comes with analog video input and output connectors, therefore, if you are displaying video (like in our encode, decode, and encodedecode demos included with DVSDK) you should be able to connect video output connector to TV and see video.  You should even be able to see x-windows applications.

    3) To run x11 application, you need to bring up x-windows enviroment (type startx at target command prompt).  See the following forum thread for more detail: http://e2e.ti.com/forums/p/4852/18002.aspx#18002

     

     

  • First of all, thanks for your quick answer.

    I'm running linux fedora 10 on my pc and montavista linux pro v4.0.1 (i know there is a newer version but i don't care) on the board all as indicated on the getting started guide.

    I'm programming with Eclipse c/c++ tool. Debug the code in it, then compile the with the arm_v5t_le-gcc as described in the gsg section 4.4.1. I tried to compile with the arm compiler directly with Eclipse but i failed so i use the command line.

    If it's possible i would not fight also with the arm source code, and limite myself, for now, to readapt in various way the demos provided, but anyway

    - Where can i find some documents about the arm source code?

    Unfortunatly, as can you imagine, i can't run the demos with my pc. So

    - There is a way to run the "encode-decode" demo on my pc (with Fedora as OS) without connecting to the board and seeing the video?

    I have a look at devRocket and yes, that's could be what i need, but i'm working for a university and i can't spend money.

    And of course, because you mentioned it

    - How can i connect the board with gdb or ddd(for example)?

    Thanks a lot. I'm new to the board and to davinci in general. the documentation i find in the box aren't exaustive so i'm really lost. If you can give me some reference to start programming and optimizing the code on the board i'll be gratefull.

  • Please note that much of the software provided via DVSDK is dependant on our EVM board.  For example, the demos you are referring to call on the underlying Linux drivers, some which include features specific to our hardware (e.g. resizer); it also calls on MJCP hardware to do encoding and decoding; these are hardware fetures on the EVM that are not available on your PC, hence if you want to run the demos in your PC, it means rewritting much of the source code.

    The following app note shows you how to connect to one of our EVMs using ddd (DM355 EVM should be similar).

    What is your end goal?  What type of application are you trying to develop for our board?

  • Juan Gonzales said:

    The following app note shows you how to connect to one of our EVMs using ddd (DM355 EVM should be similar).

    Sorry, where is it?

    Juan Gonzales said:

    What is your end goal?  What type of application are you trying to develop for our board?

    I'm in a project that concern all about video quality evaluation. We must determine which parameters determs the quality of a video and an image.

    For now we supposed the "correlogram" (of the luminance data) of blocks of the frames to be a good estimator of the "importance" of each block in a frame. So i must take the frame's luminance data, split it in blocks, compute the correlogram on each block, blur the frame's blocks with the highest correlogram values and display the frame, verifiy if the quality is perceived significantly diminished. All, possibly, on the fly.

    I should do it from a saved video (mostly) or from the input of the camera.

    Why don't do it simply on a pc? Let me say that i don't know, but They told me to use this powerfull evm and that's what i'm trying to do.

  • Sorry, here is the link to the App Note: http://focus.ti.com/dsp/docs/dspsupporttechdocsc.tsp?sectionId=3&tabId=409&familyId=1302&abstractName=spraap9

    Typically, development (writing and building code) is done on the PC because PC processors are much faster than the ARM processors found in embedded parts.  So yes you can do much of the development on the PC; however, if your end goal is to have this application running on a stand-alone device based on DM355, you will eventually have to test and debug the application.  The testing and debug phase is normally done by a combination of PC + DM355 EVM setup (code trasnferred via TFTP and NFS and debugeed via gdb and kgdb).

  • Thanks for all. I think that connecting ddd to my board will be helpfull.

    I have another question about "Alignment trap " what do it mean and how i resolve it?

    This time i dared to use malloc to allocate all the memory that i need to elaborate a single frame that i have in memory (so i don't use camera or tv). Maybe that i'm running out of memory?

    Do you think that i must open a new post?

    Thanks in advance.

     

  • The followig article has a good summary on how to detect and fix alignment traps: http://lecs.cs.ucla.edu/wiki/index.php/XScale_alignment#Identifying_alignment_problems

     

  • I'm sorry but have another question relate to ddd:

    -There is some options that i must add to the compiler:

    arm_v5t_le-gcc

    to make a program work with ddd?

    Because with ddd i can run all the examples and demo program provided in the cds, but i can't run programs of my own (also programs that work fine on the board) for this error:

    DDD: No Source

    /var/tmp/BUILD/glibc-2.3.3/objdir/csu/crti.S

    Unfortunately don't have that file in any folder on my host pc.

    I don't know why the programs and demos work and my programs do not.

    My programs work well on the board after compiled with arm, and if compiled with the linux gcc they work and i also can open them with ddd.

    - Can you please help me? (i tried to find something around the network without success).

    Thanks a lot.

  • I believe you need to include the [ -g  -D__Debug] compiler options to have the symbol information included in your build.

    Not sure why it would be looking for '/var/tmp/BUILD/glibc-2.3.3/objdir/csu/crti.S'; are you certain you are using arm_v5t_le-gcc compiler?