Hot!Simulator Speed

Author
cgoldader
New Member
  • Total Posts : 13
  • Reward points : 0
  • Joined: 2018/06/06 14:45:07
  • Location: 0
  • Status: offline
2018/07/04 14:45:30 (permalink)
0

Simulator Speed

Hi all,
 
I've been working on simulating a PIC24 in the MPLABX simulator for about a month, and have been making great progress! (Check out the Zipcar Github if you want to take a look at the open source stuff I've been working on wink: wink) Unfortunately, the speed of the simulator has been causing my development to slow pretty significantly. I'm running the simulator on a c4.xlarge in AWS, and have only been hitting around 70% CPU usage max, as reported by New Relic. Is there any way I can give MPLABX a little *push* so it tries to pull more system resources, in order to increase my simulator speed? I can scale up my instance to something more beefy if need be, but seeing as the simulator isn't trying to use more resources, I'm not sure where to turn.
#1

7 Replies Related Threads

    dan1138
    Super Member
    • Total Posts : 2896
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Simulator Speed 2018/07/04 16:53:49 (permalink)
    +1 (1)
    If you are not running the MPLABX simulator in a Linux environment check out if you can try that.
     
    In my experience the MPLABX simulator very slow in the Windows environment when compared to the MPLAB v8.92 simulator on the same workstation simulating the same code.
     
    This is most likely the result of Microchip rewriting the simulation tools for MPLABX. The rumor is that the engineer that created the simulation tools MPLAB v8.92 left the company before the MPLABX project and the simulation tools group did not want to take on the technical debt without support from the creator.
    #2
    cgoldader
    New Member
    • Total Posts : 13
    • Reward points : 0
    • Joined: 2018/06/06 14:45:07
    • Location: 0
    • Status: offline
    Re: Simulator Speed 2018/07/04 17:06:07 (permalink)
    0
    Dan, thanks for the suggestion and info. My AWS instance is currently running Ubuntu 16.04 already, and my personal machine is running MacOS (sim is pretty slow on both of them).
    #3
    NorthGuy
    Super Member
    • Total Posts : 5101
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: Simulator Speed 2018/07/04 19:10:01 (permalink)
    +1 (1)
    You always can get bigger processor and faster memory. However, hardware progress is not that fast anymore and cannot keep up with the ongoing software bloat.
    #4
    BangingMyHead
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2008/11/10 05:52:53
    • Location: 0
    • Status: offline
    Re: Simulator Speed 2018/07/09 09:57:32 (permalink)
    +2 (2)
    In my opinion, MPLABx is a step backwards.
    It is so S-L-O-W at everything.
    The simulator, that was so useful and fast on MPLB8, is now virtually useless.
    X takes about 30 seconds to step over a NOP();
    (And that is without any watch windows or active watches, and yes, multi - core processes is enabled).
    Simulating  so painful, it is virtually useless.
    With Real Ice, Loading the debug code is slow, stepping over functions is pedestrian.
    All in all, i recon it is taking me at least 5x longer to develop code for PIC's.
    I have been working with MPLBx for a couple of years now, and i whenever i can i port back to MPLAB8, for speed of development.
    Unfortunately, i am able to this less and less, as we are working with some of the newer pics that mplab8 has no support.
    I have also developed projects using ATMEL Sams.
    Atemel Studio 7 is a superb IDE.. I just hope that Microchip  dont abandon this in favour of the netbeans IDE which is a bloated monster.
    Yes, there are a couple of nice feature in X - but to me, speed is king.
    post edited by BangingMyHead - 2018/07/16 14:29:19
    #5
    GeorgePauley
    Moderator
    • Total Posts : 1019
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: online
    Re: Simulator Speed 2018/07/09 16:07:35 (permalink)
    +2 (2)
    Normally virus checkers are the culprit.  But you're not running windows, so I doubt that is the issue.  We typically get 1-2 MIPS out of the simulator on our Windows machines.  You could switch to running real hardware at a higher frequency, but there is a trade off for programming and connect time that you don't experience with the simulator .
     
    How many instructions are you needing to run to execute your tests?
    #6
    cgoldader
    New Member
    • Total Posts : 13
    • Reward points : 0
    • Joined: 2018/06/06 14:45:07
    • Location: 0
    • Status: offline
    Re: Simulator Speed 2018/07/11 20:04:45 (permalink)
    +1 (1)
    George, 
    We were hoping to achieve near real-time speeds with the simulator, and we run our PIC at 30 MIPS in production. When lucky, I've been hitting ~4 MIPS on my linux machine, which isn't fast enough. If I could reach ~25 MIPS that'd probably be sufficient, but I understand that there may be limitations for how fast the simulator can run; please let me know if you think my expectation is unreasonable. 
    post edited by cgoldader - 2018/07/11 20:29:27
    #7
    GeorgePauley
    Moderator
    • Total Posts : 1019
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: online
    Re: Simulator Speed 2018/07/13 09:20:13 (permalink)
    0
    I am shocked, and elated, to hear that you are getting 4 MIPS!  I don't think you can realistically expect any faster.
     
    I do wonder if you might not get some faster speed running the simulator through MDB instead of MPLAB X.  MDB is a command line debugger (that ships with MPLAB X).  You'll run the same simulator, but without all the NetBeans overhead.
    #8
    Jump to:
    © 2018 APG vNext Commercial Version 4.5