Cpu is an important part of digital processing systems. In my opinion, microcontrollers, microprocessors, and dsps can all be called cpu, but their focus is different. Specifically, the traditional sense of the SCM is more emphasis on embedded computing, for example, we often use the 51, avr, arm chip not only contains the computing and control functions, it also covers the timer, serial port, parallel port, Usb, i2c bus and other external resources. Dsp, cpu generally only exists as a core of the dsp, it usually contains another core, dedicated to digital signal processing. The microprocessor, that is, the processor on the PC we often talk about, has a relatively single job and focuses on the processing of calculation and control functions. Therefore, in general, the single chip microcomputer and dsp cannot Compared to it, with the help of the South Bridge chip and the North Bridge chip, the pc's microprocessor can concentrate on its own employees, and there will be a big increase in efficiency.
For friends, the most common CPU in life is the x86 cpu. Of course, if any friend likes a toy like apple, he will know something about arm. The rest is the cpu of some special fields, such as the more powerpc chips used in the communications industry, the sun sparc chips used in high-performance servers, and the mips chips used in scientific computing. Therefore, no matter what chips are encountered, the same applies to the development of friends at the application layer, but only in some small places need to pay attention to. For example,
(1) Data alignment
(2) The problem of endianness of data
(3) Pushing of function parameters
(4) Execution problems of cpu
(5) Cpu cache and memory consistency issues
Of course, if we want to think about simple application layer design, considering that these contents are already very difficult. However, we consider the question of how to design an embedded operating system, so let's also take a look at what is included in the general cpu. In this way, as long as you have mastered the design and implementation of a cpu, the knowledge of other cpu will be comprehended.
Any cpu, no matter what the function is completed, usually has these basic designs:
(1) Registers
Stack register
Pc register
Status register
Arithmetic register
Registers are the basic resources inside the CPU. No matter when the cpu code is executed, these resources are shared, so these registers need to be protected when the cpu breaks, function calls, and thread switches. The basic measure is to save them to the temporary stack. When to go. The stack register records where the current stack is used, the pc register keeps track of where the current code has run, where the next instruction is, and so on. The status register saves the current execution of the CPU, including whether the calculation overflows, whether the interrupt is off or on, whether there is an o divisor exception, and so on. As for the arithmetic register, it varies depending on the CPU, and some cpu registers are relatively few, for example x86 registers; some cpu registers are more, such as powerpc. The use of arithmetic registers is used for many purposes, such as data access, calculations, shifting, returning calculation results, and so on.
(2) Instruction set
Addressing instructions
Math operation instructions
Logical operation instructions
Soft interrupt instruction
Jump instruction
Remote call instruction
Io access instructions
Stack operation instructions
The instruction set directly determines the type of a particular CPU. Just as intel and amd produce cpu though there are differences, but their cpu uses the x86 instruction set, and the marwell, samsung, and qualcomm production cpu are certainly different, but their instruction set is the arm instruction set. So, if the software runs on marwell, it can generally run on Samsung. The instruction set is very complicated and has many contents. But generally speaking, the above contents are all kinds of instructions that cpu must complete. Of course, the most important thing is interrupt and stack processing instructions.
(3) Interrupts and exception handling mechanisms
No matter what cpu, the content of the interruption is indispensable. Just think about it, if a cpu only knows to keep running, its execution efficiency is actually very low. Having an interrupted CPU not only allows the CPU to deal with more peripheral IOs, but also greatly improves the efficiency of its own operation. Different methods of handling CPU interrupts are similar. In the entire CPU address space, there is usually an interrupt vector table in the lower address area. Each entry in the table records the processing function corresponding to each interrupt. Therefore, as long as the interrupt occurs, the CPU will first push the next pc address onto the stack, and then jump to the corresponding processing function executed at the corresponding interrupt address in the interrupt vector table. This process is done automatically by the cpu and does not require us to care. This way, for us, it is actually no different from the function call in the cpu. After waiting for the interrupt handler to complete, we use the ret instruction to return to the previously pushed IP address and continue with the following code. The whole process is like the interruption did not happen at all.
Therefore, the understanding of cpu is mainly to understand the register, instruction set and interrupt. With an in-depth understanding of interrupts and stacks, there is actually no difficulty. In software development, design is actually the most difficult, and the rest is development and debugging.
Bacteria are everywhere in our daily lives. Mobile phones have become an indispensable item for us. Of course, bacteria will inevitably grow on the phone screen. The antimicrobial coating used in our Anti Microbial Screen Protector can reduce 99% of the bacterial growth on the screen, giving you more peace of mind.
Self-healing function
The Screen Protector can automatically repair tiny scratches and bubbles within 24 hours.
Clear and vivid
A transparent protective layer that provides the same visual experience as the device itself.
Sensitive touch
The 0.14mm Ultra-Thin Protective Film can maintain the sensitivity of the touch screen to accurately respond to your touch. Like swiping on the device screen.
Oleophobic and waterproof
Anti-fingerprint and oil-proof design can help keep the screen clean and clear.
If you want to know more about Anti Microbial Screen Protector products, please click Product Details to view the parameters, models, pictures, prices and other information about Anti Microbial Screen Protector products.
Whether you are a group or an individual, we will try our best to provide you with accurate and comprehensive information about Anti Microbial Screen Protector!
Antimicrobial Screen Protector, Anti-microbial Screen Protector, Anti-bacterial Screen Protector, Antibacterial Screen Protector,Anti-microbial Hydrogel Screen Protector
Shenzhen Jianjiantong Technology Co., Ltd. , https://www.hydrogelprotectivefilm.com