Hi,
I don't have access to a logic analyzer and I'm trying to do the latency measurements. I was trying to use the counter start it and trigger an interrupt with it then stop the counter in the interrupt handler in C to begin with.
To do that I just added this line "IOWR(0x40800, 3, 0x0000FFFF);" at the beginning of the "alt_irq_handler.c" file in the "alt_irq_handler" function
However, it just makes the program on the NIOS crash.
When I move this line lower in the function (last line for example) the program runs fine on the NIOS but it doesn't stop the counter.
Do you have an idea of why it isn't possible to use this function in the interrupt service routine ?
(I added io.h to the included files in the alt_irq_handler includes)
Also, I'd like to valide my current results if possible before going forward, in order of magnitude, does a response time of 261 clock cycles makes sense on a NiosII/f (running the timer, triggering an interrupt at 0, reading the value once in the interrupt function and printing it in the main code)
For the recovery time I have a delay of 162 clock cycles (I am starting the timer in the interruption and reading the value as soon as I reach the main code)
I guess the point of the lab is not to have exactly the same value as the correction as it depends on the overhead of the various methods used but rather to compare the effect of the different cache types but I'm still concerned since my values are higher than the one we have on the course slide
Thanks for your time,
Regards,
Sylvain