Home  >  Article  >  What are the components that make up a CPU?

What are the components that make up a CPU?

青灯夜游
青灯夜游Original
2022-07-19 16:33:5310240browse

The components that make up the CPU include "calculator" and "controller". The CPU (Central Processing Unit) mainly consists of two parts: 1. The arithmetic unit refers to the component in the computer that performs various arithmetic and logical operations, among which the arithmetic logic unit is part of the central processing core; 2. The controller refers to A master device that changes the wiring of the main circuit or control circuit in a predetermined sequence and changes the resistance value in the circuit to control the starting, speed regulation, braking and reverse direction of the motor.

What are the components that make up a CPU?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

The components that make up the CPU include "calculator" and "controller".

The central processing unit (CPU), as the computing and control core of the computer system, is the final execution unit for information processing and program execution. Since its creation, CPU has made great progress in logical structure, operating efficiency and function extension.

Central processing unit (CPU) is one of the main devices of electronic computers and the core component of computers. Its function is mainly to interpret computer instructions and process data in computer software. The CPU is the core component of the computer that reads instructions, decodes them, and executes them. The central processing unit mainly consists of two parts, namely the controller and the arithmetic unit, which plays an important role in improving the overall function of the computer and can realize the proliferation of multiple functions such as register control, logical operations, and signal transmission and reception. , laying a good foundation for improving computer performance.

Operator

Operator refers to the component in the computer that performs various arithmetic and logical operations. The arithmetic logic unit is part of the central processing core.

(1) Arithmetic logic unit (ALU). Arithmetic logic unit refers to a combinational logic circuit that can realize multiple sets of arithmetic operations and logical operations. It is an important part of central processing. The operations of the arithmetic logic unit are mainly two-bit arithmetic operations, such as addition, subtraction, and multiplication. During the operation process, the arithmetic logic unit mainly performs arithmetic and logical operations using computer instructions. Generally speaking, the ALU can play the role of direct read-in and read-out, which is specifically reflected in the processor controller, memory and input and output devices. , input and output are implemented based on the bus. The input command contains an instruction word, including operation code, format code, etc.

(2) Intermediate register (IR). Its length is 128 bits, and its actual length is determined by the operands. IR plays an important role in the "push and fetch" instruction. During the execution of this instruction, the content of ACC is sent to IR, then the operand is fetched to ACC, and then the content of IR is pushed onto the stack.

(3) Operation accumulator (ACC). Current registers are generally single accumulators with a length of 128 bits. For ACC, it can be regarded as a variable-length accumulator. In the process of describing instructions, the expression of ACC length is generally based on the value of ACS, and the ACS length is directly related to the ACC length. Doubling or halving the ACS length can also be regarded as doubling or halving the ACC length.

(4) Descriptor register (DR). It is mainly used to store and modify descriptors. The length of DR is 64 bits. In order to simplify data structure processing, the use of descriptors plays an important role. [2]

(5)B register. It plays an important role in the modification of instructions. The length of the B register is 32 bits. It can save the address modification amount during the address modification process. The main memory address can only be modified using descriptors. The descriptor points to the first element in the array, so accessing other elements in the array should require modifiers. For arrays, they are composed of data of the same size or elements of the same size and are stored continuously. The common access method is the vector descriptor, because the address in the vector descriptor is a byte address, so when proceeding During the conversion process, the base addresses should first be added. For the conversion work, it is mainly implemented automatically by the hardware. In this process, special attention must be paid to alignment to avoid exceeding the array boundaries.

Controller

The controller is the nerve center of the computer, directing all components in the entire machine to work in automated coordination. Under the control of the controller, the computer can automatically perform a series of operations according to the steps set by the program to complete specific tasks.

The controller refers to a master device that changes the wiring of the main circuit or control circuit in a predetermined sequence and changes the resistance value in the circuit to control the starting, speed regulation, braking and reverse direction of the motor. The controller is composed of program status register PSR, system status register SSR, program counter PC, instruction register, etc. As a "decision-making mechanism", its main task is to issue commands and play a coordination and command role in the operation of the entire computer system. There are two main categories of control: combinational logic controllers and microprogrammed controllers. Both parts have their own advantages and disadvantages. Among them, the structure of the combinational logic controller is relatively complex, but its advantage is that it is faster; the microprogrammed controller design has a simple structure, but when modifying the function of a machine instruction, the entire microprogram needs to be reprogrammed.

The main components inside the controller are as follows:

  • ①Instruction register: stores instructions obtained from memory.

  • ②Decoder: Translate the operation code in the instruction into a control signal.

  • ③ Timing beat generator: Generates timing pulse beat signals to make the computer work rhythmically and orderly.

  • ④ Operation control components: combine control signals to control each component to complete the corresponding operation.

  • ⑤Instruction counter: Calculate and point out the address of the next instruction.

Extended knowledge: How the CPU works

The Von Neumann architecture is the foundation of modern computers. Under this architecture, programs and data are stored uniformly. Instructions and data need to be accessed from the same storage space and transmitted through the same bus, and cannot be executed overlappingly. According to the von Neumann system, the work of the CPU is divided into the following five stages: instruction fetch stage, instruction decoding stage, instruction execution stage, memory access and result write back.

  • Instruction fetch (IF, instruction fetch) is the process of fetching an instruction from the main memory to the instruction register. The value in the program counter indicates the location of the current instruction in main memory. When an instruction is fetched, the value in the program counter (PC) is automatically incremented according to the instruction word length.

  • Instruction decoding stage (ID, instruction decode), after fetching the instruction, the instruction decoder splits and interprets the fetched instruction according to the predetermined instruction format, and identifies and distinguishes it. Different instruction categories and various methods of obtaining operands are presented. Modern CISC processors use splitting to improve parallelism and efficiency.

  • Execution instruction phase (EX, execute), specifically implements the function of the instruction. Different parts of the CPU are connected to perform the required operations.

  • Access and access phase (MEM, memory), according to the instruction needs to access the main memory and read the operand, the CPU gets the address of the operand in the main memory, and reads the operand from the main memory The operand is read in and used for operation. Some instructions do not require access to main memory, so this stage can be skipped.

  • Result write back stage (WB, write back), as the last stage, the result write back stage "writes back" the running result data of the execution instruction stage to some storage form. The result data is generally written to the internal register of the CPU so that it can be quickly accessed by subsequent instructions; many instructions also change the status of the flag bits in the program status word register. These flag bits identify different operation results and can be Used to affect program actions.

After the instruction is executed and the result data is written back, if no unexpected events (such as result overflow, etc.) occur, the computer will obtain the next instruction address from the program counter and start a new instruction. After a round of looping, the next instruction will be fetched sequentially in the next instruction cycle. Many complex CPUs can fetch multiple instructions at once, decode them, and execute them simultaneously.

For more related knowledge, please visit the FAQ column!

The above is the detailed content of What are the components that make up a CPU?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn