Shop OBEX P1 Docs P2 Docs Learn Events
What's the state of Propeller Simulators? — Parallax Forums

What's the state of Propeller Simulators?

potatoheadpotatohead Posts: 10,261
edited 2011-02-20 14:29 in Propeller 1
For a time, I used GEAR.

I'm in a position now where I would like to write some basic code, don't need it to run on a Prop, but I do need to see basic outputs, such as just a pin state, or a serial text output.

There are some projects, but I've not followed them closely. Can a few of you, who are either doing this, or are interested / following the work to date, summarize what we have today?

Is it possible to just write SPIN + PASM and have it execute on a emulation and be somewhat productive?

I want to do things like write small PASM loops, and just insure that program flow and result are what is expected. Nothing complex, or bleeding edge.

Comments

  • jazzedjazzed Posts: 11,803
    edited 2011-02-20 12:37
    potatohead wrote: »
    Is it possible to just write SPIN + PASM and have it execute on a emulation and be somewhat productive?

    Dave Hein's SpinSim has several nice features for code (no physical pin emulations).
    It is a productive environment for me; I prefer the command line environment in many ways.

    SpinSim has "List executed instruction" ability, but it could be a little more verbose especially regarding source and destination values. I use my debugger when I want full interactive access to the simulation for debugging code.
    SpinSim Version 0.25
    usage: spinsim [options] file
    The options are as follows:
         -l  List executed instructions
         -p  Use PASM Spin interpreter
         -#  Execute # instructions
         -P  Profile Spin opcode usage
         -m# Set the hub memory size to # K-bytes
         -c  Enable cycle-accurate mode for pasm cogs
    

    BMA debugger example:
    C:\Propeller\spinsim025>spinsim BMADebugger_Demo.binary
    Starting BMA Debugger task 0 Main Task
    Starting BMA Debugger task 1
    
    
    BMA Debugger Task 0
    T0.PC 008 Ok> l
    
    T0.PC 008 .      : jmp     5C7C000F   N D:000  083C01F3 S#00F
    T0.PC 009 nop    : nop     00000003   N D:000  083C01F3 S:003  08BC0BF5
    T0.PC 00A nop    : nop     00000039   N D:000  083C01F3 S:039  00000000
    T0.PC 00B nop    : nop     00000000   N D:000  083C01F3 S:000  083C01F3
    T0.PC 00C nop    : nop     00000000   N D:000  083C01F3 S:000  083C01F3
    T0.PC 00D nop    : nop     00000000   N D:000  083C01F3 S:000  083C01F3
    T0.PC 00E nop    : nop     00000000   N D:000  083C01F3 S:000  083C01F3
    T0.PC 00F .      : or      68FFEC83     D:DIRA 00000000 S#083
    T0.PC 010 .      : mov     A0BC1BF0     D:00D  00000000 S:PAR  000022F0
    T0.PC 011 .      : mov     A0BC1DF0     D:00E  00000000 S:PAR  000022F0
    T0.PC 012 .      : add     80FC1C04     D:00E  00000000 S#004
    T0.PC 013 .      : rdlong  08BC180E     D:00C  00000000 S:00E  00000000
    T0.PC 014 .      : mov     A0BC160C     D:00B  00000000 S:00C  00000000
    T0.PC 015 .      : add     80FC1810     D:00C  00000000 S#010
    T0.PC 016 .      : cmp     863C180B Z N D:00C  00000000 S:00B  00000000
    T0.PC 017 .      : wrbyte  003C180C   N D:00C  00000000 S:00C  00000000
    T0.PC 008 Ok>
    T0.PC 008 .      : jmp     5C7C000F   N D:000  083C01F3 S#00F           D=000  083C01F3
    T0.PC 00F Ok> l
    
    T0.PC 00F .      : or      68FFEC83     D:DIRA 00000000 S#083
    T0.PC 010 .      : mov     A0BC1BF0     D:00D  00000000 S:PAR  000022F0
    T0.PC 011 .      : mov     A0BC1DF0     D:00E  00000000 S:PAR  000022F0
    T0.PC 012 .      : add     80FC1C04     D:00E  00000000 S#004
    T0.PC 013 .      : rdlong  08BC180E     D:00C  00000000 S:00E  00000000
    T0.PC 014 .      : mov     A0BC160C     D:00B  00000000 S:00C  00000000
    T0.PC 015 .      : add     80FC1810     D:00C  00000000 S#010
    T0.PC 016 .      : cmp     863C180B Z N D:00C  00000000 S:00B  00000000
    T0.PC 017 .      : wrbyte  003C180C   N D:00C  00000000 S:00C  00000000
    T0.PC 018 NZ     : djnz    E4D41816     D:00C  00000000 S#016
    T0.PC 019 .      : xor     6CFFE801     D:OUTA 00000000 S#001
    T0.PC 01A .      : test    637FE803 ZCN D:OUTA 00000000 S#003
    T0.PC 01B Z      : mov     A0E81411     D:00A  00000039 S#011
    T0.PC 01C C      : mov     A0F01422     D:00A  00000039 S#022
    T0.PC 01D .      : xor     6CFFE801     D:OUTA 00000000 S#001
    T0.PC 01E .      : test    637FE803 ZCN D:OUTA 00000000 S#003
    T0.PC 00F Ok> b 19
    
    T0.PC 00F Ok> g
    T0.PC*019 .      : xor     6CFFE801     D:OUTA 00000000 S#001           D=OUTA 00000001 Z
    T0.PC 01A Ok> b 20
    
    T0.PC 01A Ok> a
    
    T0.PC 01A .      : test    637FE803 ZCN D:OUTA 00000001 S#003           D=OUTA 00000001 C
    T0.PC 01B Z      : mov     A0E81411     D:00A  00000039 S#011           D=00A  00000039 C
    T0.PC 01C C      : mov     A0F01422     D:00A  00000039 S#022           D=00A  00000022 C
    T0.PC 01D .      : xor     6CFFE801     D:OUTA 00000001 S#001           D=OUTA 00000000 C
    T0.PC 01E .      : test    637FE803 ZCN D:OUTA 00000000 S#003           D=OUTA 00000000 Z
    T0.PC 01F Z      : mov     A0E81433     D:00A  00000022 S#033           D=00A  00000033 Z
    T0.PC*020 Ok>
    
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-02-20 14:29
    You can download SpinSim at http://forums.parallax.com/showthread.php?127976-Spin-Simulator . It supports serial and file I/O through the use of the conio.spin and fileio.spin objects. I provide a Windows DOS exe file, but it can also be compiled to run under linux.

    Dave
Sign In or Register to comment.