Shop OBEX P1 Docs P2 Docs Learn Events
Unique Propeller Functional Abilities? — Parallax Forums

Unique Propeller Functional Abilities?

jazzedjazzed Posts: 11,803
edited 2011-05-20 11:59 in Propeller 1
The question comes up sometimes about what unique things the Propeller is capable of doing.

It seems to be in the best interest of Propeller to identify unique abilities.
I hope that Prop People can come up with some interesting things in responses to this thread.

1) There is always the deterministic timing feature of multiple threads of execution which can enable very interesting things like precise 10ns resolution samples on many pins. A single core MCU running fast enough could do that, but may not have enough bandwidth left for anything else.

2) It occurs to me that it may be possible to detect which fast serial protocol may be attempted on a given pin (or set of pins for synchronous communications). Is this a function that can be done with other chips?

3) Phil points out that the per COG counters are a powerful asset. This is very true, and they enable things like synchronous background clocking for data transfers, easy PWM abilities, etc.... Input modes of the counters allow clock tricks for updating accumulator registers, fast ADCs, etc....

4) Ariba points out these features: A PLL per counter which allows to generate frequencies up to 160 MHz on a pin (with 80MHz system clock). Composite video with color modulator; other Micros can do VGA or B/W-video, but colors on composite is unique. A 32 bit processor in DIP package. (The only other I know is the 68000 in DIP64)

5) Prof_braino expands on counter PWM capabilities: Counters run independently of code, allowing precision control of I/O pins without impact due to code execution; IE one counter can control 8 servos as easily as controlling a single servo; one cog, having two counters, can control 16 servos. The code executing on this cog is not impacted by the counters, so the servo control is still deterministic.

6) David Hein: For me, the biggest strength of the Prop is the ability to easily implement drivers and co-processors in software in independent cogs.

7) Ale expands on the DIP package factor: The most unique feature I find is the DIP40 package. So much power in an easy-to-use package. Just one power supply, a crystal and a PC... nothing fancy. My additions: EEPROM is requried for standalone operation. Even the closest competitor does not offer 8 fully independent cores in a DIP40 package.

8) Leon describes a nice example: We were using it for a complex data logger application for refrigerated containers, for which it was an ideal platform and enabled us to offer a one-chip solution at a price that couldn't be achieved with any other solution. The on-chip VGA was especially useful, as we could provide a display in the vehicle cab. We were using most of the cogs, and had a very neat, small, PCB design.

9) Leon mentions: Video capable hardware on each cog. The hardware can also be used as a serializer for other purposes.

10) ... hopefully more useful examples may come up


Final thoughts:

It is very difficult to steer a thread like this to focus on functional abilities which provide market differentiators. The example cases provide powerful demonstrations of functional abilities without getting into mammoth detail - the examples truly focus on functional abilities.

People get caught up in implementation details too much rather than the functions that are enabled by the architecture. Still, the architecture itself is unique relative to other MCUs and some might say it's eccentric, but it is very simple and makes the chip easy to use.

The architecture does enable multi-tasking without any form context switching (required for single-core multitasking), will not freeze because of complex arbitration, and the assembly language is truly elegant once you adjust to a few strange little things.

davidsaunders offers a nice summary (edited here for focus):

1) A multi-core highly deterministic architecture without interrupts.
2) An instruction set that is very well thought and designed.
3) Versatile counters, and separate counters per COG.
4) The ability to easily access any pins from any COG at any time in a very simple manner.
5) Relatively low cost. Both the Prop, and the application of peripherals are relatively inexpensive, especially as you can implement a huge number of peripherals in software with a minimum of passive components.

I think it's great that davidsaunders "gets it" having only used Propeller for a short time.
Of course anything new has a learning curve and different people have different curves.

The message is: Propeller is different but has marketable differences, and it is easy to learn and use.
«134

