The Museum of HP Calculators

HP Forum Archive 15

[ Return to Index | Top of Index ]

Simulator vs. Emulator
Message #1 Posted by Thomas Okken on 14 Apr 2005, 11:44 a.m.

I was just wondering: it seems commonly accepted usage on this forum to refer to a piece of software that mimics a calculator as an "emulator" if it mimics the underlying hardware, and as a "simulator" if it does not.

So, Mike T.'s new HP-33C simulator is a simulator. So is Free42, etc., while Emu42 and Nonpareil are emulators.

I'm curious if this emulator/simulator distinction is a peculiarity of this forum, or if it originated elsewhere...
For example, the relevant Wikipedia pages on simulation and emulation don't make it clear just what the difference is, in the context of one computer simulating (emulating?) another.
In the PalmOS development world, we have the PalmOS simulator and the PalmOS emulator: the former is PalmOS compiled to run natively on x86 hardware; the latter is a tool that mimics 68000-based Palm hardware and runs actual Palm ROM images. This seems similar (emular?) to HP Forum usage.

Oh, well, just wondering!

- Thomas

Re: Simulator vs. Emulator
Message #2 Posted by Valentin Albillo on 14 Apr 2005, 12:52 p.m.,
in response to message #1 by Thomas Okken

Hi, Thomas:

Have a look at this link.

Best regards from V.

Re: Simulator vs. Emulator
Message #3 Posted by Garth Wilson on 14 Apr 2005, 7:02 p.m.,
in response to message #2 by Valentin Albillo

I have to go with DavidMY's definition below. I'm on a couple of microprocessor forums where things can be confusing if the difference between the two is not observed, and yet people are constantly calling a simulator (software only) and emulator. For a microprocessor, the emulator actually plugs into a socket on the target printed circuit board and acts just like the processor would, interfacing with the very same I/O ICs the actual processor will, but it has cables to the host computer which gives you a "window" into what's going on in the processor. Simulators generally have to simulate I/O as well, since they don't have the hardware to actually interface to the real thing like the emulator does.

Up to now I have ignored the issue of terms here, since most calculators' I/O consists of nothing more than a keyboard and display anyway. A real emulator of some of them though like the 41, 71, and 75 would have to be able to accept those units' plug-in modules as well, including the 41's time module and the first (non-HPIL) printer, the card readers, and the HPIL-- not just memory.

Re: Simulator vs. Emulator
Message #4 Posted by Mike (Stgt) on 14 Apr 2005, 1:34 p.m.,
in response to message #1 by Thomas Okken

Well, E. Smith calls his Nonpareil a simulator too - it just simulates the hardware and runs a firmware that can not distinguish if it runs on original hardware on on a simulation. So Nonpareil is a new platform for it. In such a case I like to call it an emulator.


Re: Simulator vs. Emulator
Message #5 Posted by hugh steers on 14 Apr 2005, 4:13 p.m.,
in response to message #1 by Thomas Okken

according to my dictionary the two terms are defined as follows:

emulator /"EmjUleIt@/ n.
2 	A piece of computer hardware or software used with one device to enable it to emulate another. M20. 
	†emulatress n. (rare) a female emulator E17–M18.

simulator /"sImjUleIt@/ n.
b 	Computing. In full simulator program. A program enabling a computer to execute programs written for a different computer. M20.

the only difference seems to be that an emulator can be hardware, and that a similar may not simulate the whole machine (ie to be a simplification like a flight simulator for example).

however, i’ve always used the terms in the same manner as you describe. ie an emulator is something with 100% identical behaviour, but a simulator is something whose behaviour can be, in places, different, for better or worse.

so, anyone seen an emulatress :-)

Re: Simulator vs. Emulator
Message #6 Posted by DavidMY on 14 Apr 2005, 4:46 p.m.,
in response to message #1 by Thomas Okken

Relative to this forum and more importantly, the individuals writing this code:

"Emulator" Mimics CPU/Chip level hardware. For example the v41 Emulator for PC and PPC is a software representation of the CPU/controller chips in a HP41 calculator. as such it can run ASSEMBLY CODE language. This means you need the firmware images HP wrote for the calculator to actually do anything. Anotherwords: you can't do a multiplication in the emulator unless the HP assembly code to provide that function is present.

"Simulator" mimics the calculator as a whole. A HP41 Simulator doesn't need HP's firmware. Instead the programmer has used the compilier available code to create the functions available to a user of the calculator. So, with the simulator when you do that multiplication you are using the code from the compiler.

Emulators emulate HARDWARE. Simulators mimic software.

For HP calculators, because HP used certain CPU/controller chips in lines of calculators, once the hardware emulator is written it is possible for the emulator to act as several different calculators as long as the correct firmware is present. You generally won't see this in a simulator because it is easier to write seperate code for each model.

Re: Simulator vs. Emulator
Message #7 Posted by John Limpert on 14 Apr 2005, 6:15 p.m.,
in response to message #1 by Thomas Okken

