News for hackers. Stuff that matters.
Re:Show HN: Pylectronics – Reproduce digital electronics in ... by fgarci03 on Sunday August 29, 2021 @10:42PM (#28352359)
I'm building a CPU out of transistors in Python. Feedback (even just to tell me what an idiot I am!) and any help is highly appreciated :)
Re:Show HN: Pylectronics – Reproduce digital electronics in ... by sigmaprimus on Sunday August 29, 2021 @11:03PM (#28352458)
Sounds like a fun project, many years ago I built a POV led wand that used an 8 bit parallel adder made from transistors, a 555 timer and an EEPROM. That might be a good hello world type project to tackle on your way to the CPU goal.
Re:Show HN: Pylectronics – Reproduce digital electronics in ... by e19293001 on Monday August 30, 2021 @12:17AM (#28352777)
I like projects like this! You may want to add to support and use VCD to dump the waveform and see the circuit's data flowing through time.

https://en.m.wikipedia.org/wiki/Value_change_dump

Re:Show HN: Pylectronics – Reproduce digital electronics in ... by gravypod on Monday August 30, 2021 @12:02AM (#28352709)
Do you have any demos of how this library works when used in something complex? Also, do you have any ways to export the logic defined into some data structure? This would allow you to bolt on compilers to translate into a netlist or FPGA.
Re:Show HN: Pylectronics – Reproduce digital electronics in ... by fgarci03 on Monday August 30, 2021 @05:17AM (#28353959)
Now there are a bunch of words I don't understand here :D

Right now there are no demos. I only have a few loose components, not enough to build anything useful (the tests do instantiate them correctly, does it count as a demo? :D)

Regarding exporting the logic, it could be a nice idea, but I have no idea where to start. Thoughts?

Re:Show HN: Pylectronics – Reproduce digital electronics in ... by diymaker on Monday August 30, 2021 @09:15AM (#28355329)
Have you already checked out: https://www.myhdl.org/?