ARMulator 简介

        ARMulator 是一个在 ARM 公司推出的集成开发环境 ADS (ARM Developer Suite)中提供的指令集模拟器。它与运行在通用计算机(通常是x86体系结构)上的调试器相连接,模拟 ARM 微处理器体系结构和指令集,提供了开发和调试 ARM 程序的软件仿真环境。ARMulator 不仅可以仿真 ARM 处理器的体系结构和指令集,还可以仿真存储器和处理器外围设备,例如中断控制器和定时器等,这样就模拟了一个进行嵌入式开发的最小子系统,另外使用者还可以扩展添加自己的外设。
  ARMulator 同时支持全部的标准C库函数,这样所有的C程序都可以在仿真器上运行。ARMulator 通过 Semihosting 方式来实现程序中输入/输出功能。Semihosting是指在 ARM 程序开发调试的过程中,目标系统还不具备输入/输出的功能,通过调试代理向调试器请求 I/O。ARMulator 就是这里所说的调试代理之一,其他还有 Angel、Multi-ICE也通过类似的方式来实现 I/O 功能。
  ARMulator 在 Windows 平台上实现为动态链接库文件(.dll),在 Linux 或者 Solaris 系统上实现为共享库文件(.so)。前者的使用一般是通过 ARM 公司提供的图形界面调试器 AXD 中,选择目标系统为 ARMulate.dll,这样就设置了 ARMulator 作为调试代理。用户在进行调试开发时,对于底层使用的调试代理是透明的。
  2.ARMulator 组成
  ARMulator 本身是由一系列的模块(module)组成的,其中最主要的模块包括:
  ? ARM 处理器核心模块,用来仿真处理器的体系结构。
  ? 处理器使用的存储器模块,用来仿真存储系统。
  缺省的内存模型是 flatmem ,内存的大小不限制,理论上 4G 的地址空间都可以使用。
  同时,ARMulator 也包含了几种外设模块,用来仿真如下的外设模型:
  ? Interrupt controller(中断控制器)
  用于中断控制,包含状态寄存器、使能寄存器、状态位清除寄存器等。
  寄存器基址:Base=0x0a000000
  ? Timer(定时器)
  ARMulator 提供了两个定时器。包含控制寄存器、计数值寄存器、中断清除寄存器等。定时器支持 free-running 和 periodic 两种工作方式,前者计数器从0xFFFF递减,到“0”后计数器溢出发生中断。后者计数器从计数值寄存器中读取计数值,然后递减至“0”后溢出发生中断。
  寄存器基址:Base=0x0a800000
  ? Watchdog(看门狗)
  看门狗是为了防止用户程序出错导致系统死锁而采用的一种保护手段。一旦到了预定时间没有设置看门狗,看门狗就会停止ARMulator的运行,返回调试器中。看门狗使用2个定时器工作,第一个定时器在复位时启动,或者通过程序写入KeyValue 寄存器预先设定好的值来启动,当过了一定时钟周期(WatchPeriod)后,第一个定时器产生 IRQ 中断,并启动第二个定时器;如果在规定时间(IRQPeriod)内程序没有写KeyValue寄存器,则看门狗将停止 ARMulator ,返回调试器中。
  寄存器基址:Base=0xb0000000 KeyValue=0x12345678
  WatchPeriod=0x80000 IRQPeriod=3000 IntNumber=16
  ? Stack tracker(栈跟踪器)
  栈跟踪器在每条指令执行后,检查栈指针(r13)寄存器的值。它记录下栈顶的最小值,从而可以计算出所用堆栈的最大长度。
  栈底地址:StackBase=0x80000000 栈空间限制:StackLimit=0x70000000
  ? Tube(显示管)
  Tube 实际上是一个寄存器,它用来显示输出。一旦写入这个寄存器某个可以显示的字符,则调试器将会把它显示在控制台 Console 下。这样用来显示对某个指定地址的写操作记录。
  寄存器基址:Base=0x0d800020
  使用者也可以根据一定的接口规范编写自己的外设模块,或者通过修改已有模块的方式来适合自己的需求。比如定制自己的存储系统等。
  3.使用 ARMulator
  从调试器中可以配置 ARMulator 的一些属性,在调试器启动的时候,会将当前配置的部分信息输出显示。ADS 提供了6个 .ami 配置文件来定义当前 ARMulator 的工作行为。当 ARMulator 被调试器启动时,就会搜索环境变量 armconf 中的路径,读取所有的 .ami 配置文件来对 ARMulator 进行设置。
  ARMulator 还提供了跟踪(Tracer)功能,用来记录程序中指令和内存被访问的情况,也可以记录下各种事件的发生,例如 ARM 处理器事件、MMU 和 cache 事件等。另外,使用 ARMulator 的 profiling 记录,可以统计特定函数在执行过程中被调用的次数,包括子函数的调用在总的执行时间中所占的比例。
  使用 ARMulator 只要在调试器中设置了 target 就可以了,通过图形用户界面的调试器AXD ,可以查看 ARM 寄存器(包括通用寄存器和程序状态寄存器等),也可以查看任意内存单元的内容,还可以进行异常的处理,例如中断和程序中止等。
  通过对上面提到的定时器和中断控制器的设置,在 ARMulator 上甚至可以移植嵌入式实时操作系统 uC/OS-II。uC/OS-II 是一个实时操作系统内核,包含了任务调度、任务管理、时间管理、内存管理和任务间的通信与同步等基本功能。通过在 ARMulator 上移植和调试 uC/OS-II,以后就可以更快将其移植到自己的嵌入式硬件平台上。
  运行在其他硬件平台,对ARM微处理器以及其相关外设进行模拟的软件。
  比较常见的是:
  1、ARM公司自己发布的Armulator。一般附带在ADS、Realview软件开发套件中,作为一个调试模块发布。

  http://www.arm.com

  2、GNU的Armulator。

  http://www.uclinux.org/pub/uClinux/utilities/armulator/
  其中skyeye是国内比较成功的集成armulator开发环境。

  http://www.skyeye.org

  使用Armulator,对降低开发成本、提高开发效率有很大的好处。
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
最新下载 : http://www.hugacy.com/read.php?tid=15 如果你是一个ARM平台的video算法爱好者,或者开发优化工程师,你将会从这里领略到ARM模拟器带来的无穷魅力。 armulator.exe是最快的ARM指令集模拟器(性能是qemu的两倍),支持ARM7,ARM9,ARM11,Cortex/Thumb,可直接运行ELF和WINCE程序。(ELF程序用armcc或者arm gcc编译,WINCE程序用pb等编译) 。 如果只想关注应用程序开发,尤其做算法优化,比如汇编(甚至neon)优化,完全不想关心底层平台和操作系统,就请使用ARM模拟器,只要你的程序编译出来能在ARM+Linux的开发板上跑,就能在这个模拟器上运行。反之亦可。 使用高性能ARM模拟器,就可以体验ARM平台开发优化video codec的威力,不再需要去采购动辄几千元的ARM11, Cortex开发版,仅仅需要一台装有windows的PC,在ARM模拟器的帮助下,带领你进入arm平台video开发优化的世界。使用ARM模拟器最终开发出的video版本,不加任何修改就可以运行在真实的ARM产品平台上,执行结果绝无任何差异。 <**任何个人和团体学习者,及教育机构,在非赢利前提下,均可以无偿体验和使用ARM模拟器,商业使用请联系作者**> 使用方法极其简单,比如在开发板上运行./x264 --help 在PC上使用模拟器的方法:armulator.exe x264 --help 本压缩包中的x264使用源代码版本x264-snapshot-20100824,具体生成过程如下: 1. 官方网站下载x264源代码并解压缩 2. 在host主机上执行./configure --disable-asm 3. 修改config.mak a. ARCH=ARM b. CC=arm-none-linux-gnueabi-gcc (请先指定好你的交叉编译器路径) c. AR=arm-none-linux-gnueabi-ar 4. 修改config.h,去掉一行#define ARCH_X86 1 5. make 对于neon汇编优化,需要在config.mak中增加AS=arm-none-linux-gnueabi-as,需要4.3.3以后的交叉编译器. <**压缩包中的包含的x264,仅作讨论交流之用,对于任何其它使用,不承担由其产生的一切后果**>
1.1 Processor architecture and organization 2 1.2 Abstraction in hardware design 3 1.3 MU0 - a simple processor 7 1.4 Instruction set design 14 1.5 Processor design trade-offs 19 1.6 The Reduced Instruction Set Computer 24 1.7 Design for low power consumption 28 1.8 Examples and exercises 32…… 2.1 The Acorn RISC Machine 36 2.2 Architectural inheritance 37 2.3 The ARM programmer's model 39 2.4 ARM development tools 43 2.5 Example and exercises 47…… 3.1 Data processing instructions 50 3.2 Data transfer instructions 55 3.3 Control flow instructions 63 3.4 Writing simple assembly language programs 69 3.5 Examples and exercises 72…… 4.1 3-stage pipeline ARM organization 75 4.2 5-stage pipeline ARM organization 78 4.3 ARM instruction execution 82 4.4 ARM implementation 86 4.5 The ARM coprocessor interface 101 4.6 Examples and exercises 103…… 5.1 Introduction 106 5.2 Exceptions 108 5.3 Conditional execution 111 5.4 Branch and Branch with Link (B, BL) 113 5.5 Branch, Branch with Link and eXchange (BX, BLX) 115 5.6 Software Interrupt (SWI) 117 5.7 Data processing instructions 119 5.8 Multiply instructions 122 5.9 Count leading zeros (CLZ - architecture v5T only) 124 5.10 Single word and unsigned byte data transfer instructions 125 5.11 Half-word and signed byte data transfer instructions 128 5.12 Multiple register transfer instructions 130 5.13 Swap memory and register instructions (SWP) 132 5.14 Status register to general register transfer instructions 133 5.15 General register to status register transfer instructions 134 5.16 Coprocessor instructions 136 5.17 Coprocessor data operations 137 5.18 Coprocessor data transfers 138 5.19 Coprocessor register transfers 139 5.20 Breakpoint instruction (BRK - architecture v5T only) 141 5.21 Unused instruction space 142 5.22 Memory faults 143 5.23 ARM architecture variants 147 5.24 Example and exercises 149…… 6.1 Abstraction in software design 152 6.2 Data types 153 6.3 Floating-point data types 158 6.4 The ARM floating-point architecture 163 6.5 Expressions 168 6.6 Conditional statements 170 6.7 Loops 173 6.8 Functions and procedures 175 6.9 Use of memory 180 6.10 Run-time environment 185 6.11 Examples and exercises 186…… 7.1 The Thumb bit in the CPSR 189 7.2 The Thumb programmer's model 190 7.3 Thumb branch instructions 191 7.4 Thumb software interrupt instruction 194 7.5 Thumb data processing instructions 195 7.6 Thumb single register data transfer instructions 198 7.7 Thumb multiple register data transfer instructions 199 7.8 Thumb breakpoint instruction 200 7.9 Thumb implementation 201 7.10 Thumb applications 203 7.11 Example and exercises 204…… 8.1 The ARM memory interface 208 8.2 The Advanced Microcontroller Bus Architecture (AMBA) 216 8.3 The ARM reference peripheral specification 220 8.4 Hardware system prototyping tools 223 8.5 The ARMulator 225 8.6 The JTAG boundary scan test architecture 226 8.7 The ARM debug architecture 232 8.8 Embedded Trace 237 8.9 Signal processing support 239 8.10 Example and exercises 245…… 9.1 ARM7TDMI 248 9.2 ARM8 256 9.3 ARM9TDMI 260 9.4 ARM10TDMI 263 9.5 Discussion 266 9.6 Example and exercises 267…… 10.1 Memory size and speed 10.2 On-chip memory 10.3 Caches 10.4 Cache design - an example 10.5 Memory management 10.6 Examples and exercises…… Architectural Support for Operating Systems 270 271 272 279 283 289 290 11.1 An introduction to operating systems 11.2 The ARM system control coprocessor 11.3 CP15 protection unit registers 11.4 ARM protection unit 11.5 CP15 MMU registers 11.6 ARM MMU architecture 11.7 Synchronization 11.8 Context switching 11.9 Input/Output 11.10 Example and exercises…… ARM CPU Cores 291 293 294 297 298 302 309 310 312 316 317 12.1 The ARM710T, ARM720T and ARM740T 12.2 The ARM810 12.3 The StrongARM SA-110 12.4 The ARM920T and ARM940T 12.5 The ARM946E-S and ARM966E-S 12.6 The ARM1020E 12.7 Discussion 12.8 Example and exercises Embedded ARM Applications…… 318 323 327 335 339 341 344 346 347 13.1 The VLSI Ruby II Advanced Communication Processor 13.2 The VLSI ISDN Subscriber Processor 13.3 The OneC™ VWS22100 GSM chip 13.4 The Ericsson-VLSI Bluetooth Baseband Controller 13.5 The ARM7500 and ARM7500FE

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值