In space research, spacecraft simulators are commonly used for training and testing. Normally, they have no hardware in common with the real spacecraft, and they don't attempt to emulate the flight hardware. They are programs that are designed to behave like the real spacecraft, accepting commands and generating telemetry.

Re: Simulator vs. Emulator
Message #8 Posted by Eric Smith on 14 Apr 2005, 8:25 p.m.,
in response to message #1 by Thomas Okken

With regard to computers, IBM invented "emulation" when they were developing the System/360, introduced in 1964. Each of the original models of the System/360 could emulate one or two of their older, incompatible systems. For instance, the 360 Model 30 could emulate the 1401 or the 1620. The emulators were optional features, and only one (1401 *or* 1620) could be installed.

IBM defined emulation to be simulation of another computer system using either hardware or microcode assistance, or a combination of the two. This is very well documented in the historical record. For instance, read the issue of IBM Systems Journal covering the 360 systems, or IBM's Early Computers by Bashe et al, or A History of Modern Computing by Paul Ceruzzi.

Any HP calculator simulation you run on your Pentium IV or PDA is simulation, not emulation. The Pentium and ARM chips don't have any special hardware or microcode devoted to assisting in the simulation of calculators.

Whether it is a microcode-level simulation, or a more abstract user-level simulation, is a different issue.

As per the original definition of emulation, I refer to Nonpareil as a microcode-level simulator.

Edited: 14 Apr 2005, 8:27 p.m.

Re: Simulator vs. Emulator
Message #9 Posted by Mike (Stgt) on 15 Apr 2005, 5:54 a.m.,
in response to message #8 by Eric Smith

Well - of cause, your simulator is able to interpret microcode. But if that microcode was ment for a calculator, the user sees (IMHO) an emulation on the screen. Nothing is real but the vision - virtual vision! <G>


Re: Simulator vs. Emulator
Message #10 Posted by Eric Smith on 15 Apr 2005, 8:12 p.m.,
in response to message #9 by Mike (Stgt)

the user sees (IMHO) an emulation on the screen.

I'd say that the user sees a simulation on the screen.

Best regards, Eric

philosopher vs. programmers' view
Message #11 Posted by Mike (Stgt) on 18 Apr 2005, 3:45 a.m.,
in response to message #10 by Eric Smith

Hi Eric!

To call Nonpareil (and others) an emulator may be a programmers' view.


BTW - had no time this WE to test some more your Nonpareil under Cygwin.

Re: Simulator vs. Emulator
Message #12 Posted by Mike (Stgt) on 27 Apr 2005, 4:18 a.m.,
in response to message #10 by Eric Smith

Have a look at Why is this advertized as _emulator_ but named *SIM390*? BTW - it works quite nice and almost no user who connects via 3270 (emulated or not) may see if the host is emulated/simulated or real.


I bow to the master
Message #13 Posted by DavidMY on 15 Apr 2005, 5:30 p.m.,
in response to message #8 by Eric Smith

Thank you Eric. You certainly should get to set the definition considering the code you've written.

What I was suggesting was that it appeared most people on this forum regarded micro-code level simulators as "emulating" the CPU because they are designed to use the microcode/assembly written by HP (i.e. "the ROMS").

I must admit my view is slanted by my time spent working with hardware. For a time I worked in a lab where we emulated new processors with descrete logic chips on circuit boards during development. Later, as processors increased in complexity the emulation shifted to computer simulations. Of course, we still called it an emulator (I think because the EE's didn't want to admit to dealing with anything that wasn't REAL circuitry--us programmers didn't care).

David Yerka

Re: I bow to the master
Message #14 Posted by Thomas Okken on 15 Apr 2005, 6:16 p.m.,
in response to message #13 by DavidMY

After writing tens of thousands of lines of code for my project, don't I get a vote, too? ;-)

But seriously, I'm surprised at the different ways these terms are interpreted by different people. I think it's safe to say there is no consensus... The point about "hardware or microcode assistance" is interesting because it certainly fits with my idea that, fundamentally, things like Emu42 and Free42 are the same -- they simulate a system at a different level, but they're both 100% software and both present the same end user experience. Then again, it does *not* fit with the way products like CCS64 or POSE are almost universally called emulators, even though there's clearly no hardware or microcode assistance involved -- but they do simulate *at the hardware level*.

I think I'll just continue to be sloppy and treat both terms as synonyms. :-)

- Thomas

Re: I bow to the master
Message #15 Posted by Giuseppe Marullo on 17 Apr 2005, 7:27 p.m.,
in response to message #14 by Thomas Okken

Thomas, for me a simple definition is that a simulator behaves almost identically to the "normal" functions that the original performs.

If you stop here, it is a simulator (normally you stop well before this).

Everything that exceeds normal functions starts to enter into the field of emulators, either because you need a better even approximation or because of special needs.

For example, suppose you get a Zen enlightment and write a program that mimic a 16c calc, given the same inputs behave *exactly* as the real thing (bugs included), how would you call it? A simulator ?

I am not sure it could not be called a emulator because you didn't mimic the internal hw architecture or its rom.

Nice topic,

[ Return to Index | Top of Index ]

Go back to the main exhibit hall