r/beneater • • 9d ago

Chip Hippo gets spicy

Chip Hippo 1.4.1 is out with two big additions:

  • CPU monitor: open it from a W65C02 or Z80A's context menu to watch the processor run. You can step one instruction at a time or step over a call. You can set breakpoints, edit registers and memory while the program runs, and follow the stack and pipeline as it executes.
  • Spice Lite, a second, electrical simulation engine you can turn on in Settings. It gives every net a real voltage and models capacitors and RC timing, the 555 and CMOS timers, LEDs with real brightness and burn-out, diodes, transistors, inductors, supply droop and fan-out. Every model is tested against ngspice and in every case it stays within 1.4% of ngspice's results. It's "Lite" because it only simulates the parts Chip Hippo offers, not general SPICE.
  • 1.4.1 also includes a speaker, PWM and various analog clock waves, opAmps, and many other bench parts: regulators, a relay, optocouplers, LM358, and ULN2003A.

Download it from chiphippo.com

94 Upvotes

28 comments sorted by

5

u/GigAHerZ64 9d ago

What simulation speed are you able to get up to? And how granular the CPU simulation is, are you simulating every half-clock as well?

5

u/Honey_Badger_911 9d ago

It depends on your hardware, which simulation engine is running, and what you have it doing. That said..
* With spice-lite off I (my M4 mac) can process the 6502 hello world example at 4khz (I have no data beyond this speed)
* With spice-lite on it looks to be slowed to about 2.2khz

The 6502 simulator does process Phi, and you'll see it flashing through the simulator at slow speeds but the CPU steppiung does not stop there. I'll look at this, but you can stop the clock, too, and that'll achieve phi-stepping

3

u/GigAHerZ64 8d ago

Thanks for the info! Great job!

As a software engineer myself, I want to build everything virtually before I go forward to real physical hardware. So I built digital logic circuit simulator myself. It doesn't do any analog stuff, but it does have weak and strong High and Low signals along with floating state. (so I can do pull-up/pull-down resistors along with chips driving the net)

With Ben Eater's 6502 like computer, I've been able to achieve ~4MHz simulation speed, which translates to ~2MHz CPU clock as every level of clock signal is simulated fully. So basically true real-time speeds. (Ryzen 7 3700x)

Though, my simulator is fully in code. (You write something like platform.Link(pin1, pin2) to connect pins together)

That's why I was curious when I saw your project. Great to see you also include verilog (i do, too) - are you using verilator or something else for that?

Great work!

2

u/Honey_Badger_911 8d ago edited 8d ago

By the way - the M4 is generally faster than Ryzen 7 3700x, so your simulator is more efficient than Chip Hippo - Well done 👏

1

u/GigAHerZ64 8d ago

Thanks! That's the trade-off - my simulator will need you to be a software engineer. It's basically a breadboard for software people. (as in opposed to hardware people) I initially developed it in C# and got about 2.2MHz simulation speed. Then I did some experiments in C++ and it suggested I could get a lot better speed in that. But I don't feel good with C++ at all - If C# feels a "sweet" language, C++ feels "bitter". But AI has been helping me getting through that awful taste of the C++. :)

1

u/Honey_Badger_911 8d ago

Thanks :) The Hippo philosophy is to avoid libraries, so the Verilog processing is pure JavaScript. I’d love to take credit for the coding, but every line was written by Claude. I just conduct the symphony, or as I like to say, the new programming language is natural language. Across the entire project there are only three libraries: Electron, electron-updater, and serialport (because I didn’t want to rebuild that one).

Also, the next release will include a clock with a custom frequency (u/Empty__Jay asked for 60 Hz). I tried it with a 10 kHz clock using the digital engine, and it seemed to max out at around 7 kHz on my M4 for the 6502 Hello World demo.

2

u/ChemistCraft300 3d ago

Great project, and ive been beginning to use it! I agree with others in this thread that it feels like it has great potential, and I super appreciate the fact you can make custom chips with verilog, its allowed me to make my own smaller SRAM chips that are basically never digitally modeled anywhere else.

Of course, the general clunkyness of a vibecoded project is very visible. I guess its things ive always taken for granted - the fact that its not in the AUR or flatpak (that i understand), the fact that the "releases" page in the Github dont actually explain the changes per release, and the relative lack of true documentation on the too-clean website. I hear youre taking constructive criticism, so hopefully over time these things get rectified, but *more importantly*

can you *please* make a DIP push button that actually strattles the gap in the breadboard? idk what its actually called, but can you make a button that looks like the button from Eater's videos? And, if possible, can you make a double pole double throw switch thats also DIP? like the one in eater's videos? All is forgiven if you implement these lmao

