Page 1 of 1

Force Interrupt during simulation

Posted: Fri Aug 17, 2012 12:07 pm
by Jay Dee
I should start this by saying this might be influenced by my Laptop getting slower. (could do with a spring clean)

When simulating, any Timer based interrupts seem to be quite random and often have large delays. I'm often waiting for the timer interrupt to overflow and trigger a part of the program.
At other times the interrupt Macro keeps triggering as i'm trying to step though a tricky bit of the program.

If these are a general problem that others also experiance, could a future feature allow you to manually trigger or stop a timer interrupt during simulation.

As ever, I remember the following from my support days "Requesting something is easy, implementing it is the hard bit" :D
J.

Re: Force Interrupt during simulation

Posted: Fri Aug 17, 2012 12:16 pm
by Enamul
HI,
I have experienced similar problem in simulation especially when any counter is used to modify freq of tasks. It would be really good if real-time scenario could be found in FC..may be tough as you said. Good to expect those from the talented team.. :)
For the time being you can try in Real PIC as it provides you real time simulation..I am now-a-days use this for TMR interrupts..pretty satisfied with its performance.
Enamul

Re: Force Interrupt during simulation

Posted: Mon Aug 20, 2012 9:27 am
by DavidA
Hi,

A manual push button for triggering interrupts is something we would like to do, as for getting a better simulation performance, have you tried closing down other programs running on your laptop to see if that helps? Or slowing the simulation speed?

Re: Force Interrupt during simulation

Posted: Mon Aug 20, 2012 2:09 pm
by Jay Dee
Hi,
Just ran a basic test. Using FC 5.4.0.0 and simulating a MIAC based project, uses a single TMR interupt with rollover at ~45Hz.
The Laptop is not that slow, it will mix two live audio fixes without any glitches and my little latency checker has reckons the system is responding in about 250 uS.

I have historically found the simulation speeds to run quite slow, anything greater than 10 steps per second and there is little or no discernible increase in execution speed. The XP performance monitor has the CPU running at ~50%, irrespective of running at 10 steps per second or 1000 steps per second.
Regarding the execution of the Interrupt, I have an LCD update which runs once for every 8 roll overs of the TMR interupt. (45/8=5.6Hz)
To get this to work anywhere near expected I need to always simulate in 'fast as possible mode' and it updates every 2 or 3 seconds.
Any ideas? As this does seem quite slow and whilst its not a super quick machine I'm not seeing any huge slowdowns in my other applications.
Might need to run one of those horrible performance utilities that usually just stuff the machine completely...hmm. :?
J.