Interrupt Measurements are all the same

Interrupt Measurements are all the same

par Dominic Robert Heinrich Hagmann,
Number of replies: 2

Hello I had a question concerning the measurement of interrupt latency, response and recovery with the Signal Tap logic analyzer. Now I'm quite astonished by my values I find. They show no dependence on cache on/off and also on-chip memory vs SDRAM. Is that even possible?

Measurement_Values_LogicAnalyzer_SignalTap_NiosII_Plugin

For measurement I used the Signal Tap logic analyzer with the niosII plugin, which gives access to program counter and current instruction run by the processor. An example is the image below: This image shows how I measured interrupt latency. Similarly for the response and recovery time, I picked the point where the pc jumps to new memory part.

GPIO1: Pin I toggle in main task
GPIO2: Pin I toggle once in ISR
IRQ: IRQ signal from library timer. Is the source of the interrupt.

In reply to Dominic Robert Heinrich Hagmann

Re: Interrupt Measurements are all the same

par Sahand Kashani-Akhavan,

Hi,

Just wanted to know if in your sdram measurements you had both the on-chip memory and the sdram present in the qsys system? If yes, then one possible explanation for your timings is that the nios compiler is placing its reset and exception handling code in the on-chip memory (even if you have an sdram). If you truly want to test what the interrupt latency, response, and recovery times are with an sdram, you need to be sure that the nios compiler is placing its reset and exception handling code in the sdram as well.

You can check if this is happening by right-clicking on the BSP project in eclipse and checking the "linker script" tab (or something like that, unfortunately I don't have the tools installed on my machine to check myself). In the "linker script" tab there should be some entries that are grayed out and that you cannot change, and other entries that you can change. For the entries you can change, it should give you the option between on-chip and sdram. But for the reset and exception vectors, the options should be grayed out. If you want to change those entries, you need to go in qsys and select the nios processor, then change its reset and exception vectors there to point to the sdram. Then rebuilding the BSP project should give  you a linker script where those 2 previously-grayed-out interrupt vectors point to the sdram.

Check the stuff above, then re-measure your timings when everything is running on the sdram. It should be much slower (I can't explain why your cache/no cache timings are not different though).

In reply to Sahand Kashani-Akhavan

Re: Interrupt Measurements are all the same

par Dominic Robert Heinrich Hagmann,

Hey,

Thank you for your quick answer. I went again over everything and in the end I found out that I was actually always testing the system with a running cache. I confused the options in the NiosII window of the Platfrom designer and thought the  field Disabled would mean that it turns off the Cache. Instead it was only disabling the burst access. After setting the Cache size to 0 it worked.