Document Details

FortuitousBongos

Uploaded by FortuitousBongos

University of the West Indies, St. Augustine

Tags

computer architecture fetch cycle instruction cycle micro-operations

Summary

This document provides a study guide on computer architecture concepts, focusing on the fetch, indirect, and interrupt cycles. It details the steps involved in these cycles, highlighting micro-operations and registers crucial for data processing within a computer. The document also delves deeper into how the control unit manages these cycles and various components within a processor.

Full Transcript

Ch 19 – Study Guide 1. List and describe the 4 registers involved in the Fetch cycle. Memory address register (MAR): Is connected to the address lines of the system bus. It specifies the address in memory for a read or write operation. Memory buffer register (MBR): Is connected to the data li...

Ch 19 – Study Guide 1. List and describe the 4 registers involved in the Fetch cycle. Memory address register (MAR): Is connected to the address lines of the system bus. It specifies the address in memory for a read or write operation. Memory buffer register (MBR): Is connected to the data lines of the system bus. It contains the value to be stored in memory or the last value read from memory. Program counter (PC): Holds the address of the next instruction to be fetched. Instruction register (IR): Holds the last instruction fetched. 2. Describe the steps and micro-operations involved in the Fetch cycle. The fetch cycle is the process of retrieving an instruction from memory. It involves the following steps: 1. The address of the next instruction is moved from the program counter (PC) to the memory address register (MAR). 2. The instruction is read from memory at the address in the MAR and stored in the memory buffer register (MBR). At the same time, the PC is incremented to prepare for the next instruction fetch. 3. The instruction is moved from the MBR to the instruction register (IR). 3. Describe the steps in the Indirect cycle. If the instruction specifies an indirect address, then an indirect cycle must precede the execute cycle – The address field of the instruction is transferred to the MAR – This is then used to fetch the address of the operand – Finally, the address field of the IR is updated from the MBR, so that it now contains a direct rather than an indirect address – The IR is now in the same state as if indirect addressing had not been used, and it is ready for the execute cycle 4. Describe the steps and micro-operations involved in the Interrupt cycle. For the processor to continue its regular operations after the interrupt, it saves the contents of the PC into the MBR. The memory buffer address is saved into memory, and that address is stored in the MAR. The control unit then stores the routine Address of the interrupt into the PC and the CPU then proceeds to deal with the interrupt and continue the instruction cycle. 5. Why does the Execute cycle not have a fixed, predictable sequence of micro-operations like the fetch, indirect, and interrupt cycles? How does the Control Unit handle the Execute cycle? Give an example of an Execute cycle, explaining the steps and microoperations in your example. Because of the variety of opcodes, there are a number of different sequences of micro-operations that can occur. The control unit examines the opcode and generates a sequence of micro-operations based on the value of the opcode. This is referred to as instruction decoding. Example: ADD R1, X which adds the contents of the location X to register R1. The following sequence of Micro-operations might occur: t1: MAR  (IR(address)) t2: MBR  Memory t3: R1  (R1) + (MBR) We begin with the IR containing the ADD instruction. In the first step, the address portion of the IR is loaded into the MAR. Then the referenced memory location is read. Finally, the contents of R1 and MBR are added by the ALU. Again, this is a simplified example. Additional micro-operations may be required to extract the register reference from the IR and perhaps to stage the ALU inputs or outputs in some intermediate registers. 6. Draw and describe the flowchart for the Instruction Cycle. Explain what is represented in the diagram. We assume a new 2-bit register called the instruction cycle code (ICC). The ICC designates the state of the processor in terms of which portion of the cycle it is in: 00: Fetch 01: Indirect 10: Execute 11: Interrupt At the end of each of the four cycles, the ICC is set appropriately. The indirect cycle is always followed by the execute cycle. The interrupt cycle is always followed by the fetch cycle (see Figure 16.3, (The Instruction Cycle ). For both the fetch and execute cycles, the next cycle depends on the state of the system. Thus, the flowchart of Figure 19.3 defines the complete sequence of micro-operations, depending only on the instruction sequence and the interrupt pattern. 7. What are the fundamental functional elements of the processor according to the text? 1. ALU (Arithmetic Logic Unit): o The ALU is a crucial component responsible for performing arithmetic and logic operations. It executes mathematical calculations and logical comparisons, playing a central role in the processor's ability to process data. 2. Registers: o Registers are storage elements within the processor that are used to store data temporarily. Different types of registers serve various purposes, including holding data for internal processing, storing status information, and facilitating communication between different components. 3. Internal Data Paths: o Internal data paths are pathways within the processor that allow the movement of data between registers and other internal elements. These pathways enable the flow of information within the processor during the execution of instructions. 4. External Data Paths: o External data paths are connections that link registers to external interfaces, such as the system bus. They provide a means for the processor to communicate with external components, including memory and input/output modules. 5. Control Unit: o The control unit is a critical element that oversees and controls the operations of the processor. It generates control signals to coordinate the execution of instructions, sequencing of operations, and communication between different elements. These elements collectively form the foundation of the processor's functionality, allowing it to execute instructions, perform computations, and manage data flow both internally and externally. 8. What are the two primary tasks of the control unit and how are they implemented? The control unit performs: Sequencing: Determining the order of micro-operations. Execution: Activating the necessary control signals to execute each micro-operation. These tasks can be implemented using hardwired control, where logic circuits generate control signals, or microprogrammed control, where microinstructions stored in control memory define the sequences. 9. How does the control unit use control signals to operate? Control signals are electrical signals generated by the control unit to coordinate and control the actions of various components in the processor. These signals serve as instructions, indicating which micro-operation or action needs to be performed. For example, a control signal may instruct the ALU to perform addition, or it may signal the transfer of data between registers. The control unit uses these signals to direct and synchronize the operations of the processor elements during the execution of a program. 10. What are the 3 types of control signals and how are they applied? Three types of control signals are used: those that activate an ALU function; those that activate a data path; and those that are signals on the external system bus or other external interface. Data paths: The control unit controls the internal flow of data. For example, on instruction fetch, the contents of the memory buffer register are transferred to the IR. For each path to be controlled, there is a switch (indicated by a circle in the figure). A control signal from the control unit temporarily opens the gate to let data pass. ALU: The control unit controls the operation of the ALU by a set of control signals. These signals activate various logic circuits and gates within the ALU. System bus: The control unit sends control signals out onto the control lines of the system bus (e.g., memory READ). All of these signals are ultimately applied directly as binary inputs to individual logic gates. 11. Explain in detail how the control unit maintains control, using the example of the Fetch cycle. The control unit keeps track of where it is in the instruction cycle. At a given point, it knows that the fetch cycle is to be performed next. The first step is to transfer the contents of the PC to the MAR. The control unit does this by activating the control signal that opens the gates between the bits of the PC and the bits of the MAR. The next step is to read a word from memory into the MBR and increment the PC. The control unit does this by sending the following control signals simultaneously: A control signal that opens gates, allowing the contents of the MAR onto the address bus; A memory read control signal on the control bus; A control signal that opens the gates, allowing the contents of the data bus to be stored in the MBR; Control signals to logic that add 1 to the contents of the PC and store the result back to the PC. Following this, the control unit sends a control signal that opens gates between the MBR and the IR. This completes the fetch cycle except for one thing: The control unit must decide whether to perform an indirect cycle or an execute cycle next. To decide this, it examines the IR to see if an indirect memory reference is made. 12. How does the control unit maintain knowledge of its position in the instruction cycle? The control unit maintains knowledge of its position in the instruction cycle by using its internal state information. It keeps track of the current stage of the instruction cycle, allowing it to emit the appropriate control signals for the corresponding micro-operations. 13. Explain the role of control signals emitted by the control unit in causing micro-operations. Control signals emitted by the control unit serve as directives to various components within the processor. These signals initiate specific micro-operations, coordinating the execution of instructions. They act as commands that trigger actions such as data transfers, arithmetic/logic operations, and other tasks necessary for instruction execution. 14. Why is it crucial for the control unit to use clock pulses in timing the sequence of events? Clock pulses provide a regular timing mechanism for the control unit. They ensure that micro-operations occur at the correct moments and allow sufficient time for signal levels to stabilize between events. The synchronization provided by clock pulses ensures the orderly progression of the instruction cycle, preventing conflicts and ensuring reliable execution. 15. Discuss the significance of the control unit in the overall functionality of a computer. The control unit is crucial for a computer's functionality as it orchestrates the execution of instructions. It ensures that micro-operations occur in the correct sequence, allowing the processor to process data and perform tasks according to the program's instructions. The control unit serves as the central controller, directing the flow of operations within the computer. 16. Reflect on the minimal nature of the control unit. Why is it considered minimal, and how does it serve as the engine of the computer? The control unit is considered minimal because it operates based on knowledge of instructions and the nature of arithmetic and logical results. It doesn't directly interact with data or observe actual results. Despite this minimal access, it controls the entire computer by emitting a few control signals to internal points within the processor and the system bus. Its ability to govern complex operations with limited visibility makes it the engine driving the computer's functionality. 17. What information does the control unit have access to, and what information is it not privy to? The control unit has knowledge of the instructions to be executed and the nature of arithmetic and logical results (e.g., positive, overflow, etc.). However, it does not have access to the data being processed or the actual results produced. 18. How does the control unit make decisions without directly observing the data being processed or the actual results produced? The control unit makes decisions based on pre-programmed knowledge and predefined rules. It uses its understanding of instructions and expected results to emit control signals that guide the processor through the necessary micro-operations. This decision-making process is deterministic and relies on the control unit's programmed logic. 19. Examine the role of control signals within the processor and their impact on the system bus. How does the control unit manage various components with these signals? Control signals act as commands issued by the control unit to coordinate the activities of different components within the processor. They manage tasks such as data transfers, arithmetic operations, and control of the system bus. The control unit uses these signals to direct the flow of data and operations, ensuring synchronization and orderly execution of instructions. The system bus serves as a communication pathway, allowing the control unit to interact with external components such as memory and I/O modules. 20. Explain the concept of a control word, and how is it constructed to represent different micro- operations? A control word is a collection of bits used to activate specific processor control lines. Each bit represents a control line, and the combination of bits in the control word determines which control lines are activated. Control words are typically stored in control memory, and the control unit reads them to determine which micro-operations to perform.

Use Quizgecko on...
Browser
Browser