Comments

  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-05-17 19:22
    I can only add:
    Instructions to explicitly self modify code, by only fields of the opcode (MOVD/MOVI/MOVS)

    Jazzed:
    Thank you for this thread.
  • potatoheadpotatohead Posts: 10,261
    edited 2011-05-17 19:50
    Native virtual machine capability. 8 concurrent virtual machines are possible.
  • Heater.Heater. Posts: 21,230
    edited 2011-05-17 20:34
    The Prop has the unique ability to make people want to program it in assembler.
  • RossHRossH Posts: 5,519
    edited 2011-05-17 20:44
    Heater. wrote: »
    The Prop has the unique ability to make people want to program it in assembler.

    1,$s/want/need/g
  • potatoheadpotatohead Posts: 10,261
    edited 2011-05-17 20:48
    @heater: Seconded! And what a fun assembly language! I love the pure von-newman model.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-05-17 21:46
    heater: Thirded. I love to program in assembler provided the instruction set is simple. The prop's certainly is simple and powerful.

    * Easy and quick to program and get working compared to other micros - mainly because of no interrupts and multi-cores
    * Being able to program in assembler for fast code execution
    * Being able to program in spin when speed is not required (usually the main program)
    * Now having Basic and C.
    * Flexible I/O so that 1 chip can do lots of functions (no need to have a lot of various families of chips)
    e.g. add UARTs, TV, Video, Stereo, microSD, Keyboard, Mouse, LCD, GPS, I2C sensors, etc etc
    * Being able to add 1pin TV debugging using 1 cog
    I often like to display results on screens for debugging purposes and this makes it simple/effective.
    I now have a nice small 4.3" LCD that gives 80x25 text for this (and CPM)
    * Able to emulate other older processors (I want to emulate a mini I worked on 1974-1999)

    Because the Prop is so powerful, I would have liked more hub ram, more cogs, more pins and ADC (I haven't played with ADC sigma-delta yet). I believe the problem I/we are finding is because we love programming the prop so much, we want it to do things that it was never conceived to do. I suspect we have the same ambitions for the prop II.

    In fact, all the initial projects I had in mind for the Prop have never been realised. This is because I found it could do so much more, so easily, that my new projects were even more fun, and more powerful, than those I had originally intended to do.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-05-17 21:49
    Heater:
    Forthed.
    I really like the Propellers assembly language and instruction set, I would almost say it is as easy as that of the 680x0 series :), though I can not, for Prop assembly is quite a bit easier than 680x0 assembly.
  • jazzedjazzed Posts: 11,803
    edited 2011-05-17 22:08
    I've seen lots of implementation details so far. Every micro has an assembly language.

    Sure Propeller is unique internally, but that just means it's different and it raises eyebrows.

    I see no specific unique functional abilities coming from the architecture itself except for multi-tasking without context switching. Running self-modifying code is just a part of the design. I like PASM too, but it's just another assembly language however neat it is.

    I guess being able to run multiple serial ports or drive multiple TV displays are "unique functional abilities."

    Are there other "unique functions" that Propeller enables which are impossible with other MCUs?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-05-17 22:15
    Counters, counters, COUNTERS!! I've never worked with another micro whose counters could be configured in ways to demodulate FSK and RF, do sigma-delta ADC, provide DUTY-mode DAC, etc., etc.

    -Phil
  • Heater.Heater. Posts: 21,230
    edited 2011-05-17 22:17
    Jazzed,
    I see no specific unique functional abilities coming from the architecture itself except for multi-tasking without context switching.
    That's a pretty major unique ability.

    For example writing a high speed DDS loop on a single core chip results in not being able to change it's frequency without pausing it briefly with an interrupt and causing a glitch.

    Perhaps not unique now a days as more multicore chips are turning up but the Prop had a good head start as is still the simplest multi-core to use.
  • potatoheadpotatohead Posts: 10,261
    edited 2011-05-17 23:21
    Seconded again. The concurrent multi-processing is a big deal as implemented in the Propeller. Being able to compartmentalize problems like we can on the Prop is unique. This can be done on most any design, given somebody has the skill to write the kernel level code required, and the unique part of the Prop is that code is simply not necessary. I think that gets marginalized, because many of us have skill and experience in that area, and I think that's completely fair.

    Well, I don't, and the Prop is a great thing in that respect, because I've been able to do lots of interesting stuff that would have been way more work on other devices, and I have a good time doing it too. Maybe that's not a "pro" unique feature, but it is a unique feature.

    And again, the virtual machine capability (LMM) is unique in that one can consider the cog as micro-code, where a specialized CPU can be built to accomplish something. On Prop I, it's a discovery and less than optimal, but on Prop II, we are going to see that well exploited, because it's known now and that will impact that design. The things we can do now, and will be able to do with LMM are pretty darn unique, in that the hardware has a distinct separation here with COG addressing and HUB addressing the way it is. How many other devices can fire off one CPU to observe another, and do so with the very basics needed on a Propeller? Again, highly differentiated, IMHO.

    Another one is clocking down to DC. I know other devices can do that, but the Prop has software control of the clock, and wait / sleep states for a very wide range of acceptable operation. Maybe not unique, but highly differentiated, IMHO.

    @Phil, I need to use the counters more. You sure are stoked on them, LOL!!
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-05-17 23:59
    Counters, counters, COUNTERS!! I've never worked with another micro whose counters could be configured in ways to demodulate FSK and RF, do sigma-delta ADC, provide DUTY-mode DAC, etc., etc.

    -Phil

    Yes, they are great. The only thing I am missing is auto-reload
  • AribaAriba Posts: 2,690
    edited 2011-05-18 03:31
    more unique features of the Propeller:

    - A PLL per counter which allows to generate frequencies up to 160 MHz on a pin

    - Composite video with color modulator. Other Micros can do VGA or B/W-video, but colors on composite is unique.

    - A 32 bit processor in DIP package. (The only other I know is the 68000 in DIP64)

    Andy
  • markaericmarkaeric Posts: 282
    edited 2011-05-18 04:59
    The fact that, by it's very nature, doesn't require you to carefully write your entire program around time critical tasks.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-05-18 06:15
    I think that the Propeller is the only 32-bit Micro to allow any IO pin for any use in a direct way.
  • LeonLeon Posts: 7,620
    edited 2011-05-18 06:34
    What about XMOS?

    And soft cores in FPGAs?
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-05-18 06:40
    Me wrote:
    I think that the Propeller is the only 32-bit Micro to allow any IO pin for any use in a direct way.
    Leon wrote:
    What about XMOS?

    And soft cores in FPGAs?
    Leon:
    'X' does not do this in a direct way, to be able to use any IO for any purpose on 'X' you have to use soft links.
    As to soft cores, being able to configure them at implementation time is not the same as being able to directly use at run time.
  • LeonLeon Posts: 7,620
    edited 2011-05-18 06:55
    Where did you get that from?

    XMOS cores can use pins for input and outut directly, at 100 MHz. This is what the code looks like:
    // LEDs
    out port p_leds_3_0 = XS1_PORT_4F;
    
    
    // Buttons
    in port p_button_0 = XS1_PORT_1K;
    in port p_button_1 = XS1_PORT_1L;
    
    
    void flashLeds(out port leds, chanend c)
    {  
      timer t;
      unsigned int time;
      int ledVal = 1;
      int isOn = 1;
      t :> time;
    
      leds <: ledVal;
      while (1)
      {    
        select
        {
          // flash the led on and off, with a period of 1Hz
          case t when timerafter(time) :> void:
          {
            if (isOn)
              leds <: ledVal;
            else
              leds <: 0;
            
            isOn = !isOn;
            
            time += 50000000;
            break;
          }
          
          // receive information from the button to decide which leds to flash
          case c :> ledVal :
          {
            break;
          }
        }
      }
    }
    
    void buttonListener(in port button, chanend c)
    {
      int led = 1;
      while (1)
      {
        select
        {
          // wait for button to be pressed
          case button when pinseq(0) :> void:
          {
            c <: led;
            led = (led + 1) & 0xF;
            
            // wait for button to be released
            button when pinseq(1) :> void;
            
            break;
          }
        }
      }
    }
    
    
    int main()
    {
      chan c;
      par
      {
        flashLeds(p_leds_3_0, c);
        buttonListener(p_button_0, c);
      }
      return 0;
    }
    
    

    I/O on other cores and chips can use very fast comms channels, of course. Everything is deterministic.

    With FPGA configuration times being a few ms, it's irrelevant when I/Os are assigned.
  • schillschill Posts: 741
    edited 2011-05-18 07:06
    Please don't turn this into the same thread that keeps popping up over and over again.
  • LeonLeon Posts: 7,620
    edited 2011-05-18 07:08
    I was merely correcting some mistakes.
  • schillschill Posts: 741
    edited 2011-05-18 07:13
    Leon wrote: »
    I was merely correcting some mistakes.

    Leon: I didn't mean to imply you were hijacking the thread or anything. And, I understand wanting to clarify things. My only concern is that this is how these threads always seem to get started. It doesn't take long for it to get out of hand.

    I think a better thread is probably "What makes a Propeller easy to use?" rather than "What makes it unique?" At least that way we shouldn't get into as many "This processor does that too or does that better" discussions.
  • jazzedjazzed Posts: 11,803
    edited 2011-05-18 07:14
    If the thread gets out of hand I will ask for it to be locked.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-05-18 07:18
    Leon wrote:
    With FPGA configuration times being a few ms, it's irrelevant when I/Os are assigned.
    It most certainly does if you need to reassign Pin usage in the middle of a running program with tight time constraints.

    Dev1: 'Lets stop our program for a couple of ms to reassign Pin defs, and crash the system'.
    Dev2: 'Sounds like a great idea'.

    Can you really see this as reasonable, Leon?

    And I will not respond to the other (we do not need another thread on that).
  • LeonLeon Posts: 7,620
    edited 2011-05-18 07:20
    I've never heard of it causing problems with FPGAs. I/O assignment flexibility is vastly superior to that offered by the Propeller.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-05-18 07:20
    jazzed wrote:
    If the thread gets out of hand I will ask for it to be locked.
    Thank you Jazzed. The reason that I refuse to further respond to one issue.
  • jazzedjazzed Posts: 11,803
    edited 2011-05-18 07:23
    schill wrote: »
    I think a better thread is probably "What makes a Propeller easy to use?" rather than "What makes it unique?" At least that way we shouldn't get into as many "This processor does that too or does that better" discussions.

    Maybe this is true. However, my primary intent for this thread was to help find marketable differentiators of the propeller.

    I've really only seen a few relevant responses so far and will update the top thread to include them later.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-05-18 07:31
    Counters, counters, COUNTERS!! I've never worked with another micro whose counters could be configured in ways to demodulate FSK and RF, do sigma-delta ADC, provide DUTY-mode DAC, etc., etc

    Perhaps a use-case example (probably not clearly, its too early):
    Counters run independently of code, allowing precision control of I/O pins without impact due to code execution; IE one counter can control 8 servos as easily as controlling a single servo;
    one cog, having two counters, can control 16 servos. The code executing on this cog is not impacted by the counters, so the servo control is still deterministic.

    Two cogs can control 32 servos, but since this consumes all 32 I/O pins, one can refactor, and divide the application between two props, 16 servos on each,
    with plenty of I/O pins for input and cogs for processing and handing inter-chip control. A cog and two (or one) I/O pins can be used as a clock speed link to another prop (or other micro). So one can have a single unit of N-props to increase the cogs and I/O pins to the needed capacity.

    The servo control and the interprop communication applications do not interfere with each others deterministic execution. There are still plenty of resources for other interfaces.
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-05-18 07:34
    For me, the biggest strength of the Prop is the ability to easily implement drivers and co-processors in software in independent cogs. However, I don't know if this is unique to the Prop. Leon, is this unique to the Prop, or are there other processor that can do this?
  • LeonLeon Posts: 7,620
    edited 2011-05-18 07:37
    That's one of the strengths of the XMOS architecture; XMOS hardware threads can be equated to cogs, and additional cores and devices can be added as required, connected via XLinks. The whole system will be deterministic. I don't think that's the case when Propellers are connected together.
  • Heater.Heater. Posts: 21,230
    edited 2011-05-18 07:41
    Dave Hein,
    Leon, is this unique to the Prop, or are there other processor that can do this?

    That was naughty:)
Sign In or Register to comment.