Hardware flaws are permanent and potent: hardware cannot be patched once fabricated, and any flaws may undermine any software executing on top. Consequently, verification time dominates implementation time. The gold standard in hardware Design Verification (DV) is concentrated at two extremes: random dynamic verification and formal verification. Both struggle to root out the subtle flaws in complex hardware that often manifest as security vulnerabilities. The root problem with random verification is its undirected nature, making it inefficient, while formal verification is constrained by the state-space explosion problem, making it infeasible against complex designs. What is needed is a solution that is directed, yet under-constrained. Instead of making incremental improvements to existing DV approaches, we leverage the observation that existing software fuzzers already provide such a solution, and adapt them for hardware DV. Specifically, we translate RTL hardware to a software model and fuzz that model. The central challenge we address is how best to mitigate the differences between the hardware execution model and software execution model. This includes: 1) how to represent test cases, 2) what is the hardware equivalent of a crash, 3) what is an appropriate coverage metric, and 4) how to create a general-purpose fuzzing harness for hardware. To evaluate our approach, we fuzz four IP blocks from Google's OpenTitan SoC. Our experiments reveal a two orders-of-magnitude reduction in run time to achieve Finite State Machine (FSM) coverage over traditional dynamic verification schemes. Moreover, with our design-agnostic harness, we achieve over 88% HDL line coverage in three out of four of our designs -- even without any initial seeds.
翻译:硬件的缺陷是永久性的和强大的: 硬件无法在制造后补齐, 任何缺陷都可能破坏任何软件。 因此, 核查时间会支配执行时间。 硬件设计核查( DV) 的金标准集中在两个极端: 随机动态核查和正式核查。 两者都努力消除复杂硬件的微妙缺陷, 这些缺陷往往表现为安全弱点。 随机核查的根基问题在于其非定向性质, 使其效率低下, 而正式核查则受到州空间爆炸问题的制约, 使得它无法应对复杂的设计。 需要的是一个指导性、 但却不够严格的解决方案。 我们所需要的是一个解决方案。 而不是对现有DV( DV) 的方法进行渐进的改进, 而是将现有的软件模糊器提供这样的解决方案, 并且将其改造为硬件 DV。 具体地说, 我们把 RTL 硬件转换为软件模型和该模型的模糊性。 我们处理的核心挑战是如何最好地减少硬件执行模式与软件执行模式之间的差异。 这包括:(1) 如何代表测试案例, 2) 任何与崩溃的硬件对应的路径, 3 也就是的覆盖范围是适当的覆盖范围, 用来测量, 。 (breal) (c) (c) (c) (to) ro) (to) ab) abilal) ac) abild) ab) ac) abild) ac) abreal rub) abild) ab) ac) abild) ab)