arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.03113cs.AR
收藏

QED:硬件内存一致性的可扩展验证

QED: Scalable Verification of Hardware Memory Consistency

Gokulan Ravi, Xiaokang Qiu, Mithuna Thottethodi, T. N. Vijaykumar

AI总结:

QED 利用可观测性概念,仅关注直接有序指令对和外部事件排序,通过决策树谓词评估 RTL,实现乱序发射处理器内存一致性的可扩展验证,并在 SC、TSO 和 RISC-V WMO 上验证了方法可行性。

摘要:

在基于乱序发射微处理器的共享内存系统中,内存一致性模型(MCM)问题 notoriously 不直观,并且是硬件设计缺陷的一个来源。先前的硬件验证工作仅限于顺序发射处理器,仅限于证明某些测试用例的正确性,或限于有界验证,而在实践中,这种有界验证无法扩展到所有线程中超过 7 条指令的规模。由于缓存一致性(即写序列化和原子性)以及流水线前端验证和测试已经得到充分研究,我们重点关注乱序发射处理器中加载-存储队列的内存排序,以及核心与全局一致性之间的一致性接口。我们基于可观测性这一关键概念提出 QED,即任何硬件重排序只有在产生被禁止的值时才有意义。我们认为,只需要考虑(1)仅直接有序的指令对——即在 MCM 施加的偏序中由一条边连接的传递非冗余对——而不是所有在飞行中的指令,以及(2)仅考虑来自其他核心的外部事件(例如无效化)的排序,而不考虑事件的来源核心,从而在飞行中内存指令数量和核心数量两方面实现验证的可扩展性。穷尽地考虑所有指令类型对以及介入每对之间的所有类型的外部事件,QED 尝试在不改变执行值的情况下将任何被重排序的指令恢复到符合 MCM 的顺序,其中失败表明存在 MCM 违反。每对指令的探索结果产生一个由简单、狭义定义的谓词组成的决策树,用于针对 RTL 进行评估。在我们的实验中,我们自动生成了 SC、TSO 和 RISC-V WMO 的决策树,并通过针对 RISC-V WMO 的 BOOMv3 实现评估一个实质性谓词来说明可自动化的验证,将完全自动化留给未来工作。

英文摘要:

Memory consistency model (MCM) issues in out-of-order-issue microprocessor-based shared-memory systems are notoriously non-intuitive and a source of hardware design bugs. Prior hardware verification work is limited to in-order-issue processors, to proving the correctness only of some test cases, or to bounded verification that does not scale in practice beyond 7 instructions across all threads. Because cache coherence (i.e., write serialization and atomicity) and pipeline front-end verification and testing are well-studied, we focus on the memory ordering in an out-of-order-issue processor's load-store queue and the coherence interface between the core and global coherence. We propose QED based on the key notion of observability that any hardware reordering matters only if a forbidden value is produced. We argue that one needs to consider (1) only directly-ordered instruction pairs -- transitively non-redundant pairs connected by an edge in the MCM-imposed partial order -- and not all in-flight instructions, and (2) only the ordering of external events from other cores (e.g.,invalidations) but not the events' originating cores, achieving verification scalability in both the numbers of in-flight memory instructions and of cores. Exhaustively considering all pairs of instruction types and all types of external events intervening between each pair, QED attempts to restore any reordered instructions to an MCM-complaint order without changing the execution values, where failure indicates an MCM violation. Each instruction pair's exploration results in a decision tree of simple, narrowly-defined predicates to be evaluated against the RTL. In our experiments, we automatically generate the decision trees for SC, TSO, and RISC-V WMO, and illustrate automatable verification by evaluating a substantial predicate against BOOMv3 implementation of RISC-V WMO, leaving full automation to future work.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