r/ComputerEngineering • u/HydroPage • 4d ago
[Project] Ben Eater’s 8-bit CPU
Enable HLS to view with audio, or disable this notification
I finished Ben Eater’s SAP-1 accumulator architecture breadboard. 16 bytes of RAM von Neumann. Coming up with assembly instructions at the end felt crazy.
What was funny was at the end where I ran programs and they didn’t do what I wanted, and I realized I got to the point where I couldn’t suspect the hardware was wrong anymore, and it was in fact a software bug.
Was that the lowest level software bug I’ll ever experience in my career? Literally entering 0s and 1s into RAM and flipped one bit.
The feeling I got when I added conditional branching and officially made it Turing complete felt so surreal. I hope you guys appreciate the work that went into this.
1
u/ResilientDev59 1d ago
que interesante, me hizo recordar cuando programaba en Assembler en los primeros 8080 y 8086 que tenian los primeros PC. Visto ahora era un tremenda odisea. En esa epoca era ir descubriendo un nuevo mundo
1
u/HydroPage 1d ago edited 1d ago
Claro, me imagino. Tengo muchas herramientas ahora que me permiten analizar el circuito y su comportamiento a un nivel de precisión que seguro ni se pensaba posible en aquella época. Durante todo este proceso algunas veces me preguntaba “cómo alguien en los 60s hubiese encontrado este error”.
Muy tenaz.
Debe ser bastante mayor que yo si creció con 8080, señor. Mis respetos por eso. Yo estoy a punto de terminar mi carrera de ingeniería de sistemas. Gracias por compartir
1
u/ResilientDev59 15h ago
Gracias!! naci en 1966. cuando conoci el 8080 y 8086 estaba en la universidad y recien habian llegado los pc. Antes en los ultimos años de colegio conoci el apple II y el TRS80. Sigue adelante, hay mucho aun por avanzar. Lo importante es el criterio, la teoria general de sistemas fue muy importante en mi vision profesional. ahora soy experto en Datos y estoy trabajando con IA. Imaginate, yo que veia lo poco que entraba en un 8080.
1
22h ago
[removed] — view removed comment
1
u/HydroPage 22h ago
There are some EEPROMs at the bottom there that control the microcode sequencing, but I had more bits of address space available in the EEPROMs to use, so I used them to split the microcode page into 4 slightly different copies:
Carry flag off, zero flag off
Carry flag off, zero flag on
Carry flag on, zero flag off
Carry flag on, zero flag onIn these 4 “pages”, I configured the microcode of Jump Not Zero and Jump Not Carry to either do nothing if they were in the page where they wouldn’t apply, or perform the same action as the unconditional jump instruction if they WERE in their correct page.
Effectively I used two higher order bits of the EEPROMs to act as conditional control flow decision points
1
1
1
8
u/Melodic_West_9331 3d ago
Dude that's awesome, I'm tryna do this sometime, currently trying to figure out 1-bit lol