Installation of gem5 Simulator for FS Mode(Full System Mode)



Introduction to gem5
gem5 is a modular discrete event driven computer system simulator platform.
That means that:
gem5's components can be rearranged, parameterized, extended or replaced easily to suit your needs.It simulates the passing of time as a series of discrete events.Its intended use is to simulate one or more computer systems in various ways.It's more than just a simulator; it's a simulator platform that lets you use as many of its premade components as you want to build up your own simulation system. gem5 is written primarily in C++ and python and most components are provided under a BSD style license. It can simulate a complete system with devices and an operating system in full system mode (FS mode), or user space only programs where system services are provided directly by the simulator in systemcall emulation mode (SE mode). There are varying levels of support for executing Alpha, ARM, MIPS, Power, SPARC, and 64 bit x86 binaries on CPU models including two simple single CPI models, an out of order model, and an in order pipelined model. A memory system can be flexibly built out of caches and crossbars. Recently the Ruby simulator has been integrated with gem5 to provide even more flexible memory system modeling.


Full System (FS) Mode-

In the FS mode, the complete system can be modeled in an OS-based simulation environment.

Steps For ARM-
1.Open the terminal and make a new directory called full_system_images

2.Change the directory to full_system_images.

3.Downloading the Arm Full-System Files from the gem5 Download page paste arm packagedownloaded manually to folder full_system_images.

4.Type tar xvfJ aarch-system-2014-10.tar.xz and extract the file.After
extracting, we let gem5 know the location of our disks and binaries directories, i.e. the path to the aarch-system-2014-10 directory.

5.Add M5_PATH . echo "export M5_PATH=/home/ankita/gem5/full_system_images/" >> ~/.bashrc

6.To check whether successful type echo $M5_PATH if it shows as follows
then successful =/home/ankita/gem5/full_system_images/

8.Verify bashrc file by opening through command -gedit ~/.bashrc

9.source ~/.bashrc

10.build/ARM/gem5.opt configs/example/fs.py --disk-image=/home/ankita/gem5/full_system_images/disks/arm-ubuntu-natty-headless.img --kernel=/home/ankita/gem5/full_system_images/binaries/vmlinux.arm.smp.fb.2.6.38.8 

11.Now Press ctrl +shift +t to open new terminal tab and type telnet
127.0.0.1 3456 to connect with the simulated system. We get information
about simulated system.

12.Wait for 30 minutes for the image to bootup.The image we used here is
arm-ubuntu-natty-headless.img .Type root to login and type command
who ,scp to test the running of simulated image.This command will give command in simulated gem5 system.

Steps For x86- 

Following are the steps to run full system simulation: 
mkdir full-system-images 
Open the terminal and make new directory called full-system-images 
cd full-system-images/
Change the directory to full-system-images,

Download X86 Packages from gem.org manually.
Paste To folder full-system-images and extract there itself.
Or by using command
wget http://www.m5sim.org/dist/current/x86/x86-system.tar.bz2
echo”export M5_PATH==/home/dell/gem5/full-system-images/” >>--/.bashrc
Store the path for the disk and binary folder in an environmental variable called M5 path. 
gedit --/.bashrc

Verify bashrc file by opening through above command .
source--/.bashrc
 build the full system gem5 using the following command
./build /X86/gem5.opt configs/example/fs.py --disk-image=/home/dell/gem5/full-system-images/disk/linux-x86.img

 
Resolve the error which are raised while building pointing towards the files and re-run the build.  
Open another terminal by using crtl+alt+t And type command telnet127.0.0.1 3456  
Now, we are logged into simulated system.

Comments

  1. I am getting a error like
    -- END LIBC BACKTRACE ---
    Aborted (core dumped)

    ReplyDelete
  2. Error
    info: Entering event queue @ 0. Starting simulation...
    300280010000000000: system.pc.com_1.device: attach terminal 0
    gem5.opt: build/X86/sim/eventq_impl.hh:44: void EventQueue::schedule(Event*, Tick, bool): Assertion `when >= getCurTick()' failed.
    Program aborted at tick 18446744000000000000
    --- BEGIN LIBC BACKTRACE ---

    ReplyDelete

Post a Comment

Popular posts from this blog

Installation of gem5 Simulator for SE Mode(System Call Emulation Mode)

Running gem5 with parsec benchmark