🤖 AI Summary
Manually designing heterogeneous, hierarchical, and scoped cache coherence protocol shims is error-prone and complex, while existing automated synthesis approaches are constrained by the single-writer multiple-reader (SWMR) assumption, limiting their ability to balance performance and generality. This work introduces a generic shim API that classifies protocol transactions according to semantic consistency requirements and presents ShimGen, an automated synthesis engine that, for the first time, supports the co-synthesis of mixed non-SWMR and SWMR protocols. ShimGen accommodates modern optimizations such as scoped memory accesses and deferred invalidations. In a case study on an AMD APU, the synthesized shim not only corrected consistency bugs present in the hand-crafted design but also achieved significantly higher performance than a pure SWMR solution.
📝 Abstract
Processor design is converging on a new model of cache-coherent shared memory characterized by heterogeneity, hierarchy, and scopes. Protocols like CXL or AMBA CHI are used as global protocols to combine multiple clusters, each with its own cluster-level coherence protocols. Manually designing shims to interface between these cluster and global protocols is subtle and error-prone. Automatic synthesis, on the other hand, makes simplifying assumptions like the single-writer multiple-reader (SWMR) invariant, that sacrifice performance for simplicity and guaranteed correctness.
We present a shim API \textemdash a generic abstraction that enables us to classify protocol transactions by their semantic coherence guarantees. Our automated synthesis engine, ShimGen, uses this shim API to automatically compose protocols with both SWMR and relaxed accesses, taking advantage of modern architectural optimizations like scoped memory accesses and lazy invalidation. We demonstrate ShimGen's efficacy on two case studies. First, we compare its output to a manually-designed hierarchical protocol for the AMD APU released in gem5. ShimGen's output is similar to the existing protocol. However, we identify one scenario where the manually-designed protocol fails to uphold compound consistency, while ShimGen's does. Second, we compare the performance of a hierarchical protocol with a global protocol that exploits non-SWMR accesses to a hierarchical protocol with a strictly SWMR global protocol. The result shows the performance benefits of accommodating global protocols with non-SWMR behavior.