Georgia Institute of Technology

CS4290/CS6290/ECE4100/ECE6100

Assignment #2
Program due: Monday (9/24) 6:00 pm T-square
Prof. Hyesoon Kim, Instructor
Prof. Moinuddin Qureshi, Instructor

This is an individual assignment. You can discuss this assignment with other classmates but you should do your assignment individually. Please follow the submission instructions. If you do not follow the submission file names, you will not receive the full credit. Please check the class homepage to see the latest update. Your code must run on the Shuttle cluster with g++4.1. This assignment is sufficiently longer than the first assignment and requires lots of C++ programming skills. Please start early! br>

Part 1: Simulator (80%): Complete the memory system


You will extend your Lab #1 pipeline design. Please download the new simulator frame (Last update 09/19 Errata). From sim.cpp/sim.h, you copy all the lines that have "NEW-LAB2" to your lab1 sim.cpp/sim.h. You have to extend your sim.cpp. In the new frame, knob related files and makefile are changed. Cache and memory related files are also added to help your assignment. Please look at memory.h file very carefully and read this assignment description and faq carefully and understand them.
Step 1:


Step 2: Summary of how/when to send an op to MSHR.
You need to send op into the MSHR. The size of MSHR is determined by KNOB_MSHR_SIZE.

Step 3: Modeling a DRAM (main_mem->run_a_cycle())
Knobs related to this assignment

KNOB_DCACHE_SIZE: data cache size (kbytes) (default value: 512 i.e., 512KB)
KNOB_DCACHE_WAY: N-way set associative data cache (default value: 4)
KNOB_DCACHE_LATENCY: cache latency when a cache hit (default value: 5)
KNOB_MEM_LATENCY_ROW_HIT: DRAM access latency when row buffer hit. ( default value: 100)
KNOB_MEM_LATENCY_ROW_MISS: DRAM access latency when row buffer miss ( default value: 200)
KNOB_DCACHE_FIXED_PENALTY: dcache miss has the fixed penalty (default value: 200)
KNOB_MSHR_SIZE: the number of entries in the MSHR ( default value is 4)
KNOB_DRAM_BANK_NUM: The number of DRAM banks (default value is 4
KNOB_DRAM_PAGE_SIZE: the size of DRAM banks (unit: KB) (default value is 2 i.e., 2KB)
KNOB_PRINT_MEM_DEBUG: print out memory debug information


You have to update dcache_hit_count, dcache_miss_count accordingly.



Grading Policy

Partial Grading
If you implement a blocking cache with a fixed memory latency (use KNOB_DCACHE_FIXED_PENALTY) you will get 20%.
If you implement a non-blocking cache with with a fixed memory latency, you will get 50%.
Late Policy
We follow the late policy in the course homepage. However, because of the first midterm date, we stop the clock after the deadline and restart after the exam. So Friday midnight will be considered as 1-day late and Saturday midnight will be 2-day late and so on.

Submission Guide
Please do not turn in pzip files(trace files). Trace file sizes are so huge so they will cause a lot of problems.
(Tar the lab2 directory. Gzip the tarfile and submit lab2.tar.gz file at T-square)
cd lab2
make clean
rm *.pzip
cd ..
tar cvf lab2.tar lab2/*.h lab2/*.cpp
gzip lab2.tar



Part 2: Report (20%)
Include your simulation results in a report. Please note that there are many simulation cases so it will take several hours to simulate all of them.

The default configuration is
Submission Guide
Your submission file name MUST be report.pdf and you must include your name and T-square account name . If you fail to put your name and your file name is different than "report.pdf", your report won't be graded .