Computing
Compute Chips
Different Kinds of Compute Chips
Microcontrollers
- A small computer that does not run a full or only a reduced operating system, consisting of:
- Processor
- Memory
- Timers
- Interfaces
- DMAs
- Low-power, low-performance
- programmable in C/C++ (mostly)
- RTOS or bare metal
Microprocessor
- A computer processor with support for high-speed interfaces and advanced operating systems (like linux)
- More powerful than a MCU
- Needs external circuitry to work
- RAM
- Oscillators
- Power sequencing
- Interface ICs
- Programmable with many languages depending on the OS
Field Programmable Gate Array (FPGA)
- re-configurable logic
- configurable logic blocks
- programmable interconnects
- the programmer connects blocks to form digital logic
Graphic Processing Units (GPU)
- some workloads are highly parallelizable
- have many cores doing the same in parallel
- control these cores in batches
Overview
| Microcontroller | Microprocessor | FPGA | GPU | |
|---|---|---|---|---|
| Main Application | Control and supervision | General Purpose | Low latency, custom logic, DSP, ... | Vector Processing, AI/ML |
| Power Consumption | 10mW to 3W | 0.5 – 15+ W | 1-50W | 15 – 150W |
| Robustness | High | Medium | Medium | Medium |
| Complexity | Low | Medium | High | High |
| Programming | Low-level C/C++ | Many Languages on top of an OS | HDL or HLS | Libraries e.g. CUDA, can be abstracted |
Chips in Space
The environment in space is hard for chips, mainly because of temperature and radiation.
COTS (Commercially off The Shelf)
- Adventages:
- Cost and availability of ICs
- Performance
- Widely used
- Disadvantages
- Little or no Traceability
- Packaging Issues (Plastic)
Rad-Hard (Radiation hardened)
- Advantages
- Made for Space
- Good quality control
- Radiation Tested and Qualified
- Disadvantages
- Hard to get
- Costly
- Outdated Technologies
Redundancy Strategies
Faults
Permanent Faults
- Total Ionizing Dose (Radiation)
- Displacement Damage (Radiation)
- Aging
- Electro Static Discharge
- Fatigue induced damage (temp. cycling)
- Contamination
Transient Faults
- Single Event Upsets (Radiation)
- Single Event Transients (Radiation)
- Latch-up (potentially permanent damage)
- Data Corruption
- Memory Errors
- EMI
From Cold to Hot Redundancy
Cold Redundancy
- Only one system is on at a time
- no power overhead
- no aging, different radiation exposure on redundant nodes
Hot Redundancy
- All redundant systems are on
- Fast switching time
- Communication/Coordination overhead
- optional: voting
Voting System (Triple Modular Redundancy)
Three separate systems decide on the same thing, majority vote.
What to do if one voter fails?
Recovery Mechanisms
Watchdog
A hardware or software component that monitors other systems and can restart them if necessary.
Error Correction Codes
Data Encoding Method to detect and correct errors.
Safe Mode
If the system can not handle a fault on its own, it can go into a safe state and wait for human intervention.
Graceful Degradation and Single Points of Failure
Graceful Degradation
Failures reduce features or performance, but do not stop the system from working.
Single Point of Failure
A component in a system that, if it fails, stops the whole system from working.
Software
Execution Models
Super Loop
- Everything runs inside an infinite loop.
- Sequential task execution
- Adding tasks may impact latency
- Polling lowers system responsiveness and increases latency
Dis- / Advantages
- Advantages
- low overhead
- simple
- Disadvantages
- hard to scale
- slow tasks delay everybody
- slow response to async events
RTOS-based (Real Time Operating System)
- Split problem in multiple tasks with different priorities.
- Scheduler will make sure high-priority tasks preempt lower-priority ones.
- Provides built-in utilities and synchronization tools
- Good when application has greater complexity and priority needs to be handled
Dis- / Advantages
- Advantages
- Easier determinism
- Easier to handle concurrency
- Disadvantages
- Greater complexity
- Harder to debug interactions
- Locking must be handled properly
- Task starvation
RTEF-based (Real-Time Event-Driven Framework)
- System is modeled as a set of asynchronous state machines (Active Objects).
- Tasks only execute in response to events; they remain idle otherwise.
- Uses a "Run-to-Completion" (RTC) model—once a task starts handling an event, it cannot be interrupted by a task of the same priority.
- Communication happens via event queues rather than shared memory or blocking primitives.
Dis- / Advantages
- Advantages
- Extremely low overhead: Often uses a single stack, requiring significantly less RAM than an RTOS.
- Built-in Design Patterns: Naturally enforces the use of state machines, leading to cleaner architecture.
- No Blocking: Eliminates many common concurrency issues like race conditions or deadlocks because tasks don't "wait" for resources.
- Power Efficiency: Since the system is event-driven, the CPU can automatically enter low-power sleep modes when no events are queued.
- Disadvantages
- Inversion of Control: The "Hollywood Principle" (Don't call us, we'll call you) can be difficult for developers used to sequential programming.
- Run-to-Completion Constraint: A single long-running task will block all other tasks in that priority level; you must manually break long tasks into smaller states.
- Steeper Learning Curve: Requires understanding hierarchical state machines and asynchronous messaging.
Synchronization Primitives
- Mutex
- Mutual exclusion of a resource
- Forces other threads to block until the resource is released
- Queues
- Thread-safe data flow
- Decouple timing and allow producer-consumer patterns
- Mailboxes
- Single element queues
- Fixed size messages
- Semaphore
- Signaling mechanism
- Any thread can release it
- Not forced to be binary
- Event Flags
- Bitmask-based synchronization
- Threads can wait on combination of bits to be set