Page 1 of 1
cached ram
Posted: Fri Jul 10, 2015 10:05 pm
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
Re: cached ram
Posted: Mon Jul 13, 2015 8:42 am
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?
Re: cached ram
Posted: Mon Jul 13, 2015 9:13 am
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
Re: cached ram
Posted: Mon Jul 13, 2015 11:24 pm
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.
Re: cached ram
Posted: Tue Jul 14, 2015 9:18 am
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.