Why Does the Microcontroller Delay in Calling Address 0004h?

  • Thread starter Thread starter MSI
  • Start date Start date
  • Tags Tags
    Time
AI Thread Summary
The discussion centers on the latency observed in a microcontroller when handling an interrupt request, specifically why it does not immediately call address "0004h" during the third machine cycle. It suggests that the microcontroller's pipelining may prevent immediate execution due to already decoded instructions at PC + 1, which could complicate halting the current execution. Additionally, there may be a need to save certain data or status flags before switching execution threads. The complexity of the specific processor in question further complicates a definitive answer. Overall, while the delay raises questions, it is not deemed a significant issue.
MSI
Messages
16
Reaction score
1
http://img521.imageshack.us/img521/6018/msi7cv.jpg

this graph shows a latency time diagram when an inturept request occur in a micro controller ..
i was just wondering why doesn't the micro controller in the third machine cycle call the address "0004h" directly ?
whats the use of this cycle ? ... still the micro controller can flush inst (PC+1) ,, while fetching 0004h in the next cycle ? :/
 
Last edited by a moderator:
Engineering news on Phys.org
Couple of possible reasons. First, many CPUs have a pipelines instruction. The instruction at PC + 1 is probably already decoded and execution may be difficult to stop and more effective to just let it complete. Second, the cpu may have to save some data before allowing the thread of excution to jump to another thread, such at status flags.

To better answer he question would require significant knowledge of that particular processor.
 
well the second is not possibel , because saving the registers is done through the intrupt, and the first one .. yea it do pipelining (: , but it is already shown in the figer .. and if pc+1 is a calling function .. there will be extra latency (not shown in the figure) ..

anyway it is not a big deal (: , thanks
 
Back
Top