gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Simulation error for hello world workload

I
IKRAM
Tue, Jan 24, 2023 6:08 PM

Hi Team,

I have written a c code (hello world program) and compiled using the arm
cross compiler. When I run the simple.py config file with new helloworld
binary updated in simple.py file I am getting simulation failure.

c code is as shown below:

#include <stdio.h>int main(int argc, char argv[]) {  // printf()
displays the string inside quotation  printf("Hello, World!");  return
0;}*

ARM cross compiler used : aarch64-linux-gnu-gcc

Below are the commands I used:

aarch64-linux-gnu-gcc -static -static-libgcc -static-libstdc++ myhello.c
-o myhellobuild/ARM/gem5.opt configs/learning_gem5/part1/simple.py

Below is the error:
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 21.2.0.0
gem5 compiled Jan 24 2023 23:16:23
gem5 started Jan 24 2023 23:21:13
gem5 executing on ubuntu-linux-22-04-desktop, pid 156963
command line: build/ARM/gem5.opt configs/learning_gem5/part1/simple.py

Global frequency set at 1000000000000 ticks per second
warn: failed to generate dot output from m5out/config.dot
build/ARM/mem/mem_interface.cc:791: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (512 Mbytes)
0: system.remote_gdb: listening for remote gdb on port 7000
Beginning simulation!
build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting
simulation...
build/ARM/sim/syscall_emul.cc:74: warn: ignoring syscall
set_robust_list(...)
build/ARM/sim/syscall_desc.hh:209: fatal: Syscall 398 out of range
Memory Usage: 649816 KBytes

If anyone knows how to solve the cross compiler issue, please give a reply.

Thanks

  • Ikram
Hi Team, I have written a c code (hello world program) and compiled using the arm cross compiler. When I run the simple.py config file with new helloworld binary updated in simple.py file I am getting simulation failure. c code is as shown below: *#include <stdio.h>int main(int argc, char* argv[]) { // printf() displays the string inside quotation printf("Hello, World!"); return 0;}* ARM cross compiler used : *aarch64-linux-gnu-gcc* Below are the commands I used: *aarch64-linux-gnu-gcc -static -static-libgcc -static-libstdc++ myhello.c -o myhellobuild/ARM/gem5.opt configs/learning_gem5/part1/simple.py* Below is the error: gem5 Simulator System. http://gem5.org gem5 is copyrighted software; use the --copyright option for details. gem5 version 21.2.0.0 gem5 compiled Jan 24 2023 23:16:23 gem5 started Jan 24 2023 23:21:13 gem5 executing on ubuntu-linux-22-04-desktop, pid 156963 command line: build/ARM/gem5.opt configs/learning_gem5/part1/simple.py Global frequency set at 1000000000000 ticks per second warn: failed to generate dot output from m5out/config.dot build/ARM/mem/mem_interface.cc:791: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes) 0: system.remote_gdb: listening for remote gdb on port 7000 Beginning simulation! build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0. Starting simulation... build/ARM/sim/syscall_emul.cc:74: warn: ignoring syscall set_robust_list(...) build/ARM/sim/syscall_desc.hh:209: fatal: Syscall 398 out of range Memory Usage: 649816 KBytes If anyone knows how to solve the cross compiler issue, please give a reply. Thanks - Ikram
RI
RTL Insn
Tue, Jan 24, 2023 6:39 PM

Hi,
First of all, you do not need to edit the script file to run a workload!!!
You can run the  workload (you hello world program) just by passing it as
an argument in your command line. It is not a good idea to modify simple.py
just to run your program. Assume you have multiple programs you need to
test them in Gem5. Is it correct to modify the simple.py every time you
need to run the simulation? Absolutely no.
The simple.py has multiple arguments you can pass them in your command
line, one of them the target binary program, i.e., hello world program.
The following command line will start gem5 (x86 arch) with default
configuration to run a hello program that is located on a particular path.
./build/X86/gem5.opt configs/example/se.py  -c ~/Desktop/hello

This cross-compiler "

