![]() CATEGORIES: BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism |
Computer Control OrganizationHardwired Controllers.To execute instructions, the CPU must have some means of generating the control signals discussed above in the proper sequence. Computer designers have used a wide variety of techniques to solve this problem. Most of these techniques, however, fall into one of two categories: hardwired control and microprogrammed control.
End = T8?ADD + T7?BR + (T7?N + T4?
WMFC = T2 + T5 ? ADD + ? ? ? The desired effect of this signal is to delay the initiation of the next control step until the MFC signal is received from the main memory. This can be accomplished by inhibiting the advancement of the control step counter for the required period. Let us assume that the control step is controlled by a signal called RUN. The counter is advanced one step for every clock pulse only if the RUN signal is equal to 1. The circuit of Fig. 1.14,a will achieve the desired control. As soon as the WMFC signal is generated, RUN becomes equal to 0. Thus counting is inhibited, and no further signal changes take place. The CPU remains in this wait state until the MFC signal is activated and the control step counter is again enabled. The next clock pulse increments the counter, which results in resetting the WMFC signal to 0.
So far, we have assumed that all control steps occupy equal time slots. This leads to implementation consisting of a state counter driven by a clock. It can be readily appreciated that this approach is not very efficient with regard to the utilization of the CPU, since not all operations require the same amount of time. For example, a simple register transfer is usually much faster than an operation involving addition or subtraction. It is possible, at least in theory, to build a completely asynchronous control unit. In this case, the clock would be replaced by a circuit that advances the step counter as soon as the current step is completed. The main problem in such an approach is the incorporation of some reliable means to detect the completion of various operations. As it turns out, propagation delay in many cases is a function not only of the gates used but also of the particular data being processed. Microprogrammed Control.Let us start by defining a control word (CW) as a word whose individual bits represent the various control signals. Therefore each of the control steps in the control sequence of an introduction defines a unique combination of 1s and 0s in the CW. A sequence of CWs corresponding to the control sequence of a machine instruction constitutes the microprogram for that instruction. The individual control words in this microprogram are usually referred to as microinstructions. Let us assume that the microprograms corresponding to the instruction set of a computer are stored in a special memory, which will be referred to as the microprogram memory. The control unit can generate the control signals for any instruction by sequentially reading the CWs of the corresponding microprogram from the microprogram memory. This suggests organizing the control unit as shown in Fig. 1.17. To read the control words sequentially from So far one important function of the control unit has not been discussed and, in fact, cannot be implemented by the simple organization of Fig. 1.17. This is the situation that arises when the control unit is required to check the status of the condition codes or status flags in order to choose between alternative courses of action. An alternative approach, which is frequently used with microprogrammed control, is based on the introduction of the concept of conditional branching in the microprogram. This can be accomplished by expanding the microinstruction set to include some conditional branch microinstructions. In addition to the branch address, these microinstructions can specify which of the status flags, condition codes, or, possibly, bits of the instruction register should be checked as a condition for branching to take place. The instruction Branch on Negative may now be implemented by a microprogram such as that shown in Fig. 1.18.
It is assumed that the microprogram for this instruction starts at location 25. Therefore, a Branch microinstruction at the end of the instruction fetch portion of the microprogram transfers control to location 25. It should be noted that the branch address of this Branch microinstruction is, in fact, the output of the "starting address generator" block. At location 25, a conditional branch microinstruction tests the N bit of the condition codes and causes a branch to End if this bit is equal to 0. To support microprogram branching, the organization of the control unit should be modified as shown in Fig. 1.19. The bits of the microinstruction word, which specify the branch conditions and address, are fed to the "starting and branch address generator" block. This block performs the function of loading a new address into the μPC when instructed to do so by a microinstruction. To enable the implementation of a conditional branch, inputs to this block consist of the status flags and condition codes as well as the contents of the instruction register. Therefore, the μPC is always incremented every time a new microinstruction is fetched from the microprogram memory, except in the following situations: 1. When an End microinstruction is encountered, the μPC is loaded with the address of the first CW in the microprogram for the instruction fetch cycle (address = 0 in Fig. 1.18). 2. When a new instruction is loaded into the IR, the μPC is loaded with the starting address of the microprogram for that instruction. 3. When a Branch microinstruction is encountered, and the branch condition is satisfied, the μPC is loaded with the branch address.
1. Microprograms define the instruction set of the computer. Hence it is possible to change the instruction set simply by changing the contents of the microprogram memory. This offers considerable flexibility to both the designer and user of the computer. 2. Since the contents of the microprogram memory are changed very infrequently, if at all, a read-only type memory (ROM) is usually used for that purpose. 3. Execution of any machine instruction involves a number of fetches from the microprogram memory. Therefore the speed of this memory plays a major role in determining the overall speed of the computer. Date: 2016-06-12; view: 178
|