Shop OBEX P1 Docs P2 Docs Learn Events
Prop 2 and understanding the new capabilities... — Parallax Forums

Prop 2 and understanding the new capabilities...

Chris_DChris_D Posts: 305
edited 2010-12-05 14:33 in Propeller 1
Hi everyone,

I know there has been a lot of discussion on the Prop 2 hashing over the features etc. I have read much of those threads and in the end I am still a bit confused. Many of you guys know and understand the terminology and recognize the benefits. Me on the other hand, I look at the prop as a black box and really don't want to understand its magic, I just want to use it. Well, I shouldn't say I "Dont' want to understand it", it is simply beyond my understanding therefore I put my head in the sand and avoid it.

Anyway, I was looking over the feature list this morning trying to figure out what all those neat things will do for me. So I thought I would start a thread to which seeks simple explanations as to what each feature's benifits are. I will start off with what I think I understand and hopefully we can get through all the features in short order.

Thanks for the help,

Chris


>>160 MHz planned maximum clock speed
The prop 1 is 80 MHz, so I look at this and see twice the raw speed, twice the computing power = faster is better!

>>Internal RC, External oscillator, PLL modes
This looks to me like a variety of methods the chip uses for its system clock. All of this would be comparable to the Prop 1.

>> 4 Stage Pipeline
I know there is one really big pipeline in Alaska that is used to bring oil down to the lower 48, but I don't think I want to pump oil through my Propeller. What is the benefit to this?

>> Most instructions are single cycle
Comparing that to the prop 1 which is 4 cycles per instruction, I see 4 times the computing power per clock cycle, 4 times faster = faster is better!

>> Main Memory: 128 KB RAM + 32 KB Rom
Somtimes I wish my brain had more memory, well, actualy I wish it had more non-volitile memory, I forget way too many things these days. Compared to the prop 1, this four times more RAM and the same amount of ROM. More Ram = more code space?

>> Cog memory: 2 KB (512 longs) cog RAM
Prop 1 also has the same memory per cog

>> Optional external 32-bit addressable SDRAM for run-time data workspace; code space is not extendable
This features allows for more variable storage space, but not code space.

>> Non-volatile application and data storage via external SPI EEPROM or SD card
How does this feature help me out, what is its benefits?

>> Cogs can access Main Memory at each hub access window in units of 1 byte, 1 word, 1 long, or 4 contiguous quad-aligned longs.
Is this any different than the Prop 1?

>> Hub access window arrives for each cog in a round-robin fashion every 8 cycles.
The Prop 1 only has access once every 16 clock cycles, so this is twice as fast- faster is better!

>> Core voltage: 1.8 VDC
The older I get, the I think my body needs more voltage to keep going. Prop 1 is 3.3 VDC, does new specification provide any benefit to me?

>> I/O pin voltage: 1.8 VDC–3.3 VDC
Prop 1 is 3.3 VDC, does this provide any benefit to me?

>> Current source or sink per I/O: 40 mA
I believe this is the same (similar) as the prop 1. Robust design means less chance of me letting the magic smoke out?

>> 92 I/O pins total: 84 fully general purpose I/O + 8 additional general purpose I/O available after boot-up
84 GPIO is much greater than prop 1 = more GPIO means more things to control or monitor

>> Each I/O pin is planned(1) to have internal: Input ADC, Output DAC, True or inverted input/output, Differential input/output, Comparator, Schmitt input

How is this different from the Prop 1 and what are the benefits of each feature?

>> Hardware multiplier and divider
At some point along the way I realized I can no longer do long-hand division on paper - perhaps I had that stored in my volitile memory I got rebooted at some point in time.
Being that the multiplier and divider are in hardware, I assume this to mean it is faster. What would be the performance comparison to the prop 1? Will this allow me to do 32 bit integer multiplication & division from within SPIN and PASM?

