Hacker Newsnew | past | comments | ask | show | jobs | submit | more vodou's commentslogin

Can you elaborate a bit regarding the -mflat compiler option? Why does it improve timing jitter etc? I am not sure I understand the description from the GCC docs. Is it disabling the register windows? Isn't that one of the big selling points of the SPARC architecture?


There is a finite number of register windows, usually 8 but only 7 can be used because the 8th serves as "sentinel" to detect over- and underflow.

Once register windows are full (a function call wants to activate the next register window but there is no unused window left) window overflow occurs and a trap handler is activated.

The trap handler "unwinds" the register windows and stores all the contents in memory (stack). Now the next function can continue with an empty set of register windows. Once you return from the function, the contents of the windows have to be restored (window underflow trap).

Problem is that the trap handlers can't know which of the registers in each window were in use. Therefore all have to be saved/restored. This ratio will worsen when you write smaller functions that use less register and nest deeper.

So there are two issues: 1. You can't really know at which point in your program that underflow/overflow occurs because it changes depending on the exact path of execution through the program. 2. Unnecessary memory write/read operations. While ca. 120 x 32-bit words is not that much, with an 8-bit wide SRAM, some waitstates and EDAC this might be noticeable. (Consider that the LEON processors have a data cache for read access but for writing only a "store buffer" that queues few memory writes)

Using -mflat every register is saved by the caller/callee (as ABI demands) on the stack. This means that the memory accesses are predictable and spread out over each function call.

So, my personal conclusion is that register windows are an intriguing idea on the surface but become useless when you aren't writing 80s spaghetti code. There were many similar ideas at that time, e.g., Am29000.


We’d considered using mflat, but we’re not that performance constrained (and prefer the slightly smaller binary size with register windows enabled). I may do some profiling of the under flow/overflow interrupts though since you’ve now got me second guessing myself.


Registers asr22/23 contain a cycle counter that you can use to time stuff. If it's not present, there's a register in the DSU that counts cycles but that requires an access via the AHB bus. You can measure a lot of things with those cycle counters, like context switch and interrupt handling times, memcpy vs naive for-loop, linear vs. binary search on small arrays...

I'd expect a few microseconds per overflow at most but it depends a lot on the characteristics of the system. Of course, if the application is not sensitive to a few microseconds here and a few microseconds there that optimization might not be worth it.


You don't normally use public key encryption in satellites, it is some sort of block crypto. CCSDS (a bunch of standards for space applications that is quite popular in the industry) recommends AES-HMAC for authentication and AES-GCM for both authentication and encryption.

My experience with a LEON processor ~100 MHz is that it is hard to get much throughput out of an AES implementation.


Satellites larger than cubesats usually use rad-hardened processors, e.g. in Europe the LEON processors are quite common. These are basically rad-hardened SPARC v8 processors. They are also clocked quite low since they are often implemented using a FPGA.

So, a rather old RISC architecture, lacking any cryptography extensions/intrinsics, running at a rather low clock frequency means that it is not that easy to fit authentication and cryptography in software (at least at the necessary rates).

To get authentication/encryption in these systems you need a separate crypto unit or implement AES-GCM/AES-HMAC in FPGA (if you have room).


Can you please ask him why he removed Jason's bass guitar! (Sorry, I had to.)


My dad’s ex-partner tells his version of a story about it: https://m.youtube.com/watch?v=lmFgeFh2nlw

Tldr: band was mourning cliff’s death and giving newsted grief.


My god. This almost brings tears to my eyes. I haven't played games for years. Small children and adult life kind of came in the way... I don't miss gaming that much, but I miss Zelda.

The sheer perfection of the Zelda games are just mindblowing to me. I replayed The Legend of Zelda many years ago and it was obvious that the gameplay was still holding up. They got it right from the absolute beginning. And not only that, it is basically the same gameplay still used (at least up to Twilight Princess which is the last major Zelda game I played. They are so consistent.


Breath of the wild was probably the largest change in the original Zelda formula since ocarina of time (which introduced 3D for the first time)

Based on the trailers I've seen of tears of the kingdom(and I've been trying to avoid that because spoilers) this game walks even further down the path that breath of the wild set out!

We're kind of alike you and I,I think. While I don't have kids that keep me from gaming, I could do without it all, except for Zelda. My switch is currently downloading totk.


Only been playing for an hour, but when you first jump off and start flying into the garden... yes basically had tears in my eyes. Perfection.


It could just be that we're trained on their mechanics due to their consistency over the years


A bit meta (sorry): Why do Americans keep calling it abortion clinics? Isn't maternity care center or maternity clinic a bit more suitable. Abortions is just a small fraction of what they do, at least at my corner of the world.


