Chapters

17 Hardware Optimization Strategies

energy-power
optimization
hardware

  1. Battery Bruno follows a battery sensor through wake, read, send, and sleep steps while the battery drains somewhere along the unfinished path.

    Which step uses most of the sensor battery?

CP-0137 pre-concept hook: Which step uses most of the sensor battery?

17.1 Start With the Block That Burns Energy

Picture a battery sensor that wakes, reads a value, sends it, and sleeps. One part may use most of the energy. It may be the radio, a memory copy, a voltage converter, or a block that never turns off.

Find that costly part first. Measure one full work cycle, including sleep and wake time. Change one part only when the record shows that it controls the budget. A faster chip is not an answer by itself.

Now check the price of the change. A special block can finish work quickly but waste power while idle. A wider data path can save time but add cost and design risk. A new power part can lose its gain at light load.

The simple cycle cannot pick a processor, memory path, power rail, or custom chip. It also cannot prove heat, update, or supply risk. Those choices need real loads and a before-and-after test on the whole device.

Use the Practitioner sections to select blocks and review the work path. Use Under the Hood for current, rail loss, memory traffic, and special hardware. The deeper checks explain when the simple rule holds and when a trade-off changes the result.

Run a plain before-and-after check. Charge the same battery. Use the same work. Use the same room. Mark sleep current. Mark wake time. Mark active current. Count each data move. Count each radio send. Measure heat. Repeat the run. Change one block. Run it again. Compare total charge. Compare missed work. Compare start time. Compare board cost. Keep the old design as a base. Reject a gain that harms safety. Reject a gain that harms repair. Accept only the whole-device result.

A hardware optimization is useful only when it reduces the part of the workload that dominates the budget. An accelerator, buck regulator, DMA path, or peripheral choice can save energy, but it can also add idle loss and integration cost.

Begin with the measured bottleneck, then choose hardware that reduces active time, transfer cost, or wasted conversion in the dominant regime.

In 60 Seconds

Hardware optimization is the decision to move work to a better physical resource: a lower-power peripheral, a wider memory path, a dedicated accelerator, reconfigurable logic, or custom silicon. The right answer depends on measured workload, data movement, update needs, volume, risk, and whole-device energy.

The mathematical gist. A core specified at 50 microamps per MHz on a 1.8 V rail behaves like about 27.8 pF of switched capacitance. At 48 MHz it draws 2.40 mA and 4.32 mW. Halving frequency alone gives 2.16 mW, but halving frequency while lowering the rail to 1.2 V gives 0.960 mW, a 77.8% saving because dynamic power follows CV2fCV^2f.

Math Bridge · guided foundationsWhy does lowering voltage save more than slowing the clock?Let Battery Bruno recover switched capacitance from the datasheet and compare frequency-only scaling with DVFS.

17.2 Hardware Optimization Strategies

Hardware optimization is not only “choose a faster chip.” In IoT systems, it usually means matching each workload to the cheapest safe hardware path that meets timing, energy, memory, and reliability constraints.

Good hardware optimization often happens before a board is finalized:

  • choose a processor family with enough sleep modes, wake sources, and peripheral support
  • offload repeated transfers to timers, DMA, or communication engines
  • reduce memory movement with better buffering and data layout
  • select an accelerator only when the algorithm is stable and the measurement justifies it
  • define power domains so unused parts can be switched off

17.3 Learning Objectives

By the end of this chapter, you will be able to:

  • Compare general-purpose processors, hardware peripherals, DSP-style blocks, reconfigurable logic, and custom silicon.
  • Explain why data movement and memory bandwidth can dominate hardware optimization.
  • Use selection gates for acceleration, power domains, clocks, and platform changes.
  • Identify when a hardware change is premature or too risky.
  • Build validation evidence for before/after hardware optimization decisions.
Minimum Viable Understanding

17.4 Hardware Choices As A Spectrum

Hardware options form a spectrum from flexible software control to highly specialized circuits.

