gem5运行cpu2006

1,因为cpu2006是iso格式,需要mount到linux的某个目录下再进行操作。
      如:​# sudo mount  -o loop path-to-cpu2006.iso  /mnt/cpu2006
2,​安装cpu2006
      # cd /mnt/cpu2006
     # ./install.sh -d    cpu2006-Install-Path/  (-d是指定安装路径)
3,​安装完后,需要修改环境变量,即在安装的目录执行命令:
      #source cshrc(我的遇到一个错误)   or   #source shrc
4,​修改编译,cpu2006的配置文件
​     # cd cpu2006-Install-Path/config
     # cp Example-medium.cfg  arm.cfg (以任何一个配置文件为基础进行修改都可以)
    打开arm.cfg,只需修改CC,CXX,FC,改成如下格式:
   CC =  cross-compiler-gcc --static
   CXX = cross-compiler-g++ --static
   FC =cross-compiler-gfortran --static
5,​编译cpu2006:
    # cd cpu2006-Install-Path
    #  runspec --action=build --config=arm.cfg --tune=base int (或编译bzip2、perlbench等benchmark)
6,使用gem5运行​cpu006​​​
​    build/ARM/gem5.opt configs/example/se.py -c cpu2006-Install-Path/benchspec/CPU2006/401.bzip2/exe/bzip2_base.gcc41-64bit  -o  cpu2006-Install-Path/benchspec/CPU2006/401.bzip2/data/test/input/control

注:在gem5上运行cpu2006时需要带上-o ,否则可能会出现can not open file input.compined: No such file or directory.​


你可能感兴趣的:(gem5)