Clock cycle-instruction cycle-machine cycle and Their Relationships

Source: Internet
Author: User

Clock cycle

The clock cycle is also called the oscillation cycle, which is defined as the reciprocal of the clock pulse (it can be understood that the clock cycle is the reciprocal of the single-chip microcomputer external crystal oscillator, such as the 12 m crystal oscillator, the time period is 1/12 US), which is the most basic and minimum time unit in the computer.

Within a clock cycle, the CPU performs only one basic action. For a single-chip microcomputer, if the 1 MHz clock frequency is adopted, the clock cycle is 1 us; if the 4 MHz clock frequency is adopted, the clock cycle is 250us. Because the clock pulse is the basic working pulse of the computer, it controls the working rhythm of the Computer (so that every step of the computer is unified to its pace ). Obviously, for computers of the same model, the higher the clock frequency, the faster the computer will work. However, because different computer hardware circuits and devices are not exactly the same, the clock frequency range is not necessarily the same. The clock range of the 8051 MCU we learned is 1.2 MHz-12 MHz.

In the 8051 microcontroller, a clock cycle is defined as a cycle (expressed by P), and two beats are defined as a state cycle (represented by S ).

Instruction cycle

A command cycle is the time required to execute a command. It generally consists of several machine cycles. The number of machine cycles varies depending on different commands. For some simple single-byte commands, after the commands are obtained into the instruction register during the instruction fetch cycle, the commands are decoded and executed immediately, and other machine cycles are no longer required. For some complex commands, such as transfer and multiplication commands, two or more machine cycles are required.
Commands that contain one machine cycle are generally called single-cycle commands. commands that contain two machines are called dual-cycle commands.


Machine cycle

In computers, to facilitate management, the execution process of a command is often divided into several stages, each of which completes a task. For example, taking commands, reading memory, writing memory, and so on, each task is called a basic operation. The time required to complete a basic operation is called the machine cycle. Generally, a machine cycle consists of several s cycles (State cycles. One machine cycle of the 8051 series single-chip microcomputer is composed of six s cycles (State cycles. As mentioned above, a clock cycle is defined as a cycle (expressed by P), and two beats are defined as a state cycle (represented by S ), 8051 the single-chip microcomputer machine cycle consists of six state cycles, that is, one machine cycle = six state cycles = 12 clock cycles.




Clock cycle-the reciprocal of clock speed, determined by the crystal oscillator or PLL.

Command cycle-the execution time of a command. The relationship between the instruction period and the clock period is determined by the chip architecture. You can refer to the specific chip manual, which is generally a multiple of the clock period, which is 4 times the number, there are 12 times...

Machine cycle-the processor of the five-level assembly line is 1/5 instruction cycle



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: 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.