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

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

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