Installing the SimpleScalar simulator is relatively straightforward under Linux. For Windows installation, the Cygwin toolchain is required. Grab the latest Cygwin installer (setup-x86_64) from here: https://cygwin.com/setup-x86_64.exe (note that this is intended for 64-bit machines).
After running the installer, just proceed through the wizard. The default installation directory is C:\cygwin64
. When selecting a mirror website, usually mirrors.kernel.org is the fastest mirror. Select where you want the Cygwin packages to be installed. In the package installation window, select the following packages under Devel
:
- gcc-core
- gcc-g++
- make
Also, under Web
select the w3m package (this will make the download process much easier). The installer will say that additional dependencies are needed. Click “Yes” to install the additional dependency packages.
Note: To install a package, you can simply click on the circular arrows next to the name of the package. The text next to the arrow will cycle between “skip” and the desired version of the package. Feel free to install the latest available version of each of the packages above.
After the installation of Cygwin is finished, simply open a Cygwin bash terminal (by opening “Cygwin64 Terminal” from the installed programs in Start menu) and follow these steps (credits go to Ramya Pradhan):
- Download SimpleScalar:
w3m http://www.simplescalar.com/agreement.php3?simplesim-3v0e.tgz
Use the arrow keys to navigate to the bottom of the page to accept the terms. Move the cursor to ‘I Agree’ and hit enter. You will see a message ‘(Download) Save file to: simplesim-3v0e.tgz’ at the bottom of the page, hit enter to save file in the current directory. To get out of the browser, press q. - Compile SimpleScalar
tar xvzf simplesim-3v0e.tgz
cd simplesim-3.0
make config-pisa
make
- Test the installation using
./sim-safe tests/bin.little/test-math
12 comments
Skip to comment form
Thanks for this specific help. It is really helpful. I have done the same processes under ubuntu. Unfortunately, it is not working correctly. Some steps may be missing or my distribution is not full.
thank you so so much! that worked for me!
Author
Glad it helped!
I am getting a few undefined references errors when I do the “make” command; specifically to “md_opoffset”, “md_opmask”, and “md_opshift”. Do you have any solution for this? Thanks,
Thanks a lot for this tutorial but I have a question. How do I download and install other simplescalar utilities using this using this cygwin bash terminals?
When I enter the command “make config-pisa” it says (translated from italian) : “no rule to generate the target <>. Arrest.”
When I, then, enter “make” it gives me a long list of errors and warnings in the “syscall.c” file.
Any solution?
Thanks
The solution is to type it by hand. I had the same issue, and retyped make config-pisa, and it worked just fine. There seems to be some janky non-ascii chars in the article.
I get the error ‘File not found’ for when I try to use the command w3m to accept the agreement. How can I solve this issue?
i get error “file does not exist” after running – w3m http://www.simplescalar.com/agreement.php3?simplesim-3v0e.tgz, any solution to this or the cause?
Me too. Fixed by getting another copy from the following source (slightly a different version): http://www.cse.iitd.ac.in/%7Edrajeswari/CSL718/simplescalar-installn-files.zip
So, you can instead run: w3m http://www.cse.iitd.ac.in/%7Edrajeswari/CSL718/simplescalar-installn-files.zip
Then open your home directory (usually C:\cygwin64\home\\) and run the next commands:
tar xvzf simplesim-3v0d.tgz
cd simplesim-3.0
make config-pisa
make
When I ran the last “make” command, I got the problem with the compilation problem as follows, even though “machine.h” does exist in the directory. Any suggestions on how to resolve this?
$ make
gcc -DDEBUG -o sysprobe sysprobe.c
endian probe results: little
probe flags: -DBYTES_LITTLE_ENDIAN -DWORDS_LITTLE_ENDIAN -DFAST_SRL -DFAST_SRA
-lme libs:
gcc `./sysprobe -flags` -DDEBUG -O0 -g -Wall -c sim-fast.c
sim-fast.c:81:10: fatal error: machine.h: Invalid argument
#include “machine.h”
^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:405: sim-fast.o] Error 1
After I updated the “gcc-core” and “gcc-g++” as instructed, it worked! A BIG “Thank You”!
Have you also successfully built the cross compiler on CygWin for SimpleScalar so that you can compile any C code to run in SimpleScalar?