PROP II - Interupts, IO and other Musings
Praxis
Posts: 333
Before anyone says yeah I know the Prop II has been discussed before and perhaps even it is too late to throw this in now.
IO Pins:
1. Phase selectable interrupts on IO pins
2. Selectable pull up/pull downs on IO pins
3. Selectable wired-or on DDR set outputs
Interrupts:
1. IO pins (as above)
2. Counters i.e. overflow, match value
I guess I am opening a debate about the virtues of interrupts here[noparse]:)[/noparse]
IO Pins:
1. Phase selectable interrupts on IO pins
2. Selectable pull up/pull downs on IO pins
3. Selectable wired-or on DDR set outputs
Interrupts:
1. IO pins (as above)
2. Counters i.e. overflow, match value
I guess I am opening a debate about the virtues of interrupts here[noparse]:)[/noparse]
Comments
Interrupts ?, forget them. Anyways you have waitpeq and waitpne.
You have waitcnt... enough to implement an "interrupt" model counter.
With more than one core, processor, cog, you may not need interrupts. Besides... the COG assembly does not provide stack or link(ed) register or hw stack. Those, any of them would be needed. The architecture is different. For interrupts... maybe an ARM or similar processor is better suited (with hig-resolution timers).
LMM can fake interrupts required for multi-tasking, but then you run out of memory eventually :<
Prop however convenient is not a general computing solution. If you want that, use another CPU.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OK there are 16 cogs, for me 8 cogs with faster clock and more memory would be enough.
With that said I like the idea of dynamic cog allocation/deallocation i.e. you need one to do some specific task allocate a cog and then when done it is available again.
Using a cog to look for say a single pin change seems a bit over kill, getting a pin transition change as an interrupt and then allocating a cog to process it, well....
no staking of the main program, parallel processing of the event etc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
at 80 MHz:
then starting a cog specifically for an interupt may be a problem too.
I agree with your request from one standpoint, though. Not many companies have a forum that is monitored so closely by the dude doing the actual design. So, making requests like this normally is moot. Please don't take our attitudes the wrong way, but the interupt thing has been discussed before. Ditto to Ken's post too.
-Parsko
When you have 16 cores, the need for hardware interrupts goes away.
If you want interrupts, do it software.
Suppose for instance they could easily give us a 15 cog propII with interupts; what's the difference between that and a 16 core chip where you use one cog into a polling?
Not sure if that's right, but I think it's pretty close. I think the interrupt issue stems from those that are afraid to learn assembly. I'm not implying anything, as you are simply making a suggestion. But, assembly allows one to write some wicked fast routines that are otherwise impossible in SPIN, at the same speeds. I think that the CASE statement may make this pretty fast in SPIN, but I don't use spin much other than human I/O...
Another benefit is you can create more powerful interupt routines in assembly using the various "conditions" such as WZ, WC IF_Z, IF_NZ, etc... I don't know, really, how a "true" interupt works, as my only real experience is with the Prop, but my take is that interrupts only work on ONE interrupt, and subsequently the ONE with the highest priority, right?
I agree with David E., when can I buy one? According to the powers that be, still another couple years off (2010ish?).
-Parsko
@parsko, I wasn't aware that starting a cog in assembly from assembly took longer than spin starting an assembly cog. Why is that?
@jazzed, I think the PropII will be more of a general computing solution. I don't think that the current prop is limited by the lack of interrupts, but for the lack of a memory interface. When you think that a 28 year old Commodore64 has more memory than the Prop1, it makes the general computing paradigm a bit limiting. Even with the P8x32B, the one with 64 I/Os, current generation, you would have enough pins to attach a megabyte or so of memory. Then in my mind, it becomes a general purpose computer! It might be worth while, after the PropII comes out, to go after a die shrunk PropII with 8MB or so of SRAM on chip. That would rock. (and probably cook too) ;^)
Is a DVI or HDTV compatible video driver possible?
Perhaps there will be an NTSC to DVI converter chip, just as we use FTDI for USB when we can't use RS-232C anymore.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
That said, a big part of the onboard input handling on the back of displays is the scan-converter and that will never be dropped now that the displays are constructed as a grid. The analogue frontends are small-fry in comparison.
Evan
cheers,
rich
LMM, the Large Memory Model, is the best way to work round the Cog memory limitation. There's a learning curve to that, it doesn't solve all problems, has some of its own, there's currently a lack of tools to make it as easy as it could be, but since understanding its advantages I've given up thinking about having larger Cog memory sizes.
Some see 512 locations/cog as a great limitation, but there is another way to look at it. How many other processors have 512 32bit registers? 512 Registers WOW. I remember on the 6502, we had only A, X, Y, SP, and PC.
The limitation, of course, is that your instructions have to live there also.
Doug
rich
More info:· http://forums.parallax.com/showthread.php?p=615022
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propeller.wikispaces.com/Large+Memory+Model
You can in some ways think of it as a paging mechanism where blocks of code are loaded into the Cog's memory to be executed as and when needed, except where paging brings in a whole block of memory LMM brings in an instruction at a time, executes that, gets the next instruction.
It's also similar to a PC emulator for games console where the PC would be interpreting the instruction set of the CPU the games console used. In this case the LMM interpreter executes a slightly modified Propeller Assembler (PASM) instruction set which means it's got very little overhead and so LMM execution isn't an awfully lot slower than native PASM.