虽然我理解模拟和模拟的一般含义,但我几乎总是对它们感到困惑。假设我创建了一个模仿现有硬件/软件的软件,我应该如何称呼它?模拟器还是模拟器?

有人能从编程的角度来解释一下吗?

福利:这两个词在英语中有什么区别?(对不起,我的母语不是英语:))


当前回答

仿真器是一个系统的模型,它可以接受被仿真系统可以接受的任何有效输入,并产生相同的输出或结果。所以你的软件就是一个模拟器,只要它能精确地再现被仿真系统的行为。

其他回答

简单的解释。

如果你想把你的电脑(运行Windows)转换成Mac,你可以做以下任何一项:

你可以简单地在你的Windows上安装一个Mac主题。所以,你的电脑感觉上更像Mac,但实际上你不能运行任何Mac程序。(模拟)

(or)

(2)你可以把你的电脑编程成像Mac一样运行(我不确定这是否可能:P)。现在你甚至可以成功地运行Mac程序,并期望得到与Mac上相同的输出。

在第一种情况下,你可以体验Mac,但你不能期待与Mac相同的输出。 在第二种情况下,你可以期待与Mac上相同的输出,但事实仍然是它只是一台PC。

这两个术语之间的区别有点模糊。来自一个“模拟器”是允许您调试嵌入式系统的硬件的世界。记住那些允许你拥有ICE (In Circuit Emulation)功能来调试PC平台的产品,我发现术语“仿真”的使用对于模拟一块硬件行为的软件来说有点不恰当。

我对当前使用“仿真”一词的理由是,它可以“增强”功能,并且只与系统行为的“合理”近似有关。

ICE: (In Circuit Emulation) A piece of hardware that is plugged into a board in place of the actual processor. It allows you to run the system as if the actual processor was present. Typically these have a variant of the processor on them to actually execute the software with glue logic to allow the user to break executation and single step under hardware control. Some would also provide logging capability. Most modern processors development systems have replace ICE type emulation with JTAG Emulation, where the JTAG just talks to the processor via a special purpose serial link and all execution is perform by the processor mounted on the board.

软件模拟器: 0x86仿真器只关心是否能够执行0x86汇编语言,而不提供特定0x86处理器的精确的每周期行为模型。Bochs就是一个例子。QEMU做到了这一点,但也允许使用特殊的内核模块进行“虚拟化”。

模拟器: 德州仪器为软件开发提供了一个处理器的CYCLE ACCURATE行为模型,该模型旨在精确模拟特定处理器核心的行为,供开发人员在拥有工作硬件之前使用。

软件模拟器增强功能: BLEEM不仅允许你运行Playstation软件,还允许显示器输出比Playstation能够提供的分辨率更高的分辨率,并且还利用了可用的gpu的更高级功能。(即更好的混合和平滑纹理。)

这个问题最好的答案可能是看一看历史实践。

在过去,我曾在PlayStation和SEGA的PC上看到过游戏主机模拟器。

模拟器是指那些试图模拟现实生活行为的软件,比如驾驶或飞行。《Gran Turismo》和《微软飞行模拟器》都是模拟游戏的经典例子。

就语言差异而言,模仿通常指的是模仿某人(或某事)值得称赞的特征或行为。仿真与模仿是不同的,模仿是为了嘲弄而复制一个人。

动词“simulation”在语言学上的意思基本上是假装或模仿某人或某事。

模拟是模拟外部可观察到的行为以匹配现有目标的过程。模拟机制的内部状态不必准确地反映它所模拟的目标的内部状态。

另一方面,仿真涉及到对目标的基本状态进行建模。一个好的仿真的最终结果是,仿真模型将模拟它所模拟的目标。

理想情况下,您应该能够查看模拟并观察到您在查看原始目标时也会看到的属性。在实践中,由于性能原因,模拟可能存在一些快捷方式——也就是说,模拟的某些内部方面实际上可能是模拟。

