Layman's language learning computer composition principle Notes: establishing a data path (a) - more operational instructions = (Lecture 17) CPU

First, the primer

1, instructions

2, computing

However, the light also know that these two parts can not be considered truly unlocked the secret of the CPU, only the "instructions" and "computing" functional connectivity these two parts together, we can form a truly complete CPU.
This lesson, we based on the previous knowledge, a complete look at how the CPU is up and running.

Second, the instruction cycle

1, a computer process execute each instruction

1 to 4. Step 3 is repeated.
Such a step, in fact, is a never-ending "Fetch - Decode - Execute" cycle, we call this cycle instruction cycle (Instruction Cycle).

 

2. What is the instruction cycle

3, different in different assembly steps to complete the

 

The relationship between the three cycles

 

4, CPU cycles

5, clock cycles

Third, establish a data path

1, a first type of operation member

2, second memory element

3. What is the data path

4, the controller

It sounds simple? In fact, particularly complex circuit controller. Let me give you a detailed analysis of it.

 

In one aspect, all the instructions supported by the CPU, which will be in the controller, is parsed into different output signals. We said before, now supports more than 2000 IntelCPU instructions. this means,

A control signal output from the controller, at least 2,000 different combinations.

 

Arithmetic unit ALU in the logic circuit and various combinations can be considered a fixed function circuit. Controller "translated", that is, different control signals. These control signals, ALU told to do different calculations.

It can be said that there is a controller, so that we can "program" to achieve feature that allows our "stored program computer" worthy of the name.

Machine code instruction decoder input resolve to different opcodes and operands, and then transmitted to the ALU to calculate

Four, CPU hardware required

1、ALU

2, the register

3, the number of automatic digital circuit

We seem to write a variety of complex advanced procedures for a variety of function calls, conditional jump. In fact, just modify the inside of the PC register address. Inside a PC register address modification, the computer can load a new command instruction

往下运行。实际上,PC寄存器还有一个名字,就叫作程序计数器。顾名思义,就是随着时间变化,不断去数数。数的数字变大了就去执行一条新指令。

所以,我们需要的就是一个自动数数的电路。

4、译码器

 五、总结延伸

好了,现在我们把这四类电路,通过各种方式组合在一起,就能最终组成功能强大的CPU了。但是,要实现这四种电路中的中间两种,我们还需要时钟电路的配合。

下一节,我们一起来看一看,这些基础的电路功能是怎么实现的,以及怎么把这些电路组合起来变成一个CPU。

Guess you like

Origin www.cnblogs.com/luoahong/p/11330406.html