A control unit in general is a central (or sometimes distributed but clearly distinguishable) part of whatsoever machinery that controls its operation, provided that a piece of machinery is complex and organized enough to contain any such unit. One domain in which the term is specifically used is the area of computer design. In the automotive industry, the control unit helps maintain various functions of the motor vehicle.
The rest of this article describes control unit in terms of computer design. There is no further article on other uses under this lemma as yet. (Disambiguation and/or integration of this article in Computer with respective linkage -- and retention/creation of a more broad-sense article -- may be appropriate.)Definition
Control Unit Co-ordinates the input and output devices of a computer system.In computers, the control unit was historically defined as one distinct part of the 1946 reference model of Von_Neumann_architecture. In modern computer designs, the control unit is typically an internal part of the CPU with its overall role and operation unchanged.General operationThe outputs of the control unit controls the activity of the rest of the device. A control unit can be thought of as a finite state machine. -->
The control unit is the circuitry that controls the flow of data through the processor, and coordinates the activities of the other units within it. In a way, it is the "brain within the brain", as it controls what happens inside the processor, which in turn controls the rest of the PC.[vague]
A few examples of devices that require a control unit are CPUs and GPUs. The modern information age would not be possible without complex control unit designs[edit] Hardwired ControlAt one time, control units for CPUs were ad-hoc logic, and they were difficult to design. These can be identified as the main part of the computer and the main device that helps the computer to function in an appropriate manner. It is constructed of logic gates,flip-flops,encoder circuits,decoder circiut,digital counters and some other digital circuits. Their control is based on fixed architecture i.e. it requires changes in the wiring if the insrtuction set is modified or changed. This architure is preferred in RISC computers as it consists of lesser instruction set.Functions of the Control UnitThe functions performed by the control unit vary greatly by the internal architecture of the CPU, since the control unit really implements this architecture. On a regular processor that executes x86 instructions natively the control unit performs the tasks of fetching, decoding, managing execution and then storing results. On a x86 processor with a RISC core, the control unit has significantly more work to do. It manages the translation of x86 instructions to RISC micro-instructions, manages scheduling the micro-instructions between the various execution units, and juggles the output from these units to make sure they end up where they are supposed to go. On one of these processors the control unit may be broken into other units (such as a scheduling unit to handle scheduling and a retirement unit to deal with results coming from the pipeline) due to the complexity of the job it must perform.In computing, an arithmetic logic unit (ALU) is a digital circuit that performs arithmetic and logical operations. The ALU is a fundamental building block of the central processing unit (CPU) of a computer, and even the simplest microprocessors contain one for purposes such as maintaining timers. The processors found inside modern CPUs and graphics processing units (GPUs) accommodate very powerful and very complex ALUs; a single component may contain a number of ALUs.
Mathematician John von Neumann proposed the ALU concept in 1945, when he wrote a report on the foundations for a new computer called the EDVAC. Research into ALUs remains an important part of computer science, falling under Arithmetic and logic structures in the ACM Computing Classification System.Early developmentIn 1946, von Neumann worked with his colleagues in designing a computer for the Institute for Advanced Study (IAS) in Princeton, New Jersey. The IAS computer became the prototype for many later computers. In the proposal, von Neumann outlined what he believed would be needed in his machine, including an ALU.
von Neumann stated that an ALU is a necessity for a computer because it is guaranteed that a computer will have to compute basic mathematical operations, including addition, subtraction, multiplication, and division. He therefore believed it was "reasonable that [the computer] should contain specialized organs for these operations".Numerical systemsAn ALU must process numbers using the same format as the rest of the digital circuit. The format of modern processors is almost always the two's complement binary number representation. Early computers used a wide variety of number systems, including one's complement, sign-magnitude format, and even true decimal systems, with ten tubes per digit.
ALUs for each one of these numeric systems had different designs, and that influenced the current preference for two's complement, as this is the representation that makes it easier for the ALUs to calculate additions and subtractions.[citation needed]
The two's-complement number system allows for subtraction to be accomplished by adding the negative of a number in a very simple way which negates the need for specialised circuits to do subtraction. Practical overview
Most of a processor's operations are performed by one or more ALUs. An ALU loads data from input registers, an external Control Unit then tells the ALU what operation to perform on that data, and then the ALU stores its result into an output register. Other mechanisms move data between these registers and memory.Complex operationsAn engineer can design an ALU to calculate any operation, however complicated it is; the problem is that the more complex the operation, the more expensive the ALU is, the more space it uses in the processor, and the more power it dissipates, etc.
Therefore, engineers always calculate a compromise, to provide for the processor (or other circuits) an ALU powerful enough to make the processor fast, but yet not so complex as to become prohibitive. Imagine that you need to calculate the square root of a number; the digital engineer will examine the following options to implement this operation:
Design an extraordinarily complex ALU that calculates the square root of any number in a single step. This is called calculation in a single clock.
Design a very complex ALU that calculates the square root of any number in several steps. But the intermediate results go through a series of circuits that are arranged in a line, like a factory production line. That makes the ALU capable of accepting new numbers to calculate even before finished calculating the previous ones. That makes the ALU able to produce numbers as fast as a single-clock ALU, although the results start to flow out of the ALU only after an initial delay. This is called calculation pipeline.
Design a complex ALU that calculates the square root through several steps. This is called interactive calculation, and usually relies on control from a complex control unit with built-in microcode.
Design a simple ALU in the processor, and sell a separate specialized and costly processor that the customer can install just beside this one, and implements one of the options above. This is called the co-processor.
Tell the programmers that there is no co-processor and there is no emulation, so they will have to write their own algorithms to calculate square roots by software. This is performed by software libraries.
Emulate the existence of the co-processor, that is, whenever a program attempts to perform the square root calculation, make the processor check if there is a co-processor present and use it if there is one; if there isn't one, interrupt the processing of the program and invoke the operating system to perform the square root calculation through some software algorithm. This is called software emulation.
The options above go from the fastest and most expensive one to the slowest and least expensive one. Therefore, while even the simplest computer can calculate the most complicated formula, the simplest computers will usually take a long time doing that because of the several steps for calculating the formula.
Powerful processors like the Intel Core and AMD64 implement option #1 for several simple operations, #2 for the most common complex operations and #3 for the extremely complex operations. That is possible by the ability of building very complex ALUs in these processors.Inputs and outputsThe inputs to the ALU are the data to be operated on (called operands) and a code from the control unit indicating which operation to perform. Its output is the result of the computation.
In many designs the ALU also takes or generates as inputs or outputs a set of condition codes from or to a status register. These codes are used to indicate cases such as carry-in or carry-out, overflow, divide-by-zero, etc.ALUs vs. FPUs
A Floating Point Unit also performs arithmetic operations between two values, but they do so for numbers in floating point representation, which is much more complicated than the two's complement representation used in a typical ALU. In order to do these calculations, a FPU has several complex circuits built-in, including some internal ALUs.
Usually engineers call an ALU the circuit that performs arithmetic operations in integer formats (like two's complement and BCD), while the circuits that calculate on more complex formats like floating point, complex numbers, etc. usually receive a more illustrious name.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment