betaFeedback

WorksComputer Science

Randomized Caches in Hardware: Challenges and Trade-offs

Abstract

Randomized caches protect against side-channel attacks by obfuscating the mapping of memory addresses to cache locations. Existing proposals typically describe architectural behavior, leaving practical hardware implementation challenges largely unexplored. We implement four prominent designs, CEASER-S, ScatterCache, SassCache, and MIRAGE, and integrate them as the last-level cache (LLC) of a multi-core out-of-order RISC-V system-on-chip (SoC). We identify common and design-specific implementation challenges and develop practical solutions. We evaluate complete FPGA implementations by running SPEC CPU 2017 rate and GAPBS workloads to completion, providing, to our knowledge, the first comparative evaluation of these designs on a common full-system hardware platform. Pipelining the index derivation function (IDF) alone is insufficient: in three of the four variants, other components become the frequency bottleneck, reducing frequency by up to 35% relative to the baseline set-associative cache. Redesigning the critical paths while preserving mappings, rekeying, and victim-selection policies brings the three affected variants to no more than 10% below the baseline frequency, at the cost of added latency or reduced concurrency. Increased LLC access latency, rather than additional misses, dominates IPC degradation, reducing instructions per cycle by up to 5% for SPEC and 11% for GAPBS. Hardware overhead depends on the design and implementation technology: FPGA lookup-table usage increases by 10-35%, while ASIC area increases by 1-14%.

Introduction

Modern processors rely on caches to hide the long latency of memory accesses. However, the timing difference between a cache hit and a miss has become a fertile ground for side-channel attacks [9, 36, 51, 52, 85]. This is especially true for last-level caches (LLCs), which are shared across cores and can be exploited to leak information across security domains [33, 41, 44, 86]. Contention-based attacks exploit this timing difference by filling selected cache sets with attacker-controlled lines and then measuring whether accesses to those lines have become slower, which reveals that the victim

evicted them. Research over the last two decades has shown that such attacks can leak cryptographic keys [24, 41, 51], keystrokes and user behavior [48, 50, 61, 67], and other sensitive information [30, 39, 66, 84]. Central to these attacks is the construction of minimal eviction sets: collections of addresses that map to the same cache set and can collectively displace a target line [35, 41, 45, 55, 56, 58, 74, 78, 86]. Constructing eviction sets is practical in conventional caches because the mapping of addresses to cache sets predictably partitions memory addresses based on address bits.

Randomized caches counter contention-based attacks by breaking this fixed mapping. Early designs randomized the address-to-cache mapping through lookup tables [80, 81] or randomized the fill policy [40], but these approaches target small L1 caches and scale poorly to large LLCs. Instead, more recent designs [26, 57, 58, 62, 70, 73, 77, 82] compute cache indices with keyed cryptographic functions, called index-derivation functions (IDFs), breaking the direct mapping of addresses to cache sets. Past work has extensively evaluated the security of randomized caches [11, 15, 16, 25, 53, 54, 68], highlighting weaknesses and proposing countermeasures.

Although these proposals describe the high-level design, they stop short of a complete hardware implementation. Existing work focuses primarily on a few isolated implementation concerns. For example, most designs recognize that the IDF must be pipelined to meet timing constraints and estimate the resulting increase in cache access latency. However, integration challenges beyond the IDF, such as critical-path analysis, control pipelining, hazard management and miss-status holding register (MSHR) locking, have received less attention.

In the absence of concrete implementations, performance evaluations primarily rely on architectural simulators [13, 27, 42, 60]. Although these simulators are invaluable for early stage exploration, they tend to abstract away many implementation issues, resulting in inaccuracies [1, 29, 31, 79]. Moreover, the speed of simulation with these tools severely limits the amount of code that can be simulated. Consequently, evaluations only span short sequences of instructions, typically in the low billions or fewer [11, 16, 62]. Hardware cost evaluation faces similar limitations. Without synthesized implementations, area, timing, and energy are typically estimated using analytical models, such as CACTI [46], rather than being derived from an implemented design.

Two works implement variants of CEASER [69] and of SCATTERCACHE [19]. Both target the in-order RocketChip core [17], leaving open how these designs translate to high-performance cores with speculative, out-of-order execution. Moreover, since each work implements only one design, a direct comparison of the implementation trade-offs across designs remains unavailable. This raises the following questions: ① What are the challenges and trade-offs for randomized cache implementation? ② What do they cost in clock frequency, performance, and area once fully integrated?

In this work, we answer these questions through an end-to-end study, illustrated in Figure 1. In the first step, we select four prominent randomized cache designs, CEASER-S [58], SCATTERCACHE [82], SASSCACHE [26], and MIRAGE [62], that highlight different aspects of the design space. We identify several challenges to implementing these—some stem from the skew cache design [65] that most modern randomized caches build on, whereas others are introduced by the relocation and indirection aspects of some specific designs. We propose solutions for these challenges and develop RTL implementations of all four cache designs.

Figure 1. Architectural overview of randomized cache implementation.

We integrate the different cache design as the LLC of a multi-core out-of-order NaxRiscv [71] RISC-V SoC, and synthesize the resulting systems on FPGA. The synthesized SoCs allow us to characterize the physical properties of the implementations, including maximum operating frequencies, resource utilization, and power consumption. Moreover, by booting Linux on the synthesized SoCs, we execute complete benchmark suites, such as SPEC CPU2017 [72] and GAPBS [6]. The execution speed of the FPGA allows these benchmarks to run to completion—averaging 290 billion instructions per benchmark, with some exceeding one trillion instructions—thereby measuring the performance impact of cache randomization over complete application executions rather than short simulated instruction windows.

We observe that, except for SASSCACHE, whose dynamic partitioning reduces effective cache capacity, randomized-cache designs incur similar instructions-per-cycle (IPC) losses. The loss correlates strongly with the LLC access rate and reaches up to 10% for memory-intensive workloads, while miss-related effects remain secondary. Adding three cycles of latency—matching the IDF latency of SCATTERCACHE and MIRAGE—to a standard set-associative cache reproduces most of IPC loss. Together, these observations indicate that the latency introduced by the IDF, rather than increased cache misses, is the dominant factor for IPC degradation.

We further observe that the IDF is not the only source of signal propagation delays. Even with a pipelined IDF, all designs exhibit a frequency drop ranging from 1% for SCATTERCACHE to 35% for MIRAGE, an effect that has been so far overlooked. Critical-path analysis reveals that asynchronous operations, such as relocation in CEASER-S and indirection in MIRAGE are the primary source for large frequency drops. We redesign SASSCACHE, CEASER-S, and MIRAGE to mitigate these critical paths, recovering much of the lost frequency at the expense of additional LLC latency or cache locking. Overall, after accounting for both IPC degradation and frequency reduction, randomized caches reduce the maximum execution throughput by up to 35%.

In summary, we make the following contributions:

  • We provide the first full implementations of advanced SoCs supporting randomized caches (Sections III and IV).

  • We identify and analyze the causes of frequency drops in the designs and show how to overcome them (§ 5).

  • We perform end-to-end comparison of the performance and the resource usage of the designs (Section VI).

Background

Cache and Cache Attacks

Caches in modern processors are typically organized as set-associative structures, where each memory address is mapped to a (fixed) subset of cache lines, called a set, and each set contains multiple ways (or cachelines) that can hold different data. Addresses that are mapped to the same set are said to be congruent and can evict each other from the cache. When loading a new line into the cache, the replacement policy determines which of the existing lines in the set to evict. Each cacheline is associated with a tag and additional metadata that uniquely identifies the memory address it corresponds to, as well as its coherence state.

Modern CPUs employ a multi-level cache hierarchy: the L1 (and often the L2) caches are private to each core and are kept consistent by a coherence protocol, whereas the last-level cache (LLC) is shared among cores and is in many cases inclusive of the private levels, i.e., any line present in a private cache is also present in the LLC. Large LLCs are additionally split into multiple slices [32, 43], each associated with a core or group of cores. As the LLC is shared across cores and thus across security domains, it is a prime target for contention-based side-channel attacks such as Prime+Probe [51]. In these attacks, the attacker fills a monitored cache set with an eviction set—a collection of congruent addresses occupying all its ways—and later re-accesses these lines, where increased access latency reveals an intervening victim access to the same set. Since conventional caches derive the set index directly from address bits, such eviction sets are straightforward to construct [35, 41, 45, 55, 56, 58, 74, 78].

Secure Cache Designs

Secure caches make contention attacks statistically hard by breaking the deterministic mapping between addresses and cache sets. The most common approach is to use a keyed cryptographic function, called an index derivation function (IDF), to derive the cache set index from the address.1 Contemporary randomized caches [10, 12, 20, 26, 58, 62, 70, 73, 75, 82] employ set- or skewed-associative design with the IDF providing the required randomization. Figure 2 summarizes the representative designs considered in this work.

Figure 2. The overview of the randomized caches.

CEASER-S [58] partitions the cache into multiple (typically two) independently indexed skews, each indexed by a separate IDF.2 A new line is inserted into a randomly selected skew, and eviction is restricted to that same skew. To retire learned mappings, CEASER-S periodically rekeys the IDFs and gradually relocates resident lines using an access counter to amortize the transition between epochs.

