Now at the end of this step you have successfully installed all of the components to run and compile files for Simplescalar. Test the cross compiler, do the following steps: Write a C program. Open the Cygwin terminal and make sure you are at Cygwin root directory by typing /”. “cd 3. To compile a c program, type <the name of program.c>”. “sslittle-na-sstrix-gcc e.g. sortingNumbers.c”. “sslittle-na-sstrix-gcc 4. To run Simplescalar, go to simplesim-3.0 directory by typing /simplesim-3.0” “cd Then type ../<the name of compiled c program for example a.out>”. “./sim-safe.exe To store the simplescalar out to a file do the following steps: Type -redir:sim <file name> ../a.out” “./sim-outorder.exe -redir:sim exam1 ../a.out”. Example: “./sim-outorder.exe To create a config file for the C program that you have been used in the previous step. Type -dumpconfig exam2”. “./sim-outorder.exe To make some change on the parameters open the config file (under simplesim-3.0 folder) by an editor and change some of the parameters. For example, L1 data cache configdl1 il1:512:32:1: l which means size=128 kb, 32 byte block size, associativity equals 4, and cycle speed is 1. As you can see, since level 1 cache is 1 mb, the latency is 1 cycles. Then you can change these numbers and save it.
Now at the end of this step you have successfully installed all of the components to run and compile files for Simplescalar. Test the cross compiler, do the following steps: Write a C program. Open the Cygwin terminal and make sure you are at Cygwin root directory by typing “cd /”. 3. To compile a c program, type “sslittle-na-sstrix-gcc <the name of program.c>”. e.g. “sslittle-na-sstrix-gcc sortingNumbers.c”. 4. To run Simplescalar, go to simplesim-3.0 directory by typing “cd /simplesim-3.0” Then type “./sim-safe.exe ../<the name of compiled c program for example a.out>”. To store the simplescalar out to a file do the following steps: Type “./sim-outorder.exe -redir:sim <file name> ../a.out” Example: “./sim-outorder.exe -redir:sim exam1 ../a.out”. To create a config file for the C program that you have been used in the previous step. Type “./sim-outorder.exe -dumpconfig exam2”. To make some change on the parameters open the config file (under simplesim-3.0 folder) by an editor and change some of the parameters. For example, L1 data cache configdl1 il1:512:32:1: l which means size=128 kb, 32 byte block size, associativity equals 4, and cycle speed is 1. As you can see, since level 1 cache is 1 mb, the latency is 1 cycles. Then you can change these numbers and save it.
Report-Lab1.docx