PDA

View Full Version : Will the universe oscillate? A pitfall



ErNa
06-04-2010, 06:04 PM
There is an ongoing discussion, if the big bang is a single event or if the universe will shrink again and the whole thing starts over. So, if silicon structure keep on shrinking, there is a chance to survive the collapse after expansion of the univers finishes. /forums/emoticons/smile.gif

If not, if everything comes to an end, we could enlarge the counter of the propeller to 64 bits. This allows to count to 10^19 counts. 100MHz = 10^8 cnts/s, so we can count 10^11s. One year has about 3*10^7 seconds. so we have in the range of 10^4 years to wait, until the counter overflows. Seeing this and taking into account, that clock speed will increase, it is better to have a 96 bits timer counter. That will give us another 10^9 factor,, what makes 10^13 years. As the universe exists now for about less than 10^10 years, there is a 10^3 margin, what should be sufficient.

Anyway, a 128 bit counter will give a solution even for the case, that such an oscillation is ongoing.

I thought about this, because there are to ways to have a time out loop:




Timer:=0
Duration:=1
start.thinking

repeat
if cnt > timer
think_a_bit
timer += Duration


or:



Timer:=0
Duration:=1
start.thinking

repeat
if (cnt-timer) > 0
think_a_bit
timer += Duration


Now, that I had time to wait, and as the 32 bit counter overflows after 53 seconds, and this happens often enough, I prefer the second version.

Have a great day, ErNa

p.s.: Did anybody take a look, if the counter is initially not zeroed? That could be seen as a hint that there was something in the past

cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_ 5511&partName=htmltext (http://cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_ 5511&partName=htmltext)
Hello Rest Of The World
Hello Debris
Install a propeller and blow them away /forums/emoticons/wink.gif

MagIO2
06-04-2010, 07:11 PM
My 2 cents:
There should not be a difference in both versions except that the subtraction in case one is done implicitly, whereas in the second case the subtraction is done explicitly ... and you have an additional implicit subtraction (result of cnt-timer) - 0. If you compare 2 variables the SPIN interpreter will subtract value2 from value1 allowing to set the C and Z flag. The combination of the flags tell whether the value is smaller, bigger, equal .....

But to be honest ... I don't get the point what this whole thing is good for?! What is think_a_bit?

What happens when the sign of cnt switches? cnt will go up from 0-$7fff_ffff. The next increment will set the sign-bit, so the resulting number is negative. '>' can't be true from there on as the greater than operator is working with signed numbers, isn't it?

I think that this code is not extending CNT to 64 bits, is it?

I'd think that the best way to extend the CNT is to use counters. Counter A can be driven by a fraction of the clock-frequency. So you already extend the counter this way. If you need even more bits you can let counter A drive a pin which is then input of counter B.

The bigger problem is reading the correct value, as this operation would not be atomic. This means it can happen that you read the first part and then an overflow occurs to the next part.

MagIO2
06-04-2010, 07:38 PM
BTW ... it would be a cool idea to put a lot of propellers inside of a time machine. And when the propellers are shrinked to the size of ... well ... say a flea by the gravity of the "gnab gib", the time machine can send em back. Parallax then can put em on a breakout board -size of a DIP- having 1024 chips = 8192 COGs. That would be fun!

;o)

nicolad76
06-04-2010, 07:44 PM
Mayas say that the world will end on 2012 so why bothering??? :)

heater
06-04-2010, 08:42 PM
nicolad76: "Mayas say that the world will end on 2012 so why bothering..."

I don't think they did. That's just where their calender stopped.

The world will actually end on Tuesday, January 19 2038. at 03:14:07 GMT.

www.rediff.com/money/2005/may/06linux.htm (http://www.rediff.com/money/2005/may/06linux.htm)

Perhaps the Mayas had a similar problem, just ran out of digits:)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.

BradC
06-04-2010, 09:10 PM
heater said...

The world will actually end on Tuesday, January 19 2038. at 03:14:07 GMT.



Your world might stop but I've got a planned migration to ensure I'm 64 bit by then :)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"I mean, if I went around sayin' I was an emperor just because some moistened bint had lobbed a scimitar at me they'd put me away!"