SCATTERCACHE [82] uses a single IDF shared across all ways. Different bit masks of the IDF output are used to derive an independent cache-set index for each way, giving every address one candidate location. A new line is inserted into a randomly selected way, and eviction is restricted to that way.

SASSCACHE [26] extends SCATTERCACHE by introducing a second level of randomization. Each way is further partitioned into multiple independently indexed sub-ways, giving each address one candidate location in every sub-way. A new line is inserted into a randomly selected sub-way, and eviction is restricted to that sub-way. Because each security domain maps to only a subset of the cache locations, SASSCACHE trades effective cache capacity for stronger isolation.

MIRAGE [62] separates the tag store from the data store to approximate fully associative replacement. The tag store remains set associative with additional invalid tag entries to avoid set conflicts, while cache misses perform global eviction by randomly selecting a data entry, invalidating its corresponding tag, and installing the incoming line. Mirage further employs two-skew indexing with load balancing and randomized address mapping via IDF for added security.

Hardware Cache Structure

Mature open-source RISC-V processors, including NaxRiscv [71], XiangShan [49], and BOOM [8], implement LLCs that share the general architecture shown in Figure 3; we use NaxRiscv as the running example throughout this paper. We next describe three properties of this architecture—non-blocking operation, set-granularity management, and decoupled data and metadata storage—that cache randomization directly disrupts.

Figure 3. General overview of a hardware last-level cache architecture.

Non-Blocking Operation

1) Non-Blocking Operation: Modern LLCs are non-blocking: The latency of a memory access in the case of a cache miss can often take more than 100 cycles. To prevent idling for such a long period, the LLC combines a pipelined access path with miss-status holding registers (MSHRs) [37]. As Figure 3 shows, requests traverse a multi-stage pipeline in which operations, such as reading and updating the metadata, are performed in different stages, so consecutive requests are processed back to back. When a request misses, an MSHR entry records the miss and its target set while the line is fetched from memory; once the response returns, the data is forwarded to the requester and the entry is released. MSHRs thus allow the cache to keep serving hits and to overlap multiple outstanding misses.

This parallelism, however, introduces hazards, which the cache resolves with a hazard controller. Two hazards are typical. A metadata read-after-write (RAW) hazard arises when one pipeline stage reads metadata that another stage is still updating, and hence may observe stale state; the hazard controller stalls the read until the update completes. In contrast, MSHR conflicts arise when a request targets a cache set with an outstanding miss. The open-source LLCs we consider update the metadata eagerly when the MSHR entry is allocated, while the corresponding data arrives from memory later. The set therefore remains temporarily inconsistent until the refill completes. The hazard controller therefore locks the sets recorded in the MSHRs (the MSHR lock), buffering conflicting requests or stalling the pipeline, depending on the exact scenario.

Set-Granularity

2) Set-Granularity: Conventional set-associative caches manage most operations at the granularity of a cache set. The tags and associated metadata of all of the ways of a set are typically stored in a single wide word of the metadata SRAM, so one access fetches all of them and the hit check compares them in parallel. Replacement state is likewise maintained per set, for instance by a pseudo-least-recently-used (PLRU) policy, and only cache lines within the same set compete for occupancy. Set granularity also keeps hazard handling simple. Congruent requests share the same set index, so the hazard controller and the MSHR lock detect conflicts by comparing set indices alone, minimizing detection logic while preserving access parallelism.

Decoupled Data and Metadata Arrays

3) Decoupled Data and Metadata Arrays: Finally, data and metadata are stored in physically separate SRAM arrays. As shown in Figure 3, the memory interface is typically narrower than a cache line (64 bits versus 64-byte lines in NaxRiscv), so a refill arrives over multiple (at least 8) cycles and occupies the data array for multiple cycles. Many frequent operations, such as coherence-state and directory updates, access only the metadata. If data and metadata shared one SRAM structure, these lightweight operations would serialize behind long-running refills. Separating the arrays lets metadata operations proceed independently of memory-side refill traffic, increasing parallelism between control-path and data-path activity.

Hardware Implementation Challenges

We study four representative randomized cache designs: SCATTERCACHE, CEASER-S, SASSCACHE, and MIRAGE. Although proposed as different schemes, we observe that they build on a shared hardware foundation while differing only in a few design-specific mechanisms. This allows us to separate the implementation challenges common to randomized caches from those specific to individual designs.

All four designs share two fundamental mechanisms. First, cache indices are derived using a keyed index-derivation function (IDF) rather than directly from the address. Second, the cache is organized as independently-indexed skews instead of using a single shared index. Consequently, every demand access must first compute the randomized indices before performing metadata lookup, hazard detection, replacement, and cache management on independently indexed structures.

Supporting IDF computation and skewed indexing is therefore fundamental to contemporary randomized caches.

SCATTERCACHE basically implements these two mechanisms, providing the minimal architecture for a randomized cache. CEASER-S adds relocation, periodically rekeying its IDFs, relocating resident lines to retire learned mappings. SASSCACHE extends the lookup hierarchy with independently indexed sub-ways while dynamically partitioning the cache to strengthen occupancy isolation. Finally, MIRAGE introduces indirect eviction, selecting a random data-store entry on a cacheline install and invalidating its owning tag through a reverse pointer. Collectively, these schemes cover a representative range of the mechanisms used in state-of-the-art randomized caches and explore the performance impact of various features.

From a hardware perspective, these mechanisms naturally divide into two classes. IDF computation and skewed metadata lookup execute on every demand access and therefore form the synchronous demand path. In contrast, relocation and indirect eviction execute independently of demand requests, overlapping with and contending for the same resources as normal cache traffic. We refer to these as asynchronous paths. Figure 4 summarizes these mechanisms and the implementation challenges they introduce. We now describe these challenges.

Figure 4. Randomization techniques and their impact on the baseline LLC.

Handling Cache Skew

Skewing affects the baseline LLC’s metadata access and conflict management in three ways. First, the baseline reads all ways of a set from a single wide meta-data-RAM word, whereas a skewed cache accesses an independent row in each skew. Retaining the original single-read-port organization would therefore serialize metadata lookup into one access per independent index—two for CEASER-S and MIRAGE, and one per way for SCATTERCACHE and SASSCACHE—increasing LLC latency. Second, a single set-index comparison no longer detects all metadata read-after-write (RAW) hazards, since requests conflict whenever they access the same row of the same metadata bank, even if their original set indices differ. Third, MSHR locking can no longer be performed at set granularity because requests to different metadata banks may proceed independently despite sharing the same row index. Our Solution. We partition the wide metadata RAM into independently accessible banks, restoring single-cycle metadata lookup through parallel reads. RAW hazards are detected independently for each skew, and each MSHR entry records both the selected way and row index. This line-level lock preserves parallel lookup and non-blocking operation without unnecessary set-level serialization.

IDF Integration

The IDF must generate the randomized index before metadata lookup and therefore lies directly on the LLC access path. Because the IDF is implemented as a keyed hash or block cipher, a fully combinational design lengthens the critical path and reduces the maximum operating frequency. Prior work addresses this by pipelining the IDF, e.g., over three stages for MIRAGE [62]. Pipelining shortens the combinational delay and, once the pipeline is filled, sustains one index per cycle, but introduces additional latency before metadata lookup.

Our Solution. Following the original proposals, we implement each IDF as a fully pipelined datapath placed before the metadata RAM. This removes the IDF from the single-cycle critical path while preserving one-request-per-cycle throughput, at the cost of a design-specific pipeline latency.

Asynchronous Paths

Unlike skew and IDF integration, asynchronous paths are not part of the demand lookup. Instead, they execute as multi-cycle operations alongside regular requests, and compete for cache resources. Although CEASER-S relocation and MIRAGE global eviction serve different purposes, both introduce conflicts absent from the baseline LLC. In CEASER-S, a demand request may target a line being relocated; the request must not observe this transient state and therefore stalls until relocation completes. In MIRAGE, global eviction generates additional dependent accesses to the metadata and pointer arrays. These accesses may contend with the demand pipeline for array ports or reach an in-flight data entry through a different metadata entry, creating both structural and data-location hazards.

Our Solution. We route these asynchronous paths through the existing control pipeline and overlap them with regular requests instead of serializing all demand traffic. Hazard detection tracks only the affected locations and array accesses so that only conflicting operations are stalled, replayed, or arbitrated, while independent requests proceed. This selective synchronization preserves correctness with minimal performance impact (cf. Sections IV-B and IV-C).

End-to-end Implementation

Having identified the platform-independent implementation challenges in Section III, we now realize the four caches as complete end-to-end hardware implementations. We implement all four designs in NaxRiscv [71], an open-source RISC-V SoC comprising an out-of-order core and a coherent L2 cache that serves as the LLC. NaxRiscv is optimized for both area efficiency and high clock frequency, making it a demanding platform for evaluating the timing and hardware implications of cache randomization. Wherever possible, we preserve the original organization while adapting the implementation to the NaxRiscv cache hierarchy. Our objective is to preserve the throughput of the baseline LLC and its non-blocking operation while minimizing additional latency. We first present the mechanisms common to all four implementations, followed by the design-specific mechanisms required for CEASER-S and MIRAGE.

