Table of Content
The CPU Performance Metrics
- CPU Performance Structure
- CPU Structure
- CPU Bus
- Arithmetic Unit
CPU vs GPU
- GPU Definition
- Design Structure
- Usage Scenarios
Central Processing Unit (CPU), is one of the main electronic computer equipment, the core of the computer accessories. Its main function is to interpret computer instructions and process data in computer software. The CPU is responsible for reading instructions, decoding instructions, and executing instructions in the computer’s core components. The CPU mainly consists of two parts, that is, the controller and the arithmetic unit, which also includes the cache memory and the data and control bus to realize the connection between them. The three core components of an electronic computer are the CPU, internal memory, and input/output devices. The main functions of the CPU are to process instructions, perform operations, control time, and process data.
In computer architecture, the CPU is the core hardware unit for controlling and allocating all the hardware resources of the computer (such as memory, input, and output units) and performing general operations. The CPU is the computing and control core of a computer. All software layer operations in a computer system will eventually be mapped to CPU operations through the instruction set.
The CPU Performance Structure
For CPUs, the indicators that affect their performance mainly include main frequency, CPU bit, CPU cache instruction set, CPU core number, and IPC (instruction number per cycle). The so-called CPU frequency refers to the clock frequency, it directly determines the PERFORMANCE of the CPU, and can be overclocked to improve the CPU frequency to obtain higher performance. The CPU number of bits is the number of floating-point numbers that the processor can calculate at one time. In general, the higher the number of bits, the faster the CPU can perform operations. The average CPU used in personal computers since the 2020s is 64-bit because 64-bit processors can handle a larger range of data and natively support higher memory addressing capacity, which increases productivity. The CPU cache instruction set is stored in the CPU, mainly because the CPU can guide and optimize the calculation of the hard program. Generally speaking, CPU cache can be divided into level 1 cache, level 2 cache, and level 3 cache. Cache performance directly affects CPU processing performance. Some special-purpose CPUs may be equipped with level 4 caches.
The structure of the CPU can be roughly divided into operation logic parts, register parts, and control parts. The so-called operation logic unit, mainly can carry out the relevant logical operations, such as: can execute the shift operation and logical operation, in addition to the execution of fixed-point or floating-point arithmetic operation and address operation and conversion commands, is a multi-functional operation unit. The register unit is used to hold instructions, data, and addresses. Control components are mainly used to analyze instructions and can send out the corresponding control signals.
For the CPU, it can be regarded as a large-scale integrated circuit, its main task is to process and process all kinds of data. The storage capacity of a traditional computer is relatively small, so it is difficult to process large-scale data, and the processing effect is relatively low. With the rapid development of information technology in our country, a computer with a high configuration processor appears. Taking the high configuration processor as the control center, it plays an important role in improving the structure and function of the computer CPU. The core part of the CPU is the controller and the arithmetic unit, which plays an important role in improving the overall function of the computer. It can realize the diffusion of many functions such as storage control, logical operation, and signal to send and receiving, laying a good foundation for improving the performance of the computer.
Integrated circuits play a role in the computer control signal, according to user operation instructions to perform different tasks. The CPU is a very large-scale integrated circuit. It is composed of an arithmetic unit, controller, register, etc., as shown in the figure below. The key operation lies in the processing and processing of all kinds of data.
Traditional computers have small storage capacity and low efficiency in the operation of large data sets. The new generation of computers uses the high configuration processor as the control center, the CPU has a lot of room for improvement in the structure and function. The CPU takes the arithmetic unit and controller as the main device and gradually spreads to logic operation, storage control, program coding, signal sending and receiving, and other functions. All of these speed up the upgrade of CPU tuning performance.
The CPU bus is the fastest bus in the computer system, and it is also the core of the chipset and motherboard. Local buses that are directly connected to the CPU are usually called CPU buses or internal buses, and local buses that are connected to various common expansion slots are called system buses or external buses. In a CPU with a single internal structure, there is usually only one set of data transmission buses, namely, the internal CPU bus, which is used to connect the registers and arithmetic logic operation parts within the CPU. Therefore, this kind of bus can also be called the ALU bus. The bus in the component, by using a set of buses to connect the chips together, can be called the bus in the component, generally containing the address line and data line in two groups of lines. The system bus refers to the circuit that connects the various components of the system and is the basis of connecting the whole system together. The bus outside the system is the basic line that connects computers and other devices together.
The arithmetic unit is the part of the computer that carries out all kinds of arithmetic and logic operations, among which the arithmetic logic unit is part of the central processing core.
(1) Arithmetic logic unit (ALU). An arithmetic logic unit is a combinational logic circuit that can realize multiple arithmetics and logic operations and is an important part of central processing. Arithmetic logic unit operations are mainly used to perform binary arithmetic operations, such as addition, subtraction, and multiplication. In the process of operation, the arithmetic logic unit is mainly based on a computer instruction set to perform arithmetic and logic operations. Generally speaking, ALU can play a direct read and read role, which is embodied in the processor controller, memory and INPUT and output devices, etc. Input and output is implemented on the basis of the bus. An input instruction contains an instruction word, including an opcode, a format code, and so on.
(2) Intermediate register (IR). The length is 128 bits, and the actual length is determined by the operands. IR plays an important role in the “stack and fetches” instruction. During the execution of this instruction, the ACC content is sent to IR, then the operand is fetched to ACC, and then the IR content is pushed.
(3) Arithmetic accumulator (ACC). Current registers are generally single accumulators with a length of 128 bits. For ACC, it can be thought of as a variable-length accumulator. In the process of describing instructions, ACC length is generally expressed based on the value of ACS, and ACS length is directly related to ACC length. The doubling or halving of ACS length can also be regarded as the doubling or halving of ACC length.
(4) Description word register (DR). It is mainly used to store and modify description words. The length of DR is 64 bits. In order to simplify the processing of data structures, the use of descriptors plays an important role.
(5) REGISTER B. It plays an important role in the modification of instructions. Register B has a length of 32 bits, which can save the address modification in the process of modifying the address. The main memory address can only be modified with descriptive words. Reference to the first element in the array is the descriptor, so access to other elements in the array should require modifications. As for the number composition, it is composed of the same size data or the same size elements and stored continuously. The common access method is vector description word because the address in vector description word is byte address, so in the process of conversion, the basic address should be added first. For conversion work, it is mainly done automatically by the hardware, especially in the process of alignment, so as not to cross the bounds of the array.
The controller is a master command device that changes the connection of the main circuit or control circuit and changes the value of resistance in the circuit to control the start, speed regulation, braking, and reverse of the motor in a predetermined order. The controller is composed of program state register PSR, system state register SSR, program counter PC, an instruction register, and so on. As a “decision-making mechanism”, its main task is to issue orders and play a coordinating and commanding role in the operation of the whole computer system. The classification of control mainly includes two kinds, which are combined logic controllers and microprogram controllers respectively. Both parts have their own advantages and disadvantages. The combined logic controller is relatively complex in structure but has the advantage of high speed. The microprogram controller is designed with a simple structure, but in modifying a machine instruction function, it needs to reprogram all the microprograms.
According to Intel product line planning, there are five types of Intel 11-generation consumer Core products by 2021: I9 / I7 / I5 / I3 / Pentium/Celeron. Xeon Platinum/Gold/Silver/Bronze for servers and Xeon W for HEDT platforms are also available.
According to AMD product line planning, by 2021 sharp dragon 5000 series processors AMD ryzen9 / ryzen7 ryzen5 / ryzen3 four consumer product lines. There are also the third generation Xiaolong EPYC processor for the server market and the Thread Ripper series for the HEDT platform.
CPU vs GPU
GPU is the image processor. The working process and physical structure of CPU and GPU are roughly similar. Compared with the CPU, THE work of the GPU is more single. On most personal computers, GPUs are simply used to draw images. If the CPU wants to draw a two-dimensional graph, all it needs to do is send an instruction to the GPU, which can quickly calculate all the pixels of the graph and draw the corresponding graph at the specified position on the display. Because GPUs generate a lot of heat, graphics cards usually have separate cooling devices on them.
CPUs have powerful arithmetic units that can perform arithmetic calculations in very few clock cycles. At the same time, there is a large cache that can store a lot of data in it. In addition, there are complex logic control units that reduce latency by providing the ability to predict branches when a program has multiple branches. GPUs are designed for high throughput, lots of arithmetic units, and very little cache. At the same time, The GPU supports a large number of threads running at the same time. If they need to access the same data, the cache will merge these accesses, which will naturally cause delays. Despite the delay, due to a large number of arithmetic operation units, it can achieve a very large throughput effect.
The CPU has a large cache and complex LOGICAL control unit, so it is very good at logical control, and serial computing. In comparison, a GPU has a large number of arithmetic operation units, so it can perform a large amount of calculation work at the same time. What it is good at is a large-scale concurrent calculation, with a large amount of calculation but no technical content, and it needs to be repeated many times. That said, we use the GPU to improve the speed of the program. Using CPU to do complex logic control, and using GPU to do simple but large arithmetic operations, can greatly improve the running speed of the program.