[rescue] [OT] S: IBM /370 or /390 card

Joshua Boyd jdboyd at jdboyd.net
Wed Sep 13 05:02:12 EDT 2023


On 9/12/23 19:31, Dave McGuire via rescue wrote:
>> Now, is a gate level re-implementation of a 68k on an FPGA emulation? 
>> If so, then I suppose that means anything on an FPGA is emulation. Is 
>> a blackbox external "reimplementation" of a 68k on an FPGA or ASIC 
>> emulation? The MiSTer people, to my understanding, state that it 
>> isn't but I feel suspicious about that, and would probably err on 
>> calling that emulation.  What if it was a blackbox re-implementation 
>> but could run original microcode? I probably don't want to even 
>> debate that one.
>
>   We are rehashing the age-old argument of "what is emulation". All 
> IBM S/390 processors are microcoded; the micromachine doesn't 
> understand the S/390 instruction set until the microcode is loaded 
> from the console system.  This is the case for nearly everything; most 
> processors are microcoded.  You know all of this, having stated that 
> you don't want to debate it. B-)

I mean others can if they want to debate the really weird combinations 
of options.

Just for the hell of it, I think I will asked GPT-4.  Their answer is 
pretty long:

<gpt>

Replacing a CPU's microcode to interpret a different Instruction Set 
Architecture (ISA) is closer to implementing an alternative version of 
the ISA than it is to emulation or simulation. However, there are subtle 
differences in these terms, and which one is most appropriate to use 
could depend on the specifics of the implementation. Here's how these 
terms generally break down:

Emulation
Emulation usually involves simulating the entire hardware environment of 
a given system, not just its CPU. It allows one system to behave like 
another. In the case of software-based emulation, the emulator runs on 
the host system's native CPU but translates the guest system's machine 
code into machine code the host CPU can understand, often on-the-fly.

Simulation
Simulation also mimics behavior, but it doesn't necessarily aim to be as 
functionally complete or as fast as emulation. Simulations often run at 
a higher abstraction level and may omit many low-level operations, 
aiming for a functional understanding rather than a 1:1 behavioral match.

Implementation
If you replace a 68000 CPU's microcode to interpret the S/370 ISA 
directly, you are essentially creating a new implementation of the S/370 
ISA. You are not simulating or emulating the S/370 in software; you're 
actually modifying the hardware (at the microcode level) to operate as 
an S/370 would. This would be a native implementation of the S/370 ISA 
on a modified 68000 CPU.

Summary
In summary, if you replace the 68000's microcode to interpret the S/370 
ISA, you're creating another implementation of the S/370 ISA rather than 
emulating or simulating it. The CPU would, in theory, execute S/370 
binaries as if it were native S/370 hardware, although there might be 
caveats related to things like I/O operations, timing, and other 
hardware features.

</gpt>

The prompt was "If you can run S/370 binaries on a 68000 CPU by 
replacing the 68000's microcode to properly interpret the S/370 ISA, is 
that emulation, simulation, or just another implementation of the S/370 
ISA."

So far I haven't been able to get anything useful from CodeLlama or 
Koala (the ones I've tried running locally).




More information about the rescue mailing list