Рет қаралды 346
The MPU 7 is my latest and fastest Minecraft Redstone CPU.
Here the MPU 7 is running the Ackermann function written in B code that has been compiled to URCL code using the B compiler I wrote.
This program took approximately 2 hours to calculate Ackermann of 3 and 1.
B code for the Ackermann function:
auto ack(auto m, auto n) {
if (m == 0) {
return n + 1;
}
if (n == 0) {
return ack(m - 1, 1);
}
return ack(m - 1, ack(m, n - 1));
}
Anyone who wants to run code on the MPU 7 can feel free to send me URCL programs (or B code!) and I can attempt to run them.
The Ackermann function is relatively simple but it is one of the most recursive programs possible. The large amounts of recursion is why it takes so long to run.
The MPU 7 is capable of doing up to ack(3, 1) = 13 or ack(2, 7) = 17 as the it is limited to a stack size of 128 bytes (which is the size of the RAM).
To run URCL code, I translate the URCL code line by line into MPU 7 assembly using a dictionary of translations in a Python program I wrote. Then I write the translated MPU 7 assembly into the instruction ROM and run it.
It really is that simple. (Which is the whole point of URCL)
Join the URCL (Universal Reduced Computer Language) discord:
/ discord
This video is at 32x speed and the carpet mod tick speed is set to 2 times speed.
The flashing horizontal line is the cursor. This just shows what area of the screen the MPU 7 is currently writing to.
MPU 7 Specs:
• No command blocks or pistons
• 2 Hz clock speed (5 ticks or 0.5 seconds per clock pulse)
• 5 stage waterfall pipeline (Fetch1 - Fetch2 - Decode - Execute - Writeback)
• 10 general purpose simulated dual read registers (with no read before write hazards because of the automatic forwarding)
• 8 bit word length
• 256 word instruction ROM x2
• 32 bit instruction length (that includes an 8 bit immediate value)
• VLIW architecture
• 32 bit hardware BCD converter
• 8 bit hardware multiplier
• 8 bit hardware divider
• 8 bit RNG
• 64x32 pixel display (1x1 pixels) which can be shifted upwards 8 pixels whenever needed
• 1 frame buffer
• Full qwerty keyboard with arrow keys and function keys for user input
• 128 bytes of main RAM
• 256 bytes of screen RAM
• Up to 128 I/O ports
• External 8 kiB paging ROM for storing large amounts of data (Like Bad Apple!!)
• 7 testable flags
• Full 7 bit character set (a custom one, so not ASCII) which uses 4x8 characters
• Can be started, stopped and reset from the UI
• Almost fully compatible with URCL
MPU 7 ISA:
docs.google.co...
MPU 7 World download is available in the URCL discord:
/ discord
If you want to support me creating these videos, Patreon is:
/ modpunchtree
or my PayPal link is:
paypal.me/modp...