Gem5 Aladdin DRAMSim2 - leeyoungseo/- GitHub Wiki
gem5-aladdin ๊ณต์ github
์์ ์๋ฃ์์ requirement ๋ฑ์ ํ์ธํ ์ ์์ผ๋, ๋จผ์ requirement๋ฅผ ์ค์นํ๊ณ ์๋ ๊ณผ์ ์ ์งํํด์ผ ํจ
git clone https://github.com/harvard-acc/gem5-aladdin
git submodule update --init --recursive
cd ext/dramsim2
git clone git://github.com/dramninjasUMD/DRAMSim2.git
๊ฒฝ๋ก ๋ฌธ์ ๋ก, ์๋์ ๊ฐ์ ์์ ์ด ์ถ๊ฐ์ ์ผ๋ก ํ์ํจ
vi src/mem/dramsim2_wrapper.cc
86 string working_dir_str;
87 working_dir_str = "/your/gem5/aladdin/path/" + working_dir;
88 _clockPeriod = extractConfig<double>("tCK=",
89 working_dir_str + '/' + config_file);
90
91 if (!_clockPeriod)
92 fatal("DRAMSim2 wrapper failed to get clock\n");
93
94 // we also need to know what transaction queue size DRAMSim2 is
95 // using so we can stall when responses are blocked
96 _queueSize = extractConfig<unsigned int>("TRANS_QUEUE_DEPTH=",
97 working_dir_str + '/' + system_file);
98
99 if (!_queueSize)
100 fatal("DRAMSim2 wrapper failed to get queue size\n");
101
102
103 // finally, get the data bus bits and burst length so we can add a
104 // sanity check for the burst size
105 unsigned int dataBusBits =
106 extractConfig<unsigned int>("JEDEC_DATA_BUS_BITS=",
107 working_dir_str + '/' + system_file);
108 unsigned int burstLength =
109 extractConfig<unsigned int>("BL=", working_dir_str + '/' + config_file);
vi ext/dramsim2/DRAMSim2/IniReader.cpp
362 filename = "/your/gem5/aladdin/path/" + filename;
ReadIni ํจ์ ์๋์ ์๋ ๊ฒฝ๋ก๋ฅผ ์์
vi ext/dramsim2/DRAMSim2/MultiChannelMemorySystem.cpp
239 path = "/your/gem5/aladdin/path/" + path;
MultiChannelMemorySystem::InitOutputFiles ํจ์ ์๋์ ์๋ ๊ฒฝ๋ก๋ฅผ ์์
scons -j8 build/X86/gem5.opt
-j8 option์ 8๊ฐ์ thread์์ compile์ ์งํํ๋ค๋ ๋ป์ผ๋ก, ๋นจ๋ฆฌ ์งํํ๊ธฐ ์ํจ์
export ALADDIN_HOME=/your/gem5/aladdin/path/
cd src/aladdin/integration-test/with-cpu/test_load_store
sh run.sh
integration-test์ example๋ค์ด ์์ผ๋ฉฐ, test_load_store (with-cpu) ์ ๋ํด์ ์ค๋ช ํ๊ฒ ์
์์ ๊ฐ์ด run.sh๋ฅผ ์ํํ๋ฉด configuration์ ๋ง๊ฒ gem5-aladdin simulator๊ฐ ๋์ํจ
DRAMSim2์ ๊ฐ์ด ๋์ํ๊ธฐ ์ํด์ shell script file์ธ run.sh์ ์๋์ ๊ฐ์ด ์์
14 --mem-type=DRAMSim2 \
gem5-aladdin์ ๋ํ output ํ์ผ์ ๋์ผ ๊ฒฝ๋ก์ outputs/ ํด๋์,
dramsim2์ ๋ํ output ํ์ผ์ /ext/dramsim2/DRAMSim2/results/์ vis ํ์ผ๋ก ์กด์ฌํจ