*aarch64-linux-gnu-gcc" generates a 64 bit binary, what is your Gem5-based
architecture? Is it aarch 64? I prefer to simply compile the hello world
program just like Cross-compiler hello.c -o hello , without other
arguments. *
*Please could you provide us with info about your architecture and binary
file (just type in linux terminal $> file hello)  to know is it compatible
with the target Gem5-based architecture. *

On Tue, Jan 24, 2023 at 9:40 PM IKRAM via gem5-users gem5-users@gem5.org
wrote:

Hi Team,

I have written a c code (hello world program) and compiled using the arm
cross compiler. When I run the simple.py config file with new helloworld
binary updated in simple.py file I am getting simulation failure.

c code is as shown below:

#include <stdio.h>int main(int argc, char argv[]) {  // printf()
displays the string inside quotation  printf("Hello, World!");  return
0;}*

ARM cross compiler used : aarch64-linux-gnu-gcc

Below are the commands I used:

aarch64-linux-gnu-gcc -static -static-libgcc -static-libstdc++ myhello.c
-o myhellobuild/ARM/gem5.opt configs/learning_gem5/part1/simple.py

Below is the error:
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 21.2.0.0
gem5 compiled Jan 24 2023 23:16:23
gem5 started Jan 24 2023 23:21:13
gem5 executing on ubuntu-linux-22-04-desktop, pid 156963
command line: build/ARM/gem5.opt configs/learning_gem5/part1/simple.py

Global frequency set at 1000000000000 ticks per second
warn: failed to generate dot output from m5out/config.dot
build/ARM/mem/mem_interface.cc:791: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (512 Mbytes)
0: system.remote_gdb: listening for remote gdb on port 7000
Beginning simulation!
build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting
simulation...
build/ARM/sim/syscall_emul.cc:74: warn: ignoring syscall
set_robust_list(...)
build/ARM/sim/syscall_desc.hh:209: fatal: Syscall 398 out of range
Memory Usage: 649816 KBytes

If anyone knows how to solve the cross compiler issue, please give a reply.

Thanks

  • Ikram

gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

Hi, First of all, you do not need to edit the script file to run a workload!!! You can run the workload (you hello world program) just by passing it as an argument in your command line. It is not a good idea to modify simple.py just to run your program. Assume you have multiple programs you need to test them in Gem5. Is it correct to modify the simple.py every time you need to run the simulation? Absolutely no. The simple.py has multiple arguments you can pass them in your command line, one of them the target binary program, i.e., hello world program. The following command line will start gem5 (x86 arch) with default configuration to run a hello program that is located on a particular path. *./build/X86/gem5.opt configs/example/se.py -c ~/Desktop/hello* This cross-compiler " *aarch64-linux-gnu-gcc" generates a 64 bit binary, what is your Gem5-based architecture? Is it aarch 64? I prefer to simply compile the hello world program just like Cross-compiler hello.c -o hello , without other arguments. * *Please could you provide us with info about your architecture and binary file (just type in linux terminal $> file hello) to know is it compatible with the target Gem5-based architecture. * On Tue, Jan 24, 2023 at 9:40 PM IKRAM via gem5-users <gem5-users@gem5.org> wrote: > Hi Team, > > I have written a c code (hello world program) and compiled using the arm > cross compiler. When I run the simple.py config file with new helloworld > binary updated in simple.py file I am getting simulation failure. > > c code is as shown below: > > > > > > *#include <stdio.h>int main(int argc, char* argv[]) { // printf() > displays the string inside quotation printf("Hello, World!"); return > 0;}* > > > ARM cross compiler used : *aarch64-linux-gnu-gcc* > > Below are the commands I used: > > *aarch64-linux-gnu-gcc -static -static-libgcc -static-libstdc++ myhello.c > -o myhellobuild/ARM/gem5.opt configs/learning_gem5/part1/simple.py* > > Below is the error: > gem5 Simulator System. http://gem5.org > gem5 is copyrighted software; use the --copyright option for details. > > gem5 version 21.2.0.0 > gem5 compiled Jan 24 2023 23:16:23 > gem5 started Jan 24 2023 23:21:13 > gem5 executing on ubuntu-linux-22-04-desktop, pid 156963 > command line: build/ARM/gem5.opt configs/learning_gem5/part1/simple.py > > Global frequency set at 1000000000000 ticks per second > warn: failed to generate dot output from m5out/config.dot > build/ARM/mem/mem_interface.cc:791: warn: DRAM device capacity (8192 > Mbytes) does not match the address range assigned (512 Mbytes) > 0: system.remote_gdb: listening for remote gdb on port 7000 > Beginning simulation! > build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0. Starting > simulation... > build/ARM/sim/syscall_emul.cc:74: warn: ignoring syscall > set_robust_list(...) > build/ARM/sim/syscall_desc.hh:209: fatal: Syscall 398 out of range > Memory Usage: 649816 KBytes > > > If anyone knows how to solve the cross compiler issue, please give a reply. > > Thanks > - Ikram > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org >
AA
Ayaz Akram
Tue, Jan 24, 2023 6:49 PM

