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

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

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


当前回答

模拟器必然是一个比例模型。 模拟器假装成1:1的模型。

其他回答

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

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

引用:

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

用比较正常的说法来说:如果你的软件能做被模仿系统能做的所有事情,那么它就是一个模拟器。如果它只是近似于系统(it或其他)的结果,那么它就是一个模拟器。

这两个术语之间的区别有点模糊。来自一个“模拟器”是允许您调试嵌入式系统的硬件的世界。记住那些允许你拥有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的更高级功能。(即更好的混合和平滑纹理。)

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

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.

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

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