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.
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:
- 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]
- Download simplesim-3v0d.tgz
- Make a folder where you want to Install SimpleScalar. So I made a folder called “Project” and copied the downloaded .tgz file in here.
- Open Cygwin Terminal and change directory to the “Project” folder
- Un-tar the downloaded file using command: tar xzvf simplesim-3v0d.tgz
All these files will be extracted to a folder called simplesim-3.0
- Change the directory to simplesim-3.0
- We try to configure it as a PISA simulator first. Run the command: make config-pisa
- Run the command: make
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.
- Now we can test if simplesim was installed or not by executing: ./sim-cache tests-pisa/bin/test-math
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 [This is where we run into an error]
ERROR: [as seen on the last line after executing “make”]
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:
-
Edit target-alpha/alpha.h
-
Go to the line that has "extern enum md_opcode md_mask2op[]".
-
Move that underneath the definition of "enum md_opcode {...}"
-
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!
Unfortunately Cygwin doesn’t allow us to execute sudo commands.
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.
Similarly, we can configure the simulator for PISA - configuration as well.
Just run the following commands in the simplesim-3.0 directory:
- make clean
- make config-pisa
- 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:
- http://www.ecs.umass.edu/ece/koren/architecture/Simplescalar/
- SPEC95 Benchmarks for little-endian machines: http://techtitude.blogspot.com/2011/12/how-to-execute-spec95-benchmarks-in.html