Hi Ikram,

It seems like your program is using a system call (#398) which has not been
tested or implemented in gem5. This can be because of a newer version of
the c library or compiler. One option is to ignore this system call and see
if your program still works. As a reference you can look at how the other
system call in your program is ignored (set_robust_list) in the gem5 source
code here: "src/arch/arm/linux/se_workload.cc".

-Ayaz

On Tue, Jan 24, 2023 at 10:12 AM IKRAM via gem5-users gem5-users@gem5.org
wrote:

Hi Team,

I have written a c code (hello world program) and compiled using the arm
cross compiler. When I run the simple.py config file with new helloworld
binary updated in simple.py file I am getting simulation failure.

c code is as shown below:

#include <stdio.h>int main(int argc, char argv[]) {  // printf()
displays the string inside quotation  printf("Hello, World!");  return
0;}*

ARM cross compiler used : aarch64-linux-gnu-gcc

Below are the commands I used:

aarch64-linux-gnu-gcc -static -static-libgcc -static-libstdc++ myhello.c
-o myhellobuild/ARM/gem5.opt configs/learning_gem5/part1/simple.py

Below is the error:
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 21.2.0.0
gem5 compiled Jan 24 2023 23:16:23
gem5 started Jan 24 2023 23:21:13
gem5 executing on ubuntu-linux-22-04-desktop, pid 156963
command line: build/ARM/gem5.opt configs/learning_gem5/part1/simple.py

Global frequency set at 1000000000000 ticks per second
warn: failed to generate dot output from m5out/config.dot
build/ARM/mem/mem_interface.cc:791: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (512 Mbytes)
0: system.remote_gdb: listening for remote gdb on port 7000
Beginning simulation!
build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting
simulation...
build/ARM/sim/syscall_emul.cc:74: warn: ignoring syscall
set_robust_list(...)
build/ARM/sim/syscall_desc.hh:209: fatal: Syscall 398 out of range
Memory Usage: 649816 KBytes

If anyone knows how to solve the cross compiler issue, please give a reply.

Thanks

  • Ikram

gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

