- So, we need to download some tools:
- GCC, the most common C compiler on linux.
- Python, at least 2.4. Available at http://www.python.org/
- Scons, "SCons is an Open Source software construction tool". It is similar to Make utility. You can download it from www.scons.org
- Swig, a connector between C/C++ and some high-level programming languages. http://swig.org/
- After install the dependencies we have to download the GEM5 source code:
- You need mercurial (hg) to download the source code. It is time to install it if you haven't it yet.
- If you already installed mercurial you are ready to clone the repository: hg clone http://repo.gem5.org/gem5
- That is the development repository, so you may want to update it in the future. You can do it with hg pull and hg update.
- If everything worked until now it is time to compile GEM5:
- You only have to run scons buid/ARM/gem5.opt in the gem5 directory. That will compile a default version of GEM5. Of course some options can be provided to the compiler to change the CPU type, cache coherence,.. You may want to use the option -j value where value indicates how many processors should the compiler uses while compiling (be careful if you don't have more than 4GB of RAM).
- If it compiled without any errors we can run a test in order to check that everything is fine. The command is ./build/ARM/gem5.opt ./configs/example/se.py - c queens -o 8. You can download the queens binary from https://mega.co.nz/#!z5I0AKAa!PkzayRAPWnJszt_qSZOmJxxh0_EixGZ1Gsux2GnChJw (448 KB). It should find 92 solutions if it worked.
That's all, if you had any problems you can find more information in the web. Although I highly recommend you to check the links at the end of the post.
Further info can be found at:
- Dependencies http://www.m5sim.org/Dependencies
- Download GEM5 http://www.m5sim.org/Download
- Compiling http://www.m5sim.org/Build_System
- Running http://www.m5sim.org/Running_gem5
Hi there,
ReplyDeleteI am also trying to learn gem5. I have installed and ran the test to check if its proper. How would you recommend to go forward from here? I am going to use it for interconnection networks.
Thanks,
Vineeth
hi there ,
ReplyDeletei'm getting this error on my Linux mint 15 64 bit. I think i'm doing something wrong.
$ scons build/ARM/gem5.opt
scons: Reading SConscript files ...
Error Don't know what compiler options to use for your compiler.
compiler: None
version: COMMAND NOT FOUND!
If you're trying to use a compiler other than GCC
or clang, there appears to be something wrong with your
environment.
If you are trying to use a compiler other than those listed
above you will need to ease fix SConstruct and
src/SConscript to support that compiler.
Can you provide me step by step info for a fresh installed system (Linux mint 15 or ubuntu) .
You should check if you have installed gcc and g++. You can check it by running gcc and g++ in the terminal. If they aren't installed then you have to install them (sudo apt-get install gcc g++)
ReplyDeleteIf gcc and g++ are installed then the problem is that scons isn't able to find the binaries, you should try this command: scons build/ARM/gem5.opt CC= CXX=
@Sunny13: Use this command to install everything you need to run gem5 properly: sudo apt-get install mercurial scons swig gcc m4 python python-dev libgoogle-perftools-dev g++
ReplyDeleteTry this video for reference: http://www.youtube.com/watch?v=SW63HJ0nW90
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete