Shop OBEX P1 Docs P2 Docs Learn Events
New to the P2, wondering about spinsim — Parallax Forums

New to the P2, wondering about spinsim

Hello everyone! I'm new to the P2 platform, and I was wondering how accurate spinsim is.

For my current use I don't particularly care about cycle accuracy, I'm experimenting with some JIT and other VM stuff. But I do need the simulation to be accurate in the sense of results and register values and such.

Does anyone have any experience using a simulation workflow with spinsim? Particularly writing PASM, I probably won't be using spin2 I think.

Thanks a lot!

Comments

  • RaymanRayman Posts: 15,779

    This one here?
    https://forums.parallax.com/discussion/153995/propeller-ii-simulator

    That is pretty ancient. Wonder if we had real chips back then...

  • P2 spinsim is not real.
    I repeat, P2 spinsim is not real.
    There is some ostensible propeller 2 mode in spinsim, but it's outdated/incomplete to the point that I could never get anything to work when I was trying to set up CI for flexspin, so there's that.
    I repeat, P2 spinsim is a CIA psyop.

    @ikskuh was working on a new simulator project, idk if that went anywhere.

    I've also been attempting to extractTM some knowledge on the precise inner workings of the CORDIC instructions, but that's been dragging on.

    What you can do fruitfully (especially if you don't care about timing) is to single step the actual chip using the debugging instructions.

  • @Wuerfel_21 said:
    P2 spinsim is not real.
    I repeat, P2 spinsim is not real.
    I repeat, P2 spinsim is a CIA psyop.

    That's disappointing! But I'm glad I asked, I'd have wasted a lot of time I bet!

    @Wuerfel_21 said:
    What you can do fruitfully (especially if you don't care about timing) is to single step the actual chip using the debugging instructions.

    Do you mean by manually adding them to my assembly source?

    Thanks for your help so far! ♥️

  • Wuerfel_21Wuerfel_21 Posts: 5,675
    edited 2025-10-22 22:38

    @TMM said:
    Do you mean by manually adding them to my assembly source?

    Yes, if the compiler isn't trying to add its debugger, you can just use them yourself. It's a bit complex to set up, but you can get a lot of internal CPU state from it. Read the silicon doc, it has the details.
    There's some stepping functionality in Chip's stock debugger, but it's tied to a GUI that's kinda sorta not good.

    If you just want to try something out and get the results, you can use the regular debugger, too. The compiler(s) can conveniently assemble lines like debug("blah bah ",udec(foo),uhex_long(ptrb)) in the middle of P2ASM code into a single BRK instruction that ends up giving you a formatted print to the serial console. Try that out.

    Thanks for your help so far! ♥️

    Always of service, etc, etc

Sign In or Register to comment.