4 ms·
> https://github.com/djhworld/simple-computer/blob/master/cpu/cpu.go#L763 https://github.com/djhworld/simple-computer/blob/master/cpu/... The author themselves
by pjc50 8y ago
> https://github.com/djhworld/simple-computer/blob/master/cpu/cpu.go#L763 https://github.com/djhworld/simple-computer/blob/master/cpu/...
The author themselves points out that a "big pile of gates" is not the best approach here, but I'm kind of surprised that at no point did they attempt to build another representation of the circuit and either execute it in a table-driven way, or write a short script that spits out go for compilation.
- gnode 8y ago> but I'm kind of surprised that at no point did they attempt to build another Perhaps because the existing implementation had already served its purpose - an educational exercise to understand CPU design, and not an instruction-level emulator or transcompiler.
- djhworld 8y agoThanks for the feedback, these are some good ideas if I was do do this again. I'm sorry you didn't think I took the best approach.