ArmIE的安装

参考:https://developer.arm.com/tools-and-software/server-and-hpc/arm-architecture-tools/arm-instruction-emulator/installing-arm-instruction-emulator

运行环境:Qemu+arm64版本的ubuntu16.04

 

  前面一篇博客使用Qemu运行Ubuntu文件系统 —— 搭建SVE学习环境(2)中才Qemu上运行了一个ubuntu16.04的系统,然后再在其中安装了ArmIE,来模拟SVE指令的执行。下面简单介绍一下ArmIE的安装方法,关于ArmIE的详细介绍,请参考ARM官网:Arm Instruction Emulator

第一步,安装module软件包(链接

sudo apt-get install environment-modules

 

第二步、下载ArmIE安装包(链接

  可以到这里下载ArmIE安装包,这里下载 ARM-Instruction-Emulator_19.2_AArch64_Ubuntu_16.04_aarch64.tar.gz

  

第三步、解压安装ArmIE

tar -xvf  ARM-Instruction-Emulator_19.2_AArch64_Ubuntu_16.04_aarch64.tar.gz 

cd ARM-Instruction-Emulator_19.2_AArch64_Ubuntu_16.04_aarch64

sudo ./arm-instruction-emulator-19.2_Generic-AArch64_Ubuntu-16.04_aarch64-linux-deb.sh

  默认会安装到/opt/arm下,也可以通过参数-i换成别的安装路径

 

第四步、设置环境变量MODULEPATH

export MODULEPATH=$MODULEPATH:/opt/arm/modulefiles/

 

第五步、重新登录系统,使用module查看哪些模块,并加载ArmIE模块

pengdl@firefly:~$ module avail

-------------------------------------------------------------- /opt/arm/modulefiles --------------------------------------------------------------
Generic-AArch64/Ubuntu/16.04/arm-instruction-emulator/19.2 Generic-AArch64/Ubuntu/16.04/gcc_runtimes/8.2.0

---------------------------------------------------------- /usr/share/modules/versions -----------------------------------------------------------
3.2.10

--------------------------------------------------------- /usr/share/modules/modulefiles ---------------------------------------------------------
dot         module-git  module-info modules     null        use.own

------------------------------------------------------------- /opt/arm/modulefiles/ --------------------------------------------------------------
Generic-AArch64/Ubuntu/16.04/arm-instruction-emulator/19.2 Generic-AArch64/Ubuntu/16.04/gcc_runtimes/8.2.0

pengdl@firefly:~$ module load Generic-AArch64/Ubuntu/16.04/arm-instruction-emulator/19.2

pengdl@firefly:~$ echo $PATH /opt/arm/arm-instruction-emulator-19.2_Generic-AArch64_Ubuntu-16.04_aarch64-linux/bin64:/home/pengdl/bin:/home/pengdl/.local/bin:/home/pengdl/sve_acle_cross/bin:/opt/gstreamer/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games pengdl@firefly:~$

 

为了实现以后每次开机都可以直接使用ArmIE,可以将 module load Generic-AArch64/Ubuntu/16.04/arm-instruction-emulator/19.2 加到.bashrc中。

 

第六步、测试

pengdl@firefly:~$ armie 
Execute binaries containing SVE instructions on Armv8-A hardware

Usage:
  armie [emulation parameters] -- <command to execute>

Examples:
  armie -msve-vector-bits=256 -- ./sve_program
  armie -msve-vector-bits=2048 --iclient libinscount.so -- ./sve_program --opt foo
  armie -e libmemtrace_sve_512.so -i libmemtrace_simple.so -- ./sve_program

Flags:
  -m<string>                    Architecture specific options. Supported options:
    -msve-vector-bits=<uint>    Vector length to use. Must be a multiple of 128 bits up to 2048 bits
    -mlist-vector-lengths       List all valid vector lengths
  -e, --eclient <client>        An emulation client based on the DynamoRIO API
                                If this is not specified, the default SVE client is used
  -i, --iclient <client>        An instrumentation client based on the DynamoRIO API
  -x, --unsafe-ldstex           Enables a workaround which avoids an exclusive load/store bug on certain AArch64 hardware
                                (See 'Known Issues' in RELEASE_NOTES.txt for details)
  -s, --show-drrun-cmd          Writes the full DynamoRIO drrun command used to execute ArmIE to stderr
                                This can be useful when debugging or developing clients
  -h, --help                    Prints this help message
  -V, --version                 Prints the version

 

完。

posted @ 2019-09-27 10:31  摩斯电码  阅读(1062)  评论(0编辑  收藏  举报