Clock cycle, machine cycle, command cycle, and CPU Length

Source: Internet
Author: User

Clock cycle: the clock cycle, also known as the oscillation cycle, is defined as the reciprocal of the clock pulse frequency (the clock cycle is the reciprocal of the single-chip microcomputer external crystal oscillator, such as a 12 m crystal oscillator, the clock cycle is 1/12us), which is the most basic and minimum time unit in the computer, that is, the CPU clock speed. The clock pulse is the basic working pulse of the computer and controls the working rhythm of the computer. The higher the clock frequency, the faster the operation speed.
Machine cycle: in a computer, the execution process of a command is often divided into several stages, each of which completes one task. Each task is called a basic operation. The time required to complete a basic operation is called a machine cycle. One machine cycle of the 8051 series single-chip microcomputer is composed of 6 s cycles (State cycles. One s cycle = 2 beats (P), so one machine cycle of 8051 Single-Chip Microcomputer = 6 State cycles = 12 clock cycles. For example, a single-chip microcomputer with an external 24 m crystal oscillator has a machine cycle of 1/24 m × 12 = 12/24 m seconds.
Command cycle: the time required to execute a command. Generally, it consists of several machine cycles. Different commands have different machine cycles. The simplest is the Nop (no operation) command, which does not complete any operation, only enablesProgramThe counter PC is added with 1, so it occupies one machine cycle
In a word, the relationship between the instruction cycle, the machine cycle, and the clock cycle is usually expressed by several machine cycles, and the machine cycle time contains several clock cycles.
Single-Chip Microcomputer's word length simply says: within a machine cycle, eight-bit single-chip microcomputer can simultaneously PROCESS 8-bit data (1 byte), 16-bit single-chip microcomputer can simultaneously process 16-bit data (2 bytes ), 32-bit single-chip microcomputer can simultaneously process 32-bit data (4 bytes), the more data can be processed at the same time, the higher the work efficiency, the faster the speed. At the same time, internal commands can be divided into 1-byte commands, 2-byte commands, and so on. An 8-bit machine can execute a 1-byte command in a machine cycle, therefore, a 32-bit host can execute four 1-byte commands in a single machine cycle, providing better processing capability and faster speed. These characters must contain the operation code and the number of operations, because both the operation code and the number of operations at the underlying layer are binary and executed by the CPU.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.