Computer system structure instruction set structure and design details

Regarding the instruction set problem, here is a deep summary. It was always confused by various terms such as "instruction set structure" and "instruction set design", so I took out this piece separately and subdivided it;

 

Classification of instruction set structure:

In general, the type of instruction set structure is mainly determined by a factor: what kind of storage unit stores the operand;

 

 According to stack storage operands, accumulator storage operands, and general register storage operands, it can be divided into three instruction set structures:

1. Stack structure;

2. Accumulator structure;

3. General register structure, in which general registers can be divided into three types according to registers and storage;


 

[Note]: Please pay attention to the problem of CISC and RISC instruction sets.

The reduction and complexity of the instruction set are only the design strategy of the instruction set, and it has nothing to do with the category of the instruction set structure. It belongs to the functional design problem of the instruction set structure;


 

 

 

Instruction set design:

Personally feel that this part can not be memorized, the most important thing is to be able to think of several major directions:

 

 1. Functional design:

That is, the design direction of the instruction set. Do you want to use the reduced instruction set or the complex instruction set? This is the direction that needs to be determined, and involves a series of problems such as the number of subsequent instruction formats, whether it is a fixed length, etc., so we must bear the brunt. consider;

 

2. Addressing mode:

Be sure to figure out what the addressing mode is;

Addressing mode: refers to how to form the address of the data to be accessed in the instruction system;

In general, the determination of the addressing mode uses the benchmark program to test statistics, check the frequency of use of various addressing modes, and set according to the frequency;

 

3. Addressing mode means:

The addressing mode still has the problem of how to express it. In fact, it involves the chapter of the instruction of the principle of computer composition;

Two methods are generally used to express:

1) It is compiled in the opcode and does not use independent fields. Although the decoding is fast, the number of instructions is increased, which makes the instruction decoding difficult;

2) Set an address descriptor separately. Although the decoding is slow, but independent of the opcode, it is easy to expand the instruction;

 

4. Operand representation and type:

Similar to the addressing mode, operands also have problems with representation and type.

Needless to say the type, everything like floating point;

Mainly operand representation:

1). Use the code designation of the operation code, the most common way;

2). The data is marked with a hardware interpretation, specifying the type of operand, so as to select the appropriate operation;

 

5. Design of instruction format:

The design of the instruction format is related to the design of the overall instruction. For example, the instruction format problem in the principle of computer composition usually consists of fixed length or variable length. For example, in the initial test, the problem of operand expansion is involved;

For the design of the instruction format:

1) Variable-length encoding format: If you are concerned about the size of the target code rather than performance, use this format;

2) Fixed-length encoding format: If you are concerned about performance rather than target code length, use this format;

3) Mixed coding format: if both performance and target code length are considered, this format is adopted;

 

Guess you like

Origin www.cnblogs.com/songlinxuan/p/12707010.html