clock cycle: The clock cycle, also known as the oscillation period, is defined as the reciprocal of the clock pulse (it can be understood that the clock cycle is the inverse of the monolithic microcomputer external crystal oscillator, such as the crystal oscillator 12M, its time period is 1/12 us), is the most basic, the smallest unit of time in the computer. In a clock cycle, the CPU only completes one of the most basic actions. For some kind of MCU, if the clock frequency of 1MHZ is used, the clock period is 1us, and if the clock frequency is 4MHZ, the clock period is 250us. Because the clock pulse is the basic work 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, the higher the clock frequency for computers of the same type, the faster the computer will work. 8051 MCU defines a clock cycle as a beat (denoted by P), and two beats are defined as a state period (denoted by s).
machine cycle: in a computer, in order to facilitate management, the execution of an instruction is often divided into several stages, each of which completes a work. For example, taking instructions, memory reads, Memory writes, and so on, each of these tasks is called a basic operation. The time required to complete a basic operation is called the machine cycle. Typically, a machine cycle consists of several S-cycles (state cycles) . A machine cycle of the 8051 series microcontroller consists of 6 s cycles (state cycles). As mentioned above, a clock cycle is defined as a beat (denoted by P), two beats are defined as a state period (denoted by s), and a 8051 microcontroller's machine cycle consists of 6 state cycles, which means a machine cycle = 6 state cycles = 12 clock cycles. (for example, a microcontroller with an external 24M oscillator, one of his machine cycles =12/24m seconds)
instruction Cycle: the time required to execute an instruction is usually composed of several machine cycles. Different instructions, the required machine cycles are also different. for some simple single-byte instructions, in the fetch instruction period, the instruction is removed to the instruction register, immediately decoding execution, no longer require other machine cycle. For some more complex instructions, such as transfer instructions, multiplication instructions, two or more than two machine cycles are required. typically a machine cycle instruction is called a single-cycle instruction, and an instruction containing two machine cycles is called a double-cycle instruction.
Bus cycle:
Since the memory and I/O ports are hooked up to the bus, the CPU accesses the memory and I/O interfaces, which are implemented via the bus. Typically, the time required for a CPU to access the microprocessor's external (memory or I/O interface) via the bus is called a bus cycle.
- Summary: The clock cycle is the smallest unit, the machine cycle requires 1 or more clock cycles, the instruction cycle requires 1 or more machine cycles; the machine cycle refers to the time to complete a basic operation, which can sometimes include the bus read and write, and thus contains the bus cycle, But sometimes it may not be related to the bus read and write, so there is no explicit relationship between them. instruction Cycle: is the CPU's key indicator, which refers to the time to take out and execute an instruction. In general, the machine cycle is the unit, single instruction execution cycle, double instruction execution cycle, etc. Most of the current processor instructions (ARM, DSP) use a single instruction execution cycle. Machine Cycle: complete a basic operation of the time unit, such as the reference period, take the number of cycles. Clock cycle: The inverse of the operating frequency of the CPU's crystal oscillator.
The operating frequency of the system determines the processing power of the arm microprocessor to a great extent. ARM7 Series microprocessor typical processing speed is 0.9mips/mhz, the common ARM7 chip system main clock for 20MHZ-133MHZ,ARM9 series microprocessor typical processing speed is 1.1mips/mhz, common ARM9 system Master the clock frequency is 100mhz-233mhz,arm10 up to 700MHz. Different chips on the clock processing different, some chips only need a master clock frequency, and some chip internal clock controller can be arm core and USB, UART, DSP, Audio and other features provide clocks of different frequencies.
The difference between the clock period, the machine cycle and the instruction cycle of the MCU