Will the universe oscillate? A pitfall
ErNa
Posts: 1,752
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.
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:
or:
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
Hello Rest Of The World
Hello Debris
Install a propeller and blow them away
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
Hello Rest Of The World
Hello Debris
Install a propeller and blow them away
Comments
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.
;o)
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
Perhaps the Mayas had a similar problem, just ran out of digits[noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Your world might stop but I've got a planned migration to ensure I'm 64 bit by then [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"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!"
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
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 6/4/2010 3:23:48 PM GMT
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.
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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
Never use : if a > CNT, always: if (a - CNT) > 0
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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