>> Hardware CORDIC system
I read through the (cordic for dummies) and thought I understood it (really I didn't but want to feel good about myself). What will this actually do for me?

Comments

  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2010-12-02 08:38
    4-stage pipeline:

    In the Prop 1, each instruction (except hub or wait ones) took 4 cycles to do everything it needed to do. In that 4 cycles, it would decode the instruction, read the source data, execute the operation, and write the results.

    With a multistage pipeline the instructions go through each stage. Typically 1 cycle per stage. Each stage does a portion of the work needed for the instruction. Stage one decodes the instruction, stage two reads the source data, stage three executes the operation, and stage four writes out the results. The trick is that as soon as one instruction has completed stage one, the next instruction can start it's stage one. The result is that once things are going you have up to 4 instructions being worked on at a time, and at the end of each cycle one of those instructions is completing it's state 4 step and therefore is done.

    This is how the Prop 2 achieves the 1 cycle per instruction speed. So in reality the first instruction executed actually takes 4 cycles before it's done, but the second instruction is done one cycle later, and so on.

    (note: my example stages may not be exactly what the Prop 2 has for it's stages, but it's probably not far off.)


    Cogs can access Main Memory at each hub access window in units of 1 byte, 1 word, 1 long, or 4 contiguous quad-aligned longs:

    The new feature here for the Prop 2, is the "4 contiguous quad-aligned longs" bit. It means you can transfer aligned memory 4 times faster.


    I/O pin voltage: 1.8 VDC–3.3 VDC:

    This feature makes it so that you can interface to some devices that operate on lower I/O voltage levels. It'll probably be most common to operate the Prop 2 I/Os at 3.3v, but in cases where you need lower voltage for a device, you can do it.


    Hardware CORDIC system:

    One thing this feature will do is make it so that the Prop 2 can do SIN, COS, and ATAN faster. It's capable of more then that though.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2010-12-03 02:00
    I have been a bit concerned with Propeller 'heads' talking way beyond my level of understanding and wondering if Prop2 might just increase the divide.

    But having said that, I still welcome the new chip. As I understand it, Parallax has indicated that Propeller 1 will be with us for 15 years or so. So you really don't have to struggle to keep up if it isn't what you want to do.

    At this point, I am not trying to get up to speed on the Propeller 2 as I really found that I just couldn't do so with the early days of Propeller 1. In the beginning, there tends to be a period where only limited material is published and people 'with appropriate technical skills' produce a lot of new code that can seem quite mysterious. Fortunately, some of those people are also prolific tutorial writers (as they learn more though explaining more).

    So I guess I am saying that it may be too early to try to figure out what you want to get out of Prop2 and it might be best to just monitor the situation and wait for the actual release to show you much of what you want to learn.

    Additionally, the best preparation for Prop2 might just be to master the Prop 1 in great depth. Trying to jump ahead and skip what Prop1 has to offer may mean that you have skipped learning some useful details.
  • Chris_DChris_D Posts: 305
    edited 2010-12-05 04:18
    Thanks for the information Roy.

    From my perspective what is appealing about the Prop 2 is its raw speed advantage. I have been working on a motion controller for about 2 years using the Prop 1 and am at its limits in a number of areas. Nearly all the limitations I have experienced will be solved with the Prop 2. So, rather than keep fighting the same battle, I am planning for what the future holds and that is MUCH more speed with the Prop 2. In the meantime I am still refining the system using the prop 1

    Thanks again!

    Chris
  • LeonLeon Posts: 7,620
    edited 2010-12-05 07:57
    I'd just use another chip with more capabilities, rather than wait an indeterminate time for the Prop 2.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-12-05 10:24
    Another option is to use two microcontrollers. One is chosen for raw speed or some other features suitable for your project, the other a Propeller, chosen for the things that are easy to do with the Propeller. Andre Lamothe sells two boards combining a Propeller with an AVR microcontroller or a 16-bit PIC (see here). Leon is developing a board combining an XMOS microcontroller with a Propeller. Several people sell multi-Propeller boards.
  • Chris_DChris_D Posts: 305
    edited 2010-12-05 12:00
    @ Leon, I don't mind waiting, heck, I have been working on this project for 2 years now, what's another year. Besides, my project runs and runs good on a prop 1, I just keep tweaking it.

    @ Mike, Actually this project uses 4 micros: 1 Atmega2560, 1 Atmega640P, and 2 Prop 2s. This project is the CNC control (and machine) I have been working on. As mentioned above, it works pretty darn good now but I just keep pushing the limits. I doubt I will ever be done with the project until I get bored doing it. It is one of those projects where its purpose is to learn and explore not to achive a final result in the form of a complete product.

    Chris
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-12-05 14:33
    Chris_D: With the correct pcb design, the prop can be pushed to 104MHz without problems and I am sure 108MHz too, just that I have not fully tested it. 6.5MHz (104MHz) and 13MHz (108MHz PLLx8) are easy to get from DigiKey and 6.25MHz (100MHz) can be purchased from Bill Henning or Parallax. This will give you a good processing boost.

    I am quite interested in your CNC setup. I am playing with a Micro-Mendel variant 3D plastic printer. However, I have a possibility of building and controlling a 6mx4m CNC router sometime next year (1 off).
Sign In or Register to comment.