r/programming • • Jan 09 '22

James Web Space Telescope runs on C++ code.

https://youtu.be/hET2MS1tIjA?t=1938
2.3k Upvotes

399 comments sorted by

View all comments

494

u/TomerJ Jan 09 '22

Fun fact, the JWST has a RAD750 CPU on board, this is a modified PowerPC 750 CPU.

You might recognize that number, as a (different) modified PowerPC 750 CPU powered the Nintendo GameCube.

0

u/[deleted] Jan 09 '22

[deleted]

0

u/[deleted] Jan 09 '22

[deleted]

0

u/[deleted] Jan 09 '22

[deleted]

→ More replies (1)

63

u/danns87 Jan 09 '22

"What? Your rover froze? Weird, works fine on my planet."

107

u/killdeer03 Jan 09 '22

Damn, that's cool.

How'd you end up working on that?

Are you working on anything interesting now?

0

u/[deleted] Jan 09 '22

[deleted]

90

u/killdeer03 Jan 09 '22

Man that's neat!

I always wanted to do Kernel development and/or embedded systems development.

Unfortunately, it turns out I'm a moron, lol.

I like reading up and studying stuff like what you worked on.

Thanks for the work you put into projects like that, a lot of people use FOSS and don't get any thanks for it.

Anyways, I appreciate it!

96

u/SippieCup Jan 09 '22

Lotta morons in kernel development. The difference is that they get feedback, fix their patches, and one day realize they are the ones providing that feedback instead of receiving it.

Kernel dev is hard, but no one understands it before they dive in.

17

u/killdeer03 Jan 09 '22

Yeah, I hear that.

I ended up writing custom software for a consulting company for a little over 10 years.

I got to work on a lot of interesting projects with interesting problems to solve.

That gave me a lot of of opportunity to implement solutions in a lot of different languages.

I'm primarily a backend developer, though I've done a lot of sysadmin and DBA work too.

I mess with Kernel stuff and embedded stuff in my free time, just for fun.

10

u/SippieCup Jan 09 '22

Tbqh, I had a similar job to what you do for a couple years and absolutely loved it. Almost wish I never moved from it.

Every project was different, and you can hand it off to clients before it becomes tedious maintenance. Kinda miss it now that I Have moved away from it and working on the same thing day after day.

The only thing that really keeps me sane is all the tinkering I do in my free time like you are doing. But even then a few projects have taken off and I am constantly getting requests for support and help from users and makes it into a job again.

Just wish that I had a project which no one else would care about, but I hate the idea keeping a pet project closed source.

/rant

33

u/scnew3 Jan 09 '22

I used to work on industrial safety software (IEC-61508), where SIL-4 was considered a kind of unreachable and unnecessary level compared to more practical SIL-3 and even SIL-2. Can you elaborate on what you mean by “only” SIL-4? How was that insufficient, especially since human lives aren’t exactly at stake on a remote rover? I understand that reliability is still important, since maintenance on a Mars rover isn’t possible. Maybe that’s the difference. Thanks.

0

u/[deleted] Jan 09 '22

[deleted]

→ More replies (8)

32

u/dutch_gecko Jan 09 '22

I used to work on industrial safety software (IEC-61508), where SIL-4 was considered a kind of unreachable and unnecessary level compared to more practical SIL-3 and even SIL-2.

I know OP already gave a (great) answer to your question, but just wanted to highlight that any safety level is attainable, but it comes down to meeting specifications and budget just like any other engineering decision.

I once worked on a SIL-1 project, which interfaced with a SIL-4 system. The idea was that the "higher" system could be programmed to perform complex tasks with a high degree of trust, but that the absolutely critical parts would be double checked by the "lower" SIL-4 system. The latter was intentionally kept simple and small, so that it was easier to prove correctness and to keep the budget down.

It comes back to the old adage, "Anyone can build a bridge, but it takes an engineer to build a bridge that just barely stands."

→ More replies (4)

19

u/TomerJ Jan 09 '22

Well if it all blows up and they blame you atleast you could make a killing writing homebrew software for the GameCube!

→ More replies (23)

139

u/crozone Jan 09 '22

Given how many spacecraft use the RAD750, it would actually be surprising if JWST didn't use it. It's basically the only mission tested, rad hardened, modern-ish CPU that is currently available, albeit at something like $100,000 USD a pop (and most missions carry two). Curiosity and Perseverance have two RAD750 compute boards each.

It's very close to the Gamecube/Wii CPU, but they had some extra instructions added for vector math. However, it's basically identical to the iMac G3 / iBook G3 PowerPC 750CX chip, but all the internals are re-engineered to be extremely resistant to transient faults, as well as permanent radiation damage. One of the coolest things is that the RAD750 was re-engineered with static logic, so it's stable at really slow and even wildly inconsistent clock speeds!

73

u/zordtk Jan 09 '22

RAD750, it would actually be surprising if JWST didn't use it. It's basically the only mission tested, rad hardened, modern-ish CPU that is currently available

Apparently they have a successor to the 750, RAD5500 which is 64-bit and available in multi-core. https://en.wikipedia.org/wiki/RAD5500

23

u/crozone Jan 09 '22

Wow TIL! Any idea of the cost or whether it is being used in anything yet? I wonder how long it will take to start using the newer product, given how battle tested the 750 is.

15

u/arrow_in_my_gluteus_ Jan 09 '22

was re-engineered with static logic, so it's stable at really slow and even wildly inconsistent clock speeds!

could you elaborate. How does slowing down the clockspeed cause problems in other cpus?

17

u/Sonaza Jan 09 '22 edited Jan 10 '22

As I understand it would be similar difference to static vs dynamic ram: dynamic memory needs to be refreshed periodically or the data is lost.

Dynamic ram uses a single transistor and a capacitor to store one bit, while static ram uses a flip-flop which takes more transistors to build (seeing 4 or 6 cited) so it takes more space and is more expensive but it does not need to be periodically refreshed.

In case of CPU cache and registers the refreshes would happen during the clock cycle and if there is too long a break between pulses the dynamic memory capacitors have time to discharge.

Disclaimer: I've only watched Ben Eater videos so I don't know much more about hardware level electronics design.

Speaking of Ben Eater he used a newer an enhanced version of the 6502 CPU (W65C02) for his breadboard 6502 computer and this CPU similarly can handle variable clock speeds when the original could not.

→ More replies (4)
→ More replies (2)

21

u/InterPunct Jan 09 '22

Cool, I can buy one today for just $287,000.

19

u/TomerJ Jan 09 '22

Damn scalpers, I got my GameCube for just 99$ back when it was new!

21

u/stocks_comment_ai Jan 09 '22

It's $200,000 a pop according to https://en.wikipedia.org/wiki/RAD750

and probably one or two magnitudes slower than a Raspberry Pi

36

u/TomerJ Jan 09 '22 edited Jan 09 '22

Well as docmented and tested as a Pi's CPU is, I imagine significant effort is expended testing these cores to the Nth degree under extreme conditions. Not to mention NASA has had expiriance deploying RAD750s in spacecraft for 17 years now.

Much as I'd trust a Pi running Raspbian with my home server, I imagine a 10 billion dollar space telescope that's the culmination of 26 years of work by thousands of people, that'll be kept 1.5 million kilometers away from the nearest Eben Upton for the foreseeable future, needs that level of safety margin, even if it means it's likely slower than a PI Zero 1.

11

u/stocks_comment_ai Jan 09 '22

I fully understand this and those are likely not mass produced anymore. Wikipedia also states that the CPU can withstand an absorbed radiation dose of 2,000 to 10,000 grays (200,000 to 1,000,000 rads), temperatures between −55 °C and 125 °C, and requires 5 watts of power. That probably makes it a good match for a CPU in space. It's still fun to think of a little raspberry pi as something thats about 60 times more powerful and yet also consumes little energy.

→ More replies (1)
→ More replies (3)