如何制作ARM9自定义设备模拟器?
我正在使用 266 Mhz、支持 fpu 和 32 MB RAM 的 ARM 9 处理器,我在上面运行 linux。我想在 pc 上模拟它(我在 pc 上同时有 linux 和 windows 可用)。我想分析我的周期计数,直接在模拟器中运行交叉编译的可执行文件。是否有任何开源项目可用于轻松创建模拟器,我需要编写多少更改/代码/工作才能用它制作自定义模拟器?如果您为我提供教程或其他参考资料以帮助我入门,那就太好了。
谢谢&问候,
桑尼。
I am working on ARM 9 processor with 266 Mhz with fpu support and 32 MB RAM, I run linux on it.I want to emulate it on pc ( I have both linux and windows availabe on pc ). I want to profile my cycle counts, run my cross-compiled executables directly in emulator. Is there any opensource project available to create emulator easily, How much change/code/effort does I need to write to make custom emulator with it ? It would be great if you provide me tutorials ot other reference to get kick-start.
Thanks & Regards,
Sunny.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您想仅模拟处理器还是整个机器?
模拟 CPU 非常简单,只需定义一个包含所有 CPU 寄存器的结构,创建一个数组来模拟 RAM,然后像这样进行模拟:
模拟整个机器要困难得多...您需要模拟 LCD 控制器、内存映射寄存器、内存条控制器、DMA、输入设备、声音、I/O 东西...也许你还需要 BIOS 和操作系统的转储...我不知道 ARM 处理器,但它是否有管道、缓存和这样的事情,时间安排变得更加复杂。
如果您完整记录了所有硬件部件,那么没有问题,但如果您需要进行逆向工程或猜测模拟机器的工作原理......您将遇到困难。
从这里开始:http://infocenter.arm.com/help/index.jsp并下载适用于您的处理器的“技术参考手册”。
对于一般仿真问题:http://www.google。 es/search?q=how+to+write+an+模拟器
Do you want to emulate just the processor or an entire machine?
Emulate a CPU is very easy, just define a structure containing all CPU registers, create an array to simulate RAM and then just emulate like this:
Emulate an entire machine is much much harder... you need to emulate LCD controllers, memory mapped registers, memory banks controllers, DMAs, input devices, sound, I/O stuff... also probably you need a dump from the bios and operative system... I don't know the ARM processor but if it has pipelines, caches and such things, things get more complicated for timing.
If you have all hardware parts fully documented, there's no problem but if you need to reverse engineer or guess how the emulated machine works... you will have a hard time.
Start here: http://infocenter.arm.com/help/index.jsp and download the "Technical Reference Manual" for your processor.
And for general emulation questions: http://www.google.es/search?q=how+to+write+an+emulator
您应该查看 QEMU。
但是我不明白,为什么需要一个完整的模拟器?
您已经可以在没有模拟器的情况下进行大量分析。您期望通过系统模拟器获得什么收益?
You should give a look at QEMU.
I don't understand however, why do you need a complete emulator ?
You can already a lot of profiling without emulator. What are the gains you expect from having a system emulator ?