To test and debug hardware modules, it is common to write two programs: a driver, which translates high-level transactions into interactions on the module's input and output signals, and a monitor, which analyzes a signal-level execution trace and recognizes a transaction. These two programs are commonly implemented separately for each hardware protocol, but this separation entails manual effort and risks inconsistencies. We advocate an alternative approach. We present a DSL in which users specify hardware communication protocols as succinct imperative programs. Crucially, the same specification can be used to both drive designs and monitor transactions. We present the design of a tool, which given a specification in our DSL and a waveform, automatically infers a transaction-level trace consistent with the waveform. We discuss plans to evaluate our DSL on real-world interconnects such as Wishbone and AXI-Stream.
翻译:为测试和调试硬件模块,通常需编写两类程序:一是驱动程序,负责将高层事务转换为模块输入/输出信号上的交互;二是监控程序,通过分析信号级执行轨迹识别事务。这两类程序通常针对每种硬件协议独立实现,但该分离方式既耗费人工又存在不一致风险。本文提出替代方案,介绍一种将硬件通信协议描述为简洁命令式程序的领域特定语言(DSL)。关键在于,同一规约既可驱动设计又能监控事务。我们进一步设计了配套工具,该工具接收DSL规约与波形后,能自动推断出与波形一致的事务级轨迹。最后讨论在Wishbone、AXI-Stream等实际互连协议中评估该DSL的规划。