当前位置: X-MOL 学术arXiv.cs.AR › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Testing Compilers for Programmable Switches Through Switch Hardware Simulation
arXiv - CS - Hardware Architecture Pub Date : 2020-05-05 , DOI: arxiv-2005.02310
Michael D. Wong, Aatish Kishan Varma, Anirudh Sivaraman

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.

中文翻译:

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

可编程交换机已成为固定功能转发设备的强大而灵活的替代品。但由于网络交换机的独特硬件限制,针对这些设备的编译器的设计和实现是乏味且容易出错的。尽管编译器在软件开发中发挥着重要作用,但仍然缺乏用于测试可编程网络设备编译器的工具。我们展示了 Druzhba,这是一种可编程开关模拟器,用于测试针对可编程数据包处理基板的编译器。我们展示了我们可以对交换机可编程硬件的低级行为进行建模。我们进一步展示了编译器开发人员如何使用我们的机器模型将 Druzhba 作为编译器后端。生成的机器代码程序被输入 Druzhba 并使用基于模糊测试的方法进行测试,该方法允许编译器开发人员测试其编译器的正确性。使用基于程序综合的编译器作为案例研究,我们展示了 Druzhba 如何成功地为我们的模拟开关管道指令集测试编译器生成的机器代码。
更新日期:2020-10-29
down
wechat
bug