MAME是一款街机游戏模拟器;Hyperterm是一个(不是很好的)终端仿真器。没有必要为街机或终端详细建模以获得所需的模拟行为。

《Flight Simulator》是一款模拟器;SPICE是一个电子模拟器。他们尽可能地模拟目标的每个细节,以表示目标在现实中的行为。

EDIT: Other responses have pointed out that the goal of an emulation is to able to substitute for the object it is emulating. That's an important point. A simulation's focus is more on the modeling of the internal state of the target -- and the simulation does not necessarily lead to emulation. In particular, a simulation may run far slower than real-time. SPICE, for example, cannot substitute for an actual electronics circuit (even if assuming there was some kind of magical device that perfectly interfaces electrical circuits to a SPICE simulation.) A simulation does not always lead to emulation --

我不认为模拟器和模拟器可以比较。两者都模仿某些东西,但不是同一推理范围的一部分,它们不在同一上下文中使用。

简而言之:模拟器被设计用来复制原始程序的某些特性,甚至可以在真实环境中替换它。模拟器的设计不是为了复制原物的特征,而是为了在人类看来与原物相似。没有了原有的功能,仿真器无法在实际环境中代替原有的功能。

An emulator is a device that mimics something close enough so that it can be substituted to the real thing. E.g you want a circuit to work like a ROM (read only memory) circuit, but also wants to adjust the content until it is what you want. You'll use a ROM emulator, a black box (likely to be CPU-based) with a physical and electrical interfaces compatible with the ROM you want to emulate. The emulator will be plugged into the device in place of the real ROM. The motherboard will not see any difference when working, but you will be able to change the emulated-ROM content easily. Said otherwise the emulator will act exactly as the actual thing in its motherboard context (maybe a little bit slower due to actual internal model) but there will be additional functions (like re-writing) visible only to the designer, out of the motherboard context. So emulator definition would be: something that mimic the original, has all of its functional features, can actually replace it to some extend in the real world, and may have additional features not visible in the normal context.

A simulator is used in another thinking context, e.g a plane simulator, a car simulator, etc. The simulation will take care only of some aspect of the actual thing, usually those related to how a human being will perceive and control it. The simulator will not perform the functions of the real stuff, and cannot be sustituted to it. The plane simulator will not fly or carry someone, it's not its purpose at all. The simulator is not intended to work, but to appear to the pilot somehow like the actual thing for purposes other than its normal ones, e.g. to allow ground training (including in unusual situations like all-engine failure). So simulator definition would be: something that can appear to human, to some extend, like the original, but cannot replace it for actual use. In addition the pilot will know that the simulator is a simulator.

我认为我们不会看到ROM模拟器,因为ROM不与人类交互,我们也不会看到任何平面模拟器,因为在现实世界中,飞机无法有一个替代物来执行相同的功能。

在我看来,模拟器或模拟器中的模型可以是任何东西,并且不必与原始模型相似。一个ROM模拟器模型将很可能是软件而不是硬件,MS飞行模拟器不能比它更软件。

这两个术语的比较将与当前选择的答案(来自Toybuilder)相矛盾,后者将差异放在内部模型上,而我的建议是,差异在于假的是否可以用于执行实际世界中的实际功能(确实在某些可接受的范围内)。

注意,飞机模拟器还必须模拟地球、太阳、风等,这些都不是飞机的一部分,所以飞机模拟器必须模拟飞机的某些方面,以及飞机的环境,因为它不是在这个实际环境中使用,而是在一个训练室中使用。

This is a big difference with the emulator which emulates only the orginal, and its purpose is to be used in the environment of the original with no need to emulate it. Back to the plane context... what could be a plane emulator? Maybe a train that will connect two airports -- actually two plane steps -- carrying passengers, with stewardesses onboard, with car interior looking like an actual plane cabin, and with captain saying "ladies and gentlemen our altitude is currenlty 10 kms and the temperature at our destination is 24°C". Its benefit is difficult to see, hum...

总之,模拟器是一个真实的东西,旨在工作,模拟器是一个假的,旨在欺骗用户。