Embedded system design process
Practical, exam-focused notes on the embedded system design process: requirements, specification, architecture and HW–SW partitioning, verification/validation, integration, testing, and common trade-offs (real-time, power, cost).
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Designing an embedded system is the engineering process that turns a requirement into a working product. Engineers use the design process to organise work, make trade-offs (for example between hardware and software), and to plan verification, validation and testing so the final system meets functional and non-functional requirements such as real-time deadlines, power and cost.
Key ideas
- Specification: a precise, measurable document that turns requirements into engineering targets (e.g., “response time ≤ 5 ms for event X”, or “battery life ≥ 48 h under normal use”). A good specification is complete, consistent, verifiable and traceable.
- Architecture: high-level structure of the system showing major components and interfaces. Typical embedded architecture blocks: sensors, actuators, processing unit (microcontroller/CPU), memory, communication buses, power supply. When asked for a diagram, draw boxes for each block and arrows for signals (label CPU↔Sensor: signal type and data rate; CPU↔Actuator: control signal power characteristics; bus: name and bandwidth).
- Hardware–software partitioning: dividing system functions between hardware (HW) and software (SW) to meet constraints. Use performance, cost, power and development time as criteria. Define hardware acceleration: moving a computation from software to dedicated hardware to improve speed or reduce energy per operation.
- Amdahl’s law (definition): gives the theoretical speedup when part of a system is improved. Assumptions: a fixed workload, only a fraction f is accelerated by factor S, rest remains unchanged.
- Scheduling: assigning CPU time to tasks so deadlines are met. Important models: periodic tasks, sporadic tasks, deadlines equal to periods. Define preemptive scheduling (tasks can be interrupted) and non-preemptive scheduling (cannot be interrupted). Also know EDF (Earliest Deadline First): a dynamic-priority uniprocessor scheduler that, with D_i = T_i and no self-suspension/overheads, is schedulable iff U ≤ 1. For RM, an exact fixed-priority test is response-time analysis: R_i = C_i + Σ_{j∈hp(i)} ceil(R_i/T_j) · C_j, and task i is schedulable if R_i ≤ D_i.
- Rate Monotonic (RM) scheduling theorem (statement): For a set of independent, periodic, preemptable tasks with static priorities and deadlines equal to periods, the processor utilisation U = Σ(Ci/Ti) is schedulable if U ≤ n(2^{1/n} − 1) where n is number of tasks. Assumptions: tasks are independent, deadlines = periods, context-switch overhead ignored, worst-case execution times known.
- Derivation sketch commonly required in exams: use the critical-instant theorem (worst case when all tasks release synchronously) and the Liu & Layland inequality ∏(U_i + 1) ≤ 2; by symmetry the least upper bound occurs when all U_i are equal, yielding U_bound = n(2^{1/n} − 1). The limit as n→∞ is ln 2. For finite n you state this as a sufficient bound; if U exceeds that bound the test is inconclusive (the task set may still be schedulable). Universities commonly ask to show the bound formula and compute for small n.
- Verification vs Validation: Verification = “Are we building the product right?” (check design/specs, run unit tests, formal proof, code reviews). Validation = “Are we building the right product?” (system meets user needs in target environment, user acceptance tests).
- Integration and testing: integrate HW and SW incrementally; use test plans derived from specifications. Define system-level test (tests full product), acceptance test (customer environment), and regression test (repeat after changes).
- Risk analysis and mitigation: identify high-risk items (timing, safety, supply), reduce risk by prototypes, redundant design, deadline slack, simulation.
Diagrams to draw when asked (describe exactly):
- V-model: Draw a large V shape. Left descending side: Requirements → System specification → Architecture → Module design. Right ascending side: Module test → Integration test → System test → Acceptance test. Connect corresponding levels across the V to show verification activities.
- Block-level architecture: Draw CPU box in center, labelled with microcontroller model and clock frequency; draw Memory (RAM, Flash) boxes connected with a bus labelled with bus name and bandwidth; draw Sensor boxes with signal types (analog/digital) and sample rates; draw Actuator boxes with required power and control signals.
Formulas
A = 1 / ((1 - f) + f / S) — Amdahl’s overall speedup. Where A = overall speedup (dimensionless), f = fraction of execution time accelerated (dimensionless, 0–1), S = speedup of accelerated part (dimensionless). Applies when total work is fixed and only fraction f is accelerated.
U = Σ (Ci / Ti) — Processor utilisation for periodic tasks. Ci = worst-case execution time of task i (seconds), Ti = period of task i (seconds). Dimensionless. Applies for periodic task systems.
U_bound(n) = n (2^{1/n} - 1) — Liu & Layland utilization bound for Rate Monotonic scheduling. n = number of tasks (integer). Dimensionless. Assumptions listed in Key ideas.
P = V · I — Electrical power. For DC or instantaneous values: p(t) = v(t) · i(t). For sinusoidal AC using RMS values, average real power is P = V_rms · I_rms · cosφ (power factor cosφ = 1 for purely resistive loads). Units: P in watts (W), V in volts (V), I in amperes (A).
E = P · t — Energy consumed. E = energy (joules, J), P = power (watts), t = time (seconds). Applies when power P is approximately constant over interval t.
R_system = Π Ri — Reliability of series system. Ri = reliability (probability of success) of component i over mission time. Dimensionless probability. Applies when components are in series (system fails if any component fails) and failures independent.
Worked examples
- HW–SW partitioning with Amdahl’s law (numerical)
- Problem: A computation takes 100 s on software-only. You can implement 40% of execution time in hardware that will be 5× faster. What is overall execution time and speedup?
- Formula:
A = 1 / ((1 - f) + f / S) - Values: f = 0.40, S = 5
- Compute: (1 - f) = 0.60; f/S = 0.40 / 5 = 0.08; denominator = 0.60 + 0.08 = 0.68
- Overall speedup A = 1 / 0.68 = 1.470588 ≈ 1.4706 (dimensionless)
- Original time = 100 s, new time = 100 s / 1.470588 = 68.0 s
- Final answer: overall execution time = 68.0 s, overall speedup ≈ 1.47×.
- Rate Monotonic schedulability (numerical)
- Problem: Three periodic tasks with (Ci in ms, Ti in ms): Task1 (C1=1, T1=4), Task2 (C2=1, T2=5), Task3 (C3=2, T3=10). Are they schedulable under RM?
- Step 1: Compute utilisation U = Σ(Ci/Ti) = 1/4 + 1/5 + 2/10 = 0.25 + 0.20 + 0.20 = 0.65
- Step 2: Compute bound for n=3:
U_bound = 3 (2^{1/3} - 1). 2^{1/3} ≈ 1.2599, so (2^{1/3} - 1) ≈ 0.2599. Multiply by 3 gives U_bound ≈ 0.7797. - Step 3: Compare: U = 0.65 ≤ U_bound ≈ 0.7797. Under RM assumptions (periodic, independent, deadlines = periods, preemptive, no overhead) the task set is schedulable.
- Final answer: Schedulable under RM (U = 0.65 ≤ 0.7797).
- Quick reliability example (short)
- Problem: Two series components with reliabilities R1 = 0.99 and R2 = 0.98 over mission time. System reliability R_sys = R1·R2 = 0.99 × 0.98 = 0.9702. Final: 0.9702.
Common mistakes
- Forgetting to include interrupt, context-switch and I/O overhead in execution times Ci.
- Applying Amdahl’s law without fixing total workload assumption (for scalable workloads, Gustafson’s law may apply instead).
- Not documenting non-functional requirements (timing, power, thermal) precisely; this makes testing and verification impossible.
- Designing integration tests only at the end; integration should be incremental.
For your exam
Question types you will see: definitions (short), describe a process (V-model, waterfall vs iterative), derive the RM bound or state and apply it, numerical problems using Amdahl and scheduling utilisation, draw architecture diagrams and label important signals, write a test plan outline, explain verification vs validation. What full-marks answers include:
- For definitions: a clear term definition and one short example.
- For derivations: state assumptions explicitly, show steps, conclude with final formula and comment on applicability.
- For numericals: list given data with units, write the formula, substitute values step-by-step, carry units, give final answer with units and a short interpretation.
- For diagrams: draw labelled blocks and arrows; annotate constraints (e.g., bandwidth, sample rates, voltages) and mention assumptions.
Quick check
- What is the difference between verification and validation?
- State Amdahl’s law and name one assumption behind it.
- For two tasks with (C1=2 ms, T1=5 ms) and (C2=1 ms, T2=10 ms), compute utilisation and say if U ≤ U_bound for n=2.
Answers: Verification checks ‘‘are we building it right’’; Validation checks ‘‘are we building the right system’’; Amdahl’s law: A = 1/((1−f)+f/S), assumption: fixed total workload and only fraction f is accelerated; For Q3: U = 2/5 + 1/10 = 0.4 + 0.1 = 0.5; U_bound for n=2 = 2(2^{1/2}−1) ≈ 2(1.4142−1) = 0.8284, so 0.5 ≤ 0.8284 (schedulable under RM assumptions).
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?