Force Interrupt during simulation

Moderator: Benj

User avatar
Jay Dee
Posts: 352
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 116 times
Been thanked: 134 times
Contact:

Force Interrupt during simulation

Postby Jay Dee » Fri Aug 17, 2012 12:07 pm

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.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Force Interrupt during simulation

Postby Enamul » Fri Aug 17, 2012 12:16 pm

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
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
DavidA
Matrix Staff
Posts: 1056
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 274 times
Contact:

Re: Force Interrupt during simulation

Postby DavidA » Mon Aug 20, 2012 9:27 am

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?

User avatar
Jay Dee
Posts: 352
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 116 times
Been thanked: 134 times
Contact:

Re: Force Interrupt during simulation

Postby Jay Dee » Mon Aug 20, 2012 2:09 pm

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.