Beau Schwabe (Parallax)
06-04-2010, 10:13 PM
BradC,

That date (at least the year) also coincides with the 1-mile wide asteroid the Earth has a date with in 2038. ...but first things first, some of 'our brightest minds' are trying to plug an oil leak in the Gulf, no time to think about a silly asteroid. Just wait until some of the solutions come pouring in for that one :-O

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Post Edited (Beau Schwabe (Parallax)) : 6/4/2010 3:23:48 PM GMT

heater
06-04-2010, 10:32 PM
Bradc: "...I've got a planned migration to ensure I'm 64 bit by then..."

Hmmm. That must mean a 64 bit version of BST compiling for the 64 bit Propeller VII.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.

kwinn
06-04-2010, 11:01 PM
The end of the world has been predicted so many times I'm surprised that even the worlds village idiots pay any attention to such predictions.

Now a 64 bit Propeller would be a chip to fantasize and drool over. No more cog or hub memory addressing limitations, 64 bit I/O ports ( 2 per chip please ), and enough memory (minimum 64K per cog, 1Meg for hub. Oh, and 16 cogs would be nice too.

ErNa
06-04-2010, 11:02 PM
Maybe we find a way to guide the asteroid to the gulf to plug the hole? Make a smart asteroid with gps and winglets. Then there is only one questions: how to evaporate the moon to create an atmosphere, so the winglets can be functional http://forums.parallax.com/images/smilies/wink.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_ 5511&partName=htmltext (http://cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_ 5511&partName=htmltext)
Hello Rest Of The World
Hello Debris
Install a propeller and blow them away http://forums.parallax.com/images/smilies/wink.gif

MagIO2
06-04-2010, 11:07 PM
Isn't there a expiration date printed on a label by the manufacturer of earth?

ErNa
06-04-2010, 11:17 PM
Ok, honestly: comparing the difference to zero handles the overflow in the correct way, like waitcnt ( time += increment). Waitcnt just waits, but I wanted to do something else in the meantime. So the loop is running infinitely, but doing think_a_bit only now and then. Comparing CNT to a value, which was incremented worked quite well, and only quite seldom the program hang for some time. But that was not "mission critical". I just didn't search this bug. Next chance, next pitfall: now it was critical and first I had no glue, what's going on. Now it's clear!

Never use : if a > CNT, always: if (a - CNT) > 0

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_ 5511&partName=htmltext (http://cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_ 5511&partName=htmltext)
Hello Rest Of The World
Hello Debris
Install a propeller and blow them away http://forums.parallax.com/images/smilies/wink.gif

JRetSapDoog
06-04-2010, 11:59 PM
Dateline 2038: World exhales sigh-of-relief as radiation-hardened Prop VII-guided rocket impactor saves planet Earth from doomsday asteroid; World leader (with the exception of Britain) rewards 5th-grader who created it with a prop-powered puppy dogbot complete with functional GI tract. No plans as yet to prevent the universe from "rolling up" like a scroll as it speeds off into oblivion near the event horizon.

heater
06-05-2010, 12:20 AM
kwinn: "No more cog or hub memory addressing limitations...enough memory (minimum 64K per cog, 1Meg for hub."

You are not thinking big enough for 2038. The Prop VII would have an extra 16 bits for each of the source and dest fields in an instruction. That's 16 + 9 = 25. That's 32 Mega LONGs per COG.
HUB RAM will of course be humungous.

Sadly though the Prop VII will still only have 32 I/O pins as that is all you can fit on a 40 pin DIP. Or they still haven't fixed that bug in the chip placement software.



64 I/O pins is rumoured to be available on the Prop VIII subject to the world still existing at that time.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.

ErNa
06-05-2010, 03:32 AM
Infinite memory is just one byte more than needed. Infinite clock speed: the program comes to an end during your lifetime!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_ 5511&partName=htmltext (http://cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_ 5511&partName=htmltext)
Hello Rest Of The World
Hello Debris
Install a propeller and blow them away http://forums.parallax.com/images/smilies/wink.gif