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

通过开关硬件仿真测试可编程开关的可编程器件

Testing Compilers for Programmable Switches Through Switch Hardware Simulation

Michael D. Wong, Aatish Kishan Varma, Anirudh Sivaraman

摘要:

可编程交换机已经成为固定功能转发设备的强大而灵活的替代品。但由于网络交换机独特的硬件限制,针对这些设备的编译器的设计和实现是繁琐和容易出错的。尽管编译器在软件开发中扮演着重要的角色,但缺乏用于测试可编程网络设备编译器的工具。我们提出Druzhba,可编程开关模拟器用于测试编译器的目标可编程数据包处理基板。我们表明,我们可以模拟交换机的可编程硬件的低级别的行为。我们进一步展示了编译器开发人员如何使用我们的机器模型来将Druzhba作为编译器后端。生成的机器码程序被输入Druzhba,并使用基于模糊的方法进行测试,该方法允许编译器开发人员测试其编译器的正确性。使用程序合成为基础的编译器作为案例研究,我们演示了如何Druzhba已成功地测试编译器生成的机器码,我们模拟开关流水线指令集。

英文摘要:

Programmable switches have emerged as powerful and flexible alternatives to fixed-function forwarding devices. But because of the unique hardware constraints of network switches, the design and implementation of compilers targeting these devices is tedious and error prone. Despite the important role that compilers play in software development, there is a dearth of tools for testing compilers for programmable network devices. We present Druzhba, a programmable switch simulator used for testing compilers targeting programmable packet-processing substrates. We show that we can model the low-level behavior of a switch's programmable hardware. We further show how our machine model can be used by compiler developers to target Druzhba as a compiler backend. Generated machine code programs are fed into Druzhba and tested using a fuzzing-based approach that allows compiler developers to test the correctness of their compilers. Using a program-synthesis-based compiler as a case study, we demonstrate how Druzhba has been successful in testing compiler-generated machine code for our simulated switch pipeline instruction set.

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

↑