Simulation software

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice.
Post Reply
steve
Posts: 5
Joined: 08 Jul 2019, 19:40

Simulation software

Post by steve » 08 Jul 2019, 22:21

Hello Marcel and all the "co" Tech aficionados!

I watched by chance a youtube video about Gigatron and started get interested about homebrew CPU design! :)

I analyzed the project and found very nicely designed and explained. I also proposed (on the hackaday blog) an exctension of the instruction set.

I was thinking to do some changes a bit more disruptive to the architecture and experiment some new ideas (e.g. transport triggered architecture). For this I was wondering if there is a usable circuit emulation software that can allow me to start doing it on "paper" (screen) and eventually (in case it make sense) on breadboard or PCB, especially because I've no tools as oscilloscopes and unfortunately for now less than basic soldering skills!...

Would kikad be a good candidate to simulate all the circuits together?

PS: as a I use mainly linux environments and I've to learn any software from zero, so the simpler the better! ...

User avatar
marcelk
Posts: 400
Joined: 13 May 2018, 08:26

Re: Simulation software

Post by marcelk » 09 Jul 2019, 08:03

Welcome to the club!

The Gigatron design is easy to expand, because so much was stripped away from it :D

Some links to interesting earlier proposals: As far as I know, both haven't materialised yet.

To me it's most interesting to see what can be achieved within the same component count. I doubt anybody has even implemented [X,D] or [D,X] yet, let alone something more elaborate. Also don't underestimate the software effort, but with a little thought it should be possible to convert the opcodes from our architecture to another. The real challenge of course is to remove chips and see what you can do with that. The condition decoder is the prime candidate, because it was Control Unit chip #6: the last addition that defined the current instruction set.

Another idea is to see if you can make the three-stage idea (rambled upon earlier) work in, let's say, <40 chips total. That's would be a truly unique and extremely cool follow-up (but you can forget about reusing much of the software).

Concerning emulation, if you want quick and meaningful results, IMO nothing beats a bunch of breadboards and a low-cost oscilloscope. We didn't use software emulation until after the first PCB version worked: at that point we started to write the vCPU interpreter and we needed an easier way to debug its timing. That was gtemu.c, and that is block level emulation, not logic gate level.

Some people use Logisim for simulating the logic gate level. It's a free educational application. It's written in java so it should work on Linux. I played with it before and I have some of our 74-series chips drafted with it. But people build entire homebrew CPU designs in it as well.

Screenshot 2019-07-09 at 10.38.57.png
Logisim screenshot
Screenshot 2019-07-09 at 10.38.57.png (351.89 KiB) Viewed 672 times

steve
Posts: 5
Joined: 08 Jul 2019, 19:40

Re: Simulation software

Post by steve » 10 Jul 2019, 17:27

marcelk wrote:
09 Jul 2019, 08:03
Welcome to the club!
Thank you!! You're really nice and let me feel feel already part of a vibrant even if niche community!! :)

marcelk wrote:
09 Jul 2019, 08:03
The Gigatron design is easy to expand, because so much was stripped away from it :D

Some links to interesting earlier proposals: As far as I know, both haven't materialised yet.

To me it's most interesting to see what can be achieved within the same component count. I doubt anybody has even implemented [X,D] or [D,X] yet, let alone something more elaborate. Also don't underestimate the software effort, but with a little thought it should be possible to convert the opcodes from our architecture to another. The real challenge of course is to remove chips and see what you can do with that. The condition decoder is the prime candidate, because it was Control Unit chip #6: the last addition that defined the current instruction set.

Another idea is to see if you can make the three-stage idea (rambled upon earlier) work in, let's say, <40 chips total. That's would be a truly unique and extremely cool follow-up (but you can forget about reusing much of the software).
As said regarding the "current" design my draft proposal is on hackaday build log. With this instead I'm trying the more disruptive ideas as you're saying to try to reduce even more, even if a real keyboard for me should a must in a computer while the current joypad seems more console oriented. I'll take a look at all the link reported for even more inspiration! Surely the sw is a great asset you created and even with a slight different architecture would be nice to reuse it!

marcelk wrote:
09 Jul 2019, 08:03
Concerning emulation, if you want quick and meaningful results, IMO nothing beats a bunch of breadboards and a low-cost oscilloscope. We didn't use software emulation until after the first PCB version worked: at that point we started to write the vCPU interpreter and we needed an easier way to debug its timing. That was gtemu.c, and that is block level emulation, not logic gate level.

