The principle of computer composition - the basic composition of a computer

Other articles

The principle of computer composition - the development history of the computer The
principle of computer composition - the basic composition of the
computer The principle of computer composition - how the
computer executes instructions

Basic hardware components of a computer

insert image description here

The CPU is equivalent to the human brain, in command of various functions of the human body; the memory and hard disk are equivalent to the memory plates in the brain, recording and storing information, the motherboard is equivalent to the human nervous system, linking all parts of the human body; the graphics card is equivalent to The human eyes and heart are the power supply of the computer, and all activities can be initiated only when the power is turned on.

insert image description here

CPU

The CPU stands for Central Processing Unit, and it's no exaggeration to say that it's the hardest-core component in your computer. The CPU is the core component that can make your computer a computer, but it cannot represent your computer. The relationship between the CPU and the computer is equivalent to the relationship between the brain and people. The core of a CPU is to take instructions from a program or application and perform calculations. This process can be divided into three key stages: extraction, decoding and execution . The CPU fetches the instruction from the system's main memory, then decodes the actual content of the instruction, which is then executed by the relevant part of the CPU.

Memory

Memory is one of the most important components in a computer, it is the bridge between the program and the CPU. All programs in the computer are run in the memory, so the memory has a great influence on the computer. The memory is also called the main memory. Its function is to store the operation data in the CPU and exchange it with external storage devices such as hard disks. data. As long as the computer is running, the CPU will transfer the data to be calculated into the main memory for operation. When the operation is completed, the CPU will transmit the result. The operation of the main memory also determines the stable operation of the computer.

motherboard

The motherboard integrates various electronic components, slots and interfaces, etc., providing installation slots for CPU, memory and various function cards, such as sound cards, network cards, etc., and providing interfaces for various multimedia and communication equipment. The following figure shows the structure of the motherboard.
insert image description here

The components, slots and interfaces of the motherboard will be introduced separately below.
North Bridge Chip: The North Bridge chip is the most important chip in the motherboard chipset. The CPU, memory and graphics card in the computer are all controlled by the North Bridge chip, so the quality of the North Bridge chip determines the performance of the motherboard to a certain extent. Since the north bridge chip processes a lot of data, in order to reduce the heat emitted when it works, a heat sink is usually installed above it.
North Bridge Chip
insert image description here

South Bridge Chip: The South Bridge chip is the second largest chip of the motherboard (the first largest chip is the North Bridge chip). The South Bridge chip controls input/output devices and external devices such as USB devices, IDE devices, SATA devices, audio controllers, keyboard controllers, real-time clock controllers, and advanced power management.
Southbridge chips
and insert image description here

motherboards are accessories with various, sometimes dozens or even hundreds of slots. Our CPU should be plugged into the motherboard, and the memory should also be plugged into the motherboard. The motherboard's chipset (Chipset) and bus (Bus) solve the problem of how the CPU and memory communicate. The chipset controls the flow of data transfers, that is, where the data goes from. The bus is the highway for the actual data transfer. Therefore, the bus speed (Bus Speed) determines how fast data can be transferred.

System bus and IO bus
Generally, the motherboard chipset is divided into north bridge and south bridge. The system bus of the north bridge is called the system bus. Because it is the main channel for CPU, memory, and graphics card transmission, it is faster. The South Bridge is the so-called input and output (I/O) bus, which is mainly used to connect peripheral devices such as hard disks, USB, and network cards. The most common one is the PCI bus. The two buses are connected by bridged chips or circuits.
insert image description here


To give a visual example, it is like a city, there are two main roads, one belongs to the administrative area, the other belongs to the commercial area, and there is a roundabout in the middle, connecting the two main roads together, the system bus is like the main road in the administrative area. , and the I/O bus is like the backbone of the business district. The bandwidth of the system bus and I/O bus is measured in Gbyte, but it is obvious that compared with the main road of the administrative area and the main road of the commercial area, the former must be more "core", wider and smoother. The design requirements are also high
. The function of the CPU bus The
CPU bus, also known as FSB (Front Side Bus, Front Side Bus), is the fastest bus in the PC system and the core of the chipset and motherboard.
Generally, the bus can be divided into three categories: Data bus, address bus, control bus, of course this also applies to the CPU bus. In a microcomputer, the CPU, as the bus master, sends control signals to each component through the control bus, and uses the address signal to specify the components it needs to access through the address bus, such as memory, and data information is transmitted on the data bus. The data bus is bidirectional That is, data information can be sent by the CPU to other components (write), or by other components to the CPU (read). The CPU bus is located between the chipset and the CPU, and is responsible for the communication between the CPU and all external components, because the CPU communicates with each component through the chipset. In addition, the CPU bus is also responsible for the communication between the CPU and the Cache. As mentioned earlier, the CPU bus is like a main road, from which data and signals flow to various components and external devices, and also from various components back to the CPU (mainly data).
insert image description here

