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

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

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


当前回答

模拟器是真实系统的替代品,但模拟器用于优化、理解和估计真实系统。

其他回答

虚拟PC试图从程序员的角度模拟计算机,但同时,它也从电气工程师的角度模拟计算机。

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

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

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

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 --

这是焦点的不同。模拟器1专注于重新创建系统的行为,而不考虑系统内部的功能。模拟器s2着重于系统组件的建模。当你主要关心一个系统做什么时,你使用模拟器;当你关心它如何做时,你使用模拟器。

就其一般的英文含义而言,emulation是“在品质或行为上努力达到或超过他人”,而simulation是“模仿、复制、复制行为、外观或特性”。差别不大。竞赛来自æmulus,“奋斗,竞争”,与“模仿”和“形象”有关,这表明表面上的相似。“模拟”来自similis的“像”,“相似”一词也是如此,这可能暗示了更深层次的一致性。

引用:

维基百科:模拟器 维基百科:计算机模拟 Wiktionary:模拟 Wiktionary:模拟 词源在线:仿真 词源在线:模拟

To understand the difference between a simulator and an emulator, keep in mind that a simulator tries to mimic the behavior of a real device. For example, in the case of the iOS Simulator, it simulates the real behavior of an actual iPhone/iPad device. However, the Simulator itself uses the various libraries installed on the Mac (such as QuickTime) to perform its rendering so that the effect looks the same as an actual iPhone. In addition, applications tested on the Simulator are compiled into x86 code, which is the byte-code understood by the Simulator. A real iPhone device, conversely, uses ARM-based code.

相比之下,模拟器模拟真实设备的工作。在模拟器上测试的应用程序被编译成实际设备使用的实际字节码。仿真器通过将字节码转换为可由运行仿真器的主机执行的形式来执行应用程序。

为了理解模拟和模拟之间的微妙区别,假设您试图说服一个孩子玩刀是危险的。为了模拟这种情况,你假装用刀割伤自己,并痛苦地呻吟。为了模仿这一点,你真的会割伤自己。

简单的解释。

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

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

(or)

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

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