 |
|
 |
| Parallax Forums > Public Forums > SX Microcontrollers, SX/B Compiler and SX-Key Tool > SXSim for MS Windows | Forum Quick Jump
|
|  Guenther Daubach Registered Member

       Date Joined Jul 2004 Total Posts : 1333 | Posted 10/23/2004 4:00 AM (GMT -7) |   | Hi Folks,
from this post, you can download the latest version of my SX Simulator for MS Windows.
To install it, just un-zip the files into any folder, and run it from there. If you like, you may manually put a shortcut to SXSimW on your desktop.
You will find the documentation in a separate ZIP file, attached to this post.
SXSim is by no means complete yet, and I'll add more features when I have the time.
Have fun!
In order to keep this post at moderate length, I have decided to strip down the software history and comments section to only contain the most recent two entries. From now on, you will find the complete history attached to the end of the documentation. Therefore, whenever I post a new software version, I will also post a new doc file in the future.
Remarks:
Added June 24, 2006: This new version 2.08.05 comes with the following fixes/enhancements:
- internal program counter is now displayed - "odd" clock frequencies are now handled correctly - SKIP handling corrected
Added December 12, 2006: This new version 2.08.06 comes with the following fixes/enhancements:
- When WREG is mapped into address $01, the contents of RTCC will be shown in a separate field - In RUN mode, the list display no longer jumps to the first line - When SXSim is terminated with the main window minimized, it will be re-opened with its default size when invoked again later - When TRIS bits are changed, the I/O Panel is correctly updated in "Run" mode now - Breakpoints now work correctly on targets of JMP w instructions - Wrong cycle count of skip instructions (2 instead of 3 in case of a skip) fixed - SKIP status display fixed, it will now only be highlighted when a skip instruction actually causes a skip - New "Run to Right-Clicked", and "Jump to Right-Clicked" modes - New status display in the Commands window indicating the current mode of SXSim ("Idle", "walking", or "running")
When your version of SXSim was auto-installed together with the latest SX-Key software, make sure to install the new SXSim files into the Tools\SXSim folder located in the main SX-Key folder (usually Program Files\Parallax Inc\SX-Key v3.1\Tools\SXSim). Greetings from Germany,
GüntherPost Edited (Guenther Daubach) : 12/12/2006 6:08:12 PM GMT
File Attachment : SXSim Manual_2_08_06.zip 159KB (application/x-zip-compressed)This file has been downloaded 945 time(s). File Attachment : SXSim_2_08_06.zip 106KB (application/x-zip-compressed)This file has been downloaded 939 time(s). | | Back to Top | | |
 |  simon Registered Member
        Date Joined Aug 2004 Total Posts : 20 | Posted 10/23/2004 5:56 AM (GMT -7) |   | Hi!
Does this Version support the output from Bytecrafts SXC Compiler ? Last time i tried it all i got was an error message after reading the sxc generated file.
Bye, Simon | | Back to Top | | |
  |  Peter Verkaik Registered Member
        Date Joined Jul 2004 Total Posts : 3985 | Posted 10/23/2004 6:37 PM (GMT -7) |   | Gunther,
When I load a SASM produced .lst file from a program
that I currently run (so it works) the SXSIM produces:
Laufzeit fehler 11
Division durch null
What happens here?
regards peter
| | Back to Top | | |
  |  Guenther Daubach Registered Member

       Date Joined Jul 2004 Total Posts : 1333 | Posted 10/24/2004 3:42 AM (GMT -7) |   | | Peter,
thanks for sending the .LST file. The error was caused because SXSim cannot handle freq directives like
freq RESONATOR * 1000000, i.e. expressions, but numerics like 50000000, or 50_000_000 only.
I have changed SXSim in a way that it ignores such expressions. In this case, it does not calculate execution times.
This new version of SXSim is 1.41, and I have appended a new ZIP file to my original posting with this version.
Greetings from Ger many,
Günther | | Back to Top | | |
 |  Guenther Daubach Registered Member

       Date Joined Jul 2004 Total Posts : 1333 | Posted 10/24/2004 3:47 AM (GMT -7) |   |
