天天看點

Sniper模拟器的安裝

1. sniper的安裝步驟

  • 安裝環境:ubuntu14.04, gcc 4.8.4(gcc版本盡可能不超過這個版本)
  • git clone  http://snipersim.org/download/42f517eddcf77bfe/git/sniper.git
  • wget http://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-gcc.4.4.7-linux.tar.gz
  • pin解壓縮到sniper/pin_kit 
  • export SNIPER_TARGET_ARCH=ia32 # default: intel64 (or update Makefile.config)
  • sudo apt-get install libc6-dev-i386 
  • sudo apt-get install g++-4.4-multilib 
  • sudo apt-get install lib32z1-dev 
  • make # or use 'make -j N' where N is the number of cores in your machine to use parallel make
  • cd test/fft
  • make run
  • 說明:最後兩個步驟用于測試sniper是否安裝成功,sniper會使用預設配置運作fft測試樣例。如果安裝成功,fft檔案夾中會出現sim.*檔案和viz的檔案夾,這些檔案為模拟運作之後的分析結果。
  • 官網連結:http://snipersim.org/w/Getting_Started
  • sniper-manual:http://snipersim.org/w/Manual

2. sniper的檔案結構

  • /sniper/test:sniper自帶的測試檔案,帶有Makefile,配置檔案為預設的gainestown
  • /sniper/config:sniper的配置檔案,*.cfg。預設均使用gainestown配置檔案。gainestown.cfg會包含nehalem.cfg檔案,nehalem.cfg包含base.cfg檔案
  • /sniper/common/core/memory_subsystem:包含sniper的存儲系統的實作
  • /sniper/pin/pin_sim.cc:sniper模拟器的開始,main函數在此檔案中
  • /sniper/run-sniper:python腳本。sniper編譯之後生成的檔案,包含配置參數,例如輸出目錄,配置檔案的讀入等
  • sim.out:程式模拟完成之後的分析報告
  • sim.cfg:指明目前程式的模拟環境