/SimpleScalar

SimpleScalar Installation & Lab Assignments

Primary LanguageC

SimpleScalar

SimpleScalar is a product of SimpleScalar, LLC that allows you to try out new computer architecture ideas. It consists of a simulator and a GNU gcc-based toolchain.

Installation Procedure:

I used VMWare Virtual Machine, I attempt installation with cygwin (all this can be done using cygwin as well, but later I preferred to install and perform the assignments on a linux system [VMWare Virtual Machine]
Linux Ubuntu version: 22.04.1
Other relevant specifications: gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04)

I am working on a Windows system, and the installation guide uses Linux commands to install SimpleScalar. So as a workaround, I installed Cygwin [Under Cygwin, source code designed for Unix-like operating systems may be compiled with minimal modification and executed.]. Alternatively, I also installed VMWare Workstation which enables us to install Ubuntu-Linux on it. [Ultimately, I end up working on this.] Using Cygwin, we can install SimpleScalar as follows:

  1. Go to the website link given below. There are various links on the page, one of which is a guide for installing SimpleScalar on a Linux system (umass.edu) [http://www.ecs.umass.edu/ece/koren/architecture/Simplescalar/installingSimpleScalar.htm]
  2. Download simplesim-3v0d.tgz
  3. Make a folder where you want to Install SimpleScalar. So I made a folder called “Project” and copied the downloaded .tgz file in here.

Step 3

  1. Open Cygwin Terminal and change directory to the “Project” folder

Step 4

  1. Un-tar the downloaded file using command: tar xzvf simplesim-3v0d.tgz

Step 5

All these files will be extracted to a folder called simplesim-3.0

  1. Change the directory to simplesim-3.0

Step 6

  1. We try to configure it as a PISA simulator first. Run the command: make config-pisa

Step 7

  1. Run the command: make

Step 8

As we can see, It has created the Makefile [The makefile contains targets and commands for execution]
We should see “my work is done here…” on the last line on the Cygwin Terminal after executing the “make” command.

Step 8-ii

  1. Now we can test if simplesim was installed or not by executing: ./sim-cache tests-pisa/bin/test-math

Step 9 Step 9-ii

The installation guide says that your output should include the following line, verifying that everything works: “-1e-17 == -1e-17 Worked!”. We can see in the above image; we got the result as desired.

SimpleScalar is an open-source computer architecture simulator. It can be configured as a PortableISA (PISA) simulator, which we configured earlier; and we can also configure it as an ALPHA simulator.
To configure SimpleScalar as Alpha Simulator, we need to execute the following three commands while we are in the simplesim-3.0 directory.

make clean
Step 10

make config-alpha
Step 11

make [This is where we run into an error]
Step 12

ERROR: [as seen on the last line after executing “make”]
Step 13

The installation guide does warn us that we might get an error, but I was unable to resolve this issue, until a fix to resolve Alpha config issue was later found.

Simple Scalar and Alpha Configuration Modification to make Simple Scalar work for the Alpha Configuration:

  1. Edit target-alpha/alpha.h

  2. Go to the line that has "extern enum md_opcode md_mask2op[]". Step 14

  3. Move that underneath the definition of "enum md_opcode {...}"
    Step 15

  4. Re-try the make command. There might still be lots of warnings, but no actual errors, so the compilation should be successful.
    This Solution Worked in my Ubuntu installed on VM!!
    I tried executing one of the alpha benchmarks and it worked!
    Step 16 Step 17

Unfortunately Cygwin doesn’t allow us to execute sudo commands.
Step 18

So, I proceeded to use the VMWare Workstation and installed Ubuntu on it.
Then, downloaded and installed simplescalar on it, like the process detailed above.
Step 19 Step 20 Step 21 Step 22

Similarly, we can configure the simulator for PISA - configuration as well.
Just run the following commands in the simplesim-3.0 directory:

  1. make clean
  2. make config-pisa
  3. make

The lab experiments I performed were implemented on the PISA configured simulator.

Lab Experiments were then performed as instructed on the umass website [http://www.ecs.umass.edu/ece/koren/architecture/Simplescalar/].

Outputs and Configuration files can be found in the LAB directory.

Sources: