SimpleScalar What is it? SimpleScalar is a suite of processor simulators and to
SimpleScalar What is it? SimpleScalar is a suite of processor simulators and tools used for simulating real programs running on a modern processor and systems. It is used to build modeling applications for program performance analysis, detailed micro-architectural modeling, and hardware-software co-verification. The tool set includes sample simulators ranging from a fast functional simulator to a detailed, dynamically scheduled processor model that supports non-blocking caches, speculative execution, and state-of-the- art branch prediction. Basically, SimpleScalar is a C program which models a processor and it accepts the programs (that could run on this hypothetical processor) as arguments. SimpleScalar simulators can emulate the Alpha, PISA, ARM, and x86 instruction sets, and these are very similar to the MIPS architecture that will be discussed in EE5364/CSCI5204. SimpleScalar was developed at the University of Wisconsin in Madison and is one of the most widely used architectural simulators in academia. Why are we using this? You will be using SimpleScalar for your assignments and/or course projects and this guide is being posted now so that you may properly install the simulator on your CSELabs accounts and get comfortable with the simulator well in advance. Installing and setting up SimpleScalar on your CSELabs accounts It is highly recommended that you install SimpleScalar on your CSELabs accounts since some simulations take several hours (sometimes days) to complete and it may not be feasible for you to run them on your personal machines. Having said that, you can always install it on your personal machines for development work. 1. Find a big endian machine This C code snippet will enable you to identify a big/little endian machine, however, all CSELabs machines running Linux are big endian. #include <stdio.h> main() { long one=1; if(!(*((char*)(&one)))) printf("Big endian\n"); else printf("Small endian\n"); } 2. Get the simulator and a sample benchmark a. Download the simplesim-3v0e.tar file from moodle and untar it. This will create the folder simplesim-3.0 b. Download the sample benchmark (anagram) from moodle. c. It is strongly recommended that you read the README before continuing to the next step. d. Change to the directory simplesim-3.0 and run the following commands i. make clean ii. make config-alpha iii. make If you see the message “my work here is done….”, then you have successfully installed SimpleScalar on your machine. e. You now have the following simulators: i. Functional: sim-safe, sim-fast ii. Cache: sim-cache iii. Profiling: sim-profile iv. Out of order processor: sim-outorder f. You may run “./sim-outorder” in the simplesim-3.0 directory to get the manpages for SimpleScalar. It gives a list of all possible arguments that SimpleScalar can accept that are used to model the processor architecture. Running the simulation 1. Go to the directory containing the anagram benchmark and run: ./<path_to_sim-outorder>/sim-outorder anagram words < anagram.in This will take about a minute to run and will give the output of anagram, as it ran on SimpleScalar. It will also give the output of SimpleScalar on the terminal, which will the simulation statistics. If you can see the simulation statistics and the output of anagram (similar to anagram.out), then your simulation has completed without any error. 2. As an example, if you wish to change the latency of your caches, then you may run: ./<path_to_sim-outorder>/sim-outorder -cache:dl1lat 2 - cache:dl2lat 12 anagram words < anagram.in How to use and present the results 1. You will get different results for every processor configuration and for every benchmark. These will be similar to: 2. If, for example, you have to compare the IPC for different cache replacement policies (viz. FIFO, Random, LRU, NMRU) for four different benchmarks (GCC, GO, GZIP, Anagram), then the graph would look like this. Hints, Tips and Tricks: 1. Scripting: It is very useful to write scripts for all the SimpleScalar commands. If, for instance, you have to simulate and compare 10 different configurations for 4 different benchmarks, then you will have to execute the SimpleScalar command 10X4 = 40 times. A scripting language (like Shell scripting, Python, Perl etc.) will be extremely beneficial. 2. Tracking the simulations: Before you use the script to spawn several processes on a machine, it will be useful to check the workload of that machine. If it already has too many processes, then your simulations may take weeks to finish. Use the top, prstat commands to check the workloads of the machine and also to find out the Process ID of a process. This is useful if you want to kill a simulation. 3. nohup, screen These commands allow you to continue running the simulation even after you have logged out of the machine. This is useful if your simulations are taking too long. e.g.: nohup ./<path to sim-outorder>/sim-outorder -redir:sim simoutput.txt -redir:prog progoutput.txt -cache:dl1lat 2 - cache:dl2lat 12 anagram words < anagram.in This command will run the simulation and will store the program output in progoutput.txt, the simulation statistics in simoutput.txt even if you have logged out of the PC after executing the command. It is strongly recommended that you start using SimpleScalar for the getting simulation statistics for the benchmarks provided. Also, it will be useful to start going through the C/C++ code of SimpleScalar because your project and/or assignment may require you to make some modifications in the code to achieve a particular processor functionality. uploads/Industriel/ simplescalar-guide.pdf
Documents similaires
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/q6VZjdUVvO2CwVjTSFlm9Z3DMk233Ma0DpZWqOwq5w6oNceyLjD6ZWYP2wWIcYqF7YvKa2IlzWLzjF4mk2OHKEEq.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/JZeP6qsRmMGOCLzXoPTkqzf0POpHFtL0uiaX6FR8r30nZd4VV46f31e382m7xjENEvDLikbJKw8JTbOD51UwViuq.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/V0nGKNB6unTiEcE1qA4uE2NtooKk8gbVQePxZKqfsfhO49ljgYHn0vJKIp2CsWQ44jmqgVe7Gbf67UZvfhFPsUww.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/fuACb7VKxIAeHtuTPlEfBVAtEyqBlepRZWXb4317DVnYNlCRDeqOXtLH1cmAzWl3GUK5K6FFeL1CDfzuyhgkPbeh.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/cuTARBeoFUn4vePylNo8S7xlukYznXBG6hxPEiGseoeSzphC3sqxfuZlJdim22UmMDFzZHPywf8nqKFXHd25bslW.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/pFLP14sYuZKg5m4s8BEoczDYBRi3nIKjCj646vNr9PUAaOFdXSB0NU9oXfiJ7OVGNwmh0w1kNWkjGwuCnCJ1qRgd.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/bODqxvPrL0zoSad0f7M8mnExXFvl0ldSf7er2JmlW7YxmU4NhXm09HXxmJkbN3K6twvM8PqW8NWEHVziDRVknmVN.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/6qPr1ohaHcSV3Nwmrfq7jeF2FwZou9khtIexiVaMqde0cdiP8cvvHqxVT955RbW1eWkN9q9qZNvjiCq2aKx0Bruc.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/3sjhXKHGwbUgfJ8TdoYg6Tk4iAiv4SFXeF7tdYzV76w7rLoWpqfTqtY4yulEBVZPsh1PN3aVNuep7h8LUJDVr6LG.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/87g0SNZkLoLPwsSLn0YL4ertQ2Efvpw8eTIcVpkOsrl3VnRZKYh4gfCzgjKmjWyIPsShFZdsq8T57JxIc9uV2jAb.png)
-
23
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Aoû 09, 2022
- Catégorie Industry / Industr...
- Langue French
- Taille du fichier 0.5690MB