Dynamic Priority Queue: An SDRAM Arbiter With Bounded Access Latencies for Tight WCET Calculation

Hardik Shah, Andreas Raabe, Alois C. KnollarXiv 2012

Overview

This research introduces the Dynamic Priority Queue (DPQ), a hardware arbitration scheme designed to bring predictability to shared SDRAM in multi-core systems. By employing dynamic task priority reordering and a budget-based mechanism, DPQ establishes tight, guaranteed bounds on memory access latency—a critical requirement for safety-critical applications like avionics and automotive electronics.

The Challenge of SDRAM Predictability

In modern Multi-Processor Systems-on-Chip (MPSoCs), resources like SDRAM are shared among multiple "masters" (CPUs, DMAs) to optimize cost and space. However, SDRAM is inherently difficult to use in real-time systems because its access latency is highly variable. Timing uncertainty arises from background refresh cycles, read/write switching, and "bank conflicts" (accessing different rows in the same memory bank).

SDRAM timing diagrams illustrating the variability between best-case and worst-case access scenarios for read and write operations.

To ensure safety-critical tasks meet their deadlines, engineers calculate the Worst-Case Execution Time (WCET). Standard arbiters often yield "pessimistic" WCET bounds, leading to significant hardware over-provisioning. DPQ aims for a "tight" (accurate) latency bound that reflects realistic worst-case scenarios.

The Dynamic Priority Queue (DPQ) Solution

The proposed DPQ arbiter manages the path between the CPU/Cache and the off-chip SDRAM. It operates on four main principles:

  1. Budgeting: Each master is assigned a fixed "budget" of memory accesses per replenishment period.
  2. Dynamic Reordering: The arbiter selects the eligible master furthest to the "left" in the queue. Upon access, the master's budget decreases, and it is moved to the "right" (end) of the queue.
  3. Priority Promotion: As other masters complete their turns, waiting masters naturally drift toward the front, preventing any single master from monopolizing the bus.
  4. WCET Analysis API: A formal algorithm calculates the maximum possible interference, allowing for precise timing analysis.
System architecture showing the memory access flow and the SDRAM bank/row buffer structure managed by the arbiter.

The system was validated on an Altera Cyclone III FPGA with DDR2-667 memory.

Key Insights and Results

DPQ successfully decouples bandwidth from latency. A task with a small budget (low bandwidth) can still achieve low latency by reaching the front of the queue quickly. Because replenishment periods and budgets are fixed, the maximum "line-jumping" by other masters is mathematically bounded.

In comparisons with the Priority Based Budget Scheduler (PBS):

  • Fairness: Under equal traffic density, DPQ maintained roughly equal WCET for all tasks (~233k cycles), whereas PBS caused low-priority task WCET to explode to over 566k cycles.
  • Tightness: DPQ bounds were significantly closer to Observed Execution Time (OET).
  • Efficiency: The worst-case overestimation was found to be only about 4%, indicating a very efficient analysis model.
  • Overhead: Implementation required 1,746 logic elements, a negligible increase over PBS (1,551).

Conclusion and Future Work

DPQ provides a robust framework for predictable memory access. While current budgets are static, future work may explore dynamic budget assignment to further improve performance without sacrificing the "tightness" of WCET analysis. Integrating the provided API into commercial end-to-end timing tools remains a key next step for industry adoption.

Summary updated

BibTeX
@misc{shah2012dynamic,
  author = {Hardik Shah and Andreas Raabe and Alois C. Knoll},
  title = {{Dynamic Priority Queue: An SDRAM Arbiter With Bounded Access Latencies for Tight WCET Calculation}},
  year = {2012},
  eprint = {1207.1187},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1207.1187},
}
Figure