GEM5 使用一 build the simulator binary

需要安裝的軟件有 mercurial scons swig gcc m4 python python-dev libgoogle-perftools-dev g++ libprotobuf-dev

創建ARM架構的模擬器:(參考網址 http://www.m5sim.org/Introduction )

     1) 在gem5目錄頂層,scons build/ARM/gem5.opt ,注意這裏ARM要大寫,創建成功後就出現一個./build文件夾

     2)使用測試程序進行驗證 build/ARM/gem5.opt    configures/examples/se.py  -c   tests/test-progs/hello/bin/arm/linux/hello


創建X86架構的模擬器:(參考網址 http://www.m5sim.org/Introduction )

    1)scons build/X86/gem5.prof 注意這裏X86要大寫

    2)使用測試程序進行驗證 build/X86/gem5.prof    configures/examples/se.py  -c   tests/test-progs/hello/bin/x86/linux/hello


由於我的機子是X86架構的,因此我自己創建了一個測試程序,名稱爲hi.c 編譯時要靜態編譯,不要使用任何動態庫

gcc -static hi.c -o hi

測試驗證 build/X86/gem5.prof    configures/examples/se.py  -c  hi

結果輸出正確



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章