Hello so today i’m going to be doing a showcase and an explanation of my fifth minecraft redstone computer so we’re going to start off with a little program and then i’ll do some explaining onto how i can make this work so fast so it’s not completely finished yet i still need to do Conditional statements so while it will do the additions and display them onto the screen it’s not going to stop once it gets to the i think it’s 233 is the highest number for 8-bit so yeah it is pipeline so it does take a little bit to start up and it gets really fast Yep and then it’s just not going to stop because there’s no conditional statements but yeah it is still pretty fast um so now i’m going to go into what makes this so fast so there are three things i would say that make this really fast um One this is a pipeline computer if you don’t know what that is that’s basically where instead of sending out one instruction waiting for it to calculate and then sending out the next one and waiting for it to calculate i’ll send out the first instruction and then before it even finishes i’ll send Out the next one and the next one and the next one and the next one in the next one um if this computer wasn’t a pipeline computer it would be about one hertz so it’s still a fast computer on its own but pipeline just makes it that much more fast Um another thing is it’s not very laggy there are a few things i did to keep it that way for example on the program memory decoder there’s no decoder here because running a 7-bit decoder at 5 hertz was super laggy so i just opted for a timing based design um and i’ll talk About that more later when i talk about jumps and stuff and then the third thing is just overall consciousness of every repeater you place every repeater in here is needed there’s no unnecessary ones and if i thought that maybe there was a way i could remove a repeater I tried i would try for hours to remove one repeater just to lower by one tick because when your instructions are two ticks long every single tick hurts you really bad so i most repeaters you can see here are powered by either signal strength two or single signal strength one let’s see And that one’s powered by sigma string two two ah i guess they’ve got a little bit of um optimization to do but most of them are powered by signal strength one um and that just keeps the total time from one side of the computer to the other super short So i guess we’ll talk about the jumps next so as i was saying it’s a timing based design so every two ticks it will send out another instruction or another line of code there might not be an instruction on that line but it will send out a new line of code But the problem with this is that there’s no way to stop this or well there is but you wouldn’t think there would be because there’s no repeaters here i mean there’s no pistons here to cut off the signals there’s no real any way to stop this except for these locking Repeaters these repeaters lock these repeaters and i just use some very careful timing to have the right repeater locked at the right moment to stop the signal so when i actually start up the computer this is the start line it will also send a signal down here And start up this clock and this clock is perfectly offset and perfectly timed with the start of the computer so that when i run a jump instruction it will turn this line on or off i guess and it will retract these pistons for exactly two ticks And then one of these two lines will turn on and then we have the odd so this one has every other and then this one is every other so they’re staggered and then that just makes it so that when for example let’s say that the signal is right here and The power from the bottom reaches up here this repeater would be locked and this repeater would be locked and then the signal just kind of goes away because if this is powered and this is locked there’s nowhere for the signal to continue on to so that’s why to stop the signals how i Start a new one um there’s two decoders here there’s an x decoder and a y decoder and they’ll kind of just meet in the middle with an and gate and then one of these 128 torches will turn on depending on the data you send to the Decoder and that’s how you start a new signal so for a jump you would first stop it and then you would start a new one this makes it really easy to do interrupts because that clock is always perfectly timed so whenever i want to stop the computer i can just flick the Our de-extend and extend the pistons real quick and it will stop the computer so that makes me want to go with an interrupt design i haven’t quite figured that part out yet i’m still figuring out some designs i could do before i actually build them but yeah that’s jumps and how i’ll do Conditions when i get to it next i’ll talk about the instruction set so there are three parts to this instruction set it’s a pretty small one in general there’s only data location code and opcode so the data can either be a number it can be an address Mostly it’s going to be a 4-bit address because most addresses in this computer are four bits i’ve only got 16 bytes of ram so it’s a little small but you probably could extend it if you wanted to but i just went with 16 bytes So um it can be either a number or an address and then location code i’m going to talk about buses before i talk about location code though and there are six buses there’s the main bus which branches right off from program memory and then goes along the bottom line here This is also the main output for the cache or the dual read ram and then it branches right here it goes into the bottom input of the lu or it goes up here and goes into the input of the caches and then you have the secondary bus which Like the main bus is the secondary output for delaware ram it just goes into the other input of the alu nothing too special then we got the first auxiliary bus which starts right here branches off from the main bus and then just goes into the main decoder for cash And then the second area auxiliary bus starts here and goes into the secondary decoder for cash and then we have the jump bus which also branches off from the main bus right here and just goes a little bit lower than the secondary auxiliary bus and then this just decodes where you Want to send your location in a move command i’ll talk more about move commands in a little bit but this just tells you where are you going to send that data and then we have the jump bus which just takes the data from the main bus Branches it down here and sends that to the jump decoders and that’s how you start a new location so now i’ve talked about that we have location code so the location code is basically describing what buses you’re going to have open and which ones you’re going to have closed at any Given instruction so if you put in zero zero it will open up the main bus and close off all the other buses and that would be used if you wanted to save a value into cash if you wanted to save a value into ram if you wanted to Save a value into a display register and if you wanted to save a value into ram address registers then we’ve got 1-0 which is referring to an aou operation you’ll use that every time you’re dealing with the alu it closes off the main bus opens up the first And the second auxiliary bus and then closes off all the other buses so if you think about it it has the main and the secondary cash decoders so depending on what address you put in those a value will be on the main bus and on the secondary Bus and then those both get perfectly timed and get put into the alu and then depending on your op code it will either it can do different alu operations and then also it will get calculated first and then depending on your op code as well it can Be either saved into register a or register b so a lot of different functionalities with the alu then we’ve got up our location code zero one which is the move location code so that will basically open up the first and the move bus and it will shut off every other bus And that basically first of all it will put a value onto the main bus it will be decoded a value from cash will be put onto the main bus and then depending on what you put under the move bus depends on where that data will end up so you’ve got A certain amount you’ve got certain registers that you can load data from in certain registers you can load data to so the registers you can load data from are register a register b register c register d you’ve got the two human inputs those are the ones that you’ll input from the control panel Then you’ve got the random number generator and you’ve got the ram out register that’s just the register that when you load a value from ram that’s where it will end up and then the registers you can save to are the display registers you can also save to the four main Registers register a b c and d and then you can also save back to ram or you can save to a ram address register i’m thinking about making it so you can save to the jump address registers when i implement them but i’m not quite sure i’m going to be Able to do that so we’ll see how that goes um and then you’ve also got location code one one which i don’t think i’m ever going to use it basically just turns off all the buses don’t see any really a point to it but it’s there Um so yeah that’s location code and then you’ve got opcode i split it into two parts just for simplicity there’s the section code and then there’s the op code so the section code is dealing with what location in the computer or what section of the computer are you dealing with Depends like are you doing with the alu the the the jump registers the ram telling the computer what part you’re dealing with and the actual op code is what do you want to do in that section so for example the opcode of one zero zero with the section code of zero one zero It’s basically saying save to register a so say whatever value is in data to register a um some other examples are up code of zero zero one and a section code of one zero zero that basically says add and save to register b so you’re gonna add what’s ever in the Cache at location one and you’re going to add whatever in the cache at location two and you’re going to save that to register b and similarly with this one this one’s add and save to register a so yeah there’s lots of ways you can do that um when i finish the computer And i implement all the conditional stuff and i finish up ram and i make a control panel and do all that um i’ll be making another video going over those parts and also showing you how to program this and then showing a list of all the op codes And how you program it there’s also some tips and tricks that can save time in programs so yeah i’ll be doing that when i finish let’s go over some of the actual parts now so most of the components of this computer were designed by me there’s one exception i’ll talk about it later Um there’s so this is the dual read ram or the cache there’s six bytes here um it’s one tick read zero tick right i guess yeah one tick reads zero tick right so it takes one take to read a value and it takes one tick to load a value out um It’s staggered um for a kind of a weird reason it’s staggered because the alu has to be staggered and the actual distance it took to unstagger the alu and then put it into the cache took about another tick and i don’t really have a tick to spare So i just designed a staggered version i actually have an unstaggered version right here which is basically the same design this one’s a little shorter because staggering it makes it a little more complicated in some cases and a little less complicated than others but it ended up being a little bit longer So there’s the dual read ram now we’ve got the alu so this is a four tick alu it’s a carry cancel adder with a inverter at the beginning it can only do addition and subtraction right now i’m looking into being able to do more but i haven’t really seen a purpose for it Right now i know there are purposes for it but i don’t really want to mess with that right now this took me five months to design so kind of taking a break from alus right now it uses a one tick xor gate i design which is continuous It also has to be staggered so but the reason the alu has to be staggered is because of these one tick or zero tick diodes which basically allow data to go one direction but not back and that’s how the carry cancel part of the adder works Yeah that’s the alu um and then we got ram so this is a zero tick read zero tig right ram so it’s a little bit faster it’s also my design uses bud power saving and then it uses this weird um system where both of these load lines have to be turned off Before it actually loads the value from that location so i just use the new target box which have saved me in so many instances but yeah that’s how that works and then um we also have the bcd converter that is the only part that i have not designed and I’ve tried so hard to get it either smaller or faster but it’s just i don’t really see a way to do it um the person who designed this is neo-master so i’ll put a link in the description if you want to go check his video out he Does a really good job of explaining how bcd converters work and then how to build this one and then i just have a kind of normal bcd to decimal or seven segment display decoder it is timed a little bit differently because i was having issues with the numbers actually disappearing Before they fully appeared so that was a little bit of a problem made it really hard to read the screen so you might have noticed that the numbers came on all at once instead of staggered um yeah that’s just because i’ve spent a little extra time timing every part of this i Think that’s about it um i guess i can talk about this so the op code or i guess the instruction bus it looks a little different than most computers um i don’t decode everything in one big block and then bust all the control lines to where they’re needed that First of all is a little bit more laggy and it doesn’t allow for multiple instructions to be decoded at once so i just went with the design of decode when i need to decode so i’ll only decode something when i’m like at the actual place where i need that control line And that just saves on space and a bunch of other things um yeah um actually i’m gonna break down this fibonacci program because it works a little bit differently than most do there’s only four instructions in the entire program and it will stay for even when i finish conditional statements But the first one is just load one into register a um that’s pretty self-explanatory we got to start with some value so i just started with one um the next one it starts the jump it starts the loop i guess i should say the continuous loop because there’s no conditional statements but basically This is saying jump this is my jump command and then i’m saying jump to position two so it just jumps back to itself next i have an addition so this adds register a and register b there’s nothing in register b right now so it just adds one and zero and Saves one to register b so now we have one in register a and one in register b and then another thing i need to say is i have a little thing here that makes it a little more efficient so i have a setting that you can change in program that basically says save Every value coming out of the alu to the display so if that’s turned on when you do an addition the result will automatically be displayed to the display you don’t need to move it to the display it will just automatically go there so that’s how i am able to do this Really in four instructions and then we have a little bit of a problem you’ll see these three instructions that are never used that is because it’s a pipeline computer so you might think about it so when i load the values from when i load one from a and zero from b To have them added together it’s going to take at least four ticks because the alu is four ticks i think uh it takes a total of seven ticks maybe six and a half i haven’t quite figured that out it’s a little finicky but it takes a little bit of time For that value to be added and then saved back into register b so i have to wait for the result from this calculation to be saved into register b before i can send out the new calculation because or else i would add zero and one together twice in a row because the one Wouldn’t be saved to be yet so that’s a little bit of a problem it’s not a problem for most instructions for example you can save to register a and register b right after each other there are just a few specific instructions that require a little bit more time but yeah that’s Why that’s like that it doesn’t really slow it down i mean if i put these two additions right next to each other it still takes a little bit of time for the jump to execute i’m actually going to show that because the when i this is one of the tips to Make it faster when i start this jump it doesn’t halt immediately there’s no way i could get this signal down there decoded release those pistons and put the signal back up here to stop the computer in two ticks that’s impossible it takes about six ticks probably a little longer But you’ll see this is the actual instruction that it gets decoded on or that the jump is loaded and it actually ends up halting right here so that’s one of the ways i can do it because or i can make this faster is because I know i need to jump so i’m just going to start the jump back here when i really want it to stop right here because i need to do these two additions so even though it takes a little bit of time for the jump to be decoded and executed I’m still not wasting any time so i’m actually going to run the computer right now um fix a few things here so you’ll see this second instruction is where it the jump is declared i guess and then it stops a little bit later oh the heck that was stupid I forgot i don’t have a observer here i guess come on remove that observer don’t know why i did that okay clocked it off everything should be good let’s start so you can see it stopped over there you can see those repeaters firing but it actually in a perfect world it Would stop right here but it stops way over there just because the time it takes for that instruction to go down and get decoded and come back up to the execute phase so if we just stop the computer so that’s one of the problems i’m having with this being a pipeline computer of Course pipeline makes it so much faster but it does introduce some problems but i think it’s still way faster with pipeline than without pipeline so yeah that’s about it if you have any questions feel free to put them in the comments below and i’ll be doing another video when i actually finish this And there will be a world download in that video i don’t really see a point in putting a world download in this video because well it’s not really working so thanks for watching and i’ll see you later Video Information
This video, titled ‘5Hz Minecraft Redstone Computer – Showcase & Explanation’, was uploaded by FEARLESS_Z_ on 2020-09-25 02:46:29. It has garnered 13327 views and 459 likes. The duration of the video is 00:24:06 or 1446 seconds.
In this video I will show how my 5Hz computer works. Going in depth into how i was able to get it to operate so fast!