Propeller 2 Spin - any news?
Bill Henning
Posts: 6,445
Now that I have my DE2-115 running, I am very interested in how Spin2 is doing...
Comments
Of course I am interested to hear what Chips view on P2 spin is.
I fully understand you have been too busy...
Can I ask a few questions about your spin2 thoughts?
I was interested to use my faster P1 spin as a base because it did quicker decoding freeing up valuable cog space that permited most of the other spin codes to be sped up, particularly the maths ones. I had thought that the decoding would fit in the CLUT but I now think this is better used for the stacks. The reason for this is that almost every spin code contains at least one push and a pop to/from the stack. Decoding is only once per code. Hence the speed yield will be much better using the CLUT as stacks. Do you agree?
Are you happy to use something like my vector table in hub to decode each spin code? Each spin code reads a long containing 3 addresses and 5 bits of flags from hub. The addresses are used as addresses to routines to be performed by the spin code.
Is there any extras you can think of that we could start implementing while we wait for you to get some free time?
Greater than 16 bit addresses? Maybe that has already been fixed.
I would be worried about stack growth > clut size.
Anybody could always use a different version of the interpreter if necessary though.
I was planning on sticking with byte codes for density, since RDBYTEC is pretty fast. The other certainty would be to use the stack RAM as the run-time stack That would place certain limits on call depth, but would be very efficient and fast. From where I left off, I was figuring Spin on Prop2 was going to be about 30x faster than on Prop1.
Agreed. No reason to change this.
This sounds good. I have not examined the interpreter from real usage point of view.
WOW. I thought maybe somewhere between 10x to 20x which would be very acceptable.
The biggest improvements I made was with the (simple) maths bytecodes. I also implemented your? improved multiply and divide routines. Many bytecodes also improved because I was able to inline some of the push/pop and other called routines (due to cog space restrictions).
By using LMM, some of the lesser used opcodes could be moved to LMM, leaving more room to streamline some of the bytecode execution.
- lower 64KB is used for Spin code sections (any free space could be used by PASM code as buffers)
- upper 64KB is used for DAT
- this should allow keeping to just 16 bit pointers, albeit by implementing a split I&D scheme
This may reduce the work needed to get a sub-optimal Spin running.
Wow, that's something like 15MIPS!?
I certainly exhausted code space. :frown:
I said code space. One project was a g-code decoder and x-y stepper driver (driven by one pin toggles). It was almost entirely SPIN except for the full-duplex serial driver and some data. That g-code program is lost except that I sent it to someone in email once.
Guess there may be a reason to have the 64KB version initially, and a second 64KB+ version (later - should not be restricted to 128KB as hopefully we may bet a P2B with >128KB hub in the future, if there is enough demand).
Function calls : function should be called with the ( ) at the end. Right now, I'm sometimes confused between function and variables.
Objects : It would be nice to be able to get the content of an object global variable without passing by a function call, directly with the dot operator.
Operators : I think that <= >= != would be more standard than =< >= <>
Structures : would make the code easier to understand than this
Just my 2 cent