Read Figure 17.1 from CPU to ASIC as a trade, not a ranking. Moving right can turn a stable kernel into dedicated parallel hardware, but each step gives up some ability to repair changing requirements in software.

No-panel hardware optimization spectrum showing flexibility decreasing and specialization increasing from general processor to peripheral offload, DSP-style accelerator, reconfigurable logic, and custom silicon.
Figure 17.1: Hardware optimization spectrum from general processor to peripheral offload, DSP-style accelerator, reconfigurable logic, and custom silicon.

The figure in Figure 17.1 puts the CPU at the end with the lowest non-recurring engineering cost and the most software flexibility, but it provides the baseline performance and lowest efficiency for regular arithmetic. A DSP narrows the design around multiply-accumulate work while remaining programmable. An FPGA trades more engineering effort and unit cost for gate-level parallelism and field reconfiguration. An ASIC reaches the highest performance and volume efficiency only after accepting fixed function and potentially very high design cost. The decision is therefore workload- and volume-dependent: specialize only as far as measured performance or energy evidence justifies.

Option
Best fit
Trade-off
Evidence needed
General processor
Changing requirements, low volume, complex control flow, and early prototypes.
Most flexible, but repeated numeric or transfer-heavy work can waste energy.
Timing trace, current trace, build size, and sleep-state behavior.
Peripheral offload
Timers, serial transfers, sampling, cryptographic primitives, and buffered I/O.
Less CPU work, but more configuration and boundary-case testing.
CPU sleep time, transfer integrity, interrupt rate, and wake latency.
DSP-style accelerator
Filtering, transforms, correlation, compression, or vector-like repeated arithmetic.
High throughput for supported kernels, lower flexibility for unusual algorithms.
Kernel timing, numerical accuracy, memory bandwidth, and duty-cycle energy.
Reconfigurable logic
Stable parallel pipelines that may still need field updates.
Hardware-level speed with update flexibility, but added toolchain and verification complexity.
Logic utilization, interface timing, update process, and power-state evidence.
Custom silicon
Very stable high-volume fixed functions with strict energy, size, or unit constraints.
Best specialization, but expensive to design, slow to change, and costly to repair after release.
Volume forecast, frozen algorithm, validation plan, manufacturing risk, and fallback plan.

The “general processor” end of the spectrum is not one part. Review boards often compare a small handful of general-purpose MCUs before picking one, and the spread in flash, RAM, and unit cost across otherwise similar Cortex-M parts is large enough to change the design:

PartCoreFlashRAMUnit cost (~1,000 units)
ATSAMD20E15ACortex-M0+16 kB2 kB$1.37
ATSAMD21E16BCortex-M0+64 kB8 kB$1.70
NRF51422Cortex-M0256 kB32 kB$2.44
ATSAM4S2BACortex-M4128 kB64 kB$2.80
ATSAM4E8EACortex-M4512 kB128 kB$7.62

That is roughly a 5.5x cost spread inside one review, before a single-board computer is even considered. The gap to the next rung up the spectrum is larger still: a Raspberry Pi-class single-board computer typically draws on the order of 700-1200 mA at 5 V (3.5-6 W) even before peripherals, while a duty-cycled microcontroller can idle at a few milliwatts and hold active current in the tens of milliwatts. Choosing the smallest part that still meets flash, RAM, and peripheral needs is a real energy and cost decision, not a rounding error — and it is the evidence a “general processor” review row in the ledger above should record, not just a feature checklist.

17.5 Selection Gates

  1. Battery Bruno locks one workload card and measures a highlighted system bottleneck.

    Freeze the workload and measure the real limit first.

  2. Bruno traces data copies and processor wakeups beside update-risk, volume, and cost cards.

    Count data moves, wake time, update risk, volume, and cost.

  3. Bruno accepts specialized hardware only after before-and-after timing, energy, and correctness gauges all pass on the same workload.

    Specialize only after timing, energy, and correct results improve.

