ProtoFlex   Carnegie Mellon

Flexus Hands-on Session

This section of the SimFlex tutorial will cover a hands-on example of using Flexus. This part of the tutorial covers three high-level steps: (1) booting a simulated system in Simics-only, (2) importing a test application into the simulated system and creating a Simics checkpoint, and (3) using the flexus tools along with the sampling concepts to measure the newly-generated workload.

In this part of the tutorial, you will only need a Windows-based laptop with Remote Desktop Connection. All work will be performed through remote windows machines at CMU. Split into groups of 2 or 3. Each group will be assigned a number.

To connect, first open up the Remote Desktop Connection tool(Start –> All Programs → Accessories → Communications → Remote Desktop Connection) and connect to the following address: where X is your designated group number (so for example, if you are in the protoflex3 group, connect to The username/password is: pf_user/protoflex. This username/password pair is common for all remaining steps of this tutorial, unless otherwise noted.

From the desktop open the SSH Secure Shell Client and click on “Quick Connect”. In the “Host Name” field type protoflexN.scotch.ece.cmu, where N is your group number (e.g. protoflex1.scotch.ece.cmu) and in the “User Name” field type pf_user. Hit connect and enter the password “protoflex”. Now open “SSH Secure File Transfer” and repeat the same steps one more time.

1. Preparing a Simics checkpoint

In this section, we will give a short tutorial on what is needed to set up and create your own Simics checkpoints.

A Simics checkpoint is simply a snapshot of simulated machine state in the form of one or more CPU's worth of registers, a physical main memory image, and device state. Checkpoints allow us to stage and position our workloads without having to reboot the target machine over and over. When running Simics, the simulation of a target machine can be interrupted at any moment in order to save a checkpoint.

SKIP - Installing Solaris in a simulated machine

We will omit this step, because installing an OS on the simulated target machine is an (uninteresting) process that can take many hours. We have provided you with a fresh disk image of the target system (prior to boot).

SKIP - Expand/Collapse

Boot Solaris and Save Checkpoint

CLICK - Expand/Collapse

2. Preparing a test workload

CLICK - Expand/Collapse

3. Working with Flexus

From the workload we just created, you will get to chance to run some sample jobs with Flexus and create a Flexpoint library. By this point you should have a valid initial checkpoint stored as ~/checkpoints/spinlock.

  1. Before starting, you should create a few initial directories in the home (which we will explain in the next steps):
mkdir ~/checkpoints
mkdir ~/images
mkdir ~/specs
  1. The flexus simulator is stored as ~/tutorial_files/flexus_tutorial.tgz. Copy this file to your home directory and extract the tarball. You should have a directory called ~/flexus.

Getting familiar with the run_job script

In this section, we will cover the run_job script, which is used in all cases to run Flexus simulations.

CLICK - Expand/Collapse

Displaying statistics through the stat-manager tool

CLICK - Expand/Collapse

Creating a flexpoint library

In this section you will be creating a flexpoint library (warm microarchitectural state and simics checkpoints).

CLICK - Expand/Collapse

Running a timing-accurate Flexus simulation

In this section you will be using the “timing” mode of Flexus.

CLICK - Expand/Collapse


To cleanup execute the following commands:

rm ~/.run_job.rc.tcl
rm -rf ~/ckpts/
rm -rf ~/specs/
rm -rf ~/results/