×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    3

    problem with enabling cache

    hi

    I am working on Symbian 2nd edition 6681 mobile phone. I have written a video decoder and player and I am trying to port it on to Symbian mobile phone.
    I have achieved around 12 fps. To further increase the speed I am trying to enable the I cache and D cache.

    I am doing this using the following MCR instructions.

    MRC p15, 0, r0, c1, c0, 0 ; read CP15 register 1 into r0
    ORR r0, r0, #(0x1 <<12) ; enable I Cache
    ORR r0, r0, #(0x1 <<2) ; enable D Cache

    MCR p15, 0, r0, c1, c0, 0 ; write CP15 register 1
    MOV pc, lr

    I can compile this properly using ARMCC compiler and obtain a sis file out of this. This sis file also installs properly. However when I open the application so installed, it just exits as in the application doesn't open. If I comment the above instructions, the player open and work properly. What am I doing wrong?

    Let me know if anyone has any pointers in this direction

    Thanks in advance
    Regards
    Ankit

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: problem with enabling cache

    Hi,

    I think that for executing such instructions you need to be in priviledge mode, so you cannot execute them in the user code.

    Anyway are u sure that those cahses are disabled?

    Br
    STeN

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    3

    Re: problem with enabling cache

    Sten

    Thanks for the reply!

    Do you know how to enable the privilege mode for the mobile device?

    I don't know for sure the caches are disabled. I tried out all the optimizations according to the documents given on ARM site and compiled my code with Realview compiler from ARM. I did get a lot of optimization from this. But beyond this I am simply stuck. The only option I have is to do hand optimization about which I remain skeptical. So I was exploring processor specific options.

    I know companies who have obtained as much as 60 fps for QCIF resolution on Nokia 6681. So there has to be something beyond just C optimization and compiling with RVCT that I am missing out.

    Regards
    Ankit

  4. #4
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: problem with enabling cache

    Hi,

    I suspect you can only run priviledged instructions in kernel code. I would be extremely surprised if these caches were not already enabled on all phones. Performance would be awful for everything otherwise.

    How many fps you can get from your codec will very much depend on its complexity. You can't compare results from other codecs unless you know they have a very similar complexity.

    It is also very possible that you could make massive improvements by restructuring something or optimising some critical part of your C code.

    Also, I think the fastest codecs have hand crafted assembly parts to take advantage of the extended instructions on the ARM9E processors (single instruction multiple data stuff).

    Good luck.

    Sorcery

Similar Threads

  1. About 6230 Bt Problem
    By eerkek in forum Bluetooth Technology
    Replies: 17
    Last Post: 2005-02-08, 12:33
  2. CodeWarrior EPOCROOT problem
    By splinecl in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2004-10-01, 09:47
  3. 7210 Silent Problem
    By MarkMckim in forum Mobile Java General
    Replies: 1
    Last Post: 2003-03-18, 12:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •