Recent

Author Topic: CPU simulators  (Read 1315 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
CPU simulators
« on: February 25, 2021, 08:19:27 pm »
I was just wondering the other evening how much work would be involved in modifying the Escape DLX simulator that Jonas et al. contributed a few years ago for RISC-V. https://github.com/jmaebe/ESCAPE

Has anybody come across https://bohr.wlu.ca/nznotinas/cp464/simulators/VSIM%20(2.0)%20CR.pdf ? It appears to be a multi-CPU emulator written using Delphi in the Win-32 era.

MarkMLl

« Last Edit: February 25, 2021, 09:55:40 pm by MarkMLl »
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: CPU simulators
« Reply #1 on: February 25, 2021, 11:08:25 pm »
I have included a device simulator for PIC microcontrollers in my compiler PicPas: https://github.com/t-edson/PicPas

It models most of the CPU hardware for several devices and use it to target the compiled code.


Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: CPU simulators
« Reply #2 on: February 26, 2021, 03:48:04 am »
Will that app compile and down load to the device via a Pick2/3 to a 12x series PIC ?

The PicPas compiler generates the *.hex output files. I think it can work with any Pickit.

The compiler can target to some PIC12F devices: PIC12F508, PIC12F509, PIC12F510 and PIC12F519 .
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

MathMan

  • Sr. Member
  • ****
  • Posts: 325
Re: CPU simulators
« Reply #3 on: February 26, 2021, 12:22:09 pm »
I was just wondering the other evening how much work would be involved in modifying the Escape DLX simulator that Jonas et al. contributed a few years ago for RISC-V. https://github.com/jmaebe/ESCAPE

Has anybody come across https://bohr.wlu.ca/nznotinas/cp464/simulators/VSIM%20(2.0)%20CR.pdf ? It appears to be a multi-CPU emulator written using Delphi in the Win-32 era.

MarkMLl

A quite broad question here, so pls forgive that I can not answer in detail. I think the approach depends a bit on what you would like to get as a simulator

* something that could help estimate execution times, or
* a nifty WebUI enhanced tool with a lot of fancy bells & whistles attached

In general both - ESCAPE & VSIM - are quite old, so from my perspective their main advantage seems to be that they are Pascal-based. However CPU tech has advanced tremenduously and beefing one of the above up to handle RISC-V will be a major task, I am quite sure. From the little reading I did on both I would give you better chances on VSIM, as it seems to be prepared for multi-core designs already.

The alternative could be to translate existing top notch simulators to Pascal - e.g. SPIKE - https://github.com/riscv/riscv-isa-sim which seems to be well maintained.

MathMan

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: CPU simulators
« Reply #4 on: February 26, 2021, 12:31:43 pm »
Do you know whether the VSIM sources have ever been made available? I'm interested in exploring a particular robustness detail based on lessons that I think everybody's learnt from the Intel architecture, and I'd rather not have a language with which I'm less than 100% familiar stand in the way.

Notwithstanding Fabrice Bellard's reputation, it's disturbing to see the number of people that think Javascript is good for this sort of thing.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MathMan

  • Sr. Member
  • ****
  • Posts: 325
Re: CPU simulators
« Reply #5 on: February 26, 2021, 12:47:52 pm »
Do you know whether the VSIM sources have ever been made available? I'm interested in exploring a particular robustness detail based on lessons that I think everybody's learnt from the Intel architecture, and I'd rather not have a language with which I'm less than 100% familiar stand in the way.

Notwithstanding Fabrice Bellard's reputation, it's disturbing to see the number of people that think Javascript is good for this sort of thing.

MarkMLl

Understandable. Only ref to the sources seems to be the indirect way here - https://bohr.wlu.ca/nznotinas/cp464/simulators/. Didn't find any reference to "official" (whatever that means anyway) release.

Forget it - files under link above do not contain source - only EXE and precompiled DLL. Then the only way might be to directly address authors.

BTW - once you have made up your mind on this project, let me know - I might join, looks interesting.

MathMan
« Last Edit: February 26, 2021, 01:06:47 pm by MathMan »

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: CPU simulators
« Reply #6 on: February 26, 2021, 01:09:10 pm »
Forget it - files under link above do not contain source - only EXE and precompiled DLL. Then the only way might be to directly address authors.

Much my conclusion.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018