1-Hz, 8-Bit RISC Micro Built Using Minecraft Redstone

Dec. 24, 2021
The CHUNGUS 2 is an 8-bit micro with features such as a 4-stage pipeline.

Sammyuri's CHUNGUS 2 (Computational Humongous Unconventional Number and Graphics Unit) isn't the first 8-bit micro built in Minecraft, but it's one of the most ambitious. The 3-operand, RISC processor can run simple applications like Tetris, Snake, and Connect 4. It includes a display as well. The system runs at a blazing 1 Hz with a 10-tick clock.

The 8-bit CPU uses 16-bit, fixed-length instructions with seven general-purpose registers.. The 4-stage instruction pipeline implements fetch - decode - execute - writeback. The system has 256 bytes of RAM with a 64-byte, 8-way associative data cache and up to 256 I/O ports. The 4-kB program storage is broken up in thirty-two 128-byte pages. The system implements a simple branch prediction system. The ALU implements 40 functions including a hardware barrel shifter, multiply, divide, and square root. 

The display is a 32-×-32 buffered pixel screen. It's possible to draw and erase individual pixels as well as using rectangles and up to eight 4 -×-4 sprites. It can also be used as a 12-character × 2-line ASCII text display or a two-line, 8-bit integer display (signed or unsigned). There's an 8-input NES-style controller. The built-in peripheral is a 3-bit pseudo-random number generator (RNG). Handy for game applications. 

Sammyuri created an assembler written in Python for the CHUNGUS 2. Sorry, not self-hosting. Not enough memory or time. 

Redstone Basics

For those unfamiliar with Minecraft, it's a video game that runs on a range of platforms. The 3D virtual world is built around uniform blocks that can be materials like air, water, wood, rock, etc. Each has its own unique attributes. One of the items is called "redstone," from the block that it's obtained from. It works something like a conductor, although it tends to operate more like a fluid rather than an electrical circuit. Redstone can be "powered" by items such as switches and redstone torches. The thing is, only one item can be in a block of space. 

There are lots of websites that cater to Minecraft and redstone devices, including processors like CHUNGUS 2, so I will not go into the nitty-gritty details here. I did find a site that does a good job of presenting basics like implementing a full adder (see figure). As you can see. It takes a lot of blocks. The example could be made more compact; CHUNGUS 2 does implement things in a more compact form, but even then it's a massive undertaking. It took the developer seven months to implement. 

Still, Minecraft and implementations like this is are a good way to teach the basics where users can experiment and learn from the implementations available. It's not quite VHDL or using an FPGA, but you need to walk before you run. 

Minecraft is a fun game. I have two servers that I run for my grandkids, which we play together on. We have implemented simple redstone devices like automatic doors and elevators, but nothing this complex. Maybe someday. I just think this it's a really neat implementation. 

Links

Sponsored Recommendations

Near- and Far-Field Measurements

April 16, 2024
In this comprehensive application note, we delve into the methods of measuring the transmission (or reception) pattern, a key determinant of antenna gain, using a vector network...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Empowered by Cutting-Edge Automation Technology: The Sustainable Journey

April 16, 2024
Advanced automation is key to efficient production and is a powerful tool for optimizing infrastructure and processes in terms of sustainability.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!