Some people use Logisim for simulating the logic gate level. It's a free educational application. It's written in java so it should work on Linux. I played with it before and I have some of our 74-series chips drafted with it. But people build entire homebrew CPU designs in it as well.
I saw around something more as CircuitVerse and alike (https://alternativeto.net/software/circuitverse-org/), but you convinced me: if I will try I'll try to go with breadboard, even if I was never good at physical HW: should be more difficult but also more fun, and anyway if I've to start from scratch maybe even not slower ... let's see! :)

User avatar
marcelk
Posts: 400
Joined: 13 May 2018, 08:26

Re: Simulation software

Post by marcelk » 10 Jul 2019, 19:32

All sounds good. Good luck!
steve wrote:
10 Jul 2019, 17:27
a real keyboard for me should a must in a computer while the current joypad seems more console oriented.
I just hope you didn't miss that we added the PS/2 keyboard interface about one year ago.

steve
Posts: 5
Joined: 08 Jul 2019, 19:40

Re: Simulation software

Post by steve » 11 Jul 2019, 17:06

Yes, I saw, but unfortunately this is adding even more circuits, even if external... (and added also to the one in the keyboard itself!)

For me to remain pure with the 70s philosophy the keyboard should be a very simple integrated old school matrix one!

The solution I was thinking was routing the (4) led output lines together with the actual (8) input ones: a 32 keys keyboard can be integrated! And with the speed of keyboard read probably this will very barely interfere with led illumination so to keep also them!

Using two type of shifts a keyboard like this will provide 90 usable input characters (120 if also using the combination of both pressed together), more than enough for the Gigatron input!

Hope you agree!

User avatar
marcelk
Posts: 400
Joined: 13 May 2018, 08:26

Re: Simulation software

Post by marcelk » 11 Jul 2019, 22:40

steve wrote:
11 Jul 2019, 17:06
For me to remain pure with the 70s philosophy the keyboard should be a very simple integrated old school matrix one!

Hope you agree!
I fully agree! The (dream) thread on this topic has been quiet for a while, and can use some new results.

If you do your own keyboard, my suggestion is to put the complexity of the keyboard mapping in the wiring matrix itself. So that you get ASCII-like codes into the system, instead of QWERTY-like order that requires additional mapping in software. So the electrical layout would be ASCII, but the physical layout can still be QWERTY.

steve
Posts: 5
Joined: 08 Jul 2019, 19:40

Re: Simulation software

Post by steve » 27 Aug 2019, 12:57

Seems to me that 8x4 matrix as it is available with current lines is not suitable for direct keycode wiring, anyway this is a simple lookup of a very low frequent event.

Instead I was trying to understand another thing (and sorry if the question is trivial but I'm pretty new on electronics):

I red about voltage levels of different circuit families (here a good post: https://www.jsykora.info/2014/05/logic-voltage-levels/); the question is, why HCT have been chosen for the majority of the project? (seems to me that HC parts are more available!) And, if HCT parts are used and some are not available, can I mix HC ones (as e.g. done for input controller), or where I should not?

User avatar
marcelk
Posts: 400
Joined: 13 May 2018, 08:26

Re: Simulation software

Post by marcelk » 27 Aug 2019, 13:47

The original design is for 70 ns RAM and 74LS logic: 74LS still has bipolar transistors, not FETs. We never want to lose the connection to this original 1970s technology. In that spirit, 74HCT can be seen as a compatible low-power substitute for 74LS, but made from "modern" transistors (well, 1983...). If we had gone "all-74HC" for the kit edition, we would have irreversibly disconnected ourselves from "true original TTL", because 74HC has incompatible input levels. Also, in case availability becomes a concern, with the kit edition done in 74HCT we can still partially switch back to 74LS parts or forward to 74HC parts (for most chips). So it leaves more options on the table for sourcing components.

You must decide on a case-to-case basis which chips you can replace by what type. You should consider the effect of the diodes and the speed of the pull-ups. It's very well possible that the design will not work with 74HC-only chips because of that.

steve
Posts: 5
Joined: 08 Jul 2019, 19:40

Re: Simulation software

Post by steve » 27 Aug 2019, 16:40

Got the point even if the last sentence is a bit scary for the testing I've to perform for the new ideas...
I've almost finalized the reasonings and hope to be able to publish the results in the short time. Hope then you'll find them interesting enough to support me a bit in the realization!...
In the meantime thank you again!

Post Reply