Hi Ikram, It seems like your program is using a system call (#398) which has not been tested or implemented in gem5. This can be because of a newer version of the c library or compiler. One option is to ignore this system call and see if your program still works. As a reference you can look at how the other system call in your program is ignored (set_robust_list) in the gem5 source code here: "src/arch/arm/linux/se_workload.cc". -Ayaz On Tue, Jan 24, 2023 at 10:12 AM IKRAM via gem5-users <gem5-users@gem5.org> wrote: > Hi Team, > > I have written a c code (hello world program) and compiled using the arm > cross compiler. When I run the simple.py config file with new helloworld > binary updated in simple.py file I am getting simulation failure. > > c code is as shown below: > > > > > > *#include <stdio.h>int main(int argc, char* argv[]) { // printf() > displays the string inside quotation printf("Hello, World!"); return > 0;}* > > > ARM cross compiler used : *aarch64-linux-gnu-gcc* > > Below are the commands I used: > > *aarch64-linux-gnu-gcc -static -static-libgcc -static-libstdc++ myhello.c > -o myhellobuild/ARM/gem5.opt configs/learning_gem5/part1/simple.py* > > Below is the error: > gem5 Simulator System. http://gem5.org > gem5 is copyrighted software; use the --copyright option for details. > > gem5 version 21.2.0.0 > gem5 compiled Jan 24 2023 23:16:23 > gem5 started Jan 24 2023 23:21:13 > gem5 executing on ubuntu-linux-22-04-desktop, pid 156963 > command line: build/ARM/gem5.opt configs/learning_gem5/part1/simple.py > > Global frequency set at 1000000000000 ticks per second > warn: failed to generate dot output from m5out/config.dot > build/ARM/mem/mem_interface.cc:791: warn: DRAM device capacity (8192 > Mbytes) does not match the address range assigned (512 Mbytes) > 0: system.remote_gdb: listening for remote gdb on port 7000 > Beginning simulation! > build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0. Starting > simulation... > build/ARM/sim/syscall_emul.cc:74: warn: ignoring syscall > set_robust_list(...) > build/ARM/sim/syscall_desc.hh:209: fatal: Syscall 398 out of range > Memory Usage: 649816 KBytes > > > If anyone knows how to solve the cross compiler issue, please give a reply. > > Thanks > - Ikram > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org >
I
IKRAM
Wed, Jan 25, 2023 4:44 AM

Hi,

Below is the info of my binary file which I have followed for simple.py
execution.

>arm-linux-gnueabi-gcc myhello.c -o myhello-arm -static

>file myhello.armmyhello-arm: ELF 32-bit LSB executable, ARM, EABI5
version 1 (SYSV), statically linked,
BuildID[sha1]=88f5968edf2205e9debda59908a7ac233fb8ad94, for GNU/Linux
3.2.0, not stripped

So, is this compatible with GEM5-based architecture?
I think may be EABI5 is not supporting.

Thanks

  • Ikram

On Wed, Jan 25, 2023 at 12:20 AM RTL Insn via gem5-users <
gem5-users@gem5.org> wrote:

Hi,
First of all, you do not need to edit the script file to run a

workload!!! You can run the  workload (you hello world program) just by
passing it as an argument in your command line. It is not a good idea to
modify simple.py just to run your program. Assume you have multiple
programs you need to test them in Gem5. Is it correct to modify the
simple.py every time you need to run the simulation? Absolutely no.

The simple.py has multiple arguments you can pass them in your command

line, one of them the target binary program, i.e., hello world program.

The following command line will start gem5 (x86 arch) with default

configuration to run a hello program that is located on a particular path.

./build/X86/gem5.opt configs/example/se.py  -c ~/Desktop/hello

This cross-compiler "aarch64-linux-gnu-gcc" generates a 64 bit binary,

what is your Gem5-based architecture? Is it aarch 64? I prefer to simply
compile the hello world program just like Cross-compiler hello.c -o hello ,
without other arguments.

Please could you provide us with info about your architecture and binary

file (just type in linux terminal $> file hello)  to know is it compatible
with the target Gem5-based architecture.

On Tue, Jan 24, 2023 at 9:40 PM IKRAM via gem5-users gem5-users@gem5.org

wrote:

Hi Team,

I have written a c code (hello world program) and compiled using the arm

cross compiler. When I run the simple.py config file with new helloworld
binary updated in simple.py file I am getting simulation failure.

c code is as shown below:
#include <stdio.h>
int main(int argc, char* argv[]) {
// printf() displays the string inside quotation
printf("Hello, World!");
return 0;
}

ARM cross compiler used : aarch64-linux-gnu-gcc

Below are the commands I used:
aarch64-linux-gnu-gcc -static -static-libgcc -static-libstdc++ myhello.c

-o myhello

build/ARM/gem5.opt configs/learning_gem5/part1/simple.py

Below is the error:
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 21.2.0.0
gem5 compiled Jan 24 2023 23:16:23
gem5 started Jan 24 2023 23:21:13
gem5 executing on ubuntu-linux-22-04-desktop, pid 156963
command line: build/ARM/gem5.opt configs/learning_gem5/part1/simple.py

Global frequency set at 1000000000000 ticks per second
warn: failed to generate dot output from m5out/config.dot
build/ARM/mem/mem_interface.cc:791: warn: DRAM device capacity (8192

Mbytes) does not match the address range assigned (512 Mbytes)

0: system.remote_gdb: listening for remote gdb on port 7000
Beginning simulation!
build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting

simulation...

build/ARM/sim/syscall_emul.cc:74: warn: ignoring syscall

set_robust_list(...)

build/ARM/sim/syscall_desc.hh:209: fatal: Syscall 398 out of range
Memory Usage: 649816 KBytes

If anyone knows how to solve the cross compiler issue, please give a

reply.

Thanks

  • Ikram

gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

Hi, Below is the info of my binary file which I have followed for simple.py execution. *>arm-linux-gnueabi-gcc myhello.c -o myhello-arm -static* *>file myhello.armmyhello-arm: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, BuildID[sha1]=88f5968edf2205e9debda59908a7ac233fb8ad94, for GNU/Linux 3.2.0, not stripped* So, is this compatible with GEM5-based architecture? I think may be EABI5 is not supporting. Thanks - Ikram On Wed, Jan 25, 2023 at 12:20 AM RTL Insn via gem5-users < gem5-users@gem5.org> wrote: > > Hi, > First of all, you do not need to edit the script file to run a workload!!! You can run the workload (you hello world program) just by passing it as an argument in your command line. It is not a good idea to modify simple.py just to run your program. Assume you have multiple programs you need to test them in Gem5. Is it correct to modify the simple.py every time you need to run the simulation? Absolutely no. > The simple.py has multiple arguments you can pass them in your command line, one of them the target binary program, i.e., hello world program. > The following command line will start gem5 (x86 arch) with default configuration to run a hello program that is located on a particular path. > ./build/X86/gem5.opt configs/example/se.py -c ~/Desktop/hello > > This cross-compiler "aarch64-linux-gnu-gcc" generates a 64 bit binary, what is your Gem5-based architecture? Is it aarch 64? I prefer to simply compile the hello world program just like Cross-compiler hello.c -o hello , without other arguments. > > Please could you provide us with info about your architecture and binary file (just type in linux terminal $> file hello) to know is it compatible with the target Gem5-based architecture. > > On Tue, Jan 24, 2023 at 9:40 PM IKRAM via gem5-users <gem5-users@gem5.org> wrote: >> >> Hi Team, >> >> I have written a c code (hello world program) and compiled using the arm cross compiler. When I run the simple.py config file with new helloworld binary updated in simple.py file I am getting simulation failure. >> >> c code is as shown below: >> #include <stdio.h> >> int main(int argc, char* argv[]) { >> // printf() displays the string inside quotation >> printf("Hello, World!"); >> return 0; >> } >> >> >> ARM cross compiler used : aarch64-linux-gnu-gcc >> >> Below are the commands I used: >> aarch64-linux-gnu-gcc -static -static-libgcc -static-libstdc++ myhello.c -o myhello >> build/ARM/gem5.opt configs/learning_gem5/part1/simple.py >> >> Below is the error: >> gem5 Simulator System. http://gem5.org >> gem5 is copyrighted software; use the --copyright option for details. >> >> gem5 version 21.2.0.0 >> gem5 compiled Jan 24 2023 23:16:23 >> gem5 started Jan 24 2023 23:21:13 >> gem5 executing on ubuntu-linux-22-04-desktop, pid 156963 >> command line: build/ARM/gem5.opt configs/learning_gem5/part1/simple.py >> >> Global frequency set at 1000000000000 ticks per second >> warn: failed to generate dot output from m5out/config.dot >> build/ARM/mem/mem_interface.cc:791: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes) >> 0: system.remote_gdb: listening for remote gdb on port 7000 >> Beginning simulation! >> build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0. Starting simulation... >> build/ARM/sim/syscall_emul.cc:74: warn: ignoring syscall set_robust_list(...) >> build/ARM/sim/syscall_desc.hh:209: fatal: Syscall 398 out of range >> Memory Usage: 649816 KBytes >> >> >> If anyone knows how to solve the cross compiler issue, please give a reply. >> >> Thanks >> - Ikram >> _______________________________________________ >> gem5-users mailing list -- gem5-users@gem5.org >> To unsubscribe send an email to gem5-users-leave@gem5.org > > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org