Common Hardware Changes

All implementations share four hardware changes, highlighted in Figure 5. Changes S1, S2, and S3 address the skew-related challenges of Section III-A, whereas I integrates the pipelined IDF of Section III-B. Their realization depends on each design’s IDF and the baseline LLC organization.

Randomized LLC implementations integrated into the NaxRiscV SoC

Figure 5. Randomized LLC implementations integrated into the NaxRiscV SoC [71]. S denotes design elements shared by all randomized LLCs to solve cache skewing, I denotes the IDF integration, and C and M denote elements specific to CEASER-S and MIRAGE for asynchronous operations, respectively.

We first partition the metadata RAM to match each design’s indexing function (S1). Because SCATTERCACHE and SASSCACHE independently index every way, their metadata is organized as NN independently addressed way RAMs, allowing candidate tags to be accessed in parallel. In contrast, CEASER-S and MIRAGE employ two skews. We therefore partition the metadata RAM into two independently addressed banks. The data array remains unchanged because randomization only affects metadata lookup.

Next, we refine pipeline hazard detection from the set level to the granularity of an independent metadata index (S2): per way for SCATTERCACHE and SASSCACHE, and per skew for CEASER-S and MIRAGE. Finally, we replace the baseline set-level MSHR lock with a line-level lock (S3), extending each MSHR entry to record the complete metadata location of an in-flight cache line. For CEASER-S, SCATTERCACHE, and SASSCACHE, this refinement eliminates unnecessary serialization between independent accesses. For MIRAGE, it additionally ensures correctness when multiple metadata entries reference the same physical cache line.

We integrate the IDF as a fully unrolled, pipelined datapath placed immediately before the metadata RAM (I). Following the original proposals, we implement a two-stage Feistel network for CEASER-S, a three-stage QARMA [5] pipeline for SCATTERCACHE, the original three-stage SASSCACHE permutation, and a three-stage PRINCE [14] pipeline for MIRAGE. Since metadata lookup depends on the randomized index, it cannot begin until the IDF completes. Consequently, an NN-stage IDF inserts NN additional stages before the baseline metadata lookup stage, shifting metadata lookup to stage N+1N + 1. Nonetheless, once the pipeline is filled, all four implementations can sustain one randomized index per cycle, preserving the baseline request throughput.

Ceaser-S-specific Implementation

CEASER-S preserves its security guarantee by periodically rekeying the cache and incrementally relocating one cache set at a time instead of flushing the entire cache. Realizing this mechanism in hardware introduces two implementation challenges: tracking each relocation until completion and maintaining correctness in the presence of concurrent requests.

Status Tracking

  1. Status Tracking: Relocation is a multi-cycle operation whose latency depends on the destination state. If the destination is invalid, relocation simply transfers the line’s data and metadata. If the destination is valid, however, it must first be evicted by issuing coherence probes to the private caches, obtaining the most up-to-date copy, completing the eviction, and only then moving the relocated line’s data and metadata. The hardware must therefore orchestrate this variable-latency operation and determine when relocation has completed before initiating the next one.

We assign this responsibility to a dedicated relocation finite-state machine (FSM) (C1), which coordinates the relocation sequence and tracks the state of the line being relocated. Rather than introducing a dedicated control pipeline, FSM reuses the existing cache-control pipeline (Figure 5), minimizing both hardware and control overhead. It injects relocation requests through the pipeline arbiter, while the MSHRs track each relocation until completion. Unlike prior work that relocates lines sequentially for CEASER [69], our FSM exploits the available cache concurrency by scheduling and processing as many relocation requests in parallel as resources permit.

Concurrent Request Handling

To preserve performance, CEASER-S performs non-blocking relocations, allowing the cache to continue serving regular requests while a relocation is in progress. This introduces potential conflicts between an in-flight relocation and demand requests. A regular request that targets a line being relocated must not observe stale data or an intermediate relocation state, and therefore cannot proceed until relocation completes. Coherence requests on the C channel are more challenging.3 Private caches use this channel to evict and write back cache lines, it provides no retry mechanism, and must be prioritized to preserve coherence correctness. Consequently, the cache cannot stall, reject, or replay conflicting C-channel requests.

We extend the hazard controller (C2) to coordinate both relocation timing and relocation-induced conflicts. Once the relocation counter reaches its threshold, the controller searches the cache pipeline, request queues and MSHRs for outstanding accesses that conflict with the target set. Relocation begins only after all conflicting accesses have completed, allowing the controller to identify a safe execution window without draining the cache. Conflicts arising during relocation are then resolved according to request type. Regular requests targeting a relocating line are redirected to the retry FIFO and replayed after relocation completes. In contrast, conflicting C-channel requests are captured by the swap buffer (Figure 5, C1), and their data are merged with the relocating line. Relocation therefore operates on the most recent copy while preserving coherence correctness.

Mirage-specific Implementation

MIRAGE decouples metadata placement from data placement to emulate a pseudo-fully-associative cache. This organization requires additional storage, including extra metadata ways and two indirection structures: tag-pointer and data-pointer arrays. Integrating these structures into the cache pipeline requires additional metadata and pointer-array accesses while introducing new hazards arising from the metadata–data indirection.

Additional Metadata Accesses

Global eviction in MIRAGE performs several dependent accesses to the metadata and the pointer array. The cache first reads the metadata array. if it determines that global eviction is necessary, it reads the data-pointer array to identify the victim data entry and then performs a second metadata read to retrieve the victim’s tag and coherence state. Finally, it then evicts the selected line, invalidates its metadata entry, and installs the incoming line, writing the new metadata and updating the data-pointer array to reconstruct the metadata–data mapping. Overall, global eviction performs two metadata reads, two metadata writes, one data-pointer read, and one data-pointer write. That is, global eviction introduces a metadata read and a write on top of the accesses that a conventional cache performs. Scheduling these dependent accesses without extending the cache access latency is our primary challenge.

We take two measures to address this challenge. We first separate the data-pointer array from the data array (Figure 5, M1), allowing pointer accesses to execute in the control pipeline alongside metadata accesses. This avoids contention between pointer operations and data-array accesses, which would be particularly costly during multi-cycle cacheline refills, which would otherwise delay pointer operations.

Second, because each storage array provides one read and one write port,4 the additional accesses fit within the existing pipeline provided no pipeline stage issues a second read or write to the same array. Accordingly, the additional metadata read and write are scheduled alongside Stage 1, while the data-pointer update overlaps with Stage 2 (cf. Figure 5). Unlike the original MIRAGE implementation [62], which budgets an additional cycle of tag-access latency, this organization introduces no additional pipeline stage and leaves the normal cache-access latency unchanged.

Additional Hazards

2) Additional Hazards: The additional array accesses and the decoupled metadata–data organization introduce two new hazards. The first is a structural hazard caused by contention for the metadata-array ports. Different pipeline stages may access the metadata array in the same cycle—for example, Stage 0 and Stage 1 both issuing a read—and because the array provides only one read port and one write port, two simultaneous reads or two simultaneous writes cannot proceed together and must therefore be arbitrated. The second hazard arises from the indirection between the metadata and data arrays. During global eviction, one operation may select a data entry that another in-flight operation is already accessing. Because different metadata entries may reference the same physical data entry, the common set- and line-level hazard checks do not detect the conflict.

We extend the hazard controller (M2) to handle both cases. For structural hazards, the controller tracks metadata-array accesses across the pipeline and stalls one stage whenever two stages simultaneously require the same metadata-array port. For data-location hazards, each MSHR additionally records and locks the physical data-array location of the in-flight cacheline. Subsequent requests targeting the same location are stalled or redirected to the retry FIFO until the lock is released.4: 1R1W is a common two-port SRAM organization [83]; for e.g., iCE40 FPGAs provide dedicated RW ports instead of symmetric 2RW access [38].

The Frequency Cost of Randomized Caches

The LLC implementations described in the previous section are functionally complete and preserve the original randomized cache organizations. However, like prior evaluations of randomized caches, they implicitly assume that integrating a randomized LLC does not affect the processor’s maximum clock frequency. We now test this assumption on complete hardware implementations. We first describe our experimental platform and timing methodology (§ 5-A) and characterize the IDF in isolation (§ 5-B), the component most commonly regarded as the primary frequency bottleneck. We then measure the maximum clock frequency of the complete SoC variants (§ 5-C), identify the critical paths responsible for the observed frequency loss (§ 5-D), and redesign them to recover the lost frequency (§ 5-E).

Experimental Setup

We configure the NaxRiscv SoC with a single core, separate 32 KB L1 instruction and data caches, and a shared 2 MB, 16-way LLC, matching a typical Intel LLC slice [22]. The baseline SoC (STD) uses the original NaxRiscv LLC with PLRU replacement policy. We adopt the default parameters of each randomized cache: CEASER-S and MIRAGE use two skews, the IDF pipeline depths follow Table I, MIRAGE provisions six additional metadata ways per skew, and CEASER-S uses a 1% relocation rate. All randomized caches use random replacement, which provides comparable performance [16]. An LFSR [23] supplies the random values for replacement, MIRAGE global eviction, and CEASER-S rekeying.

