Exercise 1, Part 2: Analyzing Performance and Memory
Hierarchy Impact
Rerunning the program shows a dramatic improvement in the program's
performance, reflected by the output of the
tistical Profiling window's results are largely unchanged. Note that since
this is a statistical view, minor differences between the program runs are
expected.
Another way to tune the performance of a Blackfin processor is to place
key algorithms into internal memory. In this program,
the "key algorithm" in that it consumes the majority of the Blackfin's pro-
cessing power. You can demonstrate the effect of placing the key
algorithm in internal memory by first "undoing" the cache set-up and
then placing the
1. In the Project–>Project Options, navigate to the Startup Code
Settings–>Cache and Memory Protection page and change
Instruction cache memory to Disable cache and disable memory
protection.
2. In the
sorts.c
the section qualifier to place this function (and this function only)
into internal L1 memory:
section("L1_code") void bubble_sort(int *v,
3. Build and run your program to completion. Now observe that the
overall performance is better than the first, non-cached run, but
not as good as the cached run because a significant portion of the
program still runs from external memory without the benefit of a
cache.
The statistical profile shows an interesting effect of the change: the
bubble_sort()
cessor time—
quick_sort()
the application
1-16
www.BDTIC.com/ADI
function into L1 internal memory:
bubble_sort()
file, go to the declaration of
function no longer uses the largest percentage of the pro-
is now the most time-consuming portion of
(Figure
1-9).
Getting Started with ADSP-BF537 EZ-KIT Lite
statement. The Sta-
printf()
bubble_sort()
bubble_sort()
unsigned int length)
is
and add
Need help?
Do you have a question about the ADSP-BF537 EZ-KIT Lite and is the answer not in the manual?