All things in all posts will help you visualize about the way that computers work generally. Note that it is not the real structure of modern computers, but the way that modern computers work is nearly the same as in my posts. I am sure that if you understand about the way that computers work in my posts, you will easy to learn about all fields of computer afterward. Thank you !!!
In the post of clock, we know that the clock must be connected to many other gates to perform its function perfectly. That is the ability to set or enable for some registers or other devices at the same time. Only for some devices that we want, not all devices as when we connect devices directly to the clock.
To clock can set or enable only some devices at the same time, we need one device that is called a “stepper”. This device will help the clock set and enable devices that we want at the proper time. The structure of this device is also constructed from many gates. First, let’s look at the diagram below to understand the function of stepper:
In the diagram, you can guess the way that the stepper works easily. We have a “clk” bit, this bit will work according to cycles of clock (“on” and “off”). The first cycle of the clock will make the “Step 1” bit “on” and other step bits “off”. The second cycle of the clock will make the “Step 2” “on” and other step bits “off”. And similar for next step bits.
Each step bit will connect to some device to set or enable them. So, in the first cycle, we have some functions on some devices. In the second cycle, we have some other functions on some other devices,...Now, we can use this stepper to control all actions of all devices in the CPU.
We also have a “reset” bit that reset the clock to the first cycle and the “Step 1” bit will be “on” again. For example, when the “Step 7” bit is “on”, the “reset” bit will help us return the first step bit or the first cycle of the clock. Now, we know that step bits work according to cycles of clock (“clk” bit) and “reset” bit will help reset the stepper to the first cycle of clock.
Below is a graph that represents the “on” time of step bits corresponding to cycles of the clock:
In the diagram, you can clearly imagine the way that stepper works. First cycle of the clock for the “Step 1” bit, second cycle of the clock for the “Step 2” bit,...Each time that the “clk” bit (clock) change the state from “off” to “on”, the next step bit will be “on” and the step bit that is “on” previous will be “off” now.
OK! That is an overview of stepper’s function. Now, how can we build that stepper? This is a problem that is not so difficult and you can understand about the structure of this device easily from things that you have learned. First, let’s look at the diagram below and understand about it:
The first thing that I want to mention is the “M” component in the diagram. What is it? It is the device that remembers one bit that we learned in a previous post. We usually call it “memory bit”. Let’s review that post to recall this device:
As you can see, we have twelve “M” that are connected together through “o” output and “i” input. The “i” input of the first “M” will connect to a bit that is always “on”. The “o” output of the last “M” will connect to a structure that we will mention later. The “clk” bit will connect to “s” bits of even “M”s. And the NOT “clk” bit will connect to the “s” bits of odd “M”s. Now, we need to examine the way that this structure works.
In the first cycle of the clock, the “clk” bit will be “on” then “off”. When the “clk” bit is “on”, the “s” bit of even “M”s will be “on”, but nothing happens because the “o” outputs that connect to them all are “off”. When the “clk” bit is “off”, the NOT “clk” bit will be “on” and the “s” bits of odd “M”s will be “on” but only the “o” output of the first “M” will be “on” and go to the “i” input of the second “M”.
In the second cycle of the clock, when the “clk” bit is “on”, the “on” signal will be transported to the “o” output of the second “M”. When the “clk” bit is “off”, the “on” signal will be transported to the “o” output of the third “M”. And you can see on the diagram that the wire that connects to the “o” output of the second “M” will also be “on” in this cycle.
Similarly, we will easily realize the rule that this structure works when examining remaining cycles of the clock. Now, let’s go to the diagram that represent full stepper that we want to build with more AND gates, OR gates and NOT gates:
Now, let’s recall the way that stepper works that I mentioned at the first part of this post. When we set the “reset” bit to “on”, the clock will return to the first cycle. Let’s examine that thing in the diagram above. You can see only the “step 1” bit will be “on” when the “reset” bit is “on”. So, it is clear that the clock returned to the first cycle.
Next, we will come to clock cycles for step bits in the case that the “reset” bit is “off”. When the “reset” bit is “off”, the “i” input of the first “M” will always be “on”. In the previous part, we examine the way this structure works, so let’s apply now. In the first cycle of the clock, the “o” output of the second “M” is “off”, so the “step 1” bit will be “on”.
In the second cycle of the clock, the “o” output of the second “M” is “on” and the “o” output of the fourth “M” is “off”, so the “step 1” bit will be “off” and the “step 2” bit will be “on”. Similarly, applying this in the remaining part and we have the stepper working as we want.
One thing more that we will conduct is connecting the “step 7” bit to the “reset” bit. We will have an automatic stepper that reset itself but because the “step 7” bit connects directly to the “reset” bit, the time is so short to conduct anything in the CPU. So, we will only use step bits from “step 1” to “step 6” for functions in the CPU and "step 7" for resetting the stepper.
That is all about stepper. Hope you like this post. Thanks for reading and see you later!!!
0 Nhận xét