Bus architecture and how register transfers work - 8 bit register - Part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in the next couple of videos we're going to focus on building the registers for this computer the registers are a fundamental building block of any computer and we've got a couple of them in this computer and they're they're fairly simple actually they're just three chips we've got a 74 LS 245 and a couple 74 LS 173 s and then we've got some LEDs to show us what data is in the register and basically a register just stores some data its stores eight bits of data in this case is an 8-bit computer and then it interfaces to the bus and so to really understand the function of a register you've got to understand how the bus works within a computer and the importance of the bus in the computer so most computers are organized around a bus and in fact many computers have multiple buses but in this case we're going to keep things simple we have a single bus here and a bus is basically just a collection of wires that are that are sort of a common connection point for multiple components within within the computer in this case we've got an 8-bit bus so there are eight wires that we're essentially using a four common connection going to to all the different components and you know we're building it with the the kind of terminal strips for the power from the bread boards and so what you can do is you can take one of these bread boards and you just snap off this this power strip here and you know it's there's some foam tape or something and you can get a knife and just kind of cut that off but what you end up with is you just end up with these little terminal strips and you can get a couple of them and connect them together and and that's essentially what what I've done here with this bus is taken eight of these and you well four of them at a time here so you get four of these and you connect them together each one has has two strips and all of the all the connection points along each of these strips are all connected together all the way down and so there's eight eight lines you know across here and then I've got you know four of them here and then four of them down here and you can see these these jumpers here connect them so they connect all the way down and that forms the bus that forms this common connection point with eight bits of data that that everything connects to it's all of these blue wires that you see here are connecting you know these blue wires coming in from register a and these why're coming in here this is the memory address register you can see you know wires coming in here from here all these blue wires you see going off to all these all these other all these other pieces of the computer those are all connecting to the bus and the bus provides this common connection point where you can essentially do what's called bus transfers which is moving data from one part of the computer to another where one module can put data on to the bus and then another module can read that data from the bus and so that's what we typically see and that's one of the main things that a register is going to do as I just kind of show an example of this I've got some stuff programmed here that just kind of move some data around so we can we can take a look at it I will manually advance the clock to kind of get things going and what you'll see is you know data is coming and going from the bus and and right now what's happening is we've got particular data in memory I just have this you know zero one zero one zero one pattern and you can see that that pattern is also on the bus and that's because the the memory module here is putting that data on the bus it's just driving that you know just just pushing that same data that's here out these wires here and onto the bus and so that data you can see it you can see it up here these are just showing what's on these eight these eight bus lines but that data is also being fed to all of these other modules should they care to to read it and so in this case the way this is set up right now and I won't go into the details of how it's all programmed we'll get into that later but what's going to happen is on the next clock cycle the a register you know register a here is going to read whatever is on the bus which is this and then it's going to latch that into and store that so we'll go ahead and hit the the next clock cycle here just the manual clock button and you see now that data that zero one zero one zero one data using register a and so what happened is the memory module over here put that data onto the bus and then the a register read it from the bus and so we essentially are able to move that data from one module to another but doesn't always have to be from memory to register a it could be from anything to anywhere so I'll go forward a couple more cycles here and now we have a different pattern here in memory so 0 1 1 0 one one zero you see that's now on the bus now we can you know the way this is programmed it's going to go into register B so I'll hit the clock again and you can see now that pattern that 0 1 1 0 0 1 1 0 pattern is in register be still transferred through the bus but instead of going from here to here it's going from here to here and that's just a function of which register is reading from the bus at a particular point in time so each of these registers has some control lines that tell it when to to read data from the bus or when to put its data on the bus so for example right now the some register is is putting its data on the bus so this sum which is just the the sum of these two if you add them up to 0 or 1 plus 0 is 1 and 0 plus 1 is 1 and 1 plus 1 is 0 carry the 1 so this is this is you kind of add them up this is the sum of a and B and so this is the data that's on the bus right now now what's going to happen on the next clock cycle is that's actually going to go into register a and there it is this is this was in the sum register now it's in register egg or some red she's different because he and B are different but that's that's not you can kind of ignore that but but the point is that we can use this bus as this common way of transferring data from one part of the computer to another whether it's from memory to a register from one register to another register or from you know register to memory or register to the output the the bus provides this kind of any-to-any connection you know that everything is connected to it and so we can move data from anywhere to anywhere very flexible to get a better sense of how this works I've kind of drawn this up to make a little maybe maybe a little bit simpler to understand so this is this is our bus we've got these 8 connections and I've just done each a different color to see you so you can see that each color is a separate wire and you know this this red that you see here going into a is the same red that's going into C so any any voltage that's on this wire is going to show up here it's going to show up here it's going to show up down here it's going to show up over here it's going to show up it's going to show up everywhere everywhere you see red you know that that's going to be the voltage but there's eight of them so there's eight eight bits each one can be different but but basically all eight of those bits are showing up on on each module in the computer and this is really flexible because you know in this diagram I've got a B C and D but you can have you know this could keep going you could have arbitrarily many modules and that and that's what makes makes this really flexible because in you know larger computer designs there might be a lot of things connected to to this bus and you know everything is connected to the bus can talk to potentially everything else connected to the bus is very flexible but the way it works is each of these things that's connected to the bus essentially you know we can think of them as just as registers but there's other things that might be connected to the bus memory and the outputs and inputs and so forth but but everything that's connected to the bus you know can have can have its input connected to the bus and it can also have its output connected to the bus and in order to control you know what's going on on the bus each module also has a couple signals control lines coming in to it so there's you know typically something like a load signal and an enable signal for each and what the enable signal does is it says whatever value is in this register or this this module or whatever whatever eight bits of data that it has when the enable goes high it says put that data out here on the bus output that data and so then that data gets output on the bus when this enable goes high and all of the other modules can then see that data you know may or may not do anything with it but but that data goes out to everything else and then another module if you if you turn on this load if this load signal goes high that says read whatever's on the bus so if a sets the enable signal high and see over here sets the it's load signal high or C isn't setting it high but some some controller then we're going to well sort of we'll assume something is controlling these these these little control lines here you know and for now I'm just going to ask you to kind of take it on faith that that is magically happening in future videos we'll talk about how that control logic actually works but for now let's let's say that somehow the computer knows that it should you know turn on the enable of a and the load of C and what that's going to do is is going to say a should be outputting data and C should be inputting data and that and that essentially causes a a bus transfer of whatever data is an a to go over to C and the actual timing of that is based on this clock input so each of these modules has a clock input and there's a common clock signal that's coming in that's connected to all of these modules on each of these modules has a little clock input and on each clock pulse whichever modules have their load signal turned on will read whatever is on the whatever is on the bus and and load it at that particular time
Info
Channel: Ben Eater
Views: 279,891
Rating: 4.9762964 out of 5
Keywords:
Id: QzWW-CBugZo
Channel Id: undefined
Length: 9min 35sec (575 seconds)
Published: Mon May 02 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.