UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
2,708 Views
Registered: ‎05-31-2015

Microblaze ISR return

Jump to solution

Hello,

    

     I am using microblaze processor in Spartan 6 FPGA. I have enabled an interrupt in it. The ISR is functioning properly. But I am having a requirement such that the ISR should return to a different point than point from being called in C code in certain cases. Suppose ISR is executing within one while loop say A , it should return to another while loop say B in certain cases. Is there any method in which I could do this? Any suggestions welcome.

 

Thanks in advance

 With Regards

Shalini

 

 

 

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
4,706 Views
Registered: ‎09-05-2007

Re: Microblaze ISR return

Jump to solution

An advantage of using an FPGA is that you don't have to do everything (anything) in a processor. If you have a time critical function then you can implement that using more dedicated logic. That logic could be a dedicated peripheral to your MicroBlaze or it could be another processor such as a PicoBlaze with its interrupt response measured in in nanoseconds rather than microseconds.

 

Indeed, many engineers have recognised the advantages of combining multiple PicoBlaze 'controllers' with a larger MicroBlaze processor. Some cases are to address the need to service and interrupt quickly. At the other end of the spectrum, PicoBlaze can be left to deal with something that takes place slowly (e.g. human interaction or printing a document) allowing the larger MicroBlaze to concentrate on the main task without interruptions.

 

Ken Chapman
Principal Engineer, Xilinx UK
0 Kudos
4 Replies
Xilinx Employee
Xilinx Employee
2,689 Views
Registered: ‎09-05-2007

Re: Microblaze ISR return

Jump to solution

What you are describing certainly goes against the concept of servicing an interrupt and definitely has the potential to lead to unreliable operation. As such, I think every interrupt should be serviced and return to the point that it occurred to continue.

 

To achieve something similar to what you are looking for then I would make the interrupt service routine (ISR) put a ‘token’ somewhere (e.g. load a register or memory location with a particular value). The processing loop ‘A’ in the main program would contain a check for that ‘token’ and invoke a premature end to loop ‘A’ in a controlled manner. Likewise, the next higher level of the program would be able to check the ‘token’ to recognise that loop ‘A’ had been prematurely abandoned in response to an interrupt and then invoke loop ‘B’.

 

Ken Chapman
Principal Engineer, Xilinx UK
0 Kudos
Explorer
Explorer
2,687 Views
Registered: ‎05-31-2015

Re: Microblaze ISR return

Jump to solution

Sir,

 

Thank you for reply.

 

In my case the interrupt routine is extremely time critical. I want it to execute every 18us. It is a timer interrupt. so if I am enabling lines in while loop then the ISR is not executing every 18us strictly. 

 

With Regards

Shalini

0 Kudos
Xilinx Employee
Xilinx Employee
4,707 Views
Registered: ‎09-05-2007

Re: Microblaze ISR return

Jump to solution

An advantage of using an FPGA is that you don't have to do everything (anything) in a processor. If you have a time critical function then you can implement that using more dedicated logic. That logic could be a dedicated peripheral to your MicroBlaze or it could be another processor such as a PicoBlaze with its interrupt response measured in in nanoseconds rather than microseconds.

 

Indeed, many engineers have recognised the advantages of combining multiple PicoBlaze 'controllers' with a larger MicroBlaze processor. Some cases are to address the need to service and interrupt quickly. At the other end of the spectrum, PicoBlaze can be left to deal with something that takes place slowly (e.g. human interaction or printing a document) allowing the larger MicroBlaze to concentrate on the main task without interruptions.

 

Ken Chapman
Principal Engineer, Xilinx UK
0 Kudos
Explorer
Explorer
2,656 Views
Registered: ‎05-31-2015

Re: Microblaze ISR return

Jump to solution

Thank you for reply sir.  I dont have picoblaze ,only microblaze.

0 Kudos