cached ram

Discussion to talk about software related topics only.
Post Reply
qwerty
Posts: 12
Joined: Mon Jun 15, 2015 2:23 am

cached ram

Post by qwerty »

is there any APIs in μC/OS-II related to cached ram or cache?
I need to increase the seed of my program using cache , I am using MOD5541x with μC/OS-II
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: cached ram

Post by rnixon »

Are you running in release or debug mode? In release mode the cache is enabled, and things like network buffers and task stacks are put in fast onchip sram if possible.

Exactly what do you need to speed up? How much space, etc?
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: cached ram

Post by dciliske »

Take a look at moving your critical variables or stack into SRAM using the FAST_USER_VAR and FAST_USER_STK macros. This can often give a 4-6x speed improvement.

-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
qwerty
Posts: 12
Joined: Mon Jun 15, 2015 2:23 am

Re: cached ram

Post by qwerty »

do u mean that by enabling FAST_USER_VAR and FAST_USER_STK preprocessors, can we move all our variables and stack to SRAM and there by increase the speed.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: cached ram

Post by rnixon »

querty, if you don't supply the important details like:
- How much space do you need
- What do you need to speed up

then the help you get will be very limited. For example, how could anyone answer your question: " can we move all our variables and stack to SRAM and there by increase the speed" if you don't tell them how much space you need? SRAM is limited, so without knowing the space you need, your question cannot be answered. Same goes for speed. Increasing speed for network throughput? Faster ISR? Faster OS Task switching? Limited SRAM, so choices must be made depending on the requirement.
Post Reply