Re:Space Invaders
by JohnFen on Wednesday March 12, 2025 @12:27PM
(#43344902)
And about the ones in the code flow, it was also pretty common practice in those days to use NOPs as time delays.
[ Parent
| on HN ]
It's required whenever your clock cycle time is near your timing requirements. Not so much a problem with multi GHz microcontrollers, but still needed for cheap ones.
Manually add up all cycles for each instruction in each branch, then pad the shorter with noop to make them the same. Repeat for each code path, and cry when you need to make a change.
Yep, it's a practice I still engage in with several of my microcontroller-based projects.
I know it's probably an intentional exaggeration... but are there really any microcontrollers over 1 GHz core clock? Fast I know of is ST at around 600 MHz.
ARM Cortex based ones exceed 1GHz [1]. Although, maybe the definition of microcontroller is a bit fuzzy these days.
[1] https://www.mouser.com/c/semiconductors/integrated-circuits-...
ARM Cortex-A is an application processor, not a microcontroller. With an MMU (can run a full OS like Linux) and without internal memory.
Cortex-M is a microcontroller, without MMU (can't run Linux etc.), and typically has internal RAM and flash.
Only the NXP i.MXRT1170 reaches 1 GHz CPU clock, and this is not multi-GHz as the prior comment declared.