simon said... Hi!
Does this Version support the output from Bytecrafts SXC Compiler ? Last time i tried it all i got was an error message after reading the sxc generated file.
Bye, Simon Simon,
thanks for sending me the sample files. Unfortunately, the LST files created by the Bytecraft SXC Compiler have a completely different format as the ones generated by SASM (thy only contain C code, no assebmly mnemonics). Therefore, SXSim cannot handle these files at all.
Maybe, the Compiler has an option to generate Assembly source files which you can then run through SASM to achieve a .lst file that can be handled by SXSim.
Greetings from Ger many,
Günther | | Back to Top | | |
 |  Peter Verkaik Registered Member
        Date Joined Jul 2004 Total Posts : 3985 | Posted 10/24/2004 4:26 AM (GMT -7) |   | Gunther,
I changed the lines
resonator equ 20
freq resontor*1000000
into
resonator equ 20
freq 20_000_000 ;equ resonator*1000000
and now the .lst file loads.
thanks.
regards peter
| | Back to Top | | |
  |  Jim Brain Registered Member
        Date Joined Oct 2004 Total Posts : 17 | Posted 10/26/2004 1:24 PM (GMT -7) |   | I'm not sure if this is a bug, or just my lack of understanding of the RTCC
I have a piece of code (the dualuart VP) that does:
mov w,#RTCC_ON | RTCC_PS_OFF ;setup option register mov !option,w
After that command, the RTCC starts going up in SxSim. However, since I don't want IRQs enables, I changed it to:
mov w,#RTCC_ON | RTCC_ID | RTCC_PS_OFF ;setup option register mov !option,w
But then the RTCC does not increment is SxSim.
The EQUs are:
RTCC_ON =%10000000 ;Enables RTCC at address $01 (RTW hi) ;*WREG at address $01 (RTW lo) by default RTCC_ID =%01000000 ;Disables RTCC edge interrupt (RTE_IE hi) ;*RTCC edge interrupt (RTE_IE lo) enabled by default
Jim | | Back to Top | | |
  |  TrapperBob Registered Member
        Date Joined Sep 2004 Total Posts : 44 | Posted 11/4/2004 5:32 PM (GMT -7) |   | Hi Guenther,
Is the 142 version meant to work on XP?
I am getting a message:
Component Comdlg32.ocx or one of its dependencies not correctly registered: a file is missing or valid
This Xp install is fresh and working fine otherwise
Thanks Trapper | | Back to Top | | |
  |  Guenther Daubach Registered Member

       Date Joined Jul 2004 Total Posts : 1333 | Posted 11/14/2004 11:35 AM (GMT -7) |   | Hi Folks,
I have uploaded a new version of SXSim (1.43) - you'll find it in the topmost post of this thread. In this version I fixed a bug which under certain situations caused shifting in and out the carry flag incorrectly with RR and RL instructions (and maybe, other bit-related operations either).
Two bugs met in a program. Says the first one: "My programmer is searching for me since two weeks." Says the other one: "Ha, my programmer does not even know that I exist."
I'm pretty sure that there are some of these still living in SXSim, so your bug reports are always welcome.
Greetings from Ger many,
Günther | | Back to Top | | |
  |  Guenther Daubach Registered Member

       Date Joined Jul 2004 Total Posts : 1333 | Posted 12/8/2004 11:15 AM (GMT -7) |   | One day later...
