Embedded Systems Overview
Definition, constraints, design metrics.
An embedded system is a dedicated computing system designed to perform one or a few specific functions, often with real-time constraints, within a larger mechanical or electronic product. Unlike general-purpose computers, embedded systems are tightly integrated with the hardware they control and are optimized for their specific application domain. They form the core of products ranging from washing machines and antilock braking systems to cardiac pacemakers and industrial robots.
Core Concept and Definition
The defining characteristic of an embedded system is its application-specific nature. The hardware and software are co-designed to meet strict requirements of the target application. This is in contrast to a general-purpose computer, where hardware is fixed and software is flexible. In an embedded system, the software is often fixed in read-only memory and executes the same program loop repeatedly.
Embedded systems operate under a set of design constraints that shape every decision in their development. These constraints include real-time performance requirements, limited memory and processing power, low power consumption, small physical size, high reliability, cost targets, and environmental operating conditions such as temperature range. Meeting all these constraints simultaneously is the central challenge of embedded system design.
Real-time operation is one of the most important constraints. A hard real-time system must complete its tasks within a strict deadline every time, with no exceptions — a missed deadline in an airbag controller or cardiac pacemaker constitutes system failure. A soft real-time system can tolerate occasional deadline misses with degraded performance but without catastrophic failure, as in a video streaming decoder.
Design Metrics
Design metrics are the quantitative measures used to evaluate and compare embedded system implementations. The primary metrics include performance (measured in MIPS or clock cycles per task), power consumption (in milliwatts or microwatts for battery systems), non-recurring engineering (NRE) cost (one-time design cost), and unit cost (per-chip cost at production volume).
Other critical metrics include code size (total ROM required for program storage), time to market (how quickly the product can be designed and delivered), and flexibility (ease of modifying behavior after deployment). These metrics often conflict. For example, using a more powerful processor improves performance but increases power and cost. Using an FPGA improves flexibility and performance but increases NRE cost and power.
Practical Understanding
In practice, embedded systems are implemented using microcontrollers (MCU), digital signal processors (DSP), application-specific integrated circuits (ASIC), or field-programmable gate arrays (FPGA), depending on the application requirements. Microcontrollers integrate CPU, memory, and peripherals on a single chip, making them ideal for cost-sensitive high-volume products. DSPs are optimized for mathematical operations on streaming data, used in audio, radar, and communications.
The firmware running on an embedded processor is typically written in C or assembly and often executes under a real-time operating system (RTOS) such as FreeRTOS or VxWorks. The RTOS manages task scheduling, inter-task communication, and deterministic timing. In simpler systems without an RTOS, the program runs as a bare-metal superloop: a continuous while(1) loop polling inputs and updating outputs.
Given:
Microcontroller clock: 16 MHz
Task requires 800 clock cycles to execute
Task must complete within 100 microseconds
Why this formula applies:
Execution time = clock cycles / clock frequency. Must verify it fits within deadline.
Formula:
T_exec = N_cycles / f_clk
Substitution:
T_exec = 800 / (16 × 10^6)
Calculation:
T_exec = 50 microseconds
Final Answer: Execution time = 50 µs, which meets the 100 µs hard deadline with 50 µs margin.Exam Tip: GATE questions often ask to classify a system as hard or soft real-time based on the consequence of a missed deadline. Hard real-time — missed deadline equals system failure (pacemaker, ABS). Soft real-time — missed deadline degrades quality but not safety (video stream, audio buffer).
- Embedded systems are application-specific, tightly coupling hardware and software to perform dedicated functions.
- Hard real-time systems have absolute deadlines; missing a deadline is system failure. Soft real-time systems degrade gracefully.
- Design metrics include performance (MIPS), power (mW), NRE cost, unit cost, code size, flexibility, and time to market.
- Microcontrollers integrate CPU, RAM, ROM, and peripherals on one chip, minimizing board area and cost.
- Firmware executes either as a bare-metal superloop or under an RTOS for deterministic multitasking.
Quick Revision
- Embedded system: dedicated, application-specific computing with hardware-software co-design.
- Hard real-time: missed deadline = failure. Soft real-time: missed deadline = degraded performance.
- Design metrics: performance, power, NRE cost, unit cost, code size, flexibility, time to market.
- Execution time: T = N_cycles / f_clk. Must always be less than the worst-case deadline.
- Microcontroller vs DSP: MCU for control tasks, DSP for signal processing with MAC operations.
- Exam trap: NRE cost is one-time. Unit cost decreases at higher production volumes. ASIC has highest NRE but lowest unit cost.
- RTOS provides deterministic scheduling; bare-metal superloop is simpler but less scalable for multi-task systems.
Embedded Systems Practice
Test your knowledge on this topic!