Shop OBEX P1 Docs P2 Docs Learn Events
Question: Propeller architecture in ? family? — Parallax Forums

Question: Propeller architecture in ? family?

mklrobomklrobo Posts: 420
edited 2014-08-17 13:03 in Propeller 1
:smile: I would like to ask a question, where permissible.
The propeller architecture, insofaras the family it is in, in not on the data sheet. I could not
find any documentation on it. Does anyone know what family the MCU resembles?
The structure of the 8 processor, or 8 cogs, is unquie. what about the MCUs, themselves?
«1345

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2014-08-11 14:43
    It is totally unique. The only somewhat similar cips are the xmos but they use a different cpu architecture and instruction set.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-08-11 14:49
    The architecture of the individual cogs is Von Neumann. The instruction set lies somewhere above RISC, but well below CISC, and bears some similarities to microcode.

    Does that help?

    -Phil
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-08-11 15:28
    mklrobo wrote: »
    :smile: I would like to ask a question, where permissible.
    The propeller architecture, insofaras the family it is in, in not on the data sheet. I could not
    find any documentation on it. Does anyone know what family the MCU resembles?
    The structure of the 8 processor, or 8 cogs, is unquie. what about the MCUs, themselves?

    If you look in the datasheet you can see a diagram of the chip with the hub servicing 8 cores in a rotary fashion. It looks reminiscent of a Propeller from which it derives it's name. Since it is the first of it's kind it is unique but when P2 is unleashed and not forgeting all the nascent P1 FPGA variants (then possibly silicon) then they will all be part of the Propeller family. The actual 32-bit core as mentioned alreadty is mostly Von Neumann and the instruction set reminds me of a blend of many different processors but not an interrupt in sight, so really they are unique too.

    Now why all these academic questions though? Don't you have something to design or build? :)
  • ksltdksltd Posts: 163
    edited 2014-08-11 16:53
    The documentation is quite poor, frequently incorrect and often misleading. There's a propensity to ignore the 50+ years of computer architecture groundwork and use new terms for old concepts - or worse yet - use old terms for concepts other than their conventional usage.

    There is no architectural overview of either the SOC or the processor.

    For what it's worth, the processor is quite simple. There is a single instruction encoding scheme described on page 251 of the manual. The concepts of memory and registers are very poorly articulated and that is compounded by the lack of architectural description of the SOC.

    The best way to conceptualize the Propeller chip is as an SOC with eight processor cores and a small fistful of shared resources.

    Each processor core has a 9-bit address space organized as 496 x 32-bit of local memory that cannot be addressed by any of the other processors and 16 x 32 bits of the local address space are decoded as internal registers - some are shared, some are read-only and some are local.

    In addition to the local memory, there's a Z and C condition code.

    That's all the state in the processor architecture. It's important to note what's absent - no interrupts, no stack, no registers.

    Instructions are fixed-length 32-bit encodings that name two operands. There is a 6-bit opcode field with 3 operation modifiers that control whether the carry flag, zero flag and destination register get modified as a result of the instructions execution. Operands are named with a 9-bit address and nearly all instructions perform "Dest := Src op Dest". There is an Immediate mode bit that controls whether the Src is interpreted as a literal value or a memory address. There are four predicate bits that control whether the instruction executes or is a nop.

    In the vast majority of encoded instructions, the 4 predicate and 3 modifier bits are "unused", resulting in very poor opcode space utilization, which is a shame as it would be so easy to combine and encode most of the useful combinations and free up two bits that could be used to extend from 9-bit addressing to 10-bit addressing.

    Another significant draw back is that there is no indirect addressing mechanism at all - self modifying code is used instead.

    If you wanted to compare the processor architecture to anything, I believe the best comparisons are to the Data General Nova and the original ARM. Like the Nova, it's possible to write remarkably compact codes. Like the ARM, a lot of the instruction encoding space is squandered on predication that is rarely used. The upside is highly predictable execution at throughputs that are quite good because there's no OS, no interrupts, no context switching, no wait states - just direct execution of perilously small (512 instruction, max!) programs.

    The SOC is comprised of eight cores plus a 32KB shared memory, 32KB shared ROM, some clock control, power management, complex inter-coupled counters that can generate wave forms and 32 GPIO pins. The ROM contains some bootstrap, a byte-code interpreter (see below) and some tables for accelerating trig, logarithm, anti-logarithm and a character generator for a bitmapped font.

    Interestingly, the vast majority of software written for the SOC doesn't rely on the underlying processor architecture in any way. Instead, it's written in a proprietary language, compiled into byte code for a stack-based p-code interpreter. That interpreter resides in ROM and interprets byte code streams from the 32KB of shared memory. The hardware bootstrap loads the 32KB shared memory from an external serial eprom and copies the interpreter from ROM into Processor 0 local memory and transfers control to that interpreter. The program that's running can spawn additional processes directly onto any of the other 7 processors or even onto its own processor. Those processes can be either interpreted or assembly language that is directly executed.

    Hope that helps ...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-08-11 18:31
    ksltd,

    Considering how poor you think the docs are, you seem to have gleaned quite a bit of good information from them, as do most other users of the Propeller! Of course, I and most other long-time Prop users woudl take issue with your negative judgement calls, since we've managed actually to spend time programming the Prop and find it very friendly and powerful. Hopefully, once you've gotten some hands-on experience with it, you will too. :)

    -Phil
  • prof_brainoprof_braino Posts: 4,313
    edited 2014-08-11 18:42
    Instead of a microcontroller with a bunch of interupt processors, its eight very complete interupt processors with not so much main processor. Maybe. At least thats the impression I get, you know, no float, no memory manager, etc. But its got plenty to do the time critical stuff, with al the counters and and stuff.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-08-11 19:02
    ksltd wrote: »
    The documentation is quite poor, frequently incorrect and often misleading. There's a propensity to ignore the 50+ years of computer architecture groundwork and use new terms for old concepts - or worse yet - use old terms for concepts other than their conventional usage.
    .....

    Hope that helps ...

    You wouldn't happen to be a food or art critic would you? You must take all things into context and what the 4004 was for corporate Intel isn't this really a much larger achievement for one guy and a small family company? Having a lot of experience with various processor architectures over the years I find it incredible that Chip managed to design a unique chip and get it into silicon first time without the usual errata sheets as well.

    With your critical analysis and comparisons you have come across as a big academic but where is your "Propeller"? Trouble with using old terms are the concepts that they bring to mind which would in itself be misleading. At least Parallax document their products, and support them and make them easily available, and now even make it an OpenCore, WOW!

    It's always appropriate to show appreciation for a great achievement, if you can appreciate it, but then food and art critics are rarely great chefs and artists themselves.
  • User NameUser Name Posts: 1,451
    edited 2014-08-11 19:17
    ksltd wrote: »
    Interestingly, the vast majority of software written for the SOC doesn't rely on the underlying processor architecture in any way. Instead, it's written in a proprietary language, compiled into byte code for a stack-based p-code interpreter.

    Hmmm... I don't think this is correct. At least it isn't my experience. The only code I use from OBEX is nearly all PASM. And 80% of what I write is also PASM. Where do you get the "...vast majority..." idea?

    BTW, I think you ought to remove the invective, then flesh out your post by about 4x and publish it as a succinct Propeller intro. I wish I'd read your post years ago when it might have saved me some time. :)
  • ksltdksltd Posts: 163
    edited 2014-08-11 20:14
    User Name's comments speak to the quality of the documentation "I wish I'd read your post years ago when it might have saved me some time".

    And while I'll repeat what I said "The upside is highly predictable execution at throughputs that are quite good". The device, for it's numerous faults, does have a niche and I'd suggest it's success, such as it is, comes despite rather than as a result of the documentation.

    I'll also stand by what I said regarding the apparent distain for the terminology developed over the past 50+ years and the disservice done by that choice, especially for a product that strives to be an educational building block. It's indefensible.

    And I'll add that I've exchanged countless e-mails with Parallax in attempts to get clarification on details of operation where the documentation is just completely wrong or so inadequate that it's impossible to understand. Why there's not a rolling effort to revise and publish the documentation is really beyond me.

    And Phil - in the last five years, I've shipped several different revenue products based on Propeller and am about to release two more.
  • jazzedjazzed Posts: 11,803
    edited 2014-08-11 20:29
    IMHO, ksltd's post is edgy, but mostly on target. It took me a few weeks to understand all the spec stuff (better than average for me on a new mcu chip). There are always opportunities to make things better or just different. Of course it is what it is, and now it's open for anyone to "fix" for those who don't mind the expense of an FPGA per board or a foundry run in mass quantities. Of course there are always the more traditional cheaper alternatives.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-08-11 21:12
    ksltd wrote: »
    User Name's comments speak to the quality of the documentation "I wish I'd read your post years ago when it might have saved me some time".

    And while I'll repeat what I said "The upside is highly predictable execution at throughputs that are quite good". The device, for it's numerous faults, does have a niche and I'd suggest it's success, such as it is, comes despite rather than as a result of the documentation.

    I'll also stand by what I said regarding the apparent distain for the terminology developed over the past 50+ years and the disservice done by that choice, especially for a product that strives to be an educational building block. It's indefensible.

    And I'll add that I've exchanged countless e-mails with Parallax in attempts to get clarification on details of operation where the documentation is just completely wrong or so inadequate that it's impossible to understand. Why there's not a rolling effort to revise and publish the documentation is really beyond me.

    And Phil - in the last five years, I've shipped several different revenue products based on Propeller and am about to release two more.

    Sorry kstld, just serving up what you ordered although I do appreciate your insight, as I said it needed to be taken into context and if OnSemi or TI were anything like Parallax then Parallax wouldn't stand a chance! The fact that they can make such an impact as they do is noteworthy. But as much as the big companies produce "documentation", although the information is there, I don't think it's all that clear or correct anyway and there is absolutely no way of talking to anybody who really knows, of making any difference, Oh, that part number has been superseded......
  • Heater.Heater. Posts: 21,230
    edited 2014-08-11 23:37
    @ksltd,

    A nice description of the Propeller.

    However I think you are a bit hard on the documentation. For sure documentation can always be improved. However pretty much everything is in the Propeller Manual. From time to to time people have debated errors and omissions but they always seem to be about odd edge cases that are not going bother most people most of the time.

    Certainly the Propeller documentation and architecture is a lot easier to understand and as well documented as say the XMOS devices. Judging by the very long discussions in their forums as to how that thing actually worked.

    As for use and abuse of terminology. Things like talk of "COG" and "HUB" can have you scratching your head for may be two or three seconds but is soon assimilated. Not a big deal. Certainly not as bad as XMOS, again, referring to hardware scheduled threads as "cores" and actual cores as "tiles", that is not just confusing it's dishonest.

    Documentation can also be perfectly complete and accurate but still useless. I have you ever tried to program an Intel 860? It was so complicated that even Intel did not know how to get the maximum speed out of that thing. Users did figure it out in a few specific cases.

    Parallax has now released the Verilog design files of the Propeller as open source. If there are any questions about the finer points of it's operation the answers are in there. If you happen to find some corner cases where the real chip does not behave like the published source then that is a bug I'm sure we'd all like you raise an issue on.

    Finally,
    And I'll add that I've exchanged countless e-mails with Parallax in attempts to get clarification on details of operation where the documentation is just completely wrong or so inadequate that it's impossible to understand.
    I do hope you find time to post the results of those exchanges somewhere. If you have had problems with the documentation I'm sure many others have as well. If you have received clarification on such issues then for sure others could also benefit from your discoveries. We look forward to that.

    @Everyone,

    Is it really helpful to classify the Prop as Von Neumann?

    When one thinks of Von Neumann one thinks of processor (ALU, registers, control) separate from memory (RAM, ROM, where your code and data is.) There are many block diagrams of the Von Neumann architecture on the net that look like that and much talk of the "Von Neumann Bottleneck", that slow pipe between processor and memory.

    A COG on the other hand has it's processor, it's registers, it's data and program store all mixed up together. Registers are registers in some normal sense. Registers are program store. Registers are the working memory.

    This is quite unlike any Von Neumann block diagram.

    @Everyone,

    I just realized another way to think about the Prop not having interrupts....

    The idea is totally wrong, the Propeller has nothing but interrupt handlers, 8 of them!

    What it does not have is a main line....
  • David BetzDavid Betz Posts: 14,516
    edited 2014-08-12 03:26
    Heater. wrote: »
    @Everyone,

    I just realized another way to think about the Prop not having interrupts....

    The idea is totally wrong, the Propeller has nothing but interrupt handlers, 8 of them!

    What it does not have is a main line....
    Ummm... Doesn't the term "interrupt" mean that you were doing one thing but were interrupted and now you're doing something else? That concept doesn't exist on the Propeller.
  • cavelambcavelamb Posts: 720
    edited 2014-08-12 04:30
    David Betz wrote: »
    Ummm... Doesn't the term "interrupt" mean that you were doing one thing but were interrupted and now you're doing something else? That concept doesn't exist on the Propeller.

    Waitpeq and waitpne could maybe kinda sorta be thought of as interrupt devices.

    It's not like they are POLLING a pin anyway...
  • David BetzDavid Betz Posts: 14,516
    edited 2014-08-12 04:35
    cavelamb wrote: »
    Waitpeq and waitpne could maybe kinda sorta be thought of as interrupt devices.

    It's not like they are POLLING a pin anyway...
    People are so down on interrupts here but it seems like they do serve a purpose. I processor can "wait" for any number of events all at the same time with zero overhead. Of course, when one of those events actually occurs there is overhead in switching context to the interrupt service routine but there is no overhead while waiting. That isn't true of the Propeller. To make use of a "soft peripheral" you end up waiting on a mailbox to determine when the operation completes and if you start up a number of different asynchonous operations at the same time you have to poll multiple mailboxes. This slows down the main thread and also requires sprinkling the code with polling calls. It seems like there is a place for both independent autonomous processors like the Propeller COG and a mechanism to interrupt the main program flow to handle infrequently occuring events without the overhead of polling.
  • Heater.Heater. Posts: 21,230
    edited 2014-08-12 05:54
    David,

    Sorry another long essay coming....
    Doesn't the term "interrupt" mean that you were doing one thing but were interrupted and now you're doing something else? That concept doesn't exist on the Propeller.
    Very true.

    But notice I did not say "...the Propeller has nothing but interrupts" I said "...the Propeller has nothing but interrupt handlers". That is very different.

    What is an interrupt handler?

    It's a chunk of code in a program that is not called by the program anywhere but rather sits around waiting to be run when some external event happens. Hopefully very soon after the event happens. It does not care how it came to be running or whatever else was going on that got interrupted to allow it to run.

    Now. If I have a Propeller with 8 COGS with code waiting on some events, WAITxx, that looks exactly like 8 interrupt handlers to me. With the bonus of course that they all get minimal latency to their events, none of them steals time from any of the others (no nested prioritized nonsense) or any back ground task.

    Having worked on systems where everything was scheduled off of interrupt handlers, where even what you might call the "main line" was hooked to a 100ms or 1s timer tick and the actual background code was nothing much more than an empty idle loop, these things look remarkably similar. In fact, the same.
    People are so down on interrupts here but it seems like they do serve a purpose.
    Yes, they do serve a purpose. They simulate a multi-processor machine on a single processor. They do it very poorly, what with making the code more complex, and having bad timing interactions and generally slowing things down.

    If you can add a core for every possible event that you might otherwise assign to an interrupt you would never need interrupts!
    To make use of a "soft peripheral" you end up waiting on a mailbox to determine when the operation completes
    Here you have hit on a very interesting point. One glaring omission from the Propeller is the absence of a WAIT on HUB memory change. Or if not memory change WAIT on some hardware signal that can be sent from some other process.

    For example consider a UART transmitter. Before it can do anything it has to check some HUB memory to see if the application has put something there to send. In a mail box or FIFO say. Currently we have to poll that HUB memory as you say. Not good. We can't WAIT, we can't go to a low power state.

    The only way for a process can send such a signal to another COG to wake it up from a WAIT is by using an I/O pin to connect them together. This is why many have asked if the 32 Port B pins exist internally they would be great for such signalling with out using valuable external pins.
    ...if you start up a number of different asynchonous operations at the same time you have to poll multiple mailboxes. This slows down the main thread...
    True. The slow down is not so critical though. After all your peripheral COGs should be doing the speed critical stuff. Also the overheads of checking half a dozen mail boxes is not so great in a lot of applications.
    ...and also requires sprinkling the code with polling calls.
    Nah, I would put all the mail box checking at the top of my code and have it dispatch to whatever it needs to do when data arrives in them. Basically structuring the main application code in an event driven style, like you do in JavaScript, except you have to code that event loop yourself.

    Which brings us to the idea that perhaps the Propeller should have some hardware that allows COGs to wake each other up from WAITs and perhaps exchange some data at the same time. For example a COG would execute a RDCHAN which puts it to sleep until another COG writes some data out with a WRCHAN. At that point the sleeping COG wakes up and has the sent data to work on immediately. Perhaps just a LONG that is the actual data or a pointer to some mailbox or FIFO that has become full.

    This of course is what XMOS, and the old Transputer, do to exchange data between cores and threads and has been suggested in the P2 development threads for years...

    That's all I have to say about that.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-08-12 06:06
    Heater. wrote: »
    David,

    Sorry another long essay coming....
    Yes, I know there are other ways of doing all of these things. It just sounds to me like "when you have a hammer everything looks like a nail". There seems to be a reluctance here to admit that any solution other that the "Propeller Way" has any merit at all.
  • mklrobomklrobo Posts: 420
    edited 2014-08-12 06:49
    :smile: WOW! The help was awesome! That is one of the reasons this forum is addicting!
    I appreciate the info from everyone, especially Ksltd. When you ask questions, you may be suprised
    at the different perspectives and insights that you get! Ya'll have save me tons of heartache!:smile:
  • Heater.Heater. Posts: 21,230
    edited 2014-08-12 07:41
    David,
    It just sounds to me like "when you have a hammer everything looks like a nail". There seems to be a reluctance here to admit that any solution other that the "Propeller Way" has any merit at all.
    An oft quote phrase. Let's examine it a bit:

    If I want to attach things together, probably wooden things in this case, I have range of options: Nails, screws, glue, dovetail joints, dowels, God knows what.

    All of these techniques have a few things in common: expense, complexity, effort, effectiveness, to some degree or other. Some may be more versatile or applicable to different situations than others.

    Having weighed up all the pros and cons of the various options I might decide on one of those and tool up my factory to use that. This will incur some investment into nail guns, or electric screw drivers or dovetail routers, whichever. Basically I'm deciding that my factory does this process and if you have a job that really does need something else then you have to go next door where they do that. I can't afford to invest in more, different, tooling and training for my work force. However look, your problem can be solved the way I do it here, even if it is not 100% optimal it's good enough.

    At that point having someone turn up and say that for this particular product screws would be better than the nails I have tooled up for is of no interest to me. It's not worth the bother.

    So, there is my long winded analogy. The Propeller is an investment in tackling problems a particular way. Cores instead of interrupts. It covers a lot of application space. It perhaps makes some jobs harder or impossible. But then the same can be said the other way around.

    Having taken that direction, mixing the chosen solution (cores) with a different solution to the same problems (interrupts) just adds expense and complication for little benefit.

    I have no problem with interrupts, as long as they work where I want them to, having been using interrupts for decades. However if you want interrupts you can go next door to the ARM and Co. factory where I believe they do that very well I'm told:)
  • David BetzDavid Betz Posts: 14,516
    edited 2014-08-12 07:47
    Heater. wrote: »
    David,

    An oft quote phrase. Let's examine it a bit:

    If I want to attach things together, probably wooden things in this case, I have range of options: Nails, screws, glue, dovetail joints, dowels, God knows what.

    All of these techniques have a few things in common: expense, complexity, effort, effectiveness, to some degree or other. Some may be more versatile or applicable to different situations than others.

    Having weighed up all the pros and cons of the various options I might decide on one of those and tool up my factory to use that. This will incur some investment into nail guns, or electric screw drivers or dovetail routers, whichever. Basically I'm deciding that my factory does this process and if you have a job that really does need something else then you have to go next door where they do that. I can't afford to invest in more, different, tooling and training for my work force. However look, your problem can be solved the way I do it here, even if it is not 100% optimal it's good enough.

    At that point having someone turn up and say that for this particular product screws would be better than the nails I have tooled up for is of no interest to me. It's not worth the bother.

    So, there is my long winded analogy. The Propeller is an investment in tackling problems a particular way. Cores instead of interrupts. It covers a lot of application space. It perhaps makes some jobs harder or impossible. But then the same can be said the other way around.

    Having taken that direction, mixing the chosen solution (cores) with a different solution to the same problems (interrupts) just adds expense and complication for little benefit.

    I have no problem with interrupts, as long as they work where I want them to, having been using interrupts for decades. However if you want interrupts you can go next door to the ARM and Co. factory where I believe they do that very well I'm told:)
    Yes, I suppose you can have that attitude. However it seems sort of like saying that we can do both addition and subtraction if we have only a SUB instruction so why complicate things by having ADD in the instruction set at all. Having different tools for different jobs seems like a better approach to me if a case can be made that all of the tools add something. I guess we differ in our opinions about whether interrupts would add value.
  • TtailspinTtailspin Posts: 1,326
    edited 2014-08-12 08:28
    What is an interrupt? and how do I get one?

    Is it way off base to say the Propeller has at least 27 available interrupt pins?

    I mean, after the interrupt pin goes high/low, things have to happen in software after that, yes?




    I finally got the courage to ask this question... I only know the propeller, but I have heard about interrupts, just not real clear on how they work.



    -Tommy
  • David BetzDavid Betz Posts: 14,516
    edited 2014-08-12 08:42
    Ttailspin wrote: »
    What is an interrupt? and how do I get one?

    Is it way off base to say the Propeller has at least 27 available interrupt pins?

    I mean, after the interrupt pin goes high/low, things have to happen in software after that, yes?




    I finally got the courage to ask this question... I only know the propeller, but I have heard about interrupts, just not real clear on how they work.



    -Tommy
    As others have already said, the Propeller does not support interrupts. However, it does support 8 completely independent processor cores and also waitpeq and waitpne instructions that allow a COG to wait for an external event. This provides a much more predictable way of respond to external events but it isn't really an interrupt. However, for almost every purpose it is likely to be a better solution.
  • TtailspinTtailspin Posts: 1,326
    edited 2014-08-12 09:03
    So if i were to do something like an interrupt in Spin, it could look like this?

    Do while ina[16] ! = 1
    Do stuff

    or

    If not ina[16] then
    Do stuff


    I am not trying to be funny or anything, it's just I've heard this before,
    As others have already said, the Propeller does not support interrupts.
    and it only confuses me about interrupts and the Prop. I am not a professional code writer, so maybe I am missing some subtle definition of "interrupt".
  • David BetzDavid Betz Posts: 14,516
    edited 2014-08-12 09:06
    Ttailspin wrote: »
    So if i were to do something like an interrupt in Spin, it could look like this?

    Do while ina[16] ! = 1
    Do stuff

    or

    If not ina[16] then
    Do stuff


    I am not trying to be funny or anything, it's just I've heard this before,

    and it only confuses me about interrupts and the Prop. I am not a professional code writer, so maybe I am missing some subtle definition of "interrupt".
    You could do that or you could use the waitpeq or waitpne instruction that will put the COG into low power mode until the pin changes state. As has been mentioned many times, there are no hardware interrupts on the Propeller but there is an efficient way to respond to external events which is what interrupts are all about after all.
  • potatoheadpotatohead Posts: 10,261
    edited 2014-08-12 09:08
    In addition to Heater's fine comments, I know where I can get interrupts. And I've built up those blobs of code that almost end up being little operating systems at times too.

    All fine and good.

    Really, the Propeller took a different direction, and is unique in that respect, as well as a few others. Rather than dilute that down with interrupts, I would much rather see the approach maximized. P1 is small. P2 will be bigger, and with that comes all the stuff we've learned how to do. Add in the features we know would seriously improve "The Propeller Way", and it's that much better.

    Maximizing it, given it's uniqueness, seems to make the most sense.

    Having done that, and we find interrupts would make sense, then let's add 'em. But not until we've actually blown "The Propeller Way" out fully, so that we can realize the benefits and not just compensate for having a smaller CPU and a growing desire to take on larger tasks.

    Re: Von Newman

    Heater, yes. It's hard to put it into one box. The way the COG is made is "Sir Gracey" However, if one is force to choose, it's just not Harvard, leaving Von Newman. BTW, there is this nice little street in the Portland area, "Von Newman Drive" and I was on it yesterday, almost took a sign to share with peeps here.

    And that bit is part of why I didn't like "core" and still don't. The COG is differentiated enough to warrant a lexicon that captures those differences rather than dilute them.

    "CORE" gets used for lots of stuff, and the more stuff it gets used for, the less we actually say with "CORE" Labeling a COG, a CORE really dilutes CORE some, just as much as it does what we know to be a COG.

    That said, I get the call for more standardized information. However, with that information comes a lot of assumptions, not all of which will apply. Seems lazy, and coarse to me. Perhaps this is an artifact of when we all did computing too. Documentation varied widely early on. Terms were introduced in the context of a product line. We read that stuff, understood those machines and moved onward. Today, a lot of stuff is generic, not so differentiated. In that context, I agree a more standard documentation makes sense. However, if something actually IS differentiated, the reasons for doing docs that are differentiated have not changed, and that's another way to put where I'm at on this.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-08-12 09:11
    potatohead wrote: »
    In addition to Heater's fine comments, I know where I can get interrupts. And I've built up those blobs of code that almost end up being little operating systems at times too.

    All fine and good.

    Really, the Propeller took a different direction, and is unique in that respect, as well as a few others. Rather than dilute that down with interrupts, I would much rather see the approach maximized. P1 is small. P2 will be bigger, and with that comes all the stuff we've learned how to do. Add in the features we know would seriously improve "The Propeller Way", and it's that much better.

    Maximizing it, given it's uniqueness, seems to make the most sense.

    Having done that, and we find interrupts would make sense, then let's add 'em. But not until we've actually blown "The Propeller Way" out fully, so that we can realize the benefits and not just compensate for having a smaller CPU and a growing desire to take on larger tasks.
    That sounds like a good approach to me.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-08-12 09:12
    Ttailspin wrote: »
    What is an interrupt? and how do I get one? Is it way off base to say the Propeller has at least 27 available interrupt pins? I mean, after the interrupt pin goes high/low, things have to happen in software after that, yes? I finally got the courage to ask this question... I only know the propeller, but I have heard about interrupts, just not real clear on how they work. -Tommy

    Try this post for information about why the Propeller doesn't have interrupts and a basic explanation of how they work.

    http://www.savagecircuits.com/showthread.php?318-Why-Doesn-t-The-Propeller-Chip-Have-Interrupts
  • mindrobotsmindrobots Posts: 6,506
    edited 2014-08-12 09:12
    Doesn't it just have "soft interrupts" if you want them just like it has "soft peripherals" in all type and combinations, if you want them.

    Park a COG on a pin and that PIN becomes your Interrupt pin. Event happens, pin changes, COG runs and does it's assigned soft interrupt tasks and goes back to sleep on the pin. OK,so it wasn't disruptive to the other COGs; to the outside world, it looked like an interrupt handler. You can even have multiple #1 priority interrupts (until you run out of COGs) before you need to start thinking about prioritizing interrupts and worrying about ISR response times and such.

    If folks get hung up on having the identical mechanics in place in order to compare solutions then that is their loss. In most anything, your chosen solution is just A way, not the ONLY way!
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-08-12 09:16
    The trouble with conventional interrupts is that they....well....interrupt whatever is happening, and it could be important or critical or just plain inconvenient but the interrupt is important too. However the conventional CPU has to stop what it's doing, save any important status flags and it's PC and other registers maybe etc before vectoring off in the new direction. All that overhead each and every time.

    With the Propeller we can't actually interrupt whatever a cog is doing although a spare cog can be sitting in reserve just waiting for that important thing that needs to be done right away, So the spare cog that has been setup to respond to that important signal is like a personal butler ready to do whatever it needs to do without having to drop something else and run over. This is so much better than having a single core and having to chop and change all the time. The end result is the same, the signal gets looked after, but the Propeller offers that personal service via each signals own private cog.

    Also conventional CPUs have a rich peripheral set such as UARTS, I2C, SPI, ADC, TIMERS etc which are typically serviced by the interrupts which will grab and process and store the data or whatever. Not so the Propeller as it doesn't have these peripherals really but that private cog doesn't just sit around twiddling it's thumbs, it emulates the UART for instance and also processes the data and stores it etc and since it did then there is no actual need to request an "interrupt" signal, it's all done and tucked away already. Again, so much more flexible than a conventional CPU.

    If every programmer could dedicate a processor to these tasks that normally require an interrupt then that is what they would do if they were smart but unfortunately they don't have any extra processors to dedicate and they are none the wiser as they only know one way of doing it, like lining up at a public phone vs having your own. I know who will get the first call in without interrupting "anybody" else.
  • TtailspinTtailspin Posts: 1,326
    edited 2014-08-12 09:19
    I think I am like that kid they handed an old cassette tape and sony walkman, then told him to make it play...
Sign In or Register to comment.