In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about what types of application instructions can be divided into. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The instructions of the application can be divided into two types: the instruction set of the central processing unit (CPU) and the instruction set used to request specific services from the operating system; the processing flow of the CPU operation instructions is roughly divided into fetch, decode, execute, access memory, write back and update the PC.
Theoretically, instructions in an application can be divided into two categories: the instruction set of the central processing unit (CPU) and the request for specific services from the operating system.
Central processing unit (CPU,Central Processing Unit) is a very large-scale integrated circuit, which is the computing core (Core) and control core (Control Unit) of a computer. Its main function is to interpret computer instructions and process data in computer software.
The CPU mainly includes arithmetic unit (arithmetic logic operation unit, ALU,Arithmetic Logic Unit) and cache memory (Cache) and the data (Data), control and state bus (Bus) that realize the relationship between them. It is called the three core components of electronic computer together with internal memory (Memory) and input / output (I / O) devices.
The processing flow of CPU operation instruction is roughly divided into several steps: fetch, decode, execute, access memory, write back and so on. Each instruction varies from 1 to 6 bytes, depending on which fields are required. The first byte of each instruction indicates the type of instruction: the high 4 bits are the code part (for example, 6 is the integer class operation instruction), and the lower 4 bits are the functional part (for example: 1 is the subtraction instruction in the integer class) 61 is the sub instruction.
Processing instruction flow
An important property of an instruction set is that byte encoding must have a unique interpretation. Any byte sequence is either the encoding of a unique instruction sequence or is not a legitimate byte sequence. Because the first byte of each instruction has a unique code and function combination, given this byte, we can determine the length and meaning of all other additional bytes.
Each instruction varies from 1 to 6 bytes, depending on which fields are required. The first byte of each instruction indicates the type of instruction: the high 4 bits are the code part (for example, 6 is the integer class operation instruction), and the lower 4 bits are the functional part (for example: 1 is the subtraction instruction in the integer class) 61 is the sub instruction.
The following is a flowchart for processing each instruction:
Fetch reference (fetch)
The value phase reads instruction bytes from memory and puts them into the instruction memory (CPU) with the address of the value of the program counter (PC). It calculates the address of the next instruction of the current instruction in a sequential manner (that is, the value of PC plus the length of the fetched instruction).
Decoding (decode)
ALU reads up to two operands from a register file (a collection of general registers). (that is, reading up to two registers at a time)
Execute (execute)
During the execution phase, the arithmetic / logic unit (ALU) is used for different purposes depending on the type of instruction. For other instructions, it acts as an adder to increase or decrease the stack pointer, or to calculate a valid address, or simply add 0 to pass an input to the output.
The condition code register (CC) has three condition bits. ALU is responsible for calculating the new value of the condition code. When a jump instruction is executed, the branch signal cnd is calculated according to the condition code and jump type.
Access to memory (memory)
In the memory access phase, the data memory (in CPU) reads or writes a memory word. Instructions and data memory access the same memory location, but for different purposes.
Write back (write back)
The writeback phase can write up to two results to a register file. The register file has two write ports. Port E is used to write values calculated by ALU, while port M is used to write values read from the data store.
Update PC (PC update)
According to the instruction code and the branch flag, the value of the next PC is selected from the signal values obtained in the previous steps.
Thank you for reading! This is the end of the article on "which types of application instructions can be divided into in the computer". I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.