AN2094 Freescale Semiconductor / Motorola, AN2094 Datasheet - Page 49

no-image

AN2094

Manufacturer Part Number
AN2094
Description
ITU-T G.729 Implementation on StarCore SC140
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Freescale Semiconductor
# run the module tester to extract build number and date
# g729coder.ini has to be renamed temporary to not perform the test
system("mv g729coder.ini g729coder.tmp");
system("runsc100 $exec_file > tmp.txt");
open (tmpfile,"tmp.txt") || die "Cannot create temporary files!!!";
while (<tmpfile>)
{
}
close(tmpfile);
system("rm -f tmp.txt");
system("mv g729coder.tmp g729coder.ini");
# run the simulation if parameter value is "exec"
if ( $ARGV[0] eq "exec" ) {
}
# open the log file of the module
$log_file_name=$module."_stack.log";
open ( fin, $log_file_name ) || die "Can’t open log file : $!\n";
$stack_top=0;
$stack_base=0xffffffff;
$begin_flag=1;
# Parse the log file.
# - First, keep the first value of the stack pointer in the $stack_base.
# - Find the maximum of the other values => $stack_top.
# The stack pointer for the C code is esp.
# Typical display line for esp:
#
while (<fin>) {
}
# output stack dimension
$encoder_stack = $stack_top - $stack_base;
print "Encoder stack size = ".$encoder_stack." bytes.\n";
# analyzed module is decoder
$module = "decoder";
# run the simulation if parameter value is "exec"
if ( $ARGV[0] eq "exec" ) {
}
# open the log file of the module
$log_file_name=$module."_stack.log";
open ( fin, $log_file_name ) || die "Can’t open log file : $!\n";
$stack_top=0;
$stack_base=0xffffffff;
$begin_flag=1;
# Parse the log file.
# - First, keep the first value of the stack pointer in the $stack_base.
# - Find the maximum of the other values => $stack_top.
# The stack pointer for the C code is esp.
# Typical display line for esp:
#
while (<fin>) {
system("simsc100 ".$module."_measure_stack.sc");
if (/.*esp.*\{(.*)\}/ ) {
}
system("simsc100 ".$module."_measure_stack.sc");
if (/.*esp.*\{(.*)\}/ ) {
if(/.*build *(\d{4}).*/)
{
}
if(/.*time: *(.*)/)
{
}
if ($begin_flag == 0) {
} else {
}
if ( $1 > $stack_top ) {
}
$stack_base = $1;
$begin_flag = 0;
print "Build number : $1\n";
print "$1\n\n";
$stack_top = $1;
ITU-T G.729 Implementation on the StarCore™ SC140/SC1400 Cores, Rev. 1
esp={00000164264}
esp={00000164264}
References
49

Related parts for AN2094