Live data from Hacker News

Show HN: We built an 8-bit CPU as 2nd year EE students

github.com

31–40 of 53 posts

Re: Show HN: We built an 8-bit CPU as 2nd year EE students

#31

Very nice. I wonder if implementing a one-instruction set computer (for example something that implements Adrian Cable's subleq VM, see https://www.ioccc.org/2025/cable/ ) would be educational and whether it can make the design of a computer from discrete logic chips simpler or more complex. Though it would very likely not be as efficient.

The simplest processors use one clock per instruction with a Harvard architecture. This allows their control unit to be a combinational circuit instead of a Finite State Machine (and depending on how your memories work you might even avoid having an instruction register).

Most one-instruction processors take multiple clocks and often need extra registers (for fetching 16 bit addresses from an 8 bit wide memory, for example) [1].

The four instruction MCPU [2] is not as bad to program as the one-instruction computers (it still needs 10 times as many instructions as a RISC-V, for example) while being very simple. Making it Harvard allows it to be slightly simpler and making it 16 bits allows it to run non trivial programs [3].

[1] https://github.com/jeceljr/SBN/blob/master/sbn.pdf

[2] https://github.com/cpldcpu/MCPU

[3] https://github.com/jeceljr/digitalCPUzoo/tree/main/MCPU

Re: Show HN: We built an 8-bit CPU as 2nd year EE students

#32
post #26

>>me and my friends ... My friends and I...

If you're going to be a pointless language pedant, it really helps if you don't fuck it up. OP said: > me and my friends together built an 8 bit CPU… – and if one replaces that with your suggestion: > My friends and I together built an 8 bit CPU… – you'll find that you are, gleefully, wrong. For those unaware, the simplest test for 'me and x' vs. 'x and I' is that, in the latter case, you should be able to remove 'x…

I downvoted the original comment because grammar pedantry adds nothing here. But if you're going to correct a pedant, you've got to be right. You're applying a test you don't understand and you messed it up.

"I" is the subject of the sentence, or the person who is doing the thing. "Me" is the object of the sentence, or the thing that is receiving the action. Since he and his friends are the ones who did the building, "I" is the correct pronoun.

Going back to the test you gave, the correct way to apply it is to replace entire the noun phrase with "I" or "me". The noun phrase here was "me and my friends together". "I built an 8 bit CPU" vs "Me built an 8 bit CPU". The former is the obviously correct one.

Re: Show HN: We built an 8-bit CPU as 2nd year EE students

#33
post #19

This is also very well documented. Probably as part of the assessment, but it's nice to see. It doesn't appear to have any kind of interrupts, which is quite a limitation for actual usecases, but also makes the architecture much simpler. The use of dual phase clocking is interesting. The document describes it as having the control and data paths operating on opposite phases. I'm curious as to where you got this techn…

Not having interrupts isn't necessarily a problem. In fact if you want to be sure that the processor behaves deterministically then you might choose to not have interrupts. I remember seeing an article about the British RAF commissioning a CPU design and explicitly forbidding interrupts for that reason. Unfortunately I don't remember where I saw it so I can't check to see if my memory is faulty.

Re: Show HN: We built an 8-bit CPU as 2nd year EE students

#34
Computer architecture (I think my uni named it comp org) was one of my toughest courses in undergrad! It steered me away from hardware. I now wonder if that is still the case today? ARM has exploded onto he scene and I'm fascinated by the sheer amount of development going on in the chip space.

Re: Show HN: We built an 8-bit CPU as 2nd year EE students

#35
post #26

>>me and my friends ... My friends and I...

If you're going to be a pointless language pedant, it really helps if you don't fuck it up. OP said: > me and my friends together built an 8 bit CPU… – and if one replaces that with your suggestion: > My friends and I together built an 8 bit CPU… – you'll find that you are, gleefully, wrong. For those unaware, the simplest test for 'me and x' vs. 'x and I' is that, in the latter case, you should be able to remove 'x…

> pendant

See https://en.wikipedia.org/wiki/Muphry%27s_law

Re: Show HN: We built an 8-bit CPU as 2nd year EE students

#38

With all the talk about developers being lazy and younger folk not understanding the technology they use, it is always great to see examples of core foundational work still being done. Makes the rest of that talk feel like fear mongering.

Every generation in history has said the younger generation is lazy. Didn't make it true when I was a young xenial / millennial and I suspect it's not true for Gen Z and Gen Alpha either.

Re: Show HN: We built an 8-bit CPU as 2nd year EE students

#39
post #27

So this was all just simulated? Where are the pictures of the build? Back in the day i built a 4-bit CPU on a breadboard (it was huge actually spanned 3 breadboards). Programming the ROM by hand like cavemen (to be fair it was the cave ages). We didn’t carry cameras in our pockets so sadly we didn’t get a picture.

I did the same (4-bit cpu, 11 instructions) in my Microprocessors class, out of 74-series logic, one GAL20V8 to handle the SLE instruction and an EPROM (not an EEPROM - one with the clear window you exposed to UV light to erase. That was also where I learned about ground-bounce & dynamic IR-drop effects due to those long looping wires between breadboards. That was a fun class.

Raise your hand if you still have a UV eraser at the bottom of a cabinet somewhere.

Re: Show HN: We built an 8-bit CPU as 2nd year EE students

#40
post #4

the rom-to-ram bootstrap is a nice touch. after it hands over, what stops the bootloader from writing to I-SRAM again? a mode flag in the control matrix?

Actually it writes again after every hard reset. but i added a push button to stop it, logically speaking we only turn our computer on once and then run it till our tasks are done. Similarly we do it here, but still the best option for me was to use a separate ROM address in Program counter and use it. It was a simple use case where you Just copy everything the the RAM from permanent memory.
Post reply on HN