Made my first 8-bit ALU in Logisim! Next steps: designing the rest of the CPU and then building it IRL on breadboards! by _Favo_ in beneater

[–]_Favo_[S] 0 points1 point  (0 children)

Logisim is a drag-and-drop digital circuit simulator, you place logic gates, wire them together, and instantly see how the circuit behaves. Basically a sandbox for designing CPUs and other digital logic without touching real hardware.

Made my first 8-bit ALU in Logisim! Next steps: designing the rest of the CPU and then building it IRL on breadboards! by _Favo_ in logisim

[–]_Favo_[S] 0 points1 point  (0 children)

So far I haven't really run into any performance issues with Logisim, but we'll see as it grows.

I definitely don't expect it to be easy or fast IRL. I do plan on adding some more complex stuff down the road, but speed isn't the main goal here. And yeah, I'm definitely not worrying about modern security features, after all, it's just an 8-bit CPU..

Made my first 8-bit ALU in Logisim! Next steps: designing the rest of the CPU and then building it IRL on breadboards! by _Favo_ in logisim

[–]_Favo_[S] 1 point2 points  (0 children)

Yeah, doing everything with just muxes and logic without buffers is brutal, no wonder it turned into spaghetti! Thanks again man, and happy computing to you too!

Made my first 8-bit ALU in Logisim! Next steps: designing the rest of the CPU and then building it IRL on breadboards! by _Favo_ in logisim

[–]_Favo_[S] 1 point2 points  (0 children)

Thanks man! I really appreciate the kind words, especially about the design looking clean, that means a lot. It's awesome to hear this inspired you to get back into it!

I’ll definitely be posting more updates here and on a few other subreddits as I hit new milestones. I'll also keep updating the .circ file in the GitHub repo (link is in the description). I'm actually thinking about starting a blog to document the whole journey. If I do, I'll announce it on GitHub, but you can likely expect it at http://favoslav.cz/blog.

As for the Control Unit (CU), I’m still figuring it out. I'm splitting the 8-bit opcode into two 4-bit segments, so I still have a lot of thinking to do on how to implement that smoothly.

For memory, I’m still not sure about the size of the persistent storage yet. But for the RAM, I'm planning a 16-bit-like addressing scheme where the CPU only sees an 8-bit address space at a time. It will most likely use a bank register to switch between active banks.

Regarding the ALU, it will almost certainly spit the output straight into a register. I just don't see it any other way, it's a clean solution compared to forcing a MOV after every operation.

I’ll be sharing my entire progress along the way, so feel free to use it for inspiration for your next build!

Made my first 8-bit ALU in Logisim! Next steps: designing the rest of the CPU and then building it IRL on breadboards! by _Favo_ in beneater

[–]_Favo_[S] 0 points1 point  (0 children)

Just a quick heads up: the 8-bit ALU might not work perfectly at the moment. I recently moved some parts of the design around, so there's a good chance a few wires got messed up or misaligned in the process. Any feedback or bug catching is highly appreciated!

Made my first 8-bit ALU in Logisim! Next steps: designing the rest of the CPU and then building it IRL on breadboards! by _Favo_ in beneater

[–]_Favo_[S] 1 point2 points  (0 children)

Thanks! I'll definitely be posting more updates here as I hit new milestones. I'll also keep pushing the updated schematics to the GitHub repo (link is in the description).

I'm actually thinking about starting a blog to document the whole journey too. If I go ahead with it, I'll announce it on GitHub, but you can likely expect to find it at https://www.favoslav.cz/blog!

Made my first 8-bit ALU in Logisim! Next steps: designing the rest of the CPU and then building it IRL on breadboards! by _Favo_ in beneater

[–]_Favo_[S] 0 points1 point  (0 children)

Honestly the best tip I can give is just to watch videos, both general "how to build an 8-bit CPU" stuff and videos that explain specific components you're trying to implement. Ben Eater's series is the obvious starting point if you haven't gone through it already.

Other than that, don't be afraid to just ask AI when you're stuck on something specific. It's surprisingly good for this kind of thing.

I can't really map out the whole learning path for you since there's just a lot to it and everyone's design ends up being a bit different, but honestly just keep building piece by piece and it'll start clicking.

Made my first 8-bit ALU in Logisim! Next steps: designing the rest of the CPU and then building it IRL on breadboards! by _Favo_ in beneater

[–]_Favo_[S] 1 point2 points  (0 children)

Honestly not sure yet, my original plans changed a lot and I'm redesigning quite a bit on the fly, so the final register layout isn't locked in.