Move to specialized hardware only after a stable workload, measured bottleneck, data-path, update-risk, volume, and real-workload proof pass.

Use gates before moving from software or peripheral offload to a specialized hardware path.

The diagram in Figure 17.2 turns an accelerator proposal into a six-gate review. Start by fixing the workload and measuring the actual limit; otherwise the team may optimize an unstable algorithm or the wrong bottleneck.

No-panel hardware selection gates: workload stability, measured bottleneck, data movement, update need, volume and risk, and validation evidence.
Figure 17.2: Hardware selection gates showing workload stability, measured bottleneck, data movement, update need, volume/risk, and validation evidence.

In Figure 17.2, the second gate separates compute time from transfer and memory cost. The third then asks whether the proposed data path avoids copies and wakeups; a fast kernel behind an expensive transfer can lose at system level. Only after those measurements pass should the review accept field-update risk and decide whether product volume justifies specialization. The sixth gate closes the loop with before-and-after timing, energy, and correctness evidence on the real workload.

Workload stability The algorithm, data size, and accuracy target should be stable before hardware is specialized.

Measured bottleneck The proposed hardware must target the measured limiter: compute, transfer, memory, sleep, wake, or radio behavior.

Data movement Check whether the data path can feed the accelerator without keeping the CPU awake or copying buffers repeatedly.

Update risk If field behavior is still changing, keep enough software or reconfigurable flexibility to repair mistakes.

17.6 Data Movement And Memory

Many hardware optimization failures happen because the compute block is faster, but data cannot reach it efficiently. A fast accelerator that requires repeated copies, cache flushes, wakeups, or polling can lose the energy benefit.

Trace one sensor or radio burst through Figure 17.3. The useful question is not merely how quickly the accelerator runs, but how much of the route can complete while the CPU remains asleep.

No-panel data movement diagram showing sensor, peripheral buffer, DMA, memory bank, accelerator, CPU, and the sleep opportunity created by offload.
Figure 17.3: Data movement path showing sensor, peripheral buffer, DMA, memory bank, accelerator, CPU, and sleep opportunity.

In Figure 17.3, the peripheral buffer absorbs arrival jitter so a burst does not force an immediate CPU wake. DMA then moves a block into shared memory without a software copy. From that bank, an accelerator can perform the regular kernel work and leave the CPU to review only the result or exception. Each extra copy, interrupt, cache flush, or polling loop breaks part of this sleep opportunity, so measure wake count and bytes moved alongside accelerator execution time.

17.7 Buffer Placement

Place buffers where the peripheral, DMA engine, and processing block can access them without extra copies.

17.8 Transfer Granularity

Use block transfers when latency allows. Many tiny interrupts keep the CPU awake and can erase the benefit of offload.

17.9 Memory Bandwidth

If the workload streams data, memory bandwidth and bus contention can be the real limit.

17.10 Wake Discipline

The hardware path should reduce wakeups or shorten active windows. If it adds wake complexity, remeasure the full cycle.

17.11 Power Domains, Clocks, And Peripherals

Before applying the specification, inspect the real shunt resistor (current-sense) below: its package, terminals, scale, and installation context are part of the engineering evidence.

Real photograph of shunt resistor (current-sense)
This real example (Shunt150myohm) shows a physical form of shunt resistor (current-sense). Use the visible package, interfaces, scale, mounting, and surrounding context as evidence; a catalogue label alone does not establish deployment fit. Photo: Ulfbastel; Public domain

Carry those visible constraints into the surrounding analysis; the abstract symbol or capability name does not capture mounting, wiring, protection, or service access.

Hardware optimization also includes turning hardware off correctly.

