Shop OBEX P1 Docs P2 Docs Learn Events
sync-ing two Props. — Parallax Forums

sync-ing two Props.

rjo_rjo_ Posts: 1,825
edited 2007-10-21 12:18 in Propeller 1
We all know that the Prop is a very deterministic device. The question naturally occurs, "how deterministic?"

Has anyone done the equivalent of the following:

1. hook up two props to the same crystal,
2. place identicle code on both eeproms, which code outputs a signal to same numbered pins,
3. force simultaneous resets, and then
4. monitor the sync between the pins?

Of course the sync should be perfect... but there are all kinds of things that might cause variable differences.

If in fact this kind of sync can be relied upon, then it would seem to me that the Prop is unique in an important aspect.

Rich

Comments

  • mirrormirror Posts: 322
    edited 2007-10-12 01:13
    I would expect the propellers to remain in sync except for two reasons:

    1) The PLL's (being analog) could start up a bit differently in the two devices. Once started the propellers should remain in step with each other - there being only a phase difference. Chip could probably tell you what the range of variation is. The impression I got was that it wasn't big enough to use for random number generation - being not random enough.

    2) Variations in input threshhold could result in an identical signal being seen at slightly different times between two propellers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-12 01:14
    What you suggest may not work because the reset processing (and download from EEPROM) may vary a little. I don't believe that anyone has tested this, but some have hooked up several Props to a common clock driver. They can be synchronized using WAITPNE/WAITPEQ and then would remain in lock step. One of the unique things about the Prop is its deterministic behavior
  • rjo_rjo_ Posts: 1,825
    edited 2007-10-12 01:26
    Mike,

    You have an almost mystical ability to get to the point.

    Thanks

    Rich
  • rjo_rjo_ Posts: 1,825
    edited 2007-10-12 01:30
    I am obviously not a systems engineer... but I think that this is a feature of the Propeller which must have enormous implications.
    I would very much enjoy reading a technical discussion between experts on this point. How unique is this capacity?... how might it reduce overhead in a parallel implementations?... what is the pertinent history, ... etc.
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-12 18:51
    rjo_ said...

    1. hook up two props to the same crystal,

    3. force simultaneous resets, and then
    4. monitor the sync between the pins?
    (1) Note that only one Prop must "drive" the crystal, however you could try to connect the XINPUTs and configure the second Prop for an external oscillator. But you generally use an oscillator in the first place. It is around $2 in contrast to a crystal for 50 cents...

    (3/4) This sync is not possible, as the Pros run for a considerable time after reset with the internal RC clock, which differs from chip to chip.

    WRT your last question. Other processors are by no means less deterministic than the Prop. "Determinism" is generally destroyed by software: The slightest IF will put an end to it.
    Chips with one processor only are handicapped by the necessity for interrupt routines for any non-trivial operation.

    The interesting feature of the Prop - IMHO - is that the concept of "trivial operation" goes a long way with eight COGs smile.gif
  • rjo_rjo_ Posts: 1,825
    edited 2007-10-15 13:18
    deSiva,

    Thanks for your response.

    In Chicago, you would be called "da" Silva.

    I had to look up the concept of "trivial operations." In terms of the significance of trivial operations, I found: http://www.ece.uvic.ca/~amirali/publications/vpw2.pdf

    The significance seems to be tha one can reliably anticipate and thereby reduce code at the pre-processor level... is this what you are saying is a major strength of the Propeller? Could you elaborate a little?

    By the way, RadioShack in the United States would appear to be in need of a consultant to help their managers[noparse]:)[/noparse]

    Talk to the CEO's executive secretary. In the US... the women run the show. Try to be charming.

    Rich
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-15 17:04
    Thank you for the link: It was about "trivial instructions", which were defined to be (machine) instructions that need not to be evaluated, as their result is either a constant (zero in most cases) or one of the operands itself.

    I was using the term "trivial operations" in a looser sense: I meant a sequence or a loop of instructions without decisions - or very simple decisions - inside, e.g. to break the loop.

    Those kinds of "programs" were typical for early computers, as the Zuse machines, reading the program from paper tape, or the ENIAC, which used hard-wired code.

    Such programs are generally easy to write and to understand.

    Complexity is introduced in many ways into programs, the best known is "recursion". For "real time" machines, collateral execution of code strings is more typical (Perhaps someone will remember the discussion along a Djkstra paper, in which he explains the context of his invention of "semaphores")

    The hardware support for parallel execution is so splendid on the Propeller, as it needs neither operating system interaction, nor other considerations from the programmer (as e.g. co-operative multitasking does).

    Post Edited (deSilva) : 10/15/2007 8:23:38 PM GMT
  • rjo_rjo_ Posts: 1,825
    edited 2007-10-15 20:00
    Got it.

    Thanks.

    Rich
  • Ken PetersonKen Peterson Posts: 806
    edited 2007-10-17 13:37
    I suppose if you really needed to sync a number of propellers, you could use a simple one-shot like a 555 connected to the reset line, then have all of the propellers do a waitpeq on that. Sort of like a "secondary reset".

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    The more I know, the more I know I don't know.· Is this what they call Wisdom?
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-17 13:42
    To the reset line??
  • Ken PetersonKen Peterson Posts: 806
    edited 2007-10-17 14:52
    @deSilva: Yes, to the input of the one-shot. Reset causes the 555 to delay and then output a second reset signal which the propellers wait for after they are up and running on the external clock.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    The more I know, the more I know I don't know.· Is this what they call Wisdom?
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-17 15:00
    Oh, I understand: it's FROM the reset line smile.gif
  • Ken PetersonKen Peterson Posts: 806
    edited 2007-10-20 13:23
    Not such a good idea after all. It wouldn't sync the hubs and the main counter would be different so this would be of limited use. It would only allow you to sync one cog on one propeller with one cog on the other. I suppose there are many ways of doing that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    The more I know, the more I know I don't know.· Is this what they call Wisdom?
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-20 18:10
    You were striving for too much. I think it will be most important to have ANY kind of (soft) sync at all. And it will and can synchronize ALL COGs of ALL chips. It is correct that ANY external clock signal will do.

    However,if that clock is not synchronized to the reset it might be too early for one the chips, so tying it to the (master-) reset will be a good idea I think.

    Nevertheless a CYCLICAL soft sync (1 Sec?) will be even better.
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-10-20 18:12
    I'm surprised that no one has mentioned this thread: http://forums.parallax.com/showthread.php?p=582511
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-20 21:08
    Too "un
  • Ken PetersonKen Peterson Posts: 806
    edited 2007-10-20 21:31
    The problem is that if the hubs aren't in sync, then your cogs will fall out of sync again once they access the hub. If you are trying to have two props do something together in lock step instruction for instruction, then this could be a problem. You could have one cog using a counter to provide a somewhat slower clock that would re-sync all of the critical cogs together again, but you would lose efficiency while you spend time on a waitpeq.

    I guess the original question was related to have two props in "perfect" sync, which may not be possible without a way to re-sync the hubs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    The more I know, the more I know I don't know.· Is this what they call Wisdom?
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-20 22:47
    Note that you already run into problems within a single chip. Can you "sync" all your COGs in the first place?
  • rjo_rjo_ Posts: 1,825
    edited 2007-10-21 11:59
    Ken,

    Assuming a single clock and multiple chips, then (worst case) you would end up with a "fixed" coherence length determined by the hubs and possibly a variable phase angle, determined by the cogs.

    Of course what everyone would want is an infinite coherence length and a zero phase angle... but any predictable relationship would do.

    Some important real systems, which one might want to measure, are sometimes governed soley by changes in coherence and phase angle. For example, one very common system that I know of would require a minimum of 5 rotating frames per locus to fully rationalize the data. Simply following the phase angle and coherence length of any one of these 5 frames gives you a lot of information. Usually, the first step is to physically impose some order on these frames. The read out rate is determined by this first step and the choice of spin systems.

    This is not my primary interest, as it carries a lot of baggage, but there is a huge market that spans most of the basic sciences. Convincing a ranking physical chemist to look at the lab value of the Prop architecture makes perfect sense to me.


    Rich
  • rjo_rjo_ Posts: 1,825
    edited 2007-10-21 12:08
    Ken,

    One correction... in the United States and England, these sorts of applications would fall within the domain of physical chemistry. In Russia and parts of the old Eastern bloc, the same applications are handled by biophysicists. Some targeted marketing would go a long way to placing the Prop into several instrument markets.

    Rich
  • rjo_rjo_ Posts: 1,825
    edited 2007-10-21 12:18
    Ken,

    And one more opinion: if one had intentionally set out to design a chip, which would ideally serve some of these critical markets, one could not have done better than to design a Propeller.

    Rich
Sign In or Register to comment.