In the North American context, "maternity care" would probably be understood as midwifery, which is not Planned Parenthood's main vocation.

That said, you're correct that Planned Parenthood offers many more services than just abortion, but the category they'd be in is "sexual and reproductive healthcare," not "maternity care."

Many advocates are pushing for "abortion forward" language to de-stigmatize the procedure, and (at least in Canada) some clinics are opting for less euphemistic names.[0]

0. https://www.cbc.ca/news/canada/abortion-clinics-language-1.6...


Because that's what they provide, and that's what they deal in, exclusively. Maternity care centers generally deal with other aspects of pregnancy, though some may also provide abortion services.


I got testicular/prostate cancer screening done at a Planned Parenthood (randomly, it was the closest place offering it) so I'm pretty sure they provide services other than abortions?


Sure, but that is not their primary focus, or historic mission. But what are you going to so with an organization founded by an out and out eugenicist.


Because "abortion" is a hot political issue in the US, and a word that pushes lots of people's emotional buttons. And because anyone using less-button-pushing words to describe things is a for-sure loser in the Darwinian attention economy.


This is pretty uncontroversial in an embedded system context. As others have said in this thread, nothing spectacular happens if STL throws, it just boils down to a std::terminate. You can mitigate this by being careful with what you do with STL.

Also, in a real-time system context, exceptions can be undesirable since they might cause non-deterministic behaviour.

Catching an exception can be surprisingly costly. Did some benchmarking a while ago on the embedded, real-time system I work on and saw that throwing and catching a std::runtime_error had about the same execution time as a rather slow CRC32 calculation (no pre-calculated tables, no special instructions) of a 256 bytes input array. (Of course, this depends a lot of the CPU architecture, compiler, etc.)


You gotta love that Tcl/Tk node based user interface in Max/FTS - something that is still alive today in Pd (Pure Data). Sure, it is clunky, probably not in line with any modern UX design rules. But, at the same time, it is kind of timeless, brutalistic and stylish in all its monochrome ugliness.


TTK can be themed to match your GTK theme :D.

You have the modernish bling-bling with TCL/TK's rad development.


:%s/ugliness/beauty


Windows Sandbox, together with WSL, have liberated me from VirtualBox/VMware Workstation. So thankful for that. Now I only wait for native USB support in WSL.


In case you don’t know about it, there is good workaround based on USB over IP that is officially recommended by MS.

I used it a while ago to flash a ESP32 and to connect a Zigbee Adapter to a Linux container. Had no issues with it.

https://learn.microsoft.com/en-us/windows/wsl/connect-usb


This is useful on the USB support front: https://learn.microsoft.com/en-us/windows/wsl/connect-usb


Somewhat related: https://en.wikipedia.org/wiki/Automavision

"Automavision is a cinematic technique invented by Danish director Lars von Trier.

Developed with the intention of limiting human influence, in Automavision no cinematographer is actively operating the camera. The best possible fixed camera position is chosen and then a computer chooses framing by randomly tilting, panning or zooming the camera. In doing so it is not uncommon that the actors appear in the shots with a part of their face and head cut from the frame. With this technique then the blame for any "errors" are entirely attributable to a computer."

I always felt this was a bit of joke from Lars von Trier, though. I am not aware of any other film than "The Boss of it All" where it was used. A good joke after all. As von Trier says:

"If you want bad framing, Automavision is the perfect way to do it."


"The Boss of it All" takes place in some kind of IT software firm. I'm pretty sure "automavision" is inspired by the kind of online meeting camera which tries (and often fails) to focus on the person talking.

While most of the satire in the movie is unrelated to IT, there are some in-jokes. In one scene, a developer is getting suspicious towards the boss of it all (who is really a hired actor with no understanding of the business) and asks "do you even know what agile development means?" The actor who is trained in improvisational theater cleverly retorts "Well, can you explain what agile development is?", which shuts up the developer.


> a developer is getting suspicious towards the boss of it all (who is really a hired actor with no understanding of the business)

The Consultant is similar, though one of these obsessively weird for the sake of if productions.


You could extend this technique to realtime random framing. Shoot everything with a fisheye lens, then screen the film with a player application that randomly crops each scene at runtime (applying correction for the fisheye distortion).

Maybe call it Automascope.


Man, I’ve been thinking for years that I should re-watch The Boss of it All. IIRC, it was very funny.

Unfortunately not available on streaming anywhere. Hopefully available via “other means”.


I did recently, and it is still as good as that first time I saw it, together with one other person in an otherwise empty arthouse movie theater. I picked it completely at random, on a day I skipped work, and the whole thing felt completely magical.


Wonderful!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: