Designing your own processor has a big title. In fact, it is from scratch to explore the idea of learning how a processor is designed. The question is, why are there CPUs of different architectures and different assembly languages? A computer consists of two parts: Software and Hardware (computers without software are inferior to scrap iron, haha semiconductor ). Then the Hardware Engineer
Designing your own processor has a big title. In fact, it is from scratch to explore the idea of learning how a processor is designed. The question is, why are there CPUs of different architectures and different assembly languages? A computer consists of two parts: Software and Hardware (computers without software are inferior to scrap iron, haha semiconductor ). Then the Hardware Engineer
Design your own processor
The title is a bit big. In fact, it is from scratch to explore how learning processors are designed.
The question is, why are there CPUs of different architectures and different assembly languages?
A computer consists of two parts: Software and Hardware (computers without software are inferior to scrap iron, haha semiconductor ).
Therefore, hardware engineers need to communicate with software engineers and develop the computers we want. Communication requires a standard. Just like the password telegram of the spy fighters, you must "understand your own language ". The Hardware Engineer and the software engineer agreed, so the standard is the command system.
At first, in order to facilitate human memory, the corresponding commands were replaced by simple writing of words in the human language as much as possible. ADD and JMP (jump wrote JMP to facilitate memory)
In fact, computers do not recognize these human characters. He can only recognize two logics-0 and 1. But based on these two logical expressions 0 and 1, different sequences can be used to derive other rich logical expressions. For example, "0001" indicates "ADD 0000" indicates "LOAD.
The following is the instruction format. Assume that the instruction length of the computer CPU we designed is 2 bytes (in fact, x86 is not equal to the instruction length)
We can assume the following design concepts.
As long as we have established the correspondence relationship between the corresponding characters and the 01 combination, we can easily "translate the character to the 01 combination ". In fact, this process is compiled by the assembly language to obtain the machine code.
If everything is really clear, you must know the ins and outs. The above answers are the questions raised at the beginning of the blog. Why do we need a command system?
For better collaboration!
Certificate ----------------------------------------------------------------------------------------------------------------------------------------------
For personal notes only, we recommend that you study and discuss the "Computer composition principles" issued by Peking University at coursera. Instructor Lu spoke very well!
I plan to summarize my problems or learned things. For personal discussion only.