Another version of SxSim (1.45).
Thanks to Jonathan, the current SxSim "Power Tester", I could fix another SxSim bug. This was a tricky one because in former versions, I made SxSim behave like I liked the SX to behave.
Here is an example:
org $100 page table mov W, #1 jmp PC+W jmp state_1 jmp state_2
org $200 table = $ state_1 ; ; some code ; state_2
It would be nice to have the initial "page table" instruction prepare the page bits for the jump table instructions following the "jmp PC+W" instruction i.e. have the "jmp PC+W" ignore the page bits (like SxSim did).
In "real SX silicon", this is not the case, i.e. the "jmp PC+W" respects the page bits, so that the next instruction following the "jmp PC+W" is executed at address $201 but not the "jmp State_2" at address $104 as one might expect/hope/wish.
SxSim now handles this like the "real" SX does (with the advantage that you get a warning message in case the jump should end in "nirvana").
I also received some bug reports that SxSim did generate a type mismatch run-time error at start-up. This is caused by the different date-time formats depending on the country settings of Windows. Should you run into this problem, simply delete any *.SIM files in the folders where you have the *.LST files for simulation. The next time, SxSim saves *.SIM files, they will contain the time-date information of the assiciated *.LST file in the format that matches your Windows country settings.
Thanks to all of you helping to improve SxSim! Greetings from Germany,
Günther | | Back to Top | | |
   |  Guenther Daubach Registered Member

       Date Joined Jul 2004 Total Posts : 1333 | Posted 12/11/2004 3:19 PM (GMT -7) |   | Hello Peter,
although I'm used to be up at nights, this time, I did it Saturday morning. Thanks to your clear description, I knew what had to be done. I hope the simulation reflects how the "real" SX performs on these "secret" instructions.
When I have the time, I'll test-run them on a "real" SX, and compare the results to what SxSim does.
A set of simple macros to have mnemonics instead of DW directives for such secret instructions would be fine. Maybe, our "MOM", i.e. Master Of Macros, James Newton has some in the drawer  Greetings from Germany,
Günther | | Back to Top | | |
    |  Peter Verkaik Registered Member
        Date Joined Jul 2004 Total Posts : 3985 | Posted 1/2/2005 7:12 AM (GMT -7) |   | |
Gunther,
I use version 1.53 and have a problem with break points.
Using my latest test.src file (post smallc compiler) it appears
a set breakpoint s ignored. I set a breakpoint at label :zero_end
(just after clearing memory) but walk and run modes simply continue.
Can you confirm this?
Also, hitting the reset button, does that clear breakpoints or are these
only to be cleared by hitting CLR BP ?
Also, when using find label, when the label is found, the sxsim window is
repositioned on the screen. I use 800x800 resolution and the window
is normally positioned with the titlebar at the top. After a find label
the window moves down to about 25% from the top of the screen.
This also happens when I display the I/O panel and then hide
the I/O panel.
regards peter
Post Edited (Peter Verkaik) : 1/2/2005 2:21:39 PM GMT | | Back to Top | | |
  |  David B Registered Member
        Date Joined Jul 2004 Total Posts : 382 | Posted 1/3/2005 11:44 AM (GMT -7) |   | Hello Gunther,
I just started using SXSim - it is great! It is amazing how it opens up the entire workings of the process right in front of my eyes! I've already used it to tune up a few badly-coded routines.
I've used it on Windows NT 4.00, where it works fine. My Windows 95 laptop was lacking the file comdlg32.ocx but I copied the WinNT file and it worked.
Minor suggestion - I'm getting lazy about initializing RAM because the SxSim zeroes RAM for me, unlike the actual chip, according to documentation.
What about having SxSim explicitly write random values into the simulated RAM locations and those registers that power-up to "undefined" in the real chip?
This would force code to initialize where it ought to, and might help detect initialization bugs for when code goes live. Maybe a checkbox could turn on this feature for final testing of a design.
David | | Back to Top | | |
 | 236 posts in this thread. Viewing Page : 1 2 3 4 5 6 7 8 9 10 | | Forum Information | Currently it is Thursday, July 29, 2010 5:22 PM (GMT -7) There are a total of 462,441 posts in 62,066 threads. In the last 3 days there were 90 new threads and 802 reply posts. View Active Threads
| | Who's Online | This forum has 20143 registered members. Please welcome our newest member, ME01. 58 Guest(s), 15 Registered Member(s) are currently online. Details John Abshier, Erik Friesen, RossH, Kevin Wood, simpsonmichael1, BradC, David Betz, Julian800, Martin Hodge, RDL2004, Harley, Sapieha, wiresalot, Ravenkallen, Tubular |
Forum powered by dotNetBB v2.42EC SP2.02 dotNetBB © 2000-2010 |
|
|