I/O equipment

With three major pieces, as long as it is powered by a power supply, the computer can almost run. But now there are still various types of input (Input) / output (Output) devices, which is what we often call I/O devices . If you are using your own personal computer, a monitor is definitely necessary. Only with a monitor can we see various images and texts output by the computer, which is also called an output device .
Likewise, the mouse and keyboard are also essential accessories. So I can enter text and write this article. They are also known as input devices .

graphics card

There is also a very special equipment, that is, the graphics card (Graphics Card). Today, a computer with a graphical interface operating system, be it Windows, Mac OS or Linux, has a graphics card essential. Some people may want to say that I didn't buy a graphics card when I installed the computer, and the computer can still run normally! That's because most motherboards have built-in graphics cards. If you use your computer to play games, do graphics rendering, or run deep learning applications, you probably need to buy a separate graphics card and plug it into the motherboard. The reason why the graphics card is special is that there is another "processor" in the graphics card besides the CPU, that is, the GPU (Graphics Processing Unit, graphics processor), and the GPU can also do various "calculation" work.

von Reuyiman and Harvard

Von Neumann Architecture Overview

Mathematician von Neumann proposed three basic principles of computer manufacturing (using binary, program storage, sequential execution), and the five components of a computer (calculator, controller, memory, input device, output device), This set of theory is known as the von Neumann architecture, and computers built on this principle are called von Neumann architecture computers.
Von Neumann first proposed the idea of ​​program storage and successfully applied it to the design of computers. The von Neumann architecture is the basis of modern computers, and most computers are still the organizational structure of von Neumann computers, so von Neumann is also known as the "father of modern computers".
insert image description here

Von Neumann architecture features:
(1) The data and instructions processed by the computer are all represented by binary numbers.
(2) Instructions and data are mixed and stored in the same memory (hard disk) without distinction
(3) Each instruction of the program is executed sequentially. (The emphasis is on "sequence")
A computer with a von Neumann architecture must have the ability to:
(1) transfer required programs and data to the computer (copy)
(2) must have long-term memory for programs, data, intermediate results, and The ability of the final calculation result (hard disk)
(3) The ability to complete various arithmetic, logical operations and data transmission and other data processing (ALU)
(4) The ability to control the direction of the program according to the needs, and to control the various functions of the machine according to the instructions. Parts coordinate operation.
(5) The processing result can be output to the user as required.

How the Von Neumann System Works (CPU Working Principle)

The execution process of the program is actually the process of continuously fetching instructions, analyzing instructions, and executing instructions. The von Neumann computer is essentially a working mechanism of serial sequential processing. Even if the relevant data is ready, the instruction sequence must be executed one by one, as shown in the following figure:
insert image description here

The specific process:
(1) Pre-order the command The instruction sequence (that is, the program) of how the computer operates and the original data are input into the computer memory (copy).
(2) When the computer is executing, it first fetches the first instruction from the memory, receives the instruction request through the decoder of the controller, then fetches the data from the memory to perform the specified operation and logical operation, etc., and then presses the address. The result is sent to the memory. If data needs to be stored in a storage device such as a hard disk, the data in the memory also needs to be stored in the hard disk. Next, take out the second instruction, complete the prescribed operation under the command of the controller, and proceed in sequence until a stop instruction is encountered.
(3) There are basically two pieces of information flowing in the computer, one is data, that is, various raw data, intermediate results and programs, etc., and the other is control information, which controls various parts of the machine to execute the instructions specified. various operations.
insert image description here

insert image description here

Harvard structure

Harvard structure is a memory structure that separates program instruction storage and data storage. Its main feature is that program and data are stored in different storage spaces, that is, program memory and data memory are two independent memories. The purpose of independent addressing and independent access is to reduce the memory access bottleneck when the program is running.

insert image description here

insert image description here

Difference Between Harvard Structure and Von Neumann Structure

The main difference between the Harvard structure and the von Neumann structure is whether to distinguish between instructions and data . In fact, in memory, instructions and data are together. In the cache in the CPU, the instruction cache and the data cache are still distinguished. When finally executed, the instruction and data come out from two different places. Outside the CPU, the von Neumann model is used, while inside the CPU the Harvard architecture is used. Most DSPs do not have caches and are therefore directly Harvard architectures. The Harvard structure is complex in design, but highly efficient. The von Neumann structure is simpler, but also slower. In order to improve the processing speed, CPU manufacturers increase the cache memory in the CPU. Also based on the same purpose, a distinction is made between instruction cache and data cache.

Guess you like

Origin blog.csdn.net/zhouhengzhe/article/details/123320858