Skip to content
Open

L #1

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"files.associations": {
"cachesim.h": "c",
"cstdlib": "c",
"math.h": "c"
}
}
38 changes: 38 additions & 0 deletions Outputs/part1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
login-20-26:/CS5375$ gcc cachesim.c -o cachesim
login-20-26:/CS5375$ ./cachesim direct ./trace_for_students/trace.hpcg

==================================
Cache type: Direct-Mapped Cache
==================================
Cache Hits: 1301327
Cache Misses: 198673
Cache Hit Rate: 86.755135%
Cache Miss Rate: 13.244867%
login-20-26:/CS5375$ ./cachesim direct ./trace_for_students/trace.stream

==================================
Cache type: Direct-Mapped Cache
==================================
Cache Hits: 1059918
Cache Misses: 2174137
Cache Hit Rate: 32.773651%
Cache Miss Rate: 67.226341%
login-20-26:/CS5375$ ./cachesim direct ./trace_for_students/trace.stream_10

==================================
Cache type: Direct-Mapped Cache
==================================
Cache Hits: 0
Cache Misses: 10
Cache Hit Rate: 0.000000%
Cache Miss Rate: 100.000000%
login-20-26:/CS5375$ ./cachesim direct ./trace_for_students/trace.stream_20

==================================
Cache type: Direct-Mapped Cache
==================================
Cache Hits: 4
Cache Misses: 16
Cache Hit Rate: 20.000000%
Cache Miss Rate: 80.000000%
login-20-26:/CS5375$
159 changes: 159 additions & 0 deletions Outputs/part2_Q1_tracehpcg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
login-20-25:/CS5375$ ./part2 direct ./trace_for_students/trace.hpcg
Select 1 to execute Question 1 or 2 to Question 2 :1
For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 1
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 1

====== STARTING EXECUTION FOR 16 BYTES cache line size ==========
==================================
Cache Hits: 1288305
Cache Misses: 211695
Cache Hit Rate : 85.887001038%
Cache Miss Rate : 14.112999916%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 1
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 2

====== STARTING EXECUTION FOR 16 BYTES cache line size ==========
==================================
Cache Hits: 1271623
Cache Misses: 228377
Cache Hit Rate : 84.774864197%
Cache Miss Rate : 15.225132942%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 1
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 4

====== STARTING EXECUTION FOR 16 BYTES cache line size ==========
==================================
Cache Hits: 1277153
Cache Misses: 222847
Cache Hit Rate : 85.143531799%
Cache Miss Rate : 14.856466293%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 1
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 8

====== STARTING EXECUTION FOR 16 BYTES cache line size ==========
==================================
Cache Hits: 1278586
Cache Misses: 221414
Cache Hit Rate : 85.239067078%
Cache Miss Rate : 14.760933876%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 2
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 1

====== STARTING EXECUTION FOR 32 BYTES cache line size ==========
==================================
Cache Hits: 1299112
Cache Misses: 200888
Cache Hit Rate : 86.607467651%
Cache Miss Rate : 13.392533302%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 2
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 2

====== STARTING EXECUTION FOR 32 BYTES cache line size ==========
==================================
Cache Hits: 1281291
Cache Misses: 218709
Cache Hit Rate : 85.419395447%
Cache Miss Rate : 14.580599785%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 2
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 4

====== STARTING EXECUTION FOR 32 BYTES cache line size ==========
==================================
Cache Hits: 1287229
Cache Misses: 212771
Cache Hit Rate : 85.815269470%
Cache Miss Rate : 14.184732437%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 2
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 8

====== STARTING EXECUTION FOR 32 BYTES cache line size ==========
==================================
Cache Hits: 1288697
Cache Misses: 211303
Cache Hit Rate : 85.913131714%
Cache Miss Rate : 14.086866379%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 3
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 1

====== STARTING EXECUTION FOR 128 BYTES cache line size ==========
==================================
Cache Hits: 1429196
Cache Misses: 70804
Cache Hit Rate : 95.279731750%
Cache Miss Rate : 4.720266342%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 3
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 2

====== STARTING EXECUTION FOR 128 BYTES cache line size ==========
==================================
Cache Hits: 1341934
Cache Misses: 158066
Cache Hit Rate : 89.462265015%
Cache Miss Rate : 10.537733078%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 3
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 4