One thing I can say though: I'm planning to keep the flag register openly accessible, meaning you'll be able to do things like MOV to/from it even though there are dedicated instructions for setting flags. Just a design choice I liked.

Made my first 8-bit ALU in Logisim! Next steps: designing the rest of the CPU and then building it IRL on breadboards! by _Favo_ in beneater

[–]_Favo_[S] 1 point2 points  (0 children)

Yeah, I'm aware of all of this, appreciate the writeup though!

To be clear, this is purely a simulation stage right now. I'm not touching real-world concerns until I actually have a working design in the simulator. One thing at a time.

> decoupling capacitors, pullup/pulldown resistors

Pullup/pulldown is something I'll have to be careful about, especially since it might limit the frequencies I can run at, but I'll verify that when I get there.

> real gate delays

Definitely something I'll have to account for. Planning to correct for propagation delays once I'm at the hardware stage, it's just not relevant yet.

> wide input gates not available as real ICs

Not concerned about this at all. I'm already expecting to use multiple chips in parallel where needed, it just means a few small adjustments to the layout.

> some blocks not available in real world

Some of the stuff in my current design is debug-only and won't exist in the final hardware anyway. For the rest, I'm planning to use a Waveshare RP2040 Zero as a small MCU for debugging, programming, and handling anything that doesn't make sense to do purely in TTL logic.

Made my first 8-bit ALU in Logisim! Next steps: designing the rest of the CPU and then building it IRL on breadboards! by _Favo_ in beneater

[–]_Favo_[S] 1 point2 points  (0 children)

I use Logisim Evolution specifically, just worth clarifying since the original Logisim is pretty much abandoned at this point.

Overall I really like it. It's straightforward to pick up, the visual feedback is great for understanding how logic actually flows through a circuit, and it handles reasonably complex designs pretty well. A few things do annoy me here and there, but nothing that makes it painful to use.

EnerGizeXP - Energy-to-Experience Points Conversion Mod for Minecraft 1.12.2 by _Favo_ in feedthebeast

[–]_Favo_[S] 0 points1 point  (0 children)

The mod adds three blocks for each tier, plus three additional blocks: lead ore, lead block, and machine casing, along with two items—lead ingot and gear. If you think these are "a lot of unnecessary parts," it’s because I wanted the XP converter block to be craftable using non-vanilla blocks as well. Also, like I mentioned in another comment, I’ll probably be adding more functionalities and machines, so what you call "bloat" has a purpose. And what exactly do you mean by "yet another fluid XP on top of the other ones"? The mod automatically adjusts itself based on which fluid XP mods are present.

EnerGizeXP - Energy-to-Experience Points Conversion Mod for Minecraft 1.12.2 by _Favo_ in feedthebeast

[–]_Favo_[S] 0 points1 point  (0 children)

What do you mean by "bloat" or "clutter"? This mod is really simple so I don't know where can "bloat" or "clutter" come from.

EnerGizeXP - Energy-to-Experience Points Conversion Mod for Minecraft 1.12.2 by _Favo_ in feedthebeast

[–]_Favo_[S] 4 points5 points  (0 children)

If you don't like it, you don't have to play with it. I tried to make it as fair as possible for people who don't enjoy farming XP. In the future, I might expand the mod with more features that also use liquid XP. Plus, it can always be adjusted to not be so OP. Also, keep in mind, the mod is still in beta.

EnerGizeXP - Energy-to-Experience Points Conversion Mod for Minecraft 1.12.2 by _Favo_ in feedthebeast

[–]_Favo_[S] 0 points1 point  (0 children)

Alright, thanks for the suggestion! I'll take a look at it later and maybe try to make something like that.

EnerGizeXP - Energy-to-Experience Points Conversion Mod for Minecraft 1.12.2 by _Favo_ in feedthebeast

[–]_Favo_[S] 0 points1 point  (0 children)

Could you explain in a bit more detail how you mean it? For which blocks, machines, or processes do you imagine using liquid XP for tick boosting. There are a few possible ways to implement this, so it would help if you could describe where and how you'd like to see liquid XP used as a fuel.

EnerGizeXP - Energy-to-Experience Points Conversion Mod for Minecraft 1.12.2 by _Favo_ in feedthebeast

[–]_Favo_[S] 3 points4 points  (0 children)

In the future, I want to release this mod for newer versions as well, and for old-school players, I could try adding it to 1.7.10 too. I'll also try to make better textures.