Definition and Function of Control Unit | pemprograman | komputer | bahasa python
Control unit control CPU operations and moreover control computer totality so that it happens synchronization among components when executing their operation functions.
Micro-Operations :
- A computer executes a program
- Fetch/execute cycle
- Each cycle has a number of steps (see pipelining)
- Called micro-operations
- Each step does very little
- Atomic operation of CPU
Functions of Control Unit :
- Setting and controlling I/O tool
- Taking instructions from main memory
- Taking data from main memory if it is needed by processed
- Sending instruction to ALU if there is aritmatic calculation or logic comparison and observing works.
- Storing the result of process to main memory
Control Unit :
- Sequencing Logic
The function is determining output of control unit.
- Address of next instruction is in PC
- Address (MAR) is placed on address bus
- Control unit issues READ command
- Result (data from memory) appears on data bus
- Data from data bus copied into MBR
- PC incremented by 1 (in parallel with data fetch from memory)
- Data (instruction) moved from MBR to IR
- MBR is now free for further data fetches
- Register & Decoders
The function is writting code and message that indeks result of operation.
- Register
Register is internal medium store.
- Memory Address Register (MAR) : Connected to address bus, Specifies address for read or write op.
- Memory Buffer Register (MBR) : Connected to data bus, Holds data to write or last data read
- Program Counter (PC) : Holds address of next instruction to be fetched
- Instruction Register (IR) : Holds last instruction fetched
- Decoders
- Single-Cycle CPU :
There ara two parts in this control, they are :
- Decode upcode, to group become 4 kinds of instructions (in AND gate)
- Presenting control signal building on type of instruction(OR gate)
- Multi-Cycle CU :
In this control is more than single-cycle. By taking state and decode, function of bolean from each output control line can be determined. They will be function of 10 kinds of input logic. In this cycle, control signal doesn’t determine by seeing on instruction bit-bit. Upcode bit-bit gives notcie to operation what will next execute by CPU, not next cycle instruction.
Control Unit with Decodes Input.
- Control Memory.
The function is observing or seeing data storage.