====== STARTING EXECUTION FOR 128 BYTES cache line size ==========
==================================
Cache Hits: 1348062
Cache Misses: 151938
Cache Hit Rate : 89.870796204%
Cache Miss Rate : 10.129199982%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 3
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 8

====== STARTING EXECUTION FOR 128 BYTES cache line size ==========
==================================
Cache Hits: 1344947
Cache Misses: 155053
Cache Hit Rate : 89.663139343%
Cache Miss Rate : 10.336867332%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 0

login-20-25:/CS5375$
159 changes: 159 additions & 0 deletions Outputs/part2_Q1_tracestream.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
login-20-25:/CS5375$ ./part2 direct ./trace_for_students/trace.stream
Select 1 to execute Question 1 or 2 to Question 2 :1
For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 1
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 1

====== STARTING EXECUTION FOR 16 BYTES cache line size ==========
==================================
Cache Hits: 1054393
Cache Misses: 2179662
Cache Hit Rate : 32.602817535%
Cache Miss Rate : 67.397186279%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 1
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 2

====== STARTING EXECUTION FOR 16 BYTES cache line size ==========
==================================
Cache Hits: 1047765
Cache Misses: 2186290
Cache Hit Rate : 32.397872925%
Cache Miss Rate : 67.602127075%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 1
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 4

====== STARTING EXECUTION FOR 16 BYTES cache line size ==========
==================================
Cache Hits: 1048044
Cache Misses: 2186011
Cache Hit Rate : 32.406501770%
Cache Miss Rate : 67.593505859%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 1
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 8

====== STARTING EXECUTION FOR 16 BYTES cache line size ==========
==================================
Cache Hits: 1047903
Cache Misses: 2186152
Cache Hit Rate : 32.402141571%
Cache Miss Rate : 67.597862244%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 2
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 1

====== STARTING EXECUTION FOR 32 BYTES cache line size ==========
==================================
Cache Hits: 1068994
Cache Misses: 2165061
Cache Hit Rate : 33.054290771%
Cache Miss Rate : 66.945709229%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 2
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 2

====== STARTING EXECUTION FOR 32 BYTES cache line size ==========
==================================
Cache Hits: 1062504
Cache Misses: 2171551
Cache Hit Rate : 32.853614807%
Cache Miss Rate : 67.146385193%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 2
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 4

====== STARTING EXECUTION FOR 32 BYTES cache line size ==========
==================================
Cache Hits: 1062487
Cache Misses: 2171568
Cache Hit Rate : 32.853092194%
Cache Miss Rate : 67.146911621%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 2
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 8

====== STARTING EXECUTION FOR 32 BYTES cache line size ==========
==================================
Cache Hits: 1062604
Cache Misses: 2171451
Cache Hit Rate : 32.856708527%
Cache Miss Rate : 67.143287659%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 3
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 1

====== STARTING EXECUTION FOR 128 BYTES cache line size ==========
==================================
Cache Hits: 1082336
Cache Misses: 2151719
Cache Hit Rate : 33.466838837%
Cache Miss Rate : 66.533157349%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 3
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 2

====== STARTING EXECUTION FOR 128 BYTES cache line size ==========
==================================
Cache Hits: 1059297
Cache Misses: 2174758
Cache Hit Rate : 32.754451752%
Cache Miss Rate : 67.245552063%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 3
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 4

====== STARTING EXECUTION FOR 128 BYTES cache line size ==========
==================================
Cache Hits: 1062298
Cache Misses: 2171757
Cache Hit Rate : 32.847248077%
Cache Miss Rate : 67.152755737%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 1

For execution over 32KB Cache size, Click 1 for 16 bytes cache line size, 2 for 32 bytes cache line size, 3 for 128 bytes cache line size : 3
Select 1 for fully associative execution, 2 for 2 way execution, 4 for 4 way execution, 8 for 8 way execution: 8

====== STARTING EXECUTION FOR 128 BYTES cache line size ==========
==================================
Cache Hits: 1061428
Cache Misses: 2172627
Cache Hit Rate : 32.820343018%
Cache Miss Rate : 67.179656982%

===========XXXX EXECUTION ENDED XXXX ==========
Select 1 to continue the test cases, any other to exit: 0

login-20-25:/CS5375$
Loading