[gem5-users] Accessing CPU cycles in Ruby components

2023-01-24 Thread Ziyao Yan via gem5-users
Hi all, I am currently trying to gather cycle information of events and wondering how I should access CPU cycles in the Ruby port component. It seems like, although tick is used universally across the simulation, Ruby has its own cycle setting that is different from the CPU cycle. Thanks, Ziyao _

[gem5-users] Limit FS memory through kernel args

2023-01-24 Thread João Vieira via gem5-users
Hi, I am trying to limit the memory used by Linux so that I am left with some physically addressable memory to use with accelerators in FS mode. In physical systems, to do this, it suffices to boot the kernel with the argument "mem=MAX_MEM", where MAX_MEM represents the maximum memory that L

[gem5-users] Running gem5 RISCV in bare-metal mode

2023-01-24 Thread Priyanka Ankolekar via gem5-users
Hello, I am trying to run RISCV in bare-metal mode using the fs_linux.py script. Here is the command I am using: /build/RISCV/gem5.opt --debug-start=0 --debug-flags=Exec --debug-file=trace.out ./configs/example/riscv/fs_linux.py --bare-metal --kernel ../riscv-tests/benchmarks/dhrystone.riscv I g

[gem5-users] Running gem5 RISCV in bare-metal mode

2023-01-24 Thread Priyanka Ankolekar via gem5-users
Hello, I am trying to run RISCV in bare-metal mode using the fs_linux.py script. Here is the command I am using: /build/RISCV/gem5.opt --debug-start=0 --debug-flags=Exec --debug-file=trace.out ./configs/example/riscv/fs_linux.py --bare-metal --kernel ../riscv-tests/benchmarks/dhrystone.riscv I g

[gem5-users] Re: Limit FS memory through kernel args

2023-01-24 Thread João Vieira via gem5-users
Hi again, I found the issue. When we add arguments to the kernel, the default arguments that are required for the FS to work properly are erased from the kernel_command! The default kernel_command is "earlyprintk=ttyS0 console=ttyS0 lpj=723 root=/dev/hda". But if kernel_args != [] in se

[gem5-users] Simulation error for hello world workload

2023-01-24 Thread IKRAM via gem5-users
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 int main(int argc, char* argv[]) {

[gem5-users] Re: Running gem5 RISCV in bare-metal mode

2023-01-24 Thread Ayaz Akram via gem5-users
Hi Priyanka, I think adding something like the following line in your script should solve the problem you are running into: system.platform.pci_host.pio = system.iobus.mem_side_ports -Ayaz On Tue, Jan 24, 2023 at 6:48 AM Priyanka Ankolekar via gem5-users < gem5-users@gem5.org> wrote: > Hello,

[gem5-users] Re: Limit FS memory through kernel args

2023-01-24 Thread Ayaz Akram via gem5-users
Hi Joao, If you look at the source code here (in case you haven't previously): src/python/gem5/components/boards/kernel_disk_workload.py, I think the expectation is that the user-provided kernel arguments will replace the default ones. However, I agree that it might be useful to have the ability t

[gem5-users] Re: Simulation error for hello world workload

2023-01-24 Thread RTL Insn via gem5-users
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 t

[gem5-users] Re: Simulation error for hello world workload

2023-01-24 Thread Ayaz Akram via gem5-users
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

[gem5-users] Re: Accessing CPU cycles in Ruby components

2023-01-24 Thread Ayaz Akram via gem5-users
Hi Ziyao, Based on my understanding, I guess for the Ruby stats that are not in Ticks, you can rely on the Ruby ClockDomain value from the configuration to convert the cycles to CPU cycles or ticks. -Ayaz On Tue, Jan 24, 2023 at 12:48 AM Ziyao Yan via gem5-users < gem5-users@gem5.org> wrote: >

[gem5-users] Re: Limit FS memory through kernel args

2023-01-24 Thread Eliot Moss via gem5-users
On 1/25/2023 2:11 AM, João Vieira via gem5-users wrote: Hi again, I found the issue. When we add arguments to the kernel, the default arguments that are required for the FS to work properly are erased from the kernel_command! The default kernel_command is "earlyprintk=ttyS0 console=ttyS0 lpj

[gem5-users] Re: Simulation error for hello world workload

2023-01-24 Thread IKRAM via gem5-users
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]=88f5968edf2205e9debda59908a7ac2