What is a machine cycle?

I am a little confused about the exact definition of a "machine cycle".

For example, some sources on the Internet say this:

Four steps that the processor performs for each machine language instruction: fetch, decode, execute, and save.

While the Z80 Programming book , which supposedly has a good reputation, says:

We saw that all instructions are executed in three stages: FETCH, DECODE, EXECUTE. Now we need to introduce some definitions. Each of these phases will require several clock cycles. The Z80 executes each phase in one or more logical cycles, called a “machine cycle".

Now what confuses me is what I understood - the first one basically says: a machine cycle is a sample-decode cycle, while a book basically says: a machine cycle is one or more - a clock a cycle that occurs in each of the cycle of sampling, decoding or execution separately .

So what is this?

+4
source share
2 answers

z80 has two different concepts of "cycle". The difference matters because the z80 is a multi-cycle architecture and uses both several clock cycles per step and (often) several steps for each instruction.

"" (M-), "" , , ALU- .. , inc (iy+42), , , , , iy, . -, M-, , .

M- (3-6) (, T- T-, , ). , 3 , 4, 5, 16- , , - OCF 2 .

z80-.

" " - " " . , z80.

+6

, : , , .

. "" - , , . .


: - --

, . . - , , .


- . https://en.wikipedia.org/wiki/Clock_signal. CPU .

, . , , , , , .

, , (, , ) . . https://en.wikipedia.org/wiki/Classic_RISC_pipeline

+3

Source: https://habr.com/ru/post/1650413/


All Articles