Recent

Author Topic: Logic simulators  (Read 3606 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 3089
Logic simulators
« on: June 11, 2021, 09:50:43 pm »
Just to remark that FPC got a mention at https://hackaday.com/2021/06/10/survey-of-simple-logic-simulators/ for being used to compile an antique logic simulator written by the redoubtable Doug Jones.

It's not one I've played with. I'm currently using Logisim-Evolution to investigate the zero-opcode computer described at https://laughtonelectronics.com/Arcana/One-bit%20computer/One-bit%20computer.html , and have (of course) used FPC to write an assembler for it. I don't have any particular application for this, I might at some point though investigate a RISCV emulator in Pascal as a research platform using Jonas et al's ESCAPE emulator which I've been tinkering with.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and 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: 1208
Re: Logic simulators
« Reply #1 on: June 12, 2021, 12:13:57 am »
I have a logic circuit simulator in my PicPas compiler: https://github.com/t-edson/PicPas

It has only a few components but It's designed to easily include new components.

Lazarus 2.0.10 - FPC 3.2.0 - x86_64-win64 on Windows 8

MarkMLl

  • Hero Member
  • *****
  • Posts: 3089
Re: Logic simulators
« Reply #2 on: June 12, 2021, 08:45:29 am »
OK, but that does appear to be quite some distance from the gate-level simulation of the tools I mentioned... it excels in a different area :-)

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

MarkMLl

  • Hero Member
  • *****
  • Posts: 3089
Re: Logic simulators
« Reply #3 on: June 12, 2021, 03:04:32 pm »
I've just taken a look at Doug Jones's code and it's so unbelievably primitive that it thinks that "string" is an identifier best avoided since it's used by some extended compilers... but not the one he was using.

Sadly, I think this is something which is probably best avoided... particularly since more recent equivalents are probably aware of it and have mined anything refineable.

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

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 9542
  • FPC developer.
Re: Logic simulators
« Reply #4 on: June 12, 2021, 03:15:12 pm »
Compiles as is with -Miso

MarkMLl

  • Hero Member
  • *****
  • Posts: 3089
Re: Logic simulators
« Reply #5 on: June 12, 2021, 03:27:25 pm »
Doesn't run though (at least on x86_64 Linux), locks up immediately after being given a filename.

I've got it running with -Mobjfpc: changed a goto into an exception, renamed one variable and redid reset() to expect a space-terminated string as parameter and that's about it... and to my surprise I get the expected output.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and 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