-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapply_B.sh
48 lines (41 loc) · 1.22 KB
/
apply_B.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
# Applying Patch for PA2-PartB
#1. Make sure to keep the freshly extracted copy of ChampSim in ChampSource dir
echo "*********************************************"
echo "Apply PA2_B Patch file"
echo "NOTE: Make sure to keep the freshly extracted copy of ChampSim and delete the other files generated by previous patch"
echo "Please make sure that you have set the following Environment VAriables "
echo "1. Set ChampSource to champsim folder"
echo "2. Set PatchFiles to PatchFiles folder"
echo "3. Set TraceFiles to TraceFiles folder"
echo "*********************************************"
echo "If All the above variables are set. Press any key"
read opt
echo $opt
cd $ChampSource
echo "Printing Champsim Dir"
pwd
#copy Trace Files to Prent Dir of
cd ..
cp -r $PatchFiles/* .
echo "-------"
echo "Copied Patch Files "
cd $ChampSource
#applying patch
patch -p1 < ../PA2_B.patch
echo "-------"
echo "Applied Patch B "
#changing the permissions of the run script files
chmod +x run_champsim.sh
chmod +x run_2core.sh
# Go to parent dir
cd ..
# Creating a folder to store the traces
mkdir Traces
cd Traces
pwd
cp -r $TraceFiles/* .
echo "-------"
echo "Copied Trace Files "
echo "-------"
echo "Done!! Now build and run the PA2_B part"