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

LightningSim:面向高层次综合的快速且精确的基于轨迹的仿真

LightningSim: Fast and Accurate Trace-Based Simulation for High-Level Synthesis

Rishov Sarkar, Cong Hao

AI总结:

本文提出 LightningSim,通过追踪 LLVM IR 并映射 HLS 静态调度信息,快速精确仿真 FIFO 交互、流水线停顿与死锁;在 33 个基准上达到 99.9% 时序精度且最高提速 95 倍。

摘要:

高层次综合(High-Level Synthesis, HLS)允许硬件设计人员使用 C/C++ 创建复杂的 RTL 设计。传统 HLS 工作流程需要反复进行 C/C++ 仿真以完成部分功能验证,并通过 HLS 综合获得粗略的时序估计。然而,C/C++ 仿真和 HLS 综合估计都无法解释 FIFO 交互和流水线停顿等复杂行为,从而掩盖死锁和延迟开销等问题。此类问题只有通过 C/RTL 协同仿真才能暴露,但该仿真通常比 C/C++ 仿真或 HLS 综合慢几个数量级,速度过慢,无法集成到“编辑—运行”开发周期中。为解决这一问题,我们提出 LightningSim,这是一种面向 HLS 的快速仿真工具,兼具原生 C/C++ 的速度与 C/RTL 协同仿真的精确性。LightningSim 直接处理 LLVM 中间表示(IR)代码,并精确仿真硬件设计的动态行为。首先,它追踪 LLVM IR 执行以捕获运行时信息;其次,将静态 HLS 调度信息映射到轨迹,以仿真动态行为;第三,根据函数间交互计算停顿和死锁,从而获得精确的周期数。在 33 个基准测试上评估时,LightningSim 生成的时序估计准确率达 99.9%,速度最高比 RTL 仿真快 95 倍。我们的代码已在 GitHub 上公开发布。

英文摘要:

High-Level Synthesis allows hardware designers to create complex RTL designs using C/C++. The traditional HLS workflow involves iterations of C/C++ simulation for partial functional verification and HLS synthesis for coarse timing estimates. However, neither C/C++ simulation nor HLS synthesis estimates can account for complex behaviors like FIFO interactions and pipeline stalls, thereby obscuring problems like deadlocks and latency overheads. Such problems are revealed only through C/RTL co-simulation, which is typically orders of magnitude slower than either C/C++ simulation or HLS synthesis, far too slow to integrate into the edit-run development cycle. Addressing this, we propose LightningSim, a fast simulation tool for HLS that combines the speed of native C/C++ with the accuracy of C/RTL co-simulation. LightningSim directly operates on the LLVM intermediate representation (IR) code and accurately simulates a hardware design's dynamic behavior. First, it traces LLVM IR execution to capture the run-time information; second, it maps the static HLS scheduling information to the trace to simulate the dynamic behavior; third, it calculates stalls and deadlocks from inter-function interactions to get precise cycle counts. Evaluated on 33 benchmarks, LightningSim produces 99.9%-accurate timing estimates up to 95x faster than RTL simulation. Our code is publicly available on GitHub.

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

↑