AN2094 Freescale Semiconductor / Motorola, AN2094 Datasheet - Page 46

no-image

AN2094

Manufacturer Part Number
AN2094
Description
ITU-T G.729 Implementation on StarCore SC140
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
References
46
}
# check and open the worst-case simulation log
$log_file_name=$module."_worst_case.log";
open ( fin, $log_file_name ) || die "Can’t open log file : $!\n";
# the comparison Perl module is needed to check if the test was passed
use File::Compare;
$frames[0]=0;
$name[0]="";
$count=1;
# create test name array from ini file
while ( <inifile> )
{
}
close(inifile);
$max_cycles = 0;
$max_cycles_test = 0;
$count = 0;
$sum = 0;
$sum_test = 0;
$test_count = 1;
# print the head of the table
print "-" x 74; print "\n";
print "| Test
print "-" x 74;
print "\n";
# change the current working directory to test_cases root directory
chdir "../../../../test_cases/";
=head2
Example lines from the worst-case log:
Break #1 _g729_encode s ;dev:0 pc:134b6 cyc:87723
p:$000134b6 94c0 9e20 9f20 = push r6 & push r7
Break #2 _frame_end s ;dev:0 pc:17ca0 cyc:172248
p:$00017ca0 9f71 = rts
Break #1 _g729_encode s ;dev:0 pc:134b6 cyc:175396
p:$000134b6 94c0 9e20 9f20 = push r6 & push r7
Break #2 _frame_end s ;dev:0 pc:17ca0 cyc:275577
p:$00017ca0 9f71 = rts
=cut
# Start analyzing the worst-case log.
# Extract the number of cycles before and after processing a frame.
while ( <fin> )
{
# the start of frame processing breakpoint
if (/Break #1/)
# the end of frame processing breakpoint
if (/Break #2/)
if(/(\w+)\ +(\d+)/)
{
}
$name[$count] = $1;
$frames[$count] = $frames[$count-1]+$2;
$count++;
system("simsc100 $cmd_file");
{
}
{
$start_cyc = $_;
$start_cyc =~ s/.*cyc:(\d+)/$1/;
$end_cyc = $_;
$end_cyc =~ s/.*cyc:(\d+)/$1/;
# compute the number of cycles needed to process a frame
$cycles = $end_cyc - $start_cyc;
# compute the sums needed for averages (global and test average)
$sum += $cycles;
$sum_test += $cycles;
$count++;
ITU-T G.729 Implementation on the StarCore™ SC140/SC1400 Cores, Rev. 1
|
average |
# one more frame processed
worst-case |
frames |
sim. test |\n";
Freescale Semiconductor

Related parts for AN2094