LLC DesignStagesScopeDetailsUnrolled Critical Path (ns)Unrolled Fmax⁡F_{\max} (MHz)Pipeline Critical Path (ns)Pipeline Fmax⁡F_{\max} (MHz)
ScatterCache QARMA5_53IDF1 IDF6.953143.43.745265.7
Wrapper3 IDFs + slicing7.746128.84.104242.5
SASSCache Ext. QARMA5_53IDF1 IDF8.212121.54.472222.7
Wrapper3 IDFs + slicing10.70693.24.706211.6
CEASER-S Feistel-Network2IDF1 IDF (2 halves)3.391293.32.466402.6
Wrapper2 IDFs + mux3.487285.32.402413.2
MIRAGE PRINCE3IDF1 IDF6.674149.43.533281.5
Wrapper1 IDF + slicing6.888149.13.804261.6
SoC Variant (LLC)Fmax⁡F_{\max} (MHz)SoC Critical PathLogic/Route Delay (ns)
Initial
STD206.0 (100.0%)MSHR → Data-RAM1.190/3.702
CEASER-S [58]169.3 (82.2%)FSM → Metadata-RAM1.669/3.972
SCATTERCACHE [82]203.8 (98.9%)MSHR → Data-RAM1.236/3.677
SASSCACHE [26]194.6 (94.5%)MSHR → Data-RAM1.066/4.198
MIRAGE [62]134.7 (65.4%)Metadata-RAM ⟲2.352/4.523
Redesign
CEASER-SF192.5 (93.5%)FSM → Metadata-RAM1.286/3.624
SASSCACHEF208.6 (101.3%)Data-RAM → Read Unit2.559/1.947
MIRAGEF185.2 (89.9%)Hit reg → Metadata-RAM1.385/3.901

Table I. Maximum operating frequency of isolated IDFs and wrappers.

We implement both the isolated components and the complete SoCs in Vivado 2020.2 targeting the AMD Xilinx VCU118 (Virtex UltraScale+) [2]. All SoC variants differ only in the LLC implementation. To determine the maximum achievable clock frequency (Fmax⁡F_{\max}), we follow the iterative methodology recommended in AMD’s UltraFast Design Methodology Guide [3]. For each variant, we independently rerun synthesis and full implementation from identical RTL at target frequencies ranging from 150 to 220 MHz in 10 MHz increments using the PerformanceOptimized synthesis and Explore implementation directives with post-route physical optimization. Rather than stopping at the first timing failure, we evaluate every target frequency and estimate Fmax⁡=1/(Ttarget−WNS)F_{\max} = 1/(T_{\mathrm{target}} - \mathrm{WNS}), where TtargetT_{\mathrm{target}} is the target clock period and WNS is the worst negative slack,5 and report the highest estimated Fmax⁡F_{\max} across the sweep.

The IDF in Isolation

Prior work [26, 62, 82] identifies the IDF as the potential frequency bottleneck in complete SoC implementations. Before evaluating the full-SoC, we therefore characterize the four default IDFs in isolation by measuring the maximum operating frequency of both the pipelined IDF and its wrapper (Table I). We use a target frequency of 200 MHz, approximately the Fmax⁡F_{\max} of the full-SoC with STD LLC. For each design, we first evaluate a single IDF instance, unrolled and pipelined, and then the IDF wrapper used in the LLC, which instantiates multiple IDFs plus the output-slicing logic needed to produce the cache-index bits. To match the additional tag-access latency, we pipeline each IDF and its wrapper with the same number of stages as its LLC implementation. Because

the default SASSCACHE configuration does not specify the IDF latency, we conservatively use three stages, following SCATTERCACHE, whose QARMA-based IDF has a similar structure).

As shown in Table I, pipelining substantially shortens the critical paths of both the standalone IDFs and their corresponding wrappers. The wrappers generally remain slower because they include multiple IDF instances and the slicing logic, except for CEASER-S, whose wrapper is slightly faster owing to a more favorable post-route implementation, where a 0.113 ns reduction in routing delay outweighs the additional 0.049 ns logic delay. This inversion reflects single-point physical implementation and WNS extrapolation, rather than a higher intrinsic wrapper Fmax⁡F_{\max}. More importantly, the results show pipelining is a prerequisite rather than an optimization. In their unrolled form, three of the four wrappers fail to meet the 200 MHz reference target, with SASSCACHE wrapper reaching only 93.2 MHz—less than half the target frequency. After pipelining, every wrappers exceeds 200 MHz, with the lowest being SASSCACHE at 211.6 MHz.

Observation 1. When evaluated in isolation, every pipelined IDF wrapper exceeds the 200 MHz reference target suggesting IDF alone is not the limiting factor for SoC frequency.

Full-SoC Frequency Degradation

The isolated evaluation suggests that, once pipelined, the IDF should not limit the operating frequency of the processor. We now test whether this conclusion holds after integrating the randomized LLCs into a complete SoC. Unless otherwise stated, all reported Fmax⁡F_{\max}, IPC, and FPGA resource results refer to complete NaxRiscv SoC variants identified by their integrated LLC implementation names. Table II (Initial SoC variants) reports the highest estimated post-route clock frequencies6 of the STD SoC variant and the four randomized variants. Since all variants differ only in their LLC implementation, any change in Fmax⁡F_{\max} is attributable to the integrated randomized cache.

The full-SoC results reveal substantial frequency degradation for three of the four variants. The CEASER-S, SASSCACHE, and MIRAGE variants achieve only 82.2%, 94.5%, and 65.4% of the STD Fmax⁡F_{\max}, respectively, corresponding to a maximum frequency loss of 34.6%. In contrast, SCATTERCACHE retains 98.9% of the baseline frequency and preserves the same critical path as STD. These results contradict the isolated IDF evaluation. Although the pipelined SASSCACHE IDF exceeds the 200 MHz reference target in isolation, the integrated SoC still incurs a measurable frequency loss. Conversely, CEASER-S employs the fastest pipelined IDF wrapper (413.2 MHz) yet exhibits the second-largest reduction in Fmax⁡F_{\max}. The dominant timing bottlenecks therefore arise from the integrated LLC rather than the IDF alone. To the best of our knowledge, this work provides the first systematic characterization of this full-SoC timing cost.

Observation 2. Pipelining eliminates the IDF as the dominant frequency bottleneck in isolation, yet full-SoC integration still incurs frequency losses of up to 34.6%.

Diagnosing the Critical Paths

We now trace the critical paths reported in Table II back to the hardware mechanisms responsible for them. The resulting critical paths are illustrated in Figure 6.

Figure 6. Critical-path characterization of the frequency degradation induced by the CEASER-S, SASSCACHE, and MIRAGE LLC implementations.

CEASER-S. Following the original design, we implement relocation in a non-blocking manner, allowing normal LLC requests to execute concurrently with relocation (cf. Section IV-B). To support this, the hazard controller records the set and way of cache lines undergoing relocation and compares them against requests arriving from multiple sources such as the request in input buffer or retry buffer. As shown in Figure 6, these comparisons form a large combinational network within the hazard controller. In the 16-way LLC configuration, the relocation set and way signals must be broadcast to a large number of comparators, resulting in a high fan-out (125) and increased combinational delay. Consequently, the CEASER-S SoC variant achieves an Fmax⁡F_{\max} of only 169.3 MHz, corresponding to 82.2% of that of the STD SoC variant.

SASSCACHE. Although its pipelined IDF exceeds the target frequency in isolation (cf. § 5-B), integrating it into the LLC still reduces the SoC frequency through placement and routing rather than IDF logic. The critical path originates at the MSHRs, whose write-side control signals depend on the IDF-derived randomized index in the final controller stage (cf. Figure 5). Although several pipeline stages separate these components logically, the dense IDF logic biases placement toward the MSHRs, increasing their distance from the data RAMs and hence the routing delay on the MSHR-to-data-RAM path (Figure 6). Consequently, the SASSCACHE SoC reaches only 194.6 MHz (94.5% of STD). The SCATTERCACHE SoC does not exhibit this effect because its simpler five-round QARMA IDF is more evenly distributed across three pipeline stages.

MIRAGE. To support indirect eviction, MIRAGE introduces additional metadata ways, the associated metadata structures, and the extra metadata accesses (cf. Section IV-C). The additional ways widen the comparison and selection networks used for hit detection and metadata updates. As Figure 6 shows, both critical paths begin at the metadata RAM, traverse the combinational comparison and update logic, and drive the write data or write request back to the metadata RAM within the same pipeline stage. This forms long RAM-to-logic-to-RAM read–modify–write paths. These additional accesses and the enlarged metadata logic form MIRAGE’s dominant frequency bottleneck, achieving only 134.7 MHz, with logic accounting for 34.2% of the critical-path delay and routing contributing the remaining 65.8%.

Across all three degraded variants, routing rather than logic accounts for the majority of the critical-path delay (65.8–79.7%, Table II). The frequency cost therefore arises primarily from fan-out, placement, and wiring—physical-design effects that are not exposed by isolated component analysis.