Lever
Optimization idea
Risk
Validation gate
Clock gating
Disable clocks for unused peripherals and memory blocks.
Peripheral state may be lost or reads may fail when a clock is off.
Run wake, resume, and fault-path tests.
Power domains
Switch off sensors, radios, or accelerators outside active windows.
Warm-up delay, calibration drift, and inrush current.
Measure startup energy and first-sample correctness.
Peripheral offload
Use timers, DMA, serial engines, and low-power comparators to avoid CPU polling.
Interrupt storms, buffer overruns, and difficult debug paths.
Stress-test transfers, error handling, and sleep entry.
Clock points
Run only as fast as the deadline requires.
Lower speed may increase active time or break communication timing.
Measure full-cycle energy and deadline margin.

17.12 Worked Review: Streaming Sensor Node

Suppose a sensor node collects short bursts of high-rate samples and then sends a compact event summary. A software-only prototype works, but the energy trace shows the CPU stays awake while it copies samples and waits for transfers.

Finding
Hardware candidate
Trade-off
Review result
CPU waits during sample transfer
Peripheral buffer plus DMA to memory.
Requires buffer ownership rules and overrun handling.
High-priority candidate because it can create sleep time.
Filter loop dominates active compute
DSP-style multiply-accumulate block or fixed-function accelerator.
Requires reference-vector testing and format constraints.
Evaluate only after the transfer path can feed the block efficiently.
Radio wake dominates the cycle
Batch events and use a low-power wake source for threshold detection.
May increase reporting latency or reduce event detail.
Validate against application detection requirements.
Review Conclusion

The first hardware optimization is not a new processor. It is the data path: use peripheral buffering and DMA so the CPU can sleep during transfer. After that, remeasure. If compute remains dominant, evaluate an accelerator with reference vectors and memory-bandwidth evidence.

17.13 Review Checklist

Before accepting a hardware optimization:

  • The workload and target requirement are stable enough for the chosen hardware path.
  • The baseline includes timing, current, memory movement, wake behavior, and error cases.
  • The proposed hardware targets a measured bottleneck.
  • Data movement into and out of the hardware path is included in the measurement.
  • Power-domain and clock-state transitions are tested.
  • Correctness is checked with reference vectors, boundary cases, and long-run stress.
  • The update and rollback story is clear.
  • The final evidence uses the real duty cycle, not only a kernel benchmark.

17.14 Knowledge Check

Knowledge Check: Offload First

Knowledge Check: Specialization Risk

17.15 Match Hardware Item To Purpose

17.16 Order The Hardware Optimization Process

17.17 Label The Hardware Optimization Record

17.18 How You Make The Rail Decides How Much You Waste

Every battery device converts the cell voltage into the rails its chips need, and the converter you choose can quietly waste a large fraction of the energy. A low-dropout linear regulator (LDO) is simple and quiet, but its efficiency is roughly the ratio of output to input voltage: eta = Vout / Vin. It passes the full load current through from the battery and burns the leftover voltage as heat. A well-chosen switching buck can reach roughly 85-95% near its intended operating point, but that figure is not constant: conversion ratio, load current, switching mode, quiescent current, and conduction and switching losses all move the efficiency.

The regulator topology becomes a physical heat and headroom choice at the component. The photograph in Figure 17.4 provides a concrete linear-regulator example before the chapter compares what happens to voltage that does not reach the load.

A three-pin 7809 linear voltage-regulator integrated circuit in a TO-220 package
Figure 17.4: A 78xx linear regulator is the physical version of the simple LDO-side tradeoff: three pins make it easy to use, but the voltage it drops is dissipated as heat rather than converted efficiently. Photo: Retired electrician, CC0

Read Figure 17.4 from the 7809 package marking to the three leads, then to the metal tab and its mounting hole. “7809” identifies a fixed 9 V member of the linear 78xx family; the leads carry input, ground, and output, while the tab provides a thermal path rather than an energy-conversion stage. This is why the rail discussion must calculate dropped-voltage times load-current and verify temperature instead of treating the part’s simple pinout as evidence of efficiency.

The map in Figure 17.5 follows energy from an imperfect source to several very different loads. Use it to locate where voltage headroom becomes protection loss, regulator loss, ripple, or useful load power.

IoT power supply architecture showing input sources, protection, LDO, buck, buck-boost, and distribution to MCU, radio, sensors, LED, display, and motor loads.
Figure 17.5: A power-supply path is an optimization choice: protection, regulation, filtering, and load distribution all determine whether voltage headroom becomes useful work or heat.

In Figure 17.5, the source column spans a 3.7 V LiPo, 5 V USB, higher-voltage solar input, and a 12 V adapter, so no single regulator topology fits every case. Protection first makes that raw input survivable; regulation then selects LDO, buck, boost, or buck-boost according to the required rail and source range. Filtering controls the ripple delivered to the circuit, but its capacitors and ferrites do not recover energy already lost in regulation. Finally, the load column shows why the rail must be sized from concurrent peaks: a 500 mA motor and 200 mA radio can dominate an 80 mA MCU and 5 mA sensor even when their average duty cycles are low.

The consequence is that an LDO draws the same current from the battery as the load draws, no matter how much voltage it is dropping, while a buck draws less battery current than the load whenever the input voltage is above the output. The wider the gap between battery voltage and rail voltage, the more a linear regulator wastes and the more a switcher saves.

Scale the loss over time before dismissing it. If the 100 mA rail is active for 5 minutes each hour, it runs 2 hours per day. The LDO waste is 90 mW x 2 h = 180 mWh per day. The 90% buck loses 37 mW x 2 h = 74 mWh per day. The difference, 106 mWh, is about 29 mAh from a 3.7 V cell each day, large enough to change the battery-size decision.

Intuition only: an LDO's wasted power is the voltage it drops times the load current. If that drop is large and the current is high, a buck converter that turns the drop into useful current can save a real slice of the battery.

17.19 The Regulator Choices

LDO

Efficiency about Vout/Vin; battery current equals load current; quiet and tiny; excellent low quiescent options.

Buck

Step-down switcher often near 85-95% at its design load; verify the efficiency curve across conversion ratio, active load, and sleep.

Boost / buck-boost

Step up a low cell, or hold a rail as a Li-ion crosses it from above to below during discharge.

Accelerators

A hardware crypto or DSP block finishes work in fewer cycles and returns to sleep sooner, saving energy.

17.20 Overview Knowledge Check

17.21 An LDO Passes The Load Current; A Buck Reduces It

Compare regulators by the battery current they draw, not just efficiency. For an LDO, I_battery = I_load. For a buck, I_battery = P_load / (Vin x eta), which falls below the load current when Vin exceeds Vout.

17.22 Worked Example: 100 mA At 3.3 V From A Full Li-ion (4.2 V)

The load delivers 330 mW at 3.3 V. Compare an LDO with a 90% buck.

  • LDO: battery current = 100 mA; battery power = 4.2 V x 100 mA = 420 mW; efficiency 3.3/4.2 = 79%; 90 mW wasted as heat.
  • Buck at 90%: battery power = 330 mW / 0.90 = 367 mW; battery current = 367 mW / 4.2 V = 87 mA; 37 mW lost.
  • Result: the buck draws 87 mA versus the LDO's 100 mA, about 13% less battery current during this high-current phase, and the advantage grows as the battery sits higher above 3.3 V.

From a nearly empty 3.7 V cell the gap narrows: the LDO reaches 3.3/3.7 = 89%, almost matching the buck. So the buck's win is largest exactly when the battery is full and the voltage gap is widest.

That comparison also explains why "90% efficient" is not enough by itself. At 4.2 V, the buck input current is 367 mW / 4.2 V = 87 mA. At 3.7 V, the same 367 mW input power requires 99 mA, almost the LDO's 100 mA. A battery-life estimate should therefore integrate the regulator choice across the discharge curve, or at least test full, nominal, and low-battery cases instead of using one current number.

17.23 Regulator Comparison Ledger

