Questions tagged [gem5]

The gem5 simulator is a modular platform for computer system architecture research, encompassing system-level architecture as well as processor microarchitecture.

Project homepage: http://gem5.org

466 questions
14
votes
2 answers

Different read and write count using cachegrind and callgrind

I am doing some experiments with Cachegrind, Callgrind and Gem5. I noticed that a number of accesses were counted as read for cachegrind, as write for callgrind and for both read and write by gem5. Let's take a very simple example: int main() { …
Maxime Chéramy
  • 17,761
  • 8
  • 54
  • 75
6
votes
2 answers

cannot open /lib/ld-linux-aarch64.so.1 in qemu or gem5

I am trying to simulate a simple Hello world ARM example on my desktop computer. I tried both qemu and gem5. Both gives a similar error. They cannot find ld-linux-aarch64.so.1. Actually I cannot find it either. If I could find it, I will show it…
cervX
  • 85
  • 1
  • 1
  • 6
6
votes
1 answer

Intel / ARM intrinsics equivalence

I have a C application using Intel intrinsics like: __m128 _mm_add_ps (__m128 a, __m128 b) __m128 _mm_sub_ps (__m128 a, __m128 b) __m128 _mm_mul_ps (__m128 a, __m128 b) __m128 _mm_set_ps (float e3, float e2, float e1, float e0) void _mm_store_ps…
A.nechi
  • 521
  • 1
  • 5
  • 15
5
votes
2 answers

Is there a list of unused binary opcodes for X86_64 (amd64)

I am trying to add custom instructions in X86_64 (amd64) ISA. I will create a binary using these instructions and then I'll run it in gem5 simulator. To find the list of unused opcodes, I am referring to http://ref.x86asm.net/coder64.html. However,…
Setu
  • 180
  • 8
5
votes
1 answer

How to compile and run an executable in gem5 syscall emulation mode with se.py?

There are many possible errors and workarounds scattered in may different places, can anyone provide at least one detailed working setup, with exact gem5 and compiler versions, hopefully on Ubuntu?
Ciro Santilli
  • 3,693
  • 1
  • 18
  • 44
5
votes
1 answer

How to build gem5 on Ubuntu 17.10 with GCC 7.2, dealing with issues in C++ compilation?

I am having lots of issues with building gem5 as directed in the official documentation. These are the commands I have used: git clone https://gem5.googlesource.com/public/gem5 cd gem5 python2 `which scons` build/MIPS/gem5.opt Which results in…
jlc
  • 51
  • 1
  • 3
4
votes
1 answer

How can I only see the execution process of the instructions of my C code starting at main in gem5 syscall emulation?

I am going crazy with gem5. When I run a program that just outputs "Hello, world". Only set debug=Exec in gem5. I saw the operation of thousands of lines of assembly instructions. How can I only see the execution process of my own code?
Gerrie
  • 736
  • 3
  • 18
4
votes
1 answer

gem5 scons build fails with "TypeError: argument should be integer or bytes-like object, not 'str'"

I am trying to install gem5 on a fresh installation of Ubuntu 20.04 and using commit 9fc9c67b4242c03f165951775be5cd0812f2a705. I have used…
John
  • 65
  • 5
4
votes
1 answer

Writing gem5 configuration scripts with Pycharm

In order to develop complex gem5 python configuration scripts with more convenient IDE the gem5 lib has to be added to the project. However, for those who are not experts in python and Pycharm (Such as myself) there are some difficulties. For…
ddleon
  • 63
  • 7
4
votes
4 answers

Why would a simple C program need syscalls?

Related to this other question. I am trying to run this simple C program in gem5: int main() { int a=1, b=2; int c=a+b; return c; } And it fails because gem5 doesn't have some syscalls implemented. My question is, why would a simple…
tgonzalez89
  • 621
  • 1
  • 6
  • 26
4
votes
2 answers

When to use full system FS vs syscall emulation SE with userland programs in gem5?

Since syscall emulation is much easier to setup, I'm wondering what are the advantages of using the full system emulation when running an userland program. Or in other words, what interesting aspects are modeled in the full system but not syscall…
Ciro Santilli
  • 3,693
  • 1
  • 18
  • 44
4
votes
1 answer

gem5 cache statistics - reset and dump

I am trying to get familiar with gem5 simulator. To start, I wrote a simple program with int main() { m5_reset_stats(0, 0); m5_dump_stats(0, 0); return 0; } I compiled it with util/m5/m5op_x86.S and ran it using... ./build/X86/gem5.opt…
Krupa
  • 41
  • 1
  • 3
3
votes
0 answers

Modifying go to use Gem5 m5ops: go tool dist shows import message then quit

I am pretty new to golang. I'm trying to insert some C function calls (specifically m5ops) to golang's runtime (specifically src/proc.go). I was trying to use cgo, which results in adding this import to the beginning of proc.go: // #cgo CFLAGS:…
LanderX
  • 43
  • 2
3
votes
0 answers

How to use the ARM PMU in GEM5?

I had a problem initializing the PMU in gem5 for an arm full system with the starter_fs.py in --cpu hpi. i followed the instructions of this post Using perf_event with the ARM PMU inside gem5 and i managed to solve my problem. I added the patch and…
Nfpol
  • 41
  • 2
3
votes
0 answers

How to run multiple process, sequentially in gem5 se mode?

I followed gem5-tutorial to build a test config. It executes hello world, on se mode. But, now I want to run multiple processes, one by one. How to do that? So far i tried this processes = [] processes.append([bzip2_benchmark,…
Satyam Jay
  • 33
  • 1
  • 2
1
2 3
31 32