Applications

Maximizing Edge AI Inference Speed: Designing with FRAM for High-Speed Parameter Updates

This article examines the memory factors that influence edge AI inference speed, explaining the relationship between inference processing and data access, scenarios that require high-speed parameter updates, and design considerations for using FRAM (FeRAM, ferroelectric memory) as non-volatile memory. The discussion is intended for design engineers.

The Reality and Speed ​​Determinants of Edge AI Inference Processing

Edge AI inference is a continuous process from input acquisition to preprocessing, inference calculation, and postprocessing, with memory references occurring at each stage. Latency is determined not only by the performance of the compute unit, but also by how quickly weights and features can be supplied. In particular, insufficient on-chip capacity increases the number of  accesses to external memory, simultaneously worsening latency and power consumption.

Inference Processing Flow and Data Access in Edge AI

In inference, sensor inputs are buffered, preprocessed with normalization and feature extraction, and weights are read repeatedly during convolution and matrix-multiplication operations. Intermediate feature maps are written back at each layer and reread in the next layer, so access is not only sequential but also includes stride and random access. If the memory hierarchy is not considered when arranging the data, the waiting time will exceed the computation time. For example, if the same weights can be reused for multiple inputs, it is effective to store them on-chip and use DMA to prefetch input/output to avoid interrupting the pipeline. Even just aligning the processing order and tensor shape can reduce bandwidth requirements.

Factors Affecting Inference Speed ​​and Limitations of the TOPS Metric

An NPU’s TOPS is a theoretical measure of computational performance, while measured latency varies significantly due to memory wait times. If the weights do not fit in on-chip memory, they are offloaded to external DRAM at each layer boundary, and the back-and-forth read operations accumulate. Furthermore, even if quantization reduces the computational workload, bandwidth becomes the dominant factor in models with frequent feature write-backs. For evaluation, listing the number of memory accesses and the data transfer volume for each layer makes comparison easier. For example, even with the same TOPS, the frame rate changes depending on cache capacity and the presence or absence of a prefetch mechanism. At the board level, memory frequency, bus width, and the number of simultaneous memory accesses also need to be checked.

The Impact of On-Chip/Off-Chip Memory on Inference Time

On-chip SRAM offers low latency but has limited capacity, and larger models require more external memory references. External DRAM makes it easier to secure bandwidth, but it has high latency and power consumption per access and performs poorly on small random accesses that cannot be burst-transferred. In inference, it is important to increase sequential accesses by blocking weights and tiling features, thereby reducing the number of external round trips. In addition, when performing inference simultaneously with multiple threads or multiple cores, memory contention can have a lingering impact on latency, so QoS and bandwidth reservation designs should also be considered.

Performance Requirements for Edge AI Memory

When selecting memory for edge inference, it is important to evaluate not only capacity but also read latency, effective bandwidth, and tolerance for simultaneous accesses. Latency and power should be budgeted across the entire memory hierarchy, including write requirements such as model updates and log storage.

Key Memory Performance Metrics for Inference Processing

To reduce inference response time, peak service latency is more important than average bandwidth. Theoretical bandwidth is calculated from the bus width and frequency, and the effective bandwidth is evaluated by checking how much it decreases due to burst length, the number of parallel banks, and simultaneous DMA usage. Furthermore, because random accesses increase latency due to address translation and contention, tensor placement and access granularity should be aligned, with sufficient margin based on measurement results. During evaluation, examining frame-level jitter also helps identify the worst-case response in real-time control. In addition, because timing varies with temperature and voltage, measurements should be performed under conditions that include adequate margin.

The Relationship Between Parameter Updates and Memory Characteristics

At the edge, there are situations where inference and parameter updates occur in close succession, such as adjusting thresholds and coefficients in response to environmental changes or applying small amounts of results of incremental (on-device) training. If updates are not completed within the short interval between frames, the next inference will either run using the old parameters or be delayed. Organizing the size of the data to be updated, the update cycle, and the data retention requirements during power loss separately makes it easier to choose between DRAM, flash, and FRAM. In particular, for memory technologies that require erasure before writing, worst-case write time becomes longer, making software-side measures, such as differential updates, necessary. If data retention is not required, storing the data in volatile memory is also an option.

Balancing Low Power Consumption with Continuous Inference

In battery-powered edge devices, it is common to design inference to operate intermittently in order to reduce average power consumption. In such cases, if reloading the weights after waking from sleep takes too long, the initial response is delayed. If on-chip non-volatile memory is available, the amount of data that must be read during resume can be reduced. Furthermore, memory technologies with low write power can limit temperature rise during inference involving parameter updates, thereby reducing the likelihood of thermal throttling. In applications with frequent power cycling, the number of writes for state preservation also increases, making it necessary to consider both write endurance and write time. Both energy consumption (watt-hours) and peak power are important.

