小型RISC仿真器 [英] Small RISC emulator

查看:260
本文介绍了小型RISC仿真器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个虚拟机到一个游戏,并想知道是否有人知道任何真正简单的虚拟机(我认为RISC / PIC是接近我想要的),通常用于嵌入式项目,如控制机器人,电机,传感器等。我主要关心的是编写/汇编程序,如果我自己滚动。我会很高兴使用已经在那里的工具,或者以最简单的形式只是一个C编译器,可以编译它:-p。



我真的很不想在这里重新发明这个轮子,但是我也需要数以千计的运行在一个虚拟的世界,所以他们必须尽可能简单和尽可能快。正如一个人已经提到的,我也不关心真实世界的问题,如时间和公共汽车以及所有有趣的东西。我认为他们的虚拟时钟将被限制在一段很慢的地方;最终我可能需要研究本机编译,使它们运行得更快,但现在我只是把原型放在一起,得到一个一般的概念证明。



作为输入,我计划安装在圆柱体周围的距离,光线,材料和触摸传感器(16个,也许32个),然后只需2个电机用于方向输出,以控制每侧的一种轮子。基本上这个处理不会太费劲,世界将会很简单,这样机器就不需要在简单的任务中投入大量的处理能力。



记忆的条件,我希望他们能够存储足够的数据,留下几天,没有干预建立地图和收集统计数据。我不喜欢8bit将其切割为处理或记忆,但16位肯定会是一个竞争者。 32位和64位只会推动它,而且没有办法让每个内存超过1MB - 可能接近256-512k。 (比尔一说640k就够了,所以为什么我不能!!)

解决方案

如果你想要一些植根于真实的东西世界上最为常用的嵌入式RISC微控制器之一就是PIC系列产品。谷歌给了几个模拟器,但是我不认为这个源可以使用。



另一种可能性是QEMU,它已经模拟了几个ARM品种。



,当然,如果你不想模拟一个真实世界的设备,更容易和更好的表现将是滚动自己的。只有你需要的,而不是进入状态标志,溢出位,有限的总线宽度,RAM定时等的混乱。


I'm looking to build a VM into a game and was wondering if anyone knew of any really simple VM's (I was thinking RISC/PIC was close to what I wanted) that are usually used for embedded projects such as controlling robots, motors, sensors, etc. My main concern is having to write a compiler/assembler if I roll my own. I'd be nice to use the tools that are already out there or in its simplest form just a C compiler that can compile for it :-p.

I really don't want to re-invent the wheel here but I also need thousands of these running around a virtual world so they have to be as simple and as fast as possible. As one person has already mentioned I also don't care about real world issues such a timing and buses and all that fun stuff. I think their virtual clocks will be limited to somthing quite slow; and eventually I'll probably have to look into native compiling to make them run even faster but for now I'm just putting together prototypes to get a general proof of concept.

As input, I'm planning on distance, light, material and touch sensors mounted around the cylindrical body (16, maybe 32 of them), then simply 2 motors for directional output to control a sort of wheel on each side. essentially the processing won't be too strenuous and the world will be simple enough so that the machine's don't have to throw lots of processing power at simple tasks.

In terms of memory, I'd like them to be able to store enough data to be left alone for a couple of days without intervention for building maps and gathering stats. I don't like 8bit would cut it for processing or memory but 16bit would definitely be a contender. 32 and 64bit would just be pushing it and there's no way they'll have any more than 1mb each of memory - probably closer to 256-512k. (Bill one said 640k would be enough so why can't I!!)

解决方案

if you want something rooted in the real world, one of the most-used embedded RISC microcontrollers is the PIC family. google gives several emulators, but i don't think the source is available for most.

another possibility is QEMU, which already emulates several ARM varieties.

and, of course, if you're not interested in emulating a real-world device, far easier and better performance would be to roll your own. with only what you need, and not getting into the mess of state flags, overflow bits, limited bus width, RAM timings, etc.

这篇关于小型RISC仿真器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