Hi Sameh,
If you could bisect the repository (see hg help bisect)
and figure out what changeset causes the issues (it should take ~10
tries) that would help in debugging the problem.
Thanks,
Ali
On
01.09.2012 19:12, Sameh Galal wrote:
> Hi everyone,
> I have used m5
couple of years back and managed to successfully get CFP2000 to work on
powerpc SE target. When I tried to run the same benchmark on the latest
version of gem5 all the floating point numbers were mysteriously zero.
So I have written a small debugging program to demonstrate the issue. It
asks the user for a real number and prints the square of that number. I
cross compiled the program into powerpc executable and tried it on my 2
years old m5 files and the newest gem5. The program works correctly on
the old m5 but displays the message "square of 0.0 is 0.0" for nonzero
input. I am attaching the 2 runs to the email and a zip file with the c
file and powerpc executable. Any help will be greatly appreciated.
>
thanks,
> Sameh
> THE CODE:
>
> #include
>
> int main(void)
> {
>
double d, d_square;
> int i, i_square;
> printf("Please input an
integer to square: ");
> scanf("%d", &i);
> i_square = i*i;
>
printf("square of %d is %dn", i, i_square);
> printf("Please input a
real number to square: ");
> scanf("%lf", &d);
> d_square = d*d;
>
printf("square of %lf is %lfn", d, d_square);
> return 0;
> }
>
COMPILING COMMAND:
>
>
~/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc-750-linux-gnu/bin/powerpc-750-linux-gnu-gcc
-static ./squarethis.c -o squarethis_ppc
> FOR THE OLD M5 HERE IS THE
LOG OF THE INPUT AND OUTPUTS:
>
> sameh06@drink-0:~/m5$
./build/POWER_SE/m5.opt ./configs/example/se.py -c
~/squarethis/squarethis_ppc
> M5 Simulator System
> Copyright (c)
2001-2008
> The Regents of The University of Michigan
> All Rights
Reserved
> M5 compiled Sep 1 2012 14:28:54
> M5 started Sep 1 2012
17:02:23
> M5 executing on drink-0
> command line:
./build/POWER_SE/m5.opt ./configs/example/se.py -c
~/squarethis/squarethis_ppc
> Global frequency set at 1000000000000
ticks per second
> 0: system.remote_gdb.listener: listening for remote
gdb #0 on port 7000
> **** REAL SIMULATION ****
> info: Entering event
queue @ 0. Starting simulation...
> warn: allowing mmap of file @ fd
45172600. This will break if not /dev/zero.
> For more information see:
http://www.m5sim.org/warn/3a2134f6 [1]
> warn: allowing mmap of file @
fd 45172600. This will break if not /dev/zero.
> For more information
see: http://www.m5sim.org/warn/3a2134f6 [2]
> Please input an integer
to square: 4
> square of 4 is 16
> Please input a real number to
square: 5.3
> square of 5.300000 is 28.090000
> hack: be nice to
actually delete the event here
> Exiting @ tick 10438500 because target
called exit()
> FOR THE GEM5 THE OUTPUT IS WRONG :
>
>
sameh06@drink-0:/~/gem5-stable$ ./build/POWER/gem5.opt
./configs/example/se.py -c ~/squarethis/squarethis_ppc
> gem5 Simulator
System. http://gem5.org [3]
> gem5 is copyrighted software; use the
--copyright option for details.
> gem5 compiled Sep 1 2012 16:48:31
>
gem5 started Sep 1 2012 17:00:35
> gem5 executing on drink-0
> command
line: ./build/POWER/gem5.opt ./configs/example/se.py -c
../FP-Genesis/FP-Gen/FP-Gen_ppc_study/squarethis/squarethis_ppc
>
Global frequency set at 1000000000000 ticks per second
> warn:
CoherentBus system.membus has no snooping ports attached!
> 0:
system.remote_gdb.listener: listening for remote gdb #0 on port 7000
>
**** REAL SIMULATION ****
> info: Entering event queue @ 0. Starting
simulation...
> Please input an integer to square: 4
> square of 4 is
16
> Please input a real number to square: 5.0
> square of 0.000000 is
0.000000
> hack: be nice to actually delete the event here
> Exiting @
tick 9296500 because target called exit()
Links:
------
[1]
http://www.m5sim.org/warn/3a2134f6
[2]
http://www.m5sim.org/warn/3a2134f6
[3] http://gem5.org
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users