News:

  • May 05, 2026, 06:18:39 PM

Login with username, password and session length

Author Topic: Positive Differential Contacts in a While Loop  (Read 24986 times)

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Positive Differential Contacts in a While Loop
« Reply #15 on: November 25, 2015, 11:02:36 PM »
Actually, that's the clearest explanation I've seen of code-block <-> edge instruction interaction I've seen (because it includes the why).  Thank you!
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: Positive Differential Contacts in a While Loop
« Reply #16 on: November 25, 2015, 11:15:03 PM »
We're implementing subroutines now and a major discussion is what instructions to allow. We'd like to give y'all the longest, stoutest rope we can, but the more we give, the greater the potential for confusion. We'll probably include as many as make sense, but provide detailed warnings (which can now be turned off ;) ).
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

sgsims

  • Hero Member
  • *****
  • Posts: 127
Re: Positive Differential Contacts in a While Loop
« Reply #17 on: November 26, 2015, 10:44:56 AM »
Just getting a response in here before the Thanksgiving festivities.  Thanks for the explanation Bob.  Your explanation that talks about the behavior being tied to the Instruction NOT the Source data made the most sense to me.

Just so I can solidify my understanding of the PD contact behavior in the Do-More CPUs,  will you compare how the behavior in the Do-More platform compares to that in the DL CPUs?  It looks like to me that in the DL line the behavior was tied to the Source data not the Instruction. 

Thanks

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: Positive Differential Contacts in a While Loop
« Reply #18 on: November 26, 2015, 11:32:34 AM »
I don't have any insight to Koyo's DL implementation, but I suspect they have a second copy of the image register to implement edges. That would give the "once everywhere" behavior rather than the "once per instruction" implementation that Do-more has. We considered that approach, but with Do-more's larger image register the performance hit to do that was unacceptable. I actually like theirs better conceptually if the hit wasn't so bad, but engineering is all about values and trade-offs.

And wow...I just realized I completely misspoke about our implementation. We don't use workspace for that, because it doesn't work right during bumpless run mode updates. We started with that and weren't happy with the results. We use edge memory, which is assigned on a per instruction basis by DmD. Behavior is the same, but where we store the prior state is different. Critical issue is run mode update behavior...needs to work perfectly.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Positive Differential Contacts in a While Loop
« Reply #19 on: November 26, 2015, 12:50:32 PM »
And DL has loops, or can have, but it doesn't have code blocks to anything like the degree that Do-More does, so this particular issue is very limited wrt discussing DL's handling of the analogous case.

IOW, if you write a DL style program in a Do-More, you probably won't notice any differences in one-shot handling.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: Positive Differential Contacts in a While Loop
« Reply #20 on: November 26, 2015, 01:55:39 PM »
And DL has loops, or can have, but it doesn't have code blocks to anything like the degree that Do-More does, so this particular issue is very limited wrt discussing DL's handling of the analogous case.

IOW, if you write a DL style program in a Do-More, you probably won't notice any differences in one-shot handling.

True.

I'm generalizing, but one-shots tend to fall into two categories, events and first scan (of a state change) detection. I'm sure you old-school guys view this differently, but I tend to write those behaviors differently in Do-more and use one-shots far less often than in DL.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

sgsims

  • Hero Member
  • *****
  • Posts: 127
Re: Positive Differential Contacts in a While Loop
« Reply #21 on: November 27, 2015, 10:45:40 AM »
Thanks everyone for the replies...Mission accomplished as far as understanding the differences in execution of the PD contact in Do-More vs DL.  Now I can continue to program in Do-More accordingly.

Cheers