Cache一致性验证的结构化激励生成算法
2018-12-26程开丰罗汉青梁利平
程开丰 罗汉青 梁利平


摘 要:为解决Cache一致性验证中传统随机激励方法的冗余覆盖及覆盖死角等问题,提出了一种高层次结构化激励生成算法和相应的高层次功能覆盖率模型.首先根据实际多核应用场景将冲突访存操作分类成基本同步和复杂同步,并进一步抽象成有向二分图模型,由此提出一种通用的层次化输入空间等价类划分算法和对应的高层次HSPC(Host Slave Pair Coverage)功能覆盖率模型,最后基于树的搜索提出了结构化激励生成算法.上述方案成功应用于IMEDiamond SoC的Cache一致性的功能验证中,实际结果表明,相比传统基于代码的覆盖率,高层次HSPC功能覆盖率模型的揭示功能Bug能力更强,而且相对于传统的随机生成,结构化的激励能够将覆盖率收敛所需的激励数减少96.3%.
关键词:Cache一致性;有向二分图模型;等价类划分;高层次功能覆盖率模型;结构化激励生成
中图分类号:TP302 文献标志码:A
Abstract: In order to deal with the problems of redundant and failed coverage in the traditional random stimuli for cache coherence verification, a high level structural stimuli generation algorithm and the corresponding functional coverage model were presented. Firstly, conflict memory accesses were categorized into basic/complex synchronizations, and thus abstracted into general bipartite graph model. Consequently, a general layered equivalence partition algorithm of ISS and the corresponding high level HSPC (Host Slave Pair Coverage) functional coverage model were proposed. Finally, two structural stimuli generation algorithms based on the search of ISS tree were presented. Experiments were performed in the functional verification of the cache system of IMEDiamond SoC, and the result indicates the HSPC coverage model can help uncover functional bugs more easily when compared with code coverage, and structural stimuli generation can reduce 96.3% stimuli for coverage convergence when compared with random stimuli generation.
Key words:Cache coherence; directed bipartite graph model; equivalence partition; high level functional coverage model; structural stimuli generation
所有基于仿真的功能驗证都需要做好两个环节:输入激励的生成与最后结果正确性的判断.Cache一致性的验证是多处理器系统功能验证中非常重要的一个部分.其输入激励是多核并行访存程序,结果正确性的判断是基于特定的内存一致性模型(MCC,Memory Consistency Model).
在已有的相关研究中,1979年Lamport[1]提出了顺序一致性模型(Sequential Consistency, SC),由于SC模型最符合程序员的直观思维,所以在多处理器系统设计和验证中一直占主导地位.1994年Gibbons和Korach[2]在理论上分析了存储一致性验证的复杂性,其中把在SC模型下的验证定义为VSC(Verifying Sequential Consistency)问……
