search
HomeCommon ProblemWhat is the function of the controller

What is the function of the controller

May 24, 2021 pm 04:03 PM
Functioncontroller

The function of the controller is to direct and coordinate the work of various computer components. The controller consists of program counter, instruction register, instruction decoder, timing generator and operation controller.

What is the function of the controller

#The operating environment of this article: windows10 system, thinkpad t480 computer.

The function of the controller is to direct and coordinate the work of various computer components.

What is a controller?

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. Composed of program counter, instruction register, instruction decoder, timing generator and operation controller, it is the "decision-making mechanism" that issues commands, that is, it completes the coordination and command of the operation of the entire computer system.

Basic functions:

Data buffering: Since the speed of the I/O device is low but the speed of the CPU and memory is high, a buffer must be set up in the controller. During output, this buffer is used to temporarily store data transmitted from the host at high speed, and then the data in the buffer is transmitted to the I/O device at the rate of the I/O device; during input, the buffer is used It temporarily stores the data sent from the I/O device, and then transmits the data in the buffer to the host at high speed after receiving a batch of data.

Error control: The device controller is also responsible for error detection of data transmitted by the I/O device. If an error occurs during transmission, the error detection code is usually set and reported to the CPU, so the CPU invalidates the data transmitted this time and retransmits it. This ensures the correctness of data entry.

Data exchange: This refers to the data exchange between the CPU and the controller, and between the controller and the device. For the former, the CPU writes data to the controller in parallel through the data bus, or reads data from the controller in parallel; for the latter, the device inputs data to the controller, or transmits data from the controller to the device. . For this purpose, data registers must be set in the controller.

Status description: The controller that identifies and reports the status of a device should note the status of the device for the CPU to understand. For example, the CPU can start the controller to read data from the device only when the device is in a ready-to-send state. To this end, a status register should be set up in the controller, and each bit in it should be used to reflect a certain status of the device. When the CPU reads the contents of this register, it can understand the status of the device.

Receive and recognize commands: The CPU can send a variety of different commands to the controller, and the device controller should be able to receive and recognize these commands. To this end, there should be corresponding control registers in the controller to store received commands and parameters, and to decode the received commands. For example, the disk controller can receive 15 different commands such as Read, Write, and Format from the CPU, and some commands also have parameters; accordingly, there are multiple registers and command decoders in the disk controller.

Address identification: Just like every unit in the memory has an address, every device in the system also has an address, and the device controller must be able to identify each device it controls. the address of. In addition, in order for the CPU to write (or read) data to (or from) registers, these registers should have unique addresses.

Free learning video sharing: Programming video

The above is the detailed content of What is the function of the controller. 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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Atom editor mac version download

Atom editor mac version download

The most popular open source editor