I. Why Do Computers Need a Motherboard, Bus, and Interfaces?
A computer consists of multiple hardware components such as the CPU, memory, hard drive, graphics card, network card, and USB devices.
These hardware components perform different tasks:
- The CPU executes instructions and processes data.
- Memory temporarily stores the data required for programs to run.
- The hard drive stores data over the long term.
- The graphics card handles graphics computation and display output.
- The network card handles network communication.
- USB devices serve to connect external devices such as keyboards, mice, and cameras.
But hardware does not work independently.
The CPU needs to read instructions from memory, the graphics card needs to obtain graphics data, the hard drive needs to receive read/write requests, and the network card needs to pass network data to memory.
These devices must have a unified or mutually compatible communication mechanism.
This involves three important concepts:
| Concept | Core responsibility | Can be understood as |
|---|---|---|
| Motherboard | Provides the hardware connection platform and electrical pathways | Hardware infrastructure |
| Bus | Transmits data and control information between devices | Communication channel |
| Interface | Defines how devices connect and exchange information | Connection specification |
The relationship among the three is as follows:
- The motherboard provides the foundation for hardware connections.
- The bus is responsible for information transmission between devices.
- The interface specifies device connection methods, electrical characteristics, and communication rules.
1.1 Basic Structure of Computer Hardware Communication
flowchart TD
A["CPU"] --> B["Motherboard interconnect system"]
C["Memory"] --> B
D["Graphics card"] --> B
E["SSD"] --> B
F["Network card"] --> B
G["USB peripherals"] --> B
B --> H["Chipset and I/O control"]
H --> I["External devices and expansion devices"]
style A fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style B fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style C fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style D fill:#FCE8C8,stroke:#D9A441,color:#765018
style E fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style F fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style G fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style H fill:#F6FAF7,stroke:#DCE9E0,color:#334155
style I fill:#E8EDF2,stroke:#B6C2CF,color:#334155
In modern computers, not all devices are connected through a single shared bus. Actual architectures usually use a combination of point-to-point interconnects, switching fabrics, dedicated memory channels, and high-speed I/O links.
II. What Is a Motherboard and What Responsibilities Does It Bear?
The motherboard is the core circuit board in a computer that connects and coordinates various types of hardware.
The motherboard itself is usually not responsible for executing complex application computations, nor does it directly store large amounts of user files.
Its core responsibilities include:
- Provide physical mounting locations for the CPU, memory, and expansion devices.
- Provide electrical connections between devices.
- Provide data transmission channels.
- Provide power distribution and power management.
- Provide booting, firmware configuration, and hardware initialization capabilities.
- Provide connection interfaces for external devices.
The motherboard can be understood as the hardware infrastructure of a computer.
2.1 Main Components on a Motherboard
| Component | Main function |
|---|---|
| CPU socket | Install the processor |
| Memory slot | Install RAM |
| Chipset | Provide platform I/O expansion capabilities |
| PCIe slot | Connect expansion devices such as graphics cards and network cards |
| M.2 slot | Connect devices such as M.2 SSDs |
| SATA interface | Connect SATA hard drives and SSDs |
| USB interface | Connect external USB devices |
| BIOS/UEFI chip | Store motherboard firmware |
| VRM power delivery module | Provide stable power to components such as the CPU |
| Network and audio chips | Provide network and audio functions |
| Clock and reset circuitry | Provide timing and system reset support |
2.2 CPU Socket
The CPU socket is used to install the processor.
Different processor platforms may use different socket specifications, for example:
- Intel LGA platform.
- AMD AM5 platform.
- AMD SP5 server platform.
The CPU socket not only determines physical compatibility, but also involves:
- Power pins.
- Memory channel connections.
- PCIe lane connections.
- Clock and reset signals.
- High-speed signal transmission between the processor and the motherboard.
Therefore, whether a CPU and motherboard are compatible is not just a question of whether it physically fits; you also need to check whether the processor architecture, socket, chipset, firmware, and power delivery design match.
2.3 Memory Slots
Memory slots are used to install DIMMs or other forms of memory modules.
Memory and the CPU usually communicate through dedicated memory channels.
Modern desktop processors may support dual-channel memory, while server processors may support more memory channels.
The number of memory channels affects memory bandwidth.
For example, assuming a memory channel has a data width of 64 bit and an operating data transfer rate of 6400 MT/s, the theoretical bandwidth is:
That is about 51.2 GB/s.
If two independent memory channels of the same specification are used, the theoretical total bandwidth can reach about 102.4 GB/s.
Actual bandwidth is also affected by factors such as the memory controller, timings, load, and platform design.
2.4 PCIe Slots
PCIe slots are used to connect high-speed expansion devices, such as:
- Dedicated graphics cards.
- High-speed network cards.
- RAID controllers.
- PCIe SSDs.
- Video capture cards.
Common physical specifications include:
- PCIe x1.
- PCIe x4.
- PCIe x8.
- PCIe x16.
Here, x1, x4, x8, and x16 indicate the physical slot or link lane count specification, but a distinction needs to be made:
Slot length does not necessarily equal the actual number of electrical lanes.
For example, a slot that appears to be x16 may actually be wired with only x4 lanes.
2.5 M.2 Slots
M.2 is a device form factor and connector standard.
Common uses:
- NVMe SSDs.
- SATA SSDs.
- Modules such as wireless network cards.
Common SSD specifications include:
- M.2 2242.
- M.2 2260.
- M.2 2280.
- M.2 22110.
For example, M.2 2280 means:
- Width of 22 mm.
- Length of 80 mm.
Note:
M.2 is not the same as NVMe.
M.2 devices may use the SATA or PCIe protocol, depending on the design of the device and the motherboard slot.
2.6 Motherboard Power Delivery Module: VRM
VRM (Voltage Regulator Module) is a voltage regulation module.
Hardware such as the CPU and memory requires specific voltages to operate stably.
However, the voltage output by the power supply unit usually cannot directly meet the power supply requirements of the processor cores.
The VRM is responsible for converting the input voltage into the stable voltages required by the hardware.
Its main components include:
- PWM controller.
- MOSFETs.
- Inductors.
- Capacitors.
- Drivers.
The VRM design affects:
- Power delivery stability.
- Current carrying capacity.
- Temperature.
- Operational stability when the processor is under sustained high load.
III. What Is a Chipset? Why Does a Motherboard Need a Chipset?
The chipset is an important part of the motherboard platform, responsible for providing and managing some of the I/O connectivity.
In traditional PC architectures, the chipset is usually divided into a southbridge and a northbridge.
Modern processors integrate more functions, and most of the traditional northbridge's responsibilities have been integrated into the CPU, so modern desktop platforms commonly use a PCH (Platform Controller Hub).
3.1 Traditional Southbridge and Northbridge Architecture
Early computer motherboards typically used a northbridge/southbridge architecture.
Northbridge
Responsible for connecting:
- CPU.
- Memory.
- High-speed graphics interface.
Southbridge
Responsible for connecting:
- USB.
- SATA.
- PCI.
- Audio.
- Network cards.
- Other low-speed I/O devices.
Traditional architecture diagram:
flowchart TD
A["CPU"] --> B["Northbridge"]
B --> C["Memory"]
B --> D["Graphics Card AGP / PCIe"]
B --> E["Southbridge"]
E --> F["SATA"]
E --> G["USB"]
E --> H["Audio"]
E --> I["Network Card"]
style A fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style B fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style C fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style D fill:#FCE8C8,stroke:#D9A441,color:#765018
style E fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style F fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style G fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style H fill:#FCE8C8,stroke:#D9A441,color:#765018
style I fill:#E8EDF2,stroke:#B6C2CF,color:#334155
This architecture manages high-speed devices and relatively low-speed peripherals separately.
3.2 Why Is the Northbridge Gradually Disappearing?
As processor technology has developed, more and more functions have been integrated into the CPU.
For example:
- Memory controller.
- PCIe controller.
- Some high-speed interconnect controllers.
Integrating these functions directly into the processor can shorten communication paths, improve performance, and reduce latency.
As a result, the traditional Northbridge has gradually been replaced by controllers inside the CPU.
3.3 Modern Motherboard Architecture
Modern desktop platforms typically use:
- A memory controller integrated into the CPU.
- The CPU provides some PCIe lanes.
- The chipset provides additional I/O capabilities such as PCIe, USB, and SATA.
- The CPU and chipset communicate over a dedicated high-speed link.
flowchart TD
A["CPU"]
B["Memory Controller"]
C["Memory RAM"]
D["CPU PCIe Controller"]
E["Discrete Graphics Card"]
F["CPU-Chipset Interconnect"]
G["Chipset PCH"]
H["SATA SSD / HDD"]
I["USB Devices"]
J["Expansion PCIe Devices"]
A --> B
B --> C
A --> D
D --> E
A --> F
F --> G
G --> H
G --> I
G --> J
style A fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style B fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style C fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style D fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style E fill:#FCE8C8,stroke:#D9A441,color:#765018
style F fill:#E8EDF2,stroke:#B6C2CF,color:#334155
style G fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style H fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style I fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style J fill:#FCE8C8,stroke:#D9A441,color:#765018
Note: This is a simplified typical architecture. Different CPU and motherboard platforms may differ significantly in PCIe lane allocation, chipset connection methods, and integrated controllers.
3.4 Main Functions of the Chipset
| Function | Description |
|---|---|
| I/O Expansion | Provides additional PCIe lanes |
| USB Control | Supports USB device connections |
| SATA Control | Supports SATA storage devices |
| Network and Peripheral Connectivity | Provides platform-specific connectivity capabilities |
| Device Management | Works with firmware and the operating system to manage hardware |
| Platform Interconnect | Communicates with the CPU over a dedicated link |
Note that the chipset is not the sole intermediary for all device communication.
For example, a discrete graphics card may connect directly to the CPU's PCIe lanes, and memory usually connects directly to the memory controller inside the CPU.
IV. What Is a Bus? Why Do Computers Need a Bus?
A bus is a communication mechanism used in computers for exchanging information between devices.
It defines how devices transmit:
- Data.
- Addresses.
- Control information.
In traditional computer organization theory, buses are often divided into three categories.
4.1 Data Bus
The data bus is responsible for transmitting the actual data content.
For example:
When the CPU reads an integer from memory, it needs to transfer the corresponding data to the processor through the data path.
The width of the data bus usually affects the amount of data that can be transmitted at one time.
Assume the data bus width is 64 bit:
Under ideal conditions, one transfer can carry 8 Byte of data.
4.
It describes how many times data or symbols can be transmitted per second.
Clock frequency describes the number of clock cycles.
The two are not always equal.
For example, DDR memory uses double data rate technology and can transfer data on both edges of a clock cycle.
Therefore:
Assuming the memory clock is 320 MHz, the data transfer rate is:
This is also why the actual clock frequency of DDR5-6400 is not the same number as the labeled data transfer rate.
5.4 Bandwidth Calculation
Under ideal conditions:
For example:
- Data rate: 6400 MT/s.
- Bus width: 64 bit.
Then:
This is the theoretical bandwidth of a single 64-bit memory channel.
5.5 Parallel Transmission and Serial Transmission
Parallel transmission:
Uses multiple data lines to transmit several data bits simultaneously.
Advantages:
- Multiple bits can be transmitted simultaneously.
- Simple to implement at lower rates.
Disadvantages:
- Signal skew is likely at high speeds.
- Crosstalk exists between lines.
- Requires more physical pins.
- High-speed design and routing are more difficult.
Serial transmission:
Uses fewer data lines and transmits data serially at high speed.
Advantages:
- Relatively few pins.
- Easier to design high-speed differential signaling.
- Suitable for high-speed point-to-point links.
Modern interfaces such as PCIe, USB, and SATA all use high-speed serial communication technology.
However, serial cannot simply be considered faster than parallel; actual performance depends on the specific protocol, signaling rate, channel count, and engineering design.
6. PCIe: One of the Most Important High-Speed Interconnects in Modern Computers
PCIe (Peripheral Component Interconnect Express) is a widely used high-speed serial interconnect standard in modern computers.
It is used to connect:
- Graphics cards.
- NVMe SSDs.
- High-speed network cards.
- RAID controllers.
- FPGAs.
- Data acquisition cards.
- Other high-speed expansion devices.
6.1 Basic Structure of PCIe
Unlike traditional shared buses, PCIe uses point-to-point links and a switched fabric.
Main concepts include:
| Concept | Meaning |
|---|---|
| Root Complex | Host-side PCIe root complex |
| Root Port | Root port |
| Endpoint | PCIe endpoint device |
| Switch | PCIe switch |
| Link | Link between two PCIe components |
| Lane | A set of transmit and receive differential signal channels |
6.2 What Is a PCIe Lane?
A lane is the basic transmission unit of PCIe.
A PCIe lane usually includes:
- A set of transmit differential signals.
- A set of receive differential signals.
Therefore, it supports full-duplex communication and can send and receive data simultaneously.
Common configurations:
- x1: 1 lane.
- x4: 4 lanes.
- x8: 8 lanes.
- x16: 16 lanes.
Multiple lanes can be combined into a wider link.
6.3 PCIe Link Structure
flowchart TD
A["CPU Root Complex"] --> B["PCIe Root Port"]
B --> C["PCIe Link"]
C --> D["PCIe Endpoint"]
C --> E["PCIe Switch"]
E --> F["NVMe SSD"]
E --> G["High-speed network card"]
E --> H["Other expansion devices"]
style A fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style B fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style C fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style D fill:#FCE8C8,stroke:#D9A441,color:#765018
style E fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style F fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style G fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style H fill:#F6FAF7,stroke:#DCE9E0,color:#334155
PCIe switches can expand connectivity, but when multiple devices share an upstream link, they may still be limited by upstream bandwidth.
6.4 Bandwidth of Different PCIe Generations
PCIe increases bandwidth by continuously raising the transfer rate of each lane.
| Version | Transfer Rate per Lane | Encoding |
|---|---|---|
| PCIe 1.0 | 2.5 GT/s | 8b/10b |
| PCIe 2.0 | 5.0 GT/s | 8b/10b |
| PCIe 3.0 | 8.0 GT/s | 128b/130b |
| PCIe 4.0 | 16.0 GT/s | 128b/130b |
| PCIe 5.0 | 32.0 GT/s | 128b/130b |
| PCIe 6.0 | 64.0 GT/s | PAM4, FLIT and other mechanisms |
| PCIe 7.0 | 128.0 GT/s | PAM4, FLIT and other mechanisms |
For PCIe 1.0 through PCIe 5.0, the theoretical effective data rate in one direction can be estimated from the transfer rate and encoding efficiency.
For example, PCIe 4.0:
Which is approximately:
Converted to bytes:
This is the theoretical data rate per lane, in one direction, after encoding, and does not yet account for other protocol overhead.
The theoretical bandwidth of PCIe 4.0 x16 in one direction is approximately:
The combined theoretical bandwidth in both directions is approximately 63 GB/s.
Actual application throughput will be lower.
6.5 Why Is PCIe Suitable for Graphics Cards?
Graphics cards need to exchange large amounts of data with the CPU and memory system.
For example:
- Texture data.
- Vertex data.
- Command buffers.
- Compute task data.
- Data transfers between VRAM and host memory.
PCIe provides high-bandwidth, low-latency point-to-point interconnect capability, making it suitable for connecting high-performance devices such as GPUs.
However, the GPU's core computation is usually performed inside the graphics card itself; graphics rendering and large-scale parallel computing mainly rely on the internal bandwidth between the GPU and VRAM.
PCIe is not the same as the VRAM bus.
6.6 Why Does PCIe Lane Allocation Matter?
A single CPU may provide only a limited number of PCIe lanes.
For example, a platform may allocate some lanes to:
- Graphics card slots.
- NVMe SSDs.
- Chipset connection.
If multiple devices need to share certain lanes, the following may occur:
- The graphics card slot drops from x16 to x8.
- Some M.2 slots occupy SATA or PCIe resources.
- Some ports are disabled when used simultaneously.
- Multiple devices share upstream bandwidth.
Therefore, when building a PC, you cannot look only at the number of slots; you also need to check the PCIe lane allocation table in the motherboard manual.
7. USB: How Does a Computer Connect External Devices?
USB (Universal Serial Bus) is a general-purpose serial bus standard.
It is widely used to connect:
- Keyboards.
- Mice.
- Webcams.
- USB flash drives.
- Portable hard drives.
- Printers.
- Audio devices.
- Phones.
7.1 Main Functions of USB
USB is responsible not only for transmitting data but can also supply power to external devices.
For example:
- A mouse draws power over USB and transmits input data.
- A USB flash drive transfers files over USB.
- A phone charges and communicates data over USB.
- A webcam transmits video data over USB.
7.2 USB Type-A and Type-C
It is necessary to distinguish between the physical form of a USB connector and the USB communication standard.
USB Type-A:
- Traditional rectangular connector.
- Common on desktop computers and external devices.
- Has a fixed insertion orientation.
USB Type-C:
- Small, reversible connector.
- Supports richer power delivery and data transfer capabilities.
- Can work with USB Power Delivery.
- Some devices support DisplayPort Alt Mode or Thunderbolt.
Type-C is only a connector form factor; it does not mean the device necessarily supports the highest speeds, video output, or high-power delivery.
7.3 USB Speed Standards
USB naming has been revised many times; when actually making a purchase, you should focus on the specific transfer rate rather than just names like USB 3.x.
| Common Name | Theoretical Signal Rate |
|---|---|
| USB 2.0 | 480 Mb/s |
| USB 5Gbps | 5 Gb/s |
| USB 10Gbps | 10 Gb/s |
| USB 20Gbps | 20 Gb/s |
| USB 40Gbps | 40 Gb/s |
| USB 80Gbps | 80 Gb/s |
Actual transfer speeds are affected by protocol overhead, device performance, cable specifications, and the connection method.
7.4 What a USB Hub Does
A USB hub expands the number of USB ports available.
For example:
A single USB host port connects to a hub, and the hub in turn connects to multiple USB devices.
flowchart TD
A["CPU / Chipset"] --> B["USB Host Controller"]
B --> C["USB Root Hub"]
C --> D["USB Hub"]
D --> E["Keyboard"]
D --> F["Mouse"]
D --> G["USB Flash Drive"]
D --> H["Webcam"]
style A fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style B fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style C fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style D fill:#FCE8C8,stroke:#D9A441,color:#765018
style E fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style F fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style G fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style H fill:#F6FAF7,stroke:#DCE9E0,color:#334155
Note that a hub expands connectivity, but it does not necessarily increase the total bandwidth of the upstream link.
When multiple high-speed devices work at the same time, they may share the upstream link's bandwidth.
7.5 How Does USB Identify Devices?
After a USB device is connected, the host needs to identify it and obtain the relevant information.
This process is called device enumeration.
Typical flow:
- The device is connected to a USB port.
- The host detects the connection state.
- The host resets the device.
- Retrieve the device descriptor.
- Assign a device address.
- Retrieve configuration, interface, and endpoint information.
- Load the corresponding driver, or use a generic driver.
- The device begins normal communication.
flowchart TD
A["USB Device Connected"] --> B["Host Detects Connection"]
B --> C["Device Reset"]
C --> D["Read Device Descriptor"]
D --> E["Assign Device Address"]
E --> F["Read Configuration and Interface Info"]
F --> G["Load Driver"]
G --> H["Device Works Normally"]
style A fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style B fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style C fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style D fill:#FCE8C8,stroke:#D9A441,color:#765018
style E fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style F fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style G fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style H fill:#F6FAF7,stroke:#DCE9E0,color:#334155
The USB device descriptor contains information such as the device type, vendor ID, product ID, and device capabilities.
The operating system can use this information to match the corresponding driver.
8. SATA: How Do Hard Drives and SSDs Connect to the Motherboard?
SATA (Serial ATA) is a common interface for connecting storage devices.
Common SATA devices include:
- Mechanical hard drives (HDD).
- 2.5-inch SATA SSDs.
- Optical drives.
8.1 Main Features of the SATA Interface
- Uses serial communication.
- The common version is SATA III.
- SATA III has a nominal transfer rate of 6 Gb/s.
- Uses a separate data cable to connect devices.
- Usually requires a separate power cable.
The theoretical signal rate of SATA III is 6 Gb/s.
Because it uses 8b/10b encoding, the theoretical effective data rate after encoding is:
Converted to bytes:
Actual effective throughput must also subtract protocol overhead.
8.2 SATA and AHCI
AHCI (Advanced Host Controller Interface) is a common programming interface specification for host-side SATA controllers.
It defines how the operating system interacts with the SATA controller.
AHCI provides:
- Command queue management.
- DMA transfer mechanisms.
- Hot-plug related capabilities.
- Native Command Queuing (NCQ).
8.3 Differences Between SATA and NVMe
| Aspect | SATA SSD | NVMe SSD |
|---|---|---|
| Common connection method | SATA | PCIe |
| Common protocol | AHCI | NVMe |
| Transfer bandwidth | Limited by SATA III | Depends on PCIe generation and number of lanes |
| Queue mechanism | Traditional SATA queue | Multiple queues |
| Concurrency capability | Relatively limited | Better suited for high concurrency |
| Common applications | Ordinary system disk, data disk | High-performance system disk, database |
Both SATA and NVMe can connect SSDs, but they use different interfaces and communication protocols.
9. Memory Bus: How Does the CPU Communicate with Memory?
Memory is one of the most important sources of data for the CPU when running programs.
The CPU needs to continuously read instructions and data from memory and write computation results back to memory.
Therefore, a high-speed communication channel is required between the CPU and memory.
9.1 What Is a Memory Controller?
The memory controller is responsible for managing data transfers between the CPU and memory.
Main responsibilities include:
- Handle memory read/write requests.
- Manage memory addresses.
- Control memory timings.
- Manage refresh operations.
- Handle channel and bank scheduling.
- Coordinate data transfers between the CPU and memory.
Modern processors usually integrate the memory controller (IMC).
Therefore, the communication path between the CPU and memory is usually more direct than in traditional northbridge architectures.
9.2 Memory Channel
A memory channel is an independent data transfer path between the CPU and memory.
For example:
- Single channel.
- Dual channel.
- Quad channel.
- Eight channel.
Increasing the number of channels can increase theoretical memory bandwidth.
But note:
- The number of memory modules is not equal to the number of channels.
- Dual-channel does not necessarily require two memory modules to work; it depends on the platform and memory configuration.
- Multiple channels require support from the CPU, motherboard, and memory configuration together.
9.3 What Is DDR?
DDR (Double Data Rate) is a memory technology that transfers data at double data rate.
It can transfer data on both the rising and falling edges of the clock signal.
Therefore, at the same clock frequency, DDR's data transfer rate can be twice that of traditional single-edge transfer.
Common generations:
- DDR3.
- DDR4.
- DDR5.
Different generations differ in voltage, signal design, timings, capacity, and performance.
9.4 Memory Access Flow
flowchart TD
A["CPU generates a memory access request"] --> B["Memory controller receives the request"]
B --> C["Resolves channel and address"]
C --> D["Selects memory bank"]
D --> E["Performs row activation and column access"]
E --> F["Reads or writes data"]
F --> G["Data is transferred through the memory channel"]
G --> H["CPU obtains the result"]
style A fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style B fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style C fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style D fill:#FCE8C8,stroke:#D9A441,color:#765018
style E fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
style F fill:#DCEFE5,stroke:#8BBFA2,color:#315E45
style G fill:#EDE4FA,stroke:#B5A0D8,color:#51416F
style H fill:#F6FAF7,stroke:#DCE9E0,color:#334155
Actual DDR memory access also involves mechanisms such as Bank Groups, row buffers, command timing, refresh, and data checking.
9.5 Memory Bandwidth and Latency
Memory performance mainly focuses on:
Bandwidth
The amount of data that can be transferred per unit of time.
Latency
The time required from issuing a memory request to obtaining the data.
These are not the same metric.
High-bandwidth memory does not necessarily have the lowest access latency.
For different applications:
- Large-scale matrix computations focus more on memory bandwidth.
- Random-access-intensive applications may focus more on access latency.
- Multitasking servers usually focus on capacity, bandwidth, and NUMA topology at the same time.
10. DMI, Infinity Fabric, and On-Chip Interconnect
In addition to external interfaces such as PCIe, USB, and SATA, high-speed interconnects are also required inside the CPU and between the CPU and the chipset.
Different vendors use different interconnect technologies.
10.1 DMI
DMI (Direct Media Interface) is the interconnect technology used between the CPU and the chipset on Intel platforms.
It is mainly responsible for data exchange between the CPU and the PCH.
Through DMI, SATA, USB, and other devices connected to the chipset can communicate with the CPU and the memory system.
It should be noted that DMI bandwidth is one of the upstream resources shared by downstream devices on the chipset.
10.2 Infinity Fabric
Infinity Fabric is the interconnect technology system used by AMD processors and platforms.
It is used to connect different modules inside the processor and is also used for communication between some processors.
In different product architectures, it may involve:
- CPU core complexes.
- I/O Die.
- Memory controllers.
- Inter-chip interconnect.
- Multiprocessor systems.
10.3 On-Chip Interconnect NoC
Modern processors integrate a large number of functional modules.
For example:
- CPU cores.
- GPU.
- Memory controllers.
- Cache.
- PCIe controllers.
- I/O controllers.
These modules need to communicate at high speed.
NoC (Network on Chip) is an interconnect architecture used for communication between modules inside a chip.
It organizes intra-chip communication into a network-like structure.
10.4 Comparison of Interconnect Technologies
| Technology | Primary Application Scope | Primary Role |
|---|---|---|
| PCIe | CPU and expansion devices | High-speed device communication |
| DMI | Intel CPU and PCH | Platform I/O connection |
| Infinity Fabric | AMD processor platforms | Intra-chip and inter-chip interconnect |
| NoC | Inside SoC | Multi-module interconnect |
| DDR memory channels | CPU and memory | Memory data access |
These technologies solve communication problems at different levels, and they cannot simply be regarded as interchangeable interfaces.
11. DMA: How Do Devices Access Memory Directly?
DMA (Direct Memory Access) is a mechanism that allows devices to exchange data directly with memory under specific conditions.
Without DMA, many I/O operations might require the CPU to participate frequently in data movement.
For example, when a network card receives a network packet:
- The network card receives the data.
- The data needs to be written to memory.
- The CPU handles subsequent network protocol processing.
If the CPU had to move all data byte by byte, it would incur a large amount of extra overhead.
DMA can help devices transfer data directly to a specified area in memory.
11.1 Basic Working Principle of DMA
Typical process:
- The CPU prepares a memory buffer.
- The CPU configures the address and transfer length required for DMA.
- The device or DMA controller initiates the data transfer.
- Data is transferred directly between the device and memory.
- After the transfer is complete, an interrupt or completion notification is generated.
- The CPU processes the transfer result.