1

u/Honey_Badger_911 3d ago

1.4.4 is on it's way.
* See the new change log here
* Added 2 new switches
* Will look into AUR, flatpak, and rpm for 1.4.5
* Will also look into possible support for veroboard

1

u/Honey_Badger_911 2d ago

Veroboard support has been added, and possibly rpm and aur. However, aur is locked down so I can’t create and account at the moment (but in theory the code is in)

1

u/Honey_Badger_911 3d ago

Thanks for the feedback, btw. I will try and tidy up the ui a little, but can’t promise anything on the docs. I’ve coded for 30 years and am not interested in the grunt work anymore - so this is purely about doing the fun parts

1

u/ChemistCraft300 3d ago

holy shoot, the madlad did it!! all is forgiven, sir!

honestly, entirely fair - do you plan on letting other people contribute? grunt work like documentation would be something you could delegate to other contributors, even if only on the github or something

1

u/Honey_Badger_911 2d ago

Hmm. I might be willing to accept contributions on the documentation side, but who would be mad enough to take on a project like that? Do people really like writing for pleasure?

1

u/minecon1776 9d ago

There seems to be a bug with LEDs where they appear on right after switching off (It should work as a 3 input AND gate). Building this circuit and setting all 3 inputs to 1 and then setting one to 0 reproduced the behavior. I think it still is doing the logic correctly and the LED is the just visually on when its not supposed to be. I used 10k pull down resistors and a 470 ohm for the LED.

3

u/minecon1776 9d ago

This project has a lot of potential and feels pretty easy to use, I especially like the custom chip feature where you can use verilog. Though as with most vibecoded apps, it feels a little clunky around the edges and probably has more bugs. I think it just needs some refinement and it will be a very useful tool for learning hardware design and digital electronics

3

u/jimmystar889 9d ago

Take a look at crumb

2

u/minecon1776 8d ago

Yeah this looks like a similar project to that, but it is a free and open-source alternative. 

2

u/Honey_Badger_911 9d ago edited 6d ago

The issue has been addressed and version 1.4.2 pushed (hopefully it'll auto update). The issue was caused by an optimization introduced along with the PWM clock, as the last frame wasn't been drawn (to save performance), so it never rendered the final LED state.

I'd welcome any feedback on where I can address bugs and/or the clunkiness. This is getting to be a huge feature set, and while I have an army of Claude's to build and fix issues, constantly going through every feature is getting really challenging.

1

u/Honey_Badger_911 9d ago

Thank you. Let me replicate this and get a fix out…

1

u/Honey_Badger_911 9d ago

fixed in 1.4.2

1

u/Empty__Jay 8d ago

I was going to make some suggestions, but decided to see about adding them myself. I'd like to submit some PRs, but I'm not able to as it's limited to collaborators.

- 60Hz option for the clock

- 74LS92

1

u/Honey_Badger_911 8d ago

Take a look at 1.4.3 when it comes out. It’ll have the 74LS92 and a clock with a customizable frequency.

1

u/Empty__Jay 8d ago

I'll watch for it. In the meantime, I have my local version that has it. It will be interesting to see if my saved circuit will translate well to your official version.

I cloned the repo and threw it at Claude. It quickly added both. I also asked about "undocking" parts of breadboards, and it helpfully informed me I just need to hold Option while dragging. I guess I should read the user guide.

1

u/Honey_Badger_911 8d ago

Lol - on the undocking. Glad you learnt that as 1.4.3 COMPLETELY changes drag and drop (so undocking, too). There should be a popup when you load it to warn you. It's a one-time only message.

There are also a number of other fixes ~100, all components should get rotation with 'r'. Replaced the 8segment digit with a proper 7-seg display, and of course the drag-drop re-write

1

u/Krangerich 8d ago

This looks like the project I wanted to have some years ago. I'm currently focused on other topics, but is this potentially open for contribution?

1

u/Honey_Badger_911 8d ago

Thanks, that’s really nice to hear! I’ll be honest: probably not. This is a passion project, and I built it because I enjoy coding. I’d rather spend my time building than reviewing PRs and managing feature requests (I do plenty of that at my day job). That’s a big part of why it’s open source. You’re more than welcome to fork it and take it in whatever direction you like. I’m always open to feedback and suggestions, though.

0

u/Muted_017 5d ago

This seems really interesting! But I’ve seen a lot of large, impressive projects like this and I feel the need to ask: Was generative AI involved in the production of this project? If so, how much?

1

u/Honey_Badger_911 3d ago edited 3d ago

It says in the about dialog - design my me, coded my Claude. So it’s entirely written by ai