Observation 3. The frequency bottlenecks arise from three distinct mechanisms: concurrent-relocation conflict handling in CEASER-S, placement-and-routing pressure from IDF integration in SASSCACHE, and additional accesses to enlarged metadata RAMs in MIRAGE. No single mitigation applies to all designs.

Restoring Frequency by Redesign

Having identified the sources of the frequency degradation, we now redesign the LLC logic along the critical paths of the three affected SoC variants. We propose the frequency-optimized LLC implementations CEASER-SF, SASSCACHEF, and MIRAGEF and integrate each into an otherwise unchanged SoC.7 The resulting timing improvements are summarized in Table II (Redesign SoC variants).

For CEASER-S, we propose CEASER-SF, which disables concurrent request processing during relocation. Each relocation operation temporarily stalls incoming LLC requests, eliminating the need to compare the relocation state against requests from multiple sources. This simplifies the comparison network (Figure 6) and reduces its fan-out from 125 to 46. Consequently, the CEASER-SF SoC variant achieves a maximum operating frequency of 192.5 MHz, a 13.7% improvement over the original CEASER-S variant. Although the critical path remains the same, its overall delay is substantially reduced by the lower fan-out.

For SASSCACHE, we propose SASSCACHEF, which increases the number of IDF pipeline depth from three to four stages. The additional stage provides the placer with greater flexibility in the IDF region, allowing the MSHRs to be

placed closer to the data RAM and thereby reducing routing delay. After this optimization, the SASSCACHEF SoC variant reaches 208.6 MHz, exceeding the STD SoC frequency. This improvement may be attributed to the dedicated metadata-RAM access stage in the randomized LLC implementation, described in Section IV-A (Figure 1), which can improve placement and routing. Additionally, the critical path no longer spans the MSHRs and data RAM, instead shifting entirely into the backend pipeline.

Finally, for MIRAGE, we redesign the parallel pipeline associated with M2 in Figure 5. Rather than overlapping the additional metadata access with the controller pipeline, MIRAGEF introduces two pipeline stages to buffer the metadata-RAM response. These stages pipeline the two long combinational paths indicated by the black arrows in Figure 6. After optimization, the MIRAGEF SoC variant achieves 185.2 MHz, corresponding to 89.9% of the frequency of the STD SoC variant. The critical path shifts to the registers that retain cache-hit information for scheduling in the subsequent cycle, located in Stage 2 of the control pipeline (cf. Figure 5). The remaining delay primarily arises from the architectural characteristics of the MIRAGE LLC, including its 75% increase in the number of ways and the resulting increase in combinational-logic complexity.

Observation 4. Most of the lost frequency is recoverable (89.9–101.3% of the STD Fmax⁡F_{\max}), but only through design-specific trade-offs: reduced concurrency in CEASER-SF, increased IDF latency in SASSCACHEF, and additional pipeline stages in MIRAGEF.

Evaluation

We evaluate the complete SoC variants by measuring application performance together with FPGA implementation and ASIC synthesis results, using instructions per cycle (IPC) as the primary performance metric. Unless otherwise stated, all variants differ only in their LLC implementation, and the experimental setup is summarized below.

SoCNavRiscV [7], one or two out-of-order cores at 125 MHz; 32 KiB L1I/L1D; 2 MB 16-way L2 as the LLC; 2 GB DDR4 at 500 MHz.
SoftwareBenchmarks are compiled with the RISC-V GCC toolchain [34], using -fopenmp for the multicore runs.
BenchmarksSingle core: SPEC CPU 2017 rate [72]: all 23 int and FP programs. GAP [6]: TC, BFS, CC, SSP, BC, PR. Multicore: four most memory-intensive programs of each suite [59]—SPEC CPU 2017 speed: for, rom, bwa, lbm; GAP: BC, PR, CC, SSSP.
FPGAAMD Xilinx VCU118 (Virtex UltraScale+) [2] with Vivado 2020.2. Resource utilization is taken from post-implementation reports, and dynamic power from Vivado’s vector-based analysis flow [4].8
ASICSynopsys Design Compiler with the Nangate 45 nm standard-cell library [47] and OpenRAM SRAMs at the same technology node [28].

Table 1. Experimental Setup

Performance

a) Baseline Characterization: Figure 7 reports the IPC of each initial SoC variant with a randomized LLC, normalized to the STD SoC variant. Programs are ordered from left to right by increasing accesses per kilo-instruction (APKI), illustrating how LLC access intensity influences performance.9 On average, the SCATTERCACHE and MIRAGE SoC variants reduce IPC by 2.9% on SPEC and 6.3% on GAP because both introduce the same additional control-pipeline latency. In contrast, CEASER-S incurs one fewer pipeline stage, reducing the average IPC loss to 2.7% on SPEC and 6.1% on GAP. The SASSCACHE SoC variant exhibits the largest IPC reduction—5.3% on SPEC and 11.3% on GAP—because it combines the additional control-pipeline latency with a higher LLC miss rate resulting from its reduced effective cache capacity. Interestingly, the multicore results follow the same trend as the single-core, except for SASSCACHE, whose reduced effective cache capacity increases the IPC degradation by up to 9%. While these results quantify the overall performance impact, they do not explain its underlying cause. We therefore next examine whether randomization-induced LLC misses account for the observed slowdown.

Figure 7. IPC of the four initial randomized-LLC SoC variants normalized to STD for SPECrate CPU 2017. Labels are abbreviated to the first three letters.

b) Miss-Rate Analysis: Following prior work [26, 58, 62, 82], we consider two potential sources of IPC degradation: randomization-induced LLC misses and the additional control-pipeline latency incurred on every LLC access. For each benchmark, Δ\DeltaMPKI measures the %age increase in LLC misses per kilo-instruction over STD, whereas APKI measures how frequently the additional latency is incurred. Table III directly contrasts the Pearson correlations of normalized IPC with these two metrics. For SPEC, the Δ\DeltaMPKI–IPC correlations are weak and slightly positive (0.086–0.325), whereas the APKI–IPC correlations are consistently negative and stronger (−0.803 to −0.717). Thus, additional misses alone do not explain the SPEC degradation, which instead

SPECGAP
SCTMIRCESSASSCTMIRCESSAS
Δ\DeltaMPKI+3.1%+3.1%+8.7%+53.4%+6.5%+6.5%+12.3%+42.3%
rΔMPKI,IPCr_{\Delta\mathrm{MPKI},\mathrm{IPC}}0.0860.0870.3250.228−0.663−0.651−0.848−0.860
rAPKI,IPCr_{\mathrm{APKI},\mathrm{IPC}}−0.803−0.774−0.771−0.717−0.890−0.889−0.927−0.882

Table III. MPKI statistics and correlations with normalized IPC.

Note: SCT: SCATTERCACHE; MIR: MIRAGE; CES: CEASER-S; SAS: SASSCACHE.

tracks LLC access intensity. For GAP, both Δ\DeltaMPKI (−0.860 to −0.651) and APKI (−0.927 to −0.882) correlate strongly with normalized IPC. Correlation, however, characterizes how two metrics vary together across benchmarks, not the magnitude of their contribution. To provide this context, we also examine the average increase in LLC misses. Relative to the suite-mean STD MPKI, the suite-mean Δ\DeltaMPKI of SCATTERCACHE, MIRAGE, and CEASER-S is only 3.1–8.7% for SPEC and 6.5–12.3% for GAP. Only SASSCACHE exhibits a substantial MPKI increase because its reduced effective cache capacity increases LLC misses. These statistics alone cannot identify the dominant source of IPC degradation. We therefore isolate the per-access latency cost using latency-matched controls.

c) Latency-Matched Validation: To isolate the per-access latency, we construct STD-3C by adding the default three-cycle LLC latency of SCATTERCACHE and MIRAGE to STD using pipeline registers but no IDF. The remaining IPC difference captures non-latency effects, including randomization-induced misses. Across both suites, STD-3C closely matches SCATTERCACHE, MIRAGE, and the one-cycle-shorter CEASER-S. Their geometric-mean IPC differs by at most 0.2 percentage points on SPEC and 1.3 on GAP. Compared with the total IPC degradations of roughly 3% and 6%, these residuals show that latency dominates the performance overhead. SASSCACHE falls further because its reduced effective capacity increases LLC misses. We further compare four-, and five-cycle SCATTERCACHE and MIRAGE configurations against latency-matched STD variants. Figure 8 shows that the SPEC residual remains within 0.12 percentage points for both caches at every evaluated pipeline depth.

Figure 8. Latency-matched SPEC validation for SCATTERCACHE and MIRAGE with varying IDF latencies. The blue-shaded part denotes the IPC degradation of latency-matched STD variant.

Note: IPC is calculated as Gmean of all benchmarks running under each design’s Fmax⁡F_{\max}. MIPS is IPC multiplied by Fmax⁡F_{\max}.

Observation 5. Except for SASSCACHE, IPC degradation tracks LLC access intensity rather than LLC misses. Latency-matched evaluation confirm that additional LLC access latency dominates the performance overhead of randomized caches.

Maximum Execution Speed

