-
First, set the state of the interrupt allow trigger, there is an interrupt allow trigger inside the CPU, and only when it is "1", the CPU can respond to the interrupt. You can use the Allow Interrupt and Break Prohibit commands to set the status of the Interrupt Allow trigger. When the CPU is reset, the interrupt allow trigger also resets to "0", i.e. the interrupt is off.
When an interrupt responds, the CPU automatically shuts down the interrupt to prohibit another new interrupt from being accepted (otherwise multiple interrupts are handled), so usually at the end of the interrupt service program, there must be two instructions, the allow interrupt instruction and the return instruction.
2. The CPU responds to an interruption after the end of the current instruction.
-
When an interrupt source sends an interrupt request, both conditions must be met for the CPU to respond. The first condition is that the CPU must be in a state where interrupts are allowed, i.e., the interrupt system is open; The second condition is the time condition, when the interrupt request is sent to the CPU, the CPU cannot immediately find it, the CPU only checks the side at the last moment of each instruction cycle to check whether there is an interrupt request coming, so the interrupt request signal must have a persistence function until the CPU responds before it can be undone.
-
CPU Response Interrupt Condition:
1. There is an interrupt request issued by an interrupt source;
2. The total allowable bit of interrupt ea=1, that is, the CPU is interrupted;
3. The interrupt allowable bit of the interrupt source applying for interrupt is 1, that is, the interrupt is not shielded;
4. No interruption of the same level or higher is being served;
5. The current instruction cycle has ended.
CPU includes arithmetic logic components, register components and control components, etc., English Logic Components; The arithmetic logic component can perform fixed-point or floating-point arithmetic operations, shift operations, and logical operations, as well as address operations and transformations.
-
Answer]: When an interrupt request is made, the CPU must wait until the following two conditions are met before the CPU responds to the interrupt request.
1) The instructions currently being executed by Li You have been executed, not in the execution of Hail Tong.
2) The current program allows interrupts, i.e. the state of the interrupt allow trigger ie is 1.
During the interrupt cycle, the CPU mainly accomplishes the following operations:
1) Identify the source of the outage.
The interrupt response signal inta is sent to the interrupt source query circuit to read the interrupt source code with the highest priority.
2) Off the outage.
Allow the interrupt trigger to clear 0 and no longer respond to any interrupt requests temporarily.
3) Protect the program breakpoint address.
The instruction address of the interrupt execution, that is, the content of the program counter PC, is pushed into the stack to protect it, so that after the interrupt service is completed, it can return to the interrupt point and continue to execute the program that was canceled by the interrupt.
4) Go to the corresponding interrupt service program entry.
Based on the interrupt source code obtained from the interrupt query circuit, go to the corresponding interrupt service program entry.
-
Take a microcontroller as an example.
CPU Response Interrupt Condition:
1. There is an interrupt request issued by an interrupt source;
2. The total allowable bit of interrupt ea=1, that is, the CPU is interrupted;
3. The interrupt allowable bit of the interrupt source applying for interrupt is 1, that is, the interrupt is not shielded;
4. No interruption of the same level or higher is being served;
5. The current instruction cycle has ended.
-
Take a microcontroller as an example.
CPU Response Interrupt Condition:
1. There is an interrupt request issued by an interrupt source;
2. The total allowable bit of interrupt ea=1, that is, the CPU is interrupted;
3. The interrupt allowable bit of the interrupt source applying for interrupt is 1, that is, the interrupt is not shielded;
4. No interruption of the same level or higher is being served;
5. The current instruction cycle has ended.
-
For requests from the internal interrupt source of the CPU, you can directly transfer the interrupt cycle to the internal hardware, and the internal hardware automatically performs the scheduled operation.
For requests from CPU external interrupt sources, the following conditions must generally be met in order to respond.
The interrupt request trigger is set. Each interrupt source corresponds to an interrupt request trigger through which interrupt requests are signaled and maintained until the CPU responds.
The Interrupt Shielding trigger is in an unshielded state. In a real system with multiple interrupt sources, in order to increase the flexibility of control, an interrupt shielding trigger is often set in the interface of each interrupt source, and only when the trigger is in an unshielded state, the interrupt request can be sent to the CPU, otherwise it will be blocked.
The inside of the CPU is interrupted and open. Inside the CPU there is an interrupt allow trigger (if) and the CPU can only respond to the external interrupt if it is "1" (i.e. the interrupt is open); Otherwise the interrupt is shut down and the CPU does not respond even though there is an interrupt request on the INTR. The state of the interrupt allow trigger is usually changed by the STI and CLI directives (set "1" or clear "0").
When the CPU is reset, the interrupt allows the trigger to be cleared to "0", that is, the interrupt is off, so the interrupt must be turned on with the STI command; Whenever the interrupt responds, the CPU will automatically turn off the interrupt, so you must use the STI command to open the interrupt in the interrupt service program, so that it can respond to higher priority interrupt requests when the interrupt service program is executed, and can respond to new interrupt requests after the interrupt service program ends.
-
When an interrupt occurs, such as an external interrupt, it will give the CPU an electrical signal through the 8259 chip, and put the interrupt number into the specified register, the CPU will check whether there is an interrupt after executing the current instruction, if it is found that the CPU interrupt pin has a high level, then obtain the interrupt number for the register, and query the interrupt vector table according to the interrupt number to obtain the interrupt service address (the entrance of the interrupt vector is the architecture fixed +0000 ingress address + interrupt number You can get the interrupt service entry address), and then start executing the interrupt service program.
-
It's not interrupts that tell the CPU which interrupt function to execute. When the CPU detects the interrupt signal, the CPU turns to execute a function that you have preset.
-
Answer]: C The protection site includes the protection of breakpoints and the protection of the contents of other related registers in the CPU, including the task of the breakpoint is completed by the interrupt implicit instruction during the interrupt premature tremor cycle, and the task of protecting the content of other registers is completed by the interrupt service program, rather than by the interrupt implicit instruction during the interrupt cycle.
A lot, the initial cy300a OC stabilized to 450, the basic all-inclusive 500, and occasionally 700The K6-2 300 of the same period was up to 350, and it was basically 266 polished. Damaging AMD's reputation, the 300A's outflanking and various modifications to the 440BX made the 300A unbeatable in the market. >>>More
Question 1: What are the provinces in Southwest China? i.e. Sichuan Province, Yunnan Province, Guizhou Province, Chongqing Municipality, and *Autonomous Region. >>>More
A side quest in The Witcher 3 that affects the main story. >>>More
Choose the right pillow.
Although babies are not very old, they are exactly the same as adults in some aspects, such as at the sleeping level, if they have an uncomfortable pillow, they will also sleep unstable and uncomfortable like parents. Therefore, in order to allow the baby to sleep longer, parents must prepare a suitable and comfortable pillow for him. This kind of pillow is not only comfortable to hold, but also has the effect of antibacterial and anti-mite, for the baby, not only can make him sleep sweeter, but also good for his physical and mental health, which parents must understand. >>>More
Good habits are conducive to the healthy development trend of mothers and babies, in turn, it will hinder the development trend of the fetus, and even lead to difficulties in production and manufacturing. Let's find out. >>>More