Skip to content

aferikoglou/Gem5DSE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design Space Exploration using GEM5 Simulator

This exercise illustrates the process of optimizing an application by varying unrolling factors for two distinct x86 architectures within the gem5 simulator.

Gem5 Setup

This project was tested on Ubuntu 22.04.3 LTS (GNU/Linux 6.2.0-35-generic x86_64) equipped with Docker version 24.0.5.

# https://www.gem5.org/getting_started/

# Clone gem5 GitHub repository
git clone https://github.com/gem5/gem5
# Pull Docker image
docker pull gcr.io/gem5-test/ubuntu-22.04_all-dependencies:v22-1
# Start & connect to Docker container
docker run --user root --volume ./gem5:/gem5 --rm -it gcr.io/gem5-test/ubuntu-22.04_all-dependencies:v22-1
# Now we are INSIDE the container which contains all the dependencies for building gem5
# Move to gem5 directory & build it using scons
cd /gem5
scons build/X86/gem5.opt -j <NUMBER OF CPUs ON YOUR PLATFORM - 1> # This step requires more than 45 minutes to execute the first time
# Note that each time you connect to the container you have to re-build it using scons
# Test that gem5 was built successfully
build/X86/gem5.opt configs/learning_gem5/part1/simple.py

# Expected output

# gem5 Simulator System.  https://www.gem5.org
# gem5 is copyrighted software; use the --copyright option for details.

# gem5 version 23.0.1.0
# gem5 compiled Oct 24 2023 13:20:19
# gem5 started Oct 26 2023 17:31:02
# gem5 executing on c9091c734210, pid 5675
# command line: build/X86/gem5.opt configs/learning_gem5/part1/simple.py

# Global frequency set at 1000000000000 ticks per second
# src/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
# src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
# system.remote_gdb: Listening for connections on port 7000
# Beginning simulation!
# src/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting simulation...
# Hello world!
# Exiting @ tick 488970000 because exiting with last active thread context

Exercise Setup

# Clone this GitHub repository under gem5 directory
git clone https://github.com/aferikoglou/Gem5DSE.git
# Move to Gem5DSE directory and copy its contents to /gem5 directory
cd ./Gem5DSE && cp -r * ../
# Compile tables.c and tables_ufXXX.c in tables_UF directory
cd ../tables_UF
chmod +x compile.sh && ./compile.sh
cd ..
# Modify configs/learning_gem5/part1/simple.py and configs/learning_gem5/part1/two_level.py to take as input the path to an .exe file. Use ABSOLUTE PATHS.
# Install Python libraries
python3 -m pip install -r requirements.txt

About

NTUA ECE Embedded Systems Design - Exercise 1 (Part B) 2023-2024

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published