Why FRAM Is Suitable for Inference Speed and Parameter Updates

As a non-volatile memory technology that also supports high-speed writes, FRAM has characteristics that make it well suited for parameter updates and state storage during inference. Because it does not require an erase operation, worst-case latency is easier to predict—a design advantage for preserving real-time behavior. On the other hand, its placement must be determined with capacity and interface constraints in mind.

FRAM Operating Characteristics and Access Performance

FRAM stores information in the polarization state of a ferroelectric material, and data is written by reversing the polarization. As a result, unlike flash memory, which requires page erasure, FRAM exhibits less variation in write latency and is well suited for applications that require frequent, small updates. In inference implementations, storing in FRAM the coefficients, thresholds, statistics, and calibration values updated through training—rather than the weights themselves—can reduce the impact of update processing on the inference pipeline. In addition, because data is retained even during power loss, FRAM can also be used in designs that retain in-progress training state and diagnostic logs, allowing inference to resume immediately after restart.

The Impact of High-Speed Parameter Updates on Inference Processing

High-speed updates are beneficial for inference not when rewriting the entire model, but when a small number of parameters are updated frequently. For example, when fine-tuning coefficients for individual variation correction or environmental adaptation and applying them to the next inference, the time required to complete the write operation directly adds to the latency. Providing a memory region that can be written without waiting for an erase operation, such as FRAM, makes it easier to move the update process outside the inference loop and to estimate the worst-case latency. Duplicating updated data in a ring buffer so that the read side can access a stable version even while a write is in progress is also effective.

Role of FRAM When Combined with Other Memory Types

Since FRAM cannot match DRAM in cost per bit, it is more practical to use it for small memory regions that are updated frequently rather than storing the entire set of weights. SRAM stores intermediate feature data as a high-speed buffer close to the processing unit, while DRAM stores and transfers large volumes of weights and input frames. Placing FRAM between them to continuously retain update coefficients and state information can reduce external storage accesses while shortening both recovery time and write wait time. On the software side, fixing the memory map and explicitly defining the update region also makes it easier to isolate the causes of latency during debugging.

Memory Configurations in Practice from the Perspective of Inference Speed ​​and Parameter Update Requirements

In designs that aim to achieve fast inference while incorporating updates, where data is placed within the memory hierarchy determines both performance and reliability. By pinning down where accesses occur, the size of the update targets, and the retention requirements during power outages, it becomes easier to compare placement options, including those involving FRAM. Finally, measuring the latency distribution and power consumption on actual hardware helps eliminate sporadic latency spikes (tail latency).

Memory Access and Latency Factors During Inference Processing

During inference, memory access is mainly composed of weight reads and feature read/write operations, and buffers are swapped at layer transition points. If cache misses occur consecutively, external memory stalls occur, resulting in a long tail in the latency distribution. After applying basic measures such as consistent access granularity, proper alignment, and prefetching using double buffering, the wait time should be measured per layer, and mitigation should focus on the latency-dominant layers. Even without a profiler, transfer wait time and compute wait time can be separated using DMA completion interrupt timestamps or a bus monitor. The basis for the worst-case value should be recorded.

Cases Where Parameter Update Frequency Affects Memory Selection

When update frequency is high, the issue is not so much the write time itself, but the fact that update timing conflicts with the inference schedule. For example, with per-frame correction coefficient updates, writes compete for the same bus as weight reads in the next frame, increasing jitter. Interference can be reduced by batching updates, writing only deltas, or separating the update region into a different bank. It is also effective to distinguish between updates that require non-volatile retention and those that can remain volatile. Furthermore, requirements vary depending on whether a power outage can occur and whether the same coefficients are needed after recovery, so update policies should be defined per scenario. These should be incorporated into test cases.

Example Memory Layout and Role Allocation with FRAM

A straightforward example of an FRAM-integrated layout is to fix the update coefficient region in on-chip FRAM while placing the main weights in DRAM. In the inference loop, coefficients in FRAM are referenced on every iteration and updated as needed, but since the coefficient size is small, bus occupancy remains limited. Furthermore, by duplicating the coefficient region and referencing the old copy during writes, inference can continue even if an update fails. Using protection bits and CRC together also improves detectability of corruption caused by power loss or noise. When write frequency is high, it is also effective to organize update logs in a ring buffer and aggregate them at a later stage.

RAMXEED FeRAM Product Lineup

RAMXEED FeRAM-Based ASIC/ASSP Solutions

Share this article