Case
Efficiency
Battery Current
Note
LDO from 4.2 V
79%
100 mA
90 mW wasted as heat
Buck from 4.2 V
90%
87 mA
About 13% less battery current
LDO from 3.7 V
89%
100 mA
Gap narrows; LDO nearly matches buck

17.24 Practitioner Knowledge Check

17.25 Efficiency Is Load-Dependent, So Pick For The Dominant Regime

Regulator efficiency is not one number; it changes with load. A buck is excellent at the high currents of a radio burst, but at the microamp currents of sleep its own controller quiescent current can dwarf the load. Suppose a buck controller draws 15 uA of quiescent current and the sleep load is 10 uA. The regulator now consumes 25 uA to deliver 10 uA - an effective efficiency near 40%. A low-quiescent LDO drawing 1 uA delivers the same 10 uA at 11 uA total, about 91% effective. At light load the simple LDO wins decisively.

Over one day, that sleep choice alone is visible. A 25 uA buck-fed sleep rail for 23.76 hours consumes about 594 uAh. An 11 uA low-Iq LDO sleep rail consumes about 261 uAh over the same interval, saving roughly 333 uAh per day. If the product reports rarely, that sleep-rail saving can be larger than the active burst optimization; if it reports constantly, the high-current buck path may dominate instead.

This matters because a duty-cycled device spends almost all of its time asleep, so the sleep regulator, not the active one, often dominates the energy budget. A common mistake is to select a single high-efficiency buck for the radio peak and then pay its quiescent current through months of sleep. The better designs pick the regulator for the regime that dominates the energy: a buck for the high-current active phase, and a low-quiescent LDO or a converter with a light-load pulse-frequency mode for the long sleep. The same finish-and-sleep logic explains hardware accelerators: a crypto or DSP block that completes an operation in far fewer cycles than the CPU lets the whole system return to that low-power sleep sooner, so the accelerator is an energy win even when its instantaneous power is higher.

17.26 Choosing By Regime

Heavy load

A buck's flat high efficiency and lower battery current win the radio and compute bursts.

Light load

At microamp sleep currents a switcher's quiescent current can exceed the load; a low-Iq LDO wins.

Weight by time

Since the device mostly sleeps, the sleep regulator often dominates the battery budget.

Accelerate to sleep

A hardware block that finishes in fewer cycles returns the system to sleep sooner, saving energy.

17.27 Under-the-Hood Knowledge Check

17.28 ASIC Specialization Axes

An ASIC earns its efficiency by deleting generality. That deletion must follow evidence, because a circuit frozen around the wrong workload cannot be repaired with a compiler flag. Treat specialization as a chain from measured software to silicon, not as a menu of clever instructions.

The development chain is:

  1. Profile representative source. Capture hot kernels, data widths, memory traffic, branch behavior, deadlines, and worst-case inputs.
  2. Explore architectures. Compare a tuned MCU, peripheral offload, DSP, reconfigurable logic, and custom logic using the same workload and accuracy contract.
  3. Define the programmer contract. Select the instruction set, registers, data types, memory model, exceptions, assembly syntax, and compiler intrinsics that firmware will actually use.
  4. Design the microarchitecture. Map that contract onto datapaths, functional units, memories, interconnect, and control.
  5. Build the toolchain and firmware together. An instruction the compiler cannot emit safely is not a usable accelerator feature.
  6. Benchmark the full path. Include instruction fetch, memory movement, stalls, conversion boundaries, and idle power—not only the arithmetic block.

Five coordinated axes shape the result:

AxisSpecialization choicesBenefit soughtCost or failure mode to check
Instruction setRemove unused operations; compress common encodings; fuse multiply-accumulate, filter, codec, string, vector, or pixel kernelsFewer instructions and fetches; smaller codeCompiler support, exception semantics, verification surface, and loss of flexibility
Datapath and functional unitsTailor word length, register count, lane count, multiplier shape, saturation, and roundingLess switched capacitance and area for the required precisionOverflow, quantization error, awkward spills, and underused units
MemoryChoose bank count, port count, capacity, line size, associativity, split or unified caches, and hierarchy depthFeed parallel work with fewer conflicts and lower movement costMulti-port area, leakage, coherence, misses, and bandwidth hotspots
InterconnectSelect bus count, topology, width, arbitration, direct paths, and coherence policyKeep producers, memories, and consumers concurrentWiring area, arbitration delay, verification complexity, and idle switching
ControlCentralized or distributed control; pipelined or sequential; hardwired or microcoded; in-order or more dynamic schedulingMatch control overhead to workload regularityHazards, recovery behavior, timing closure, and programmability

Instruction fusion shows how the axes interact. Replacing load, multiply, add, store with a fused kernel only saves energy if operands arrive without extra copies, the accumulator width preserves accuracy, the register file can supply the ports, and the compiler recognizes the pattern. Otherwise, the “special” instruction waits on memory or forces marshaling that consumes the saving.

Memory banking has the same dependency. Four single-ported banks can serve four simultaneous accesses only when addresses distribute across different banks. If every lane addresses the same bank, the requests serialize. Profiling must therefore record access strides and conflicts, not just total bytes. Cache choices are equally application-specific: a streaming kernel may benefit more from scratchpad DMA than from a large associative cache whose tags and replacement logic switch on every access.

The exit criterion is a four-column ledger—performance, energy, area, and toolchain consequence—for every proposed feature. Specialize only when the evidence shows a stable benefit across representative and worst-case workloads.

17.29 Heterogeneous Run-State Migration

Heterogeneous multicore systems can implement the same instruction architecture on “little” efficient cores and “big” fast cores. Compatibility lets a thread migrate, but migration is not free: caches may be cold, state must be transferred, and the receiving core may need a voltage or frequency transition.

Scheduling modeWhat the operating system seesStrengthMain limitation
Cluster switchingOne active cluster at a time: all little or all big coresSimple global power-state policyA single demanding thread can move every thread onto the expensive cluster
Paired CPU migrationEach logical CPU maps to a big/little pair; one member runs at a timePer-thread performance choice with bounded topologyPairing limits placement freedom and simultaneous use of all physical cores
Global task schedulingEvery core is independently schedulableMixes latency-critical and background work across all suitable coresMore complex capacity, thermal, migration, and load-balancing decisions

For a candidate migration, compare completion energy rather than instantaneous power:

Estay=PLtL,E_{stay}=P_L t_L, Emove=Emigration+Ecache refill+PBtB.E_{move}=E_{migration}+E_{cache\ refill}+P_B t_B.

Move only when Emove<EstayE_{move}<E_{stay} or when the little core would miss the deadline. A big core can consume more power yet less energy if its shorter runtime is enough to overcome transition and refill costs. Conversely, bouncing a short task between cores can cost more than simply finishing it where it started. Practical schedulers therefore use utilization windows or hysteresis instead of migrating on every brief load spike.

17.30 Always-On Vision Accelerator Data Path

Always-on vision exposes both sides of specialization: arithmetic per pixel and bytes moved per frame. Historical 4 mm-class object-detection silicon demonstrated histogram-of-oriented-gradients (HOG) and deformable-part-model (DPM) processing below roughly 1 nJ per pixel—comparable in scale to dedicated video-codec work in that implementation. Treat those numbers as a measured design point, not a promise for a different resolution, process, model, or memory system.

The data path explains the saving:

  1. A conventional imager digitizes the full pixel array.
  2. Raw or lightly processed pixels cross an interface into processor memory.
  3. A feature extractor repeatedly reads neighborhoods to compute gradients, magnitudes, orientation bins, and normalized HOG cells.
  4. A detector consumes the feature tensor and reports candidate objects.

Sensor-adjacent extraction moves step 3 beside the imager. Row buffers retain the small neighborhood needed for gradients, a compact accelerator emits feature cells, and only that feature stream crosses to detector memory. In the cited implementation, this reduced the transferred representation by about 20 times. The important result is not the portrait of a detection chip; it is the boundary change from pixel-space transmission to feature-space transmission.

