View Full Version : pre-emptive Multi-tasking kernel for cog's added to large model
11-11-2006, 03:27 PM
Check out page 3 of that thread. please comment there as that is the main thread; I only posted here so that people who may not care about large memory models but care about running several threads per cog will find it.
M. K. Borri
11-12-2006, 09:21 AM
You, sir, kick an unholy amount of ***.
11-12-2006, 12:36 PM
Thank you. (blush)
I think Propeller kicks even more ***... that's why I'm trying to help it!
M. K. Borri
11-12-2006, 12:44 PM
I don't think I can be of a lot of help, so far the only decent thing I wrote that isn't application-dependent is that math library. I still can't grok Propeller asm too well. However, I had a lot of people ask me if it's feasible to program a Prop in Basic, would that be worthwhile?
11-12-2006, 12:46 PM
I'd LOVE to see someone write a large model basic compiler for the Propeller!!!
Writing fast, large programs was a driving motivation behind coming up with this; and while I'm working too much right now to contribute code, I'd help out where I could.
11-13-2006, 01:16 AM
The addition of a few BASIC keywords to manage COG's would make the multi-processing element of the prop very accessable.
on cog x do
Pretty easy to weave into a standard basic program. Would have to sort out variable declarations. Global, local to cog, shared.
byte shared z
print @ [0,0] "begin of program"
[some init code ]
print @ [0,1] "Watching cog do it's thing"
if z = something important then stopcog 1 : goto done
print @ [0,3] "Cog finished, moving on..."
oncog 1 do:
byte a, b
[do something that affects z shared]
Post Edited (potatohead) : 11/12/2006 8:54:04 PM GMT
11-13-2006, 01:36 AM
Like the COGxxx keywords in SPIN; and I'd suggest using the same names and syntax
Now I'd also want a few more primitives:
threadid = NEWTHREAD faddr,fstack
So once a COG is started, it can start/stop threads on itself. I'm working on some system library routines to do this.
11-13-2006, 01:59 AM
Agreed likewise. I like the idea of keeping our existing syntax definitions where possible.
When I read that first little code snippet you posted Bill, everything about this chip changed. Very cool!