IPC alone does not capture the overall performance impact of randomized LLCs because it ignores the reduction in processor frequency. We therefore evaluate the maximum execution speed under each design’s maximum reachable frequency, computed as IPC × Fmax⁡F_{\max}, and report it in millions of instructions per second (MIPS). As shown in Table IV, incorporating the frequency reveals a much larger performance loss. In general, because the memory frequency is fixed, a lower execution frequency translates to a reduction in the number of cycles a cache miss costs, which somewhat compensates for the additional latency that randomized caches induce. However, although the IPC loss is reduced to at most 6%, the overall execution speed still drops by up to almost 35%, once the maximal execution frequency is taken into account. The frequency-optimized implementations recover most of this loss. In particular, MIRAGE^F improves the slowdown from 34.85% to 13.41% on SPEC and from 32.43% to 15.47% on GAP, despite incurring a small additional IPC penalty. These results show that evaluating IPC in isolation substantially underestimates the true performance cost of randomized caches.

SoC VariantSPEC IPCSPEC MIPSSPEC SlowdownGAP IPCGAP MIPSGAP Slowdown
STD0.692135.58–0.34868.19–
CEASER-S0.683109.9518.90%0.34255.0819.23%
SCATTERCACHE0.672130.353.86%0.32763.357.09%
SASSCACHE0.648119.9411.54%0.30556.4617.21%
MIRAGE0.69088.3434.85%0.36046.0832.43%
CEASER-S^F0.674123.428.97%0.33060.3911.45%
SASSCACHE^F0.638126.386.79%0.29558.4514.29%
MIRAGE^F0.667117.3913.41%0.32757.6415.47%

Table IV. IPC, maximum execution speed (MIPS), and MIPS slowdown.

Resource Utilization and Power

Note: FPGA results are for the complete SoC; Power measurement excludes I/O

Table V reports post-implementation FPGA resource utilization and dynamic power together with post-synthesis ASIC area, all normalized to STD. Among the initial designs, SCATTERCACHE and SASSCACHE incur similar overheads because they use similar IDFs (about 10% LUTs, 6% FFs, and 1.4% BRAM). CEASER-S exhibits the largest LUT overhead (∼ 35%) due to relocation and conflict-handling logic, although mapping metadata to UltraRAM reduces BRAM utilization by 3.5%. MIRAGE increases LUT, FF, and BRAM utilization by about 15%, 11%, and 11%, respectively, owing to its additional metadata ways.

SoC VariantFPGA LUTFPGA FFFPGA BRAMDyn Power SoC (mW)Dyn Power LLC (mW)ASIC Area SoC (mm²)ASIC Area LLC (mm²)
STD40,69929,221579.565423857.75754.903
CEASER-S55,02133,074559.073832659.00756.153
SCATTERCACHE44,61130,972587.573830958.41755.564
SASSCACHE44,70830,894587.583841758.41755.564
MIRAGE46,62732,542642.579336165.85463.000
CEASER-S^F48,40833,100559.075132758.98256.128
SASSCACHE^F44,58631,163587.571931058.41955.565
MIRAGE^F47,25137,883642.579538165.88963.035

Table V. Post-implementation FPGA and post-synthesis ASIC results.

The redesigns preserve the randomized-cache algorithms while shortening their critical paths. Simplifying relocation lowers the LUT overhead of CEASER-S^F from 35.2% to 18.9% with essentially unchanged FF utilization. The additional IDF stage in SASSCACHE^F adds only about one percentage point of FF overhead and leaves LUT and BRAM utilization nearly unchanged. In contrast, the deeper pipeline in MIRAGE^F raises FF overhead from 11.4% to 29.6%, while its LUT and BRAM overheads remain close to those of MIRAGE.

Unlike FPGA LUT utilization, ASIC area is dominated by the LLC SRAM macros rather than synthesized control logic. Consequently, the additional hazard logic, FSMs, and IDFs contribute little to the overall silicon area, yielding SoC area overheads of only 1–14%. Instead, the ASIC area closely follows the FPGA memory overhead—BRAM, together with CEASER-S’ UltraRAM—showing that additional cache storage, rather than control logic, dominates the silicon cost.

Dynamic power overhead ranges from about 12–28% at the SoC level and 30–75% within the LLC. The IDF dominates the power overhead of SCATTERCACHE and SASSCACHE, whereas CEASER-S is additionally affected by UltraRAM accesses and the 160-bit rekeying LFSR. MIRAGE incurs higher LLC power because of its expanded metadata structures. The redesigns have little impact on SoC-level power. SASSCACHE^F reduces power by shortening the critical path, CEASER-S^F remains nearly unchanged because relocation is infrequent, and MIRAGE^F slightly lowers SoC power despite higher LLC power by increasing processor stalls.

Conclusion and Future Works

Randomized caches are among the most promising defenses against cache side-channel attacks, yet their practical deployment remains largely unexplored. In this work, we presented the first end-to-end hardware study of state-of-the-art randomized caches on a high-performance out-of-order RISC-V SoC. We identified the implementation challenges of integrating cache randomization into modern non-blocking LLCs, developed corresponding hardware solutions, and evaluated four representative designs. Our results revealed a previously overlooked processor-frequency cost of randomized caches, traced it to its underlying critical paths, and showed that most of this loss can be recovered through targeted microarchitectural redesigns. Together, these findings establish a practical foundation for implementing randomized caches and provide the hardware insights needed to evaluate future randomized-cache designs under realistic implementation constraints.

The insights gained from this study suggest several directions for future work. Although our study targets an advanced open-source out-of-order RISC-V SoC, commercial processors feature larger cache hierarchies, deeper pipelines, and more complex memory systems. Extending this analysis to such platforms is therefore an important next step. Likewise, many randomized-cache proposals beyond the four studied here remain unevaluated in hardware, and implementing them would further broaden our understanding of the randomized-cache design space. Finally, completing a full ASIC implementation flow, including physical design, would provide additional insight into optimization opportunities and bottlenecks.

Acknowledgments

This work has been supported by the Advanced Research Projects Agency for Health (ARPA-H) under Agreement No. 140D042590046; the Alfred P. Sloan Research Fellowship; an ARC Discovery Project number DP210102670; the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence Strategy - EXC 2092 CASA - 390781972 and through project number 560392681; a grant from Coefficient Giving; and gifts from Qualcomm and Zama.