For a frame of NpN_p pixels at bpb_p bits per pixel, raw transfer volume is

Draw=Npbp.D_{raw}=N_p b_p.

If feature extraction reduces the representation by factor rr, then Dfeature=Draw/rD_{feature}=D_{raw}/r. The transfer-energy saving is

ΔEmove=(DrawDfeature)Elink/bit.\Delta E_{move}=(D_{raw}-D_{feature})E_{link/bit}.

With r=20r=20, 95% of the raw transfer bits disappear. The accelerator is worthwhile only when its extraction energy plus feature-transfer energy is below the raw-transfer and downstream-processing energy it replaces. The review must also test whether the chosen features preserve required accuracy, whether the feature format can evolve with the model, and whether keeping the detector off-chip creates a privacy or availability risk.

17.31 Figure Review: Specialization With an Energy Ledger

The diagram in Figure 17.6 makes ASIC design defensible only when profiling evidence selects a concrete specialization lane and the result is measured across more than peak speed.

Five ASIC specialization lanes for ISA, datapath, memory, interconnect, and control, driven by workload evidence and ending in performance, energy, area, toolchain, and verification consequences.
Figure 17.6: Five evidence-driven ASIC specialization lanes.

The figure in Figure 17.6 routes WORKLOAD evidence through ISA, DATAPATH, MEMORY, INTERCONNECT, or CONTROL, then forces MEASURE AGAIN and a CONSEQUENCE LEDGER spanning performance, energy, area, toolchain, and verification.

The chart in Figure 17.7 shows why accelerator energy and data-movement energy must be reviewed as a single system budget.

Illustrative sub-nanojoule-per-pixel codec and detector energy bars beside two camera paths comparing raw pixel transmission with sensor-adjacent feature extraction that reduces the stream from 100 to 5 megabytes per second.
Figure 17.7: Always-on vision compute and data-movement energy.

The ILLUSTRATIVE ACCELERATOR ENERGY panel in Figure 17.7 puts H.265 and HOG near the same nJ-per-pixel scale, while the diagram’s SENSOR-ADJACENT FEATURES path shrinks 100 MB/s of raw pixels to a 5 MB/s · 20× smaller feature stream.

17.32 Summary

Hardware optimization is evidence-led platform design:

  1. Start with the measured workload and target requirement.
  2. Identify whether the limiter is compute, data movement, memory, wake behavior, or background power.
  3. Prefer the least specialized hardware path that can move the bottleneck.
  4. Treat peripherals, DMA, clock gating, and power domains as first-class optimization levers.
  5. Specialize hardware only when workload stability, volume, risk, and validation evidence support it.
  6. Remeasure the whole device after every hardware change.

Common Pitfalls

Peak benchmark numbers can hide data movement, sleep-state behavior, and peripheral limits. Test the real workload.

An accelerator that waits for copied buffers or frequent interrupts may not improve total energy.

Custom or reconfigurable hardware is risky when the algorithm, data size, or field behavior is still changing.

Clock and power gating can break wake behavior, first samples, calibration, and fault recovery unless those paths are tested.

17.33 What’s Next

17.34 Tune Firmware

Software Optimization Techniques covers compiler settings, data layout, scheduling, and memory-aware firmware.

17.35 Use Fixed-Point Carefully

Fixed-Point Arithmetic explains Q-format choices, scaling, saturation, and validation evidence.

17.36 Review The Fundamentals

Optimization Fundamentals explains targets, bottlenecks, trade-off ledgers, and optimization records.

17.37 Measure The Result

Energy Measurement and Profiling shows how to collect the current trace that proves a hardware change helped.

17.38 Key Takeaway

Hardware optimization means selecting the MCU, peripherals, sensors, radios, accelerators, and power domains that match the workload. Idle leakage and wake cost can matter as much as peak speed.