This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:multiasm:cs:chapter_3_4 [2026/06/21 14:48] – pczekalski | en:multiasm:cs:chapter_3_4 [2026/06/22 17:18] (current) – pczekalski | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======Components of Processor: Registers, ALU, Bus Control, Instruction Decoder ====== | ======Components of Processor: Registers, ALU, Bus Control, Instruction Decoder ====== | ||
| - | From our perspective, | + | From our perspective, |
| <figure procblock> | <figure procblock> | ||
| Line 17: | Line 17: | ||
| * Bus interface unit. | * Bus interface unit. | ||
| * Interrupt controller. | * Interrupt controller. | ||
| - | Elements of the control unit are shown in Fig {{ref> | + | Elements of the control unit are shown in figure |
| <figure controlunit> | <figure controlunit> | ||
| Line 31: | Line 31: | ||
| In detail, the process looks as follows: | In detail, the process looks as follows: | ||
| - | - The control unit takes the address of the instruction to be executed from a special register known as the Instruction Pointer or Program Counter | + | - The control unit takes the address of the instruction to be executed from a special register known as the Instruction Pointer or Program Counter. It sends it to the memory via the address bus. It also generates signals on the control bus to synchronise memory with the processor. |
| - Memory takes the code of instruction from the provided address and sends it to the processor using a data bus. | - Memory takes the code of instruction from the provided address and sends it to the processor using a data bus. | ||
| - The processor stores the instruction code in the instruction register and, based on the bit pattern, interprets what to do next. | - The processor stores the instruction code in the instruction register and, based on the bit pattern, interprets what to do next. | ||
| - If the instruction requires the execution unit operation, the control unit generates signals to control it. In cooperation with the execution unit, it can also read from or write to memory. | - If the instruction requires the execution unit operation, the control unit generates signals to control it. In cooperation with the execution unit, it can also read from or write to memory. | ||
| - | The control unit operates according to the clock signal generator' | + | The control unit operates according to the clock signal generator' |
| + | In summary, one instruction execution requires one instruction cycle and several machine cycles, each consisting of a few main clock cycles. Modern processors are designed to execute a single instruction (sometimes more than one) every clock cycle. This requires a more complex control-unit design, multiple execution units, and other advanced techniques that enable processing | ||
| The control unit also accepts input signals from peripherals, | The control unit also accepts input signals from peripherals, | ||
| Line 61: | Line 62: | ||
| The flags are used as conditions for decision-making instructions (like //if// statements in some high-level languages). | The flags are used as conditions for decision-making instructions (like //if// statements in some high-level languages). | ||
| - | The flags register can also store control flags to enable/ | + | The flags register can also store control flags to turn processor functionality |
| ===== Registers ===== | ===== Registers ===== | ||
| - | Registers are memory elements | + | Registers are memory elements |
| - | As we mentioned in the chapter on CISC and RISC processors, CISC processors have specialised registers, including the accumulator. A typical CISC execution unit is shown in Fig {{ref> | + | As we mentioned in the chapter on CISC and RISC processors, CISC processors have specialised registers, including the accumulator. A typical CISC execution unit is shown in figure |
| <figure CISCexeunit> | <figure CISCexeunit> | ||
| Line 74: | Line 75: | ||
| </ | </ | ||
| - | A typical RISC execution unit does not have a specialised accumulator register. It implements the set of scratch registers as shown in Fig {{ref> | + | A typical RISC execution unit does not have a specialised accumulator register. It implements the set of scratch registers as shown in figure |
| <figure RISCexeunit> | <figure RISCexeunit> | ||