Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 05 Mar 2014 07:42 AM by  Howe Robert
code speed
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Howe Robert
New Member
New Member
Posts:4


--
28 Feb 2014 07:14 AM
    I have been comparing how fast code is running between the OMAP-L138 EVM and the Mitty DSP -L138F by critical link. It appears that the code on EVM som is running 1/3 the speed of the Mitty DSP-L138F. Both boards are clocking at the same rate 300MHz. Could anyone tell me why this is. 
    jemiaha
    New Member
    New Member
    Posts:10


    --
    03 Mar 2014 12:13 PM

    Hi Robert,

    Can you tell me about how you made this comparison? Specifically please share the part number of the OMAP-L138 EVM SOM you used in the test?  You can use the following link to find the part number:

    http://www.logicpd.com/pa...rial-number-sticker/


    Please also share the details about the test including the command output logs if possible. If you can share enough information to allow us to repeat the Logic portion of the test we can look into your issue.

    Thanks

    .

    Howe Robert
    New Member
    New Member
    Posts:4


    --
    04 Mar 2014 04:29 AM

    Hi Jemiaha,

    Thanks for replying, the part number is 1017855 REV A. The same code (see below) is running on both SOMs using ThreadX. The code is being run via an emulator on both SOMs

    The count value that is being output on the Mitty DSP - L138B by critical link ~= 666000

    The count value that is being output on the OMAP-L138 EVM                         ~= 222000

    #define TIME_SINCE(x)        (tx_time_get() - x)

    void DebugThread(ULONG thread_input)
    {
         DWORD Count = 0;
         ULONG StartTime = tx_time_get();

         ConfigData.DebugLink = true;
         while(1)
         {
              if( DebugCountOn )
              {
                   StartTime = tx_time_get();
                   while( TIME_SINCE(StartTime) < TX_1_SEC )
                   {
                        Count++;
                   }

                   sprintf( (char*)&FaultMessageBuffer[0], "\r\n Count = %ld \r\n", Count );
                   SendTerminalMessage(&FaultMessageBuffer[0]);
                   Count = 0;
              }
              else
              {
                   tx_thread_sleep( 1000);
              }
         }
    }

    Regards,

    Rob

    jemiaha
    New Member
    New Member
    Posts:10


    --
    04 Mar 2014 05:17 PM
    Hi Robert,
    So the SOM you have has 128MB of DDR and 8MB of Flash. I assume that you're running out of the RAM. Does your Mitty DSP-L138F have the same amount of RAM? (I think it has a 256MB option) How are you setting and checking the Clock rate on the Logic SOM? To be honest I can't think of a good reason for why the code should be running slower if you're correctly setting the clock to 300MHz.

    Looking at your code I do have a question: You said this was running via an emulator. What do you mean by that? If you're running ThreadX then this code won't be an accurate judge of the code execution speed unless you can ensure that the threads have run for the same amount of time on both SOMs. The Count variable is only incrementing while the DebugThread is running. You could work around that by enclosing the following code in a critical section where preemption and interrupts are disabled:
    StartTime = tx_time_get();
    while( TIME_SINCE(StartTime) < TX_1_SEC )
    {
    Count++;
    }

    You'll need to be sure your ThreadX build can tolerate a critical section one second long. Shouldn't be a problem if the timer that tx_time_get() is based on is free-running. Can you check to see how that effects the results?

    Thanks,
    Jemiah
    .



    Howe Robert
    New Member
    New Member
    Posts:4


    --
    05 Mar 2014 07:42 AM

    Hi Jemiah,

    The difference in speed looks like it is caused by the Mitty DSP-L138F having a ubl binary file and u-boot binary file in spi flash. When I then restored the EVM spi flash with a ubl binary file and u-boot binary file the code then ran at the same speed. I had been running with just a single application image or via Code Composer Studio V5.3 via an in circuit emulator. I take it that U-boot must be doing some extra initilisation that I will need to do in my single application image. Is this to do with setting up DDR memory.

    Regards,

    Rob

    You are not authorized to post a reply.