References

  1. [1]Ayaz Akram and Lina Sawahla, “Validation of the gem5 simulator for x86 architectures,” in PMBS, 2019, pp. 53–58.DOI
  2. [2]AMD, “VCU118 Evaluation Board User Guide,” https://docs.amd.com/v/u/en-US/ug1224-vcu118-eval-bd, 2023, UG1224, Version 1.5.
  3. [3]AMD, UltraFast Design Methodology Guide for FPGAs and SoCs, AMD, Jun. 2026, section: Assessing the Maximum Frequency of the Design. [Online]. Available: https://docs.amd.com/r/en-US/ug949-vivado-design-methodology/Assessing-the-Maximum-Frequency-of-the-Design
  4. [4]AMD, “Vivado Design Suite User Guide: Power Analysis and Optimization,” https://docs.amd.com/r/en-US/ug907-vivado-power-analysis-optimization/Vector-SAIF-Based-Power-Analysis, 2026, ug907, 2026.1.
  5. [5]Roberto Avanzi, “The QARMA block cipher family. Almost MDS matrices over rings with zero divisors, nearly symmetric Even-Mansour constructions with non-involutory central rounds, and search heuristics for low-latency S-boxes,” IACR Trans. Symmetric Cryptol., vol. 2017, no. 1, pp. 4–44, 2017.
  6. [6]Scott Beamer, Krste Asanović, and David A. Patterson, “The GAP benchmark suite,” CoRR, vol. abs/1508.03619, 2015. [Online]. Available: https://arxiv.org/abs/1508.03619
  7. [7]Nathan Beckmann and Daniel Sanchez, “Jigsaw: Scalable software-defined caches,” in PACT, 2013, pp. 213–224.DOI
  8. [8]Berkeley Architecture Research Group, “RISC-V BOOM,” https://github.com/riscv-boom/riscv-boom, accessed: 2026-07-21.
  9. [9]Daniel J. Bernstein, “Cache-timing attacks on AES,” 2005. [Online]. Available: https://cr.yp.to/antiforgery/cachetiming-20050414.pdf
  10. [10]Anubhav Bhatla, Navneet, and Biswabandan Panda, “The Maya Cache: A storage-efficient and secure fully-associative last-level cache,” in ISCA, 2024, pp. 32–44.DOI
  11. [11]Anubhav Bhatla, Hari Rohit Bhavsar, Sandeep Saha, and Biswabandan Panda, “SoK: So, you think you know all about secure randomized caches?” in USENIX Security, 2025, pp. 2461–2480.DOI
  12. [12]Anubhav Bhatla, Navneet, Moinuddin Qureshi, and Biswabandan Panda, “The Avatar Cache: Enabling on-demand security with morphable cache architecture,” CoRR, vol. abs/2602.06433, 2026. [Online]. Available: https://arxiv.org/abs/2602.06433
  13. [13]Nathan L. Binkert, Bradford M. Beckmann, Gabriel Black, Steven K. Reinhardt, Ali G. Saidi, Arkaprava Basu, Joel Hestness, Derek Hower, Tushar Krishna, Somayeh Sardashti, Rathijit Sen, Korey Sewell, Muhammad Shoaib Bin Altaf, Nilay Vaish, Mark D. Hill, and David A. Wood, “The gem5 simulator,” ACM SIGARCH computer architecture news, vol. 39, no. 2, pp. 1–7, 2011.DOI
  14. [14]Julia Borghoff, Anne Canteaut, Tim Güney su, Elif Bilge Kavun, Miroslav Knezevic, Lars R. Knudsen, Gregor Leander, Ventzislav Nikov, Christof Paar, Christian Rechberger, Peter Rombouts, Søren S. Thomsen, and Tolga Yalçin, “PRINCE - a low-latency block cipher for pervasive computing applications - extended abstract,” in ASIACRYPT, vol. 7658, 2012, pp. 208–225.
  15. [15]Thomas Bourgeat, Jules Drean, Yueheng Yang, Lillian Tsai, Joel S. Emer, and Mengjia Yan, “CaSA: End-to-end quantitative security analysis of randomly mapped caches,” in MICRO, 2020, pp. 1110–1123.
  16. [16]Anirban Chakraborty, Nimish Mishra, Sayandeep Saha, Sarani Bhattacharya, and Debdeep Mukhopadhyay, “Systematic evaluation of randomized cache designs against cache occupancy,” in USENIX Security, 2025, pp. 2499–2518.
  17. [17]CHIPS Alliance, “Rocket Chip Generator,” https://github.com/chipsalliance/rocket-chip, accessed: 2026-07-31.
  18. [18]Henry Michael Cook, Productive design of extensible on-chip memory hierarchies. University of California, Berkeley, 2016.
  19. [19]Phaedra Sophia Curlin and Tamara Silbergleit Lehman, “Open-source cache architectures in Chipyard,” https://oscar-workshop.github.io/files/5_1_secure_cache_hw.pdf, 2026, presentation at the Fifth Workshop on Open-Source Computer Architecture Research (OSCAR); accessed: 2026-07-31.
  20. [20]Roland Czerny, Simon Lammer, Lukas Giner, Anirban Chakraborty, and Daniel Gruss, “Fast and secure LLC caches via spatial windows,” in DIMVA, 2026, to appear. [Online]. Available: https://www.rolandczerny.com/papers/dimva_26.pdf
  21. [21]Leonid Domnitser, Aamer Jaleel, Jason Loew, Nael Abu-Ghazaleh, and Dmitry Ponomarev, “Non-monopolizable caches: Low-complexity mitigation of cache side channel attacks,” ACM Transactions on Architecture and Code Optimization (TACO), vol. 8, no. 4, pp. 1–21, 2012.
  22. [22]Jack Doweck, Wen-Fu Kao, Allen Kuan yu Lu, Julius Mandelblat, Anirudha Rahatekar, Lihu Rappoport, Efraim Rotem, Ahmad Yasin, and Adi Yoaz, “Inside 6th-generation Intel core: New microarchitecture code-named Skylake,” IEEE Micro, vol. 37, no. 2, pp. 52–62, 2017.
  23. [23]Alex Forencich, “verilog-lfsr,” https://github.com/alexforencich/verilog-lfsr, 2016, accessed: 2026-7-11.
  24. [24]Daniel Genkin, Lev Pachmanov, Eran Tromer, and Yuval Yarom, “Drive-by key-extraction cache attacks from portable code,” in ACNS, 2018, pp. 83–102.DOI
  25. [25]Daniel Genkin, William Kosasih, Fangfei Liu, Anna Trikalinou, Thomas Unterluggauer, and Yuval Yarom, “CacheFX: A framework for evaluating cache security,” in AsiaCCS, 2023, pp. 163–176.arxiv.org/abs/2201.11377
  26. [26]Lukas Giner, Stefan Steinegger, Antoon Purnal, Maria Eichlseder, Thomas Unterluggauer, Stefan Mangard, and Daniel Gruss, “Scatter and split securely: Defeating cache contention and occupancy attacks,” in IEEE SP, 2023, pp. 2273–2287.DOI
  27. [27]Nathan Gober, Gino Chacon, Lei Wang, Paul V. Gratz, Daniel A. Jiménez, Elvira Teran, Seth H. Pugsley, and Jinchun Kim, “The championship simulator: Architectural simulation for education and competition,” CoRR, vol. abs/2210.14324, 2022.arxiv.org/abs/2210.14324
  28. [28]Matthew R. Guthaus, James E. Stine, Samira Ataei, Brian Chen, Bin Wu, and Mehdi Sarwar, “OpenRAM: An open-source memory compiler,” in ICCAD, 2016, pp. 1–6.DOI
  29. [29]Anthony Gutierrez, Joseph Pusdesris, Ronald G. Dreslinski, Trevor N. Mudge, Chander Sudanthi, Christopher D. Emmons, Mitchell Hayenga, and Nigel C. Paver, “Sources of error in full-system simulation,” in ISPASS, 2014, pp. 13–22.DOI
  30. [30]Ralf Hund, Carsten Willems, and Thorsten Holz, “Practical timing side channel attacks against kernel space ASLR,” in NDSS, 2013.DOI
  31. [31]Quentin Huppert, Timon Evenblij, Manu Perumkunnil, Francky Catthoor, Lionel Torres, and David Novo, “Memory hierarchy calibration based on real hardware in-order cores for accurate simulation,” in DATE, 2021, pp. 707–710.
  32. [32]Gorka Irazoqui, Thomas Eisenbarth, and Berk Sunar, “Systematic reverse engineering of cache slice selection in intel processors,” in DSD, 2015, pp. 629–636.
  33. [33]Gorka Irazoqui Apec­chea, Thomas Eisenbarth, and Berk Sunar, “$$A: A shared cache attack that works across cores and defies VM sandboxing - and its application to AES,” in IEEE SP, 2015, pp. 591–604.
  34. [34]Jakub Jelinek, “GCC 13.3 released,” May 2024, GNU Compiler Collection release 13.3.0. [Online]. Available: https://gcc.gnu.org/pipermail/gcc-announce/2024/000181.html
  35. [35]Tom Kessous and Niv Gilboa, “Prune+PlumTree - finding eviction sets at scale,” in IEEE SP, 2024, pp. 3754–3772.DOI
  36. [36]Paul C Kocher, “Timing attacks on implementations of Diffie-Hellman, RSA, DSS, and other systems,” in Crypto, 1996, pp. 104–113.DOI
  37. [37]David Kroft, “Lockup-free instruction fetch/prefetch cache organization,” in ISCA, 1981, pp. 81–87.
  38. [38]Lattice Semiconductor Corporation, Memory Usage Guide for iCE40 Devices, Lattice Semiconductor Corporation, Sep. 2020, see Section 3 and Figure 3.1 for the separate write and read ports of the iCE40 sysMEM EBR. [Online]. Available: https://www.latticesemi.com/view_document?document_id=47775
  39. [39]Yoochan Lee, Sihyun Roh, Hyuk Kwon, Byoungyoung Lee, and Thorsten Holz, “Heap Localization: cache side-channel based linux kernel heap exploit techniques,” in IEEE SP, 2026, pp. 4003–4019.DOI
  40. [40]Fangfei Liu and Ruby B. Lee, “Random Fill Cache Architecture,” in MICRO, 2014, pp. 203–215.DOI
  41. [41]Fangfei Liu, Yuval Yarom, Qian Ge, Gernot Heiser, and Ruby B Lee, “Last-level cache side-channel attacks are practical,” in IEEE SP, 2015, pp. 605–622.DOI
  42. [42]Hao Ma, Zhidong Wang, and Wei Song, “PIR-Cache: Mitigating conflict-based cache side-channel attacks via partial indirect replacement,” in ASP-DAC, 2026, pp. 56–62.DOI
  43. [43]Clémentine Maurice, Nicolas Le Scouarnec, Christoph Neumann, Olivier Heen, and Aurélien Francillon, “Reverse engineering intel last-level cache complex addressing using performance counters,” in RAID, 2015, pp. 48–65.DOI
  44. [44]Clémentine Maurice, Manuel Weber, Michael Schwarz, Lukas Giner, Daniel Gruss, Carlo Alberto Boano, Kay Römer, and Stefan Mangard, “Hello from the other side: SSH over robust cache covert channels in the cloud,” in NDSS, 2017.DOI
  45. [45]Bradley Morgan, Gal Horowitz, Sioli O’Connell, Stephan van Schaik, Chitshanok Chuengsatiansup, Daniel Genkin, Olaf Maene, Paul Montague, Eyal Ronen, and Yuval Yarom, “Slice+Slice Baby: Generating last-level cache eviction sets in the blink of an eye,” in IEEE SP, 2025, pp. 3479–3496.
  46. [46]Naveen Muralimanohar, Rajeev Balasubramonian, and Norman P. Jouppi, “Optimizing NUCA organizations and wiring alternatives for large caches with CACTI 6.0,” in MICRO, 2007, pp. 3–14.DOI
  47. [47]Nangate, 45nm Open Cell Library, Nangate Inc., Santa Clara, CA, USA, 2008.
  48. [48]Sioli O’Connell, Lishay Aben Sour, Ron Magen, Daniel Genkin, Yossi Oren, Hovav Shacham, and Yuval Yarom, “Pixel thief: Exploiting SVG filter leakage in Firefox and Chrome,” in USENIX Security, 2024, pp. 3331–3348.
  49. [49]OpenXiangShan, “XiangShan,” https://github.com/OpenXiangShan/XiangShan, accessed: 2026-07-21.
  50. [50]Yossef Oren, Vasileios P. Kemerlis, Simha Sethumadhavan, and Angelos D. Keromytis, “The spy in the sandbox: Practical cache attacks in JavaScript and their implications,” in CCS, 2015, pp. 1406–1418.DOI
  51. [51]Dag Arne Osvik, Adi Shamir, and Eran Tromer, “Cache attacks and countermeasures: The case of AES,” in CT-RSA, 2006, pp. 1–20.
  52. [52]Dan Page, “Theoretical use of cache memory as a cryptanalytic side-channel,” Department of Computer Science, University of Bristol, Tech. Rep. CSTR-02-003, 2002. [Online]. Available: https://eprint.iacr.org/2002/169
  53. [53]Moritz Peters, Florian Stolz, Jan Philipp Thoma, Tim Güney­sу, and Yuval Yarom, “Revisiting Prime+Prune+Probe: Pitfalls and remedies,” in ACSAC, 2025, pp. 751–766.DOI
  54. [54]Antoon Purnal, Lukas Giner, Daniel Gruss, and Ingrid Verbauwhede, “Systematic analysis of randomization-based protected cache architectures,” in IEEE SP, 2021, pp. 987–1002.DOI
  55. [55]Antoon Purnal, Furkan Turan, and Ingrid Verbauwhede, “Prime+Scope: Overcoming the observer effect for high-precision cache contention attacks,” in CCS, 2021, pp. 2906–2920.DOI
  56. [56]Antoon Purnal, Marton Bognar, Frank Piessens, and Ingrid Verbauwhede, “ShowTime: Amplifying arbitrary CPU timing side channels,” in AsiaCCS, 2023, pp. 205–217.DOI
  57. [57]Moinuddin K. Qureshi, “CEASER: Mitigating conflict-based cache attacks via encrypted-address and remapping,” in MICRO, 2018, pp. 775–787.DOI
  58. [58]Moinuddin K. Qureshi, “New attacks and defense for encrypted-address cache,” in ISCA, 2019, pp. 360–371.DOI
  59. [59]Ranjan Hebbar S. R and Aleksandar Milenkovic, “SPEC CPU2017: Performance, event, and energy characterization on the Core i7-8700K,” in ICPE, 2019, pp. 111–118.
  60. [60]RISC-V International, “Spike RISC-V ISA simulator,” https://github.com/riscv-software-src/riscv-isa-sim, 2026.
  61. [61]Thomas Ristenpart, Eran Tromer, Hovav Shacham, and Stefan Savage, “Hey, you, get off of my cloud: exploring information leakage in third-party compute clouds,” in CCS, 2009, pp. 199–212.
  62. [62]Gururaj Saileshwar and Moinuddin Qureshi, “MIRAGE: Mitigating conflict-based cache attacks with a practical fully-associative design,” in USENIX Security, 2021, pp. 1379–1396.arxiv.org/abs/2009.09090
  63. [63]Daniel Sanchez and Christos Kozyrakis, “Vantage: Scalable and efficient fine-grain cache partitioning,” in ISCA, 2011, pp. 57–68.
  64. [64]Brian C Shwedock and Nathan Beckmann, “Jumanji: The case for dynamic nuca in the datacenter,” in MICRO, 2020, pp. 665–680.DOI
  65. [65]André Seznec, “A case for two-way skewed-associative caches,” in ISCA, 1993, pp. 169–178.
  66. [66]Aria Shahverdi, Mohammad Shirinov, and Dana Dachman-Soled, “Database reconstruction from noisy volumes: A cache side-channel attack on SQLite,” in USENIX Security, 2021, pp. 1019–1035.arxiv.org/abs/2006.15007
  67. [67]Lachlan Shusterman, Lachlan Kang, Yarden Haskal, Yosef Meltser, Prateek Mittal, Yossi Oren, and Yuval Yarom, “Robust website fingerprinting through the cache occupancy channel,” in USENIX Security, 2019, pp. 639–656.arxiv.org/abs/1811.07153
  68. [68]Wei Song, Boya Li, Zihan Xue, Zhenzhen Li, Wenhao Wang, and Peng Liu, “Randomized last-level caches are still vulnerable to cache side-channel attacks! but we can fix it,” in IEEE SP, 2021, pp. 955–969.DOI
  69. [69]Wei Song, Zihan Xue, Jinchi Han, Zhenzhen Li, and Peng Liu, “Randomizing set-associative caches against conflict-based cache side-channel attacks,” IEEE Trans. Computers, vol. 73, no. 4, pp. 1019–1033, 2024.DOI
  70. [70]Wei Song, Zhidong Wang, Jinchi Han, Da Xie, Hao Ma, and Peng Liu, “SeqASS: Using sequential associative caches to mitigate conflict-based cache attacks with reduced cache misses and performance overhead,” in IEEE SP, 2026, pp. 638–655.
  71. [71]SpinalHDL, “NaxRiscv,” https://github.com/SpinalHDL/NaxRiscV, accessed: 2026-07-01.
  72. [72]Standard Performance Evaluation Corporation, “SPEC CPU 2017 Benchmark,” 2017. [Online]. Available: https://www.spec.org/cpu2017/
  73. [73]Qinhan Tan, Zhihua Zeng, Kai Bu, and Kui Ren, “PhantomCache: Obfuscating cache conflicts with localized randomization,” in NDSS, 2020.DOI
  74. [74]Jan Philipp Thoma and Tim Güneysu, “Write me and I’ll tell you secrets – write-after-write effects on Intel CPUs,” in RAID, 2022, pp. 72–85.DOI
  75. [75]Jan Philipp Thoma, Christian Niesler, Dominic Funke, Gregor Leander, Pierre Mayr, Nils Pohl, Lucas Davi, and Tim Güneysu, “ClepsydraCache: Preventing cache attacks with time-based evictions,” in USENIX Security, 2023, pp. 1991–2008.
  76. [76]David Trilla, Carles Hernandez, Jaume Abella, and Francisco J Cazorla, “Cache side-channel attacks and time-predictability in high-performance critical real-time systems,” in DAC, 2018, pp. 1–6.DOI
  77. [77]Thomas Unterluggauer, Austin Harris, Scott Constable, Fangfei Liu, and Carlos Rozas, “Chameleon Cache: Approximating fully associative caches with random replacement to prevent contention-based cache attacks,” in SEED, 2022, pp. 13–24.DOI
  78. [78]Pepe Vila, Boris Köpf, and José F. Morales, “Theory and practice of finding eviction sets,” in IEEE SP, 2019, pp. 39–54.arxiv.org/abs/1810.01497
  79. [79]Matthew Walker, Sascha Bischoff, Stephan Diestel- horst, Geoff Merrett, and Bashir Al-Hashimi, “Hardware-validated CPU performance and energy modelling,” in ISPASS, 2018, pp. 44–53.
  80. [80]Zhenghong Wang and Ruby B. Lee, “New cache designs for thwarting software cache-based side channel attacks,” in ISCA, 2007, pp. 494–505.
  81. [81]Zhenghong Wang and Ruby B. Lee, “A novel cache architecture with enhanced performance and security,” in MICRO, 2008, pp. 83–93.DOI
  82. [82]Mario Werner, Thomas Unterluggauer, Lukas Giner, Michael Schwarz, Daniel Gruss, and Stefan Mangard, “ScatterCache: Thwarting cache attacks via cache set randomization,” in USENIX Security, 2019, pp. 675–692.
  83. [83]Makoto Yabuuchi, Yohei Sawada, Toshiaki Sano, Yuichiro Ishii, Shinji Tanaka, Miki Tanaka, and Koji Nii, “A 6.05-Mb/mm² 16-nm FinFET double-pumping 1W1R 2-port SRAM with 313-ps read access time,” in VLSI, 2016, pp. 1–2.
  84. [84]Mengjia Yan, Christopher W. Fletcher, and Josep Torrellas, “Cache telepathy: Leveraging shared resource attacks to learn DNN architectures,” in USENIX Security, 2020, pp. 2003–2020.
  85. [85]Yuval Yarom and Katrina Falkner, “Flush+Reload: A high resolution, low noise, L3 cache side-channel attack,” in USENIX Security, 2014, pp. 719–732.
  86. [86]Zirui Neil Zhao, Adam Morrison, Christopher W. Fletcher, and Josep Torrellas, “Last-level cache side-channel attacks are feasible in the modern public cloud,” in ASPLOS, 2024, pp. 582–600.DOI

Paper details

vlnc:W_cksr3yqr
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 11

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents