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

Synchron——一种面向嵌入式系统的API与运行时

Synchron -- An API and Runtime for Embedded Systems

Abhiroop Sarkar, Bo Joel Svensson, Mary Sheeran

AI总结:

本文提出Synchron API与SynchronVM虚拟机,通过CML风格消息传递并发、消息传递I/O接口和时序操作符syncT,为嵌入式系统提供高级编程抽象,并在STM32F4和NRF52上验证其表达能力与性能。

摘要:

编写嵌入式系统应用程序涉及编写并发、事件驱动且具有时序感知能力的程序。传统上,此类程序使用C或汇编等面向机器的低级编程语言编写。我们提出一种替代方案,引入Synchron,这是一个API,它为程序员提供高级抽象,同时在关联的运行时系统和一次性驱动程序中支持低级基础设施。嵌入式系统应用程序表现出以下一般特征:(i)并发,(ii)I/O受限,以及(iii)时序感知。为了解决这些问题中的每一个,Synchron API由三个组件组成:(1)一个受Concurrent ML(CML)启发的消息传递并发模型,(2)一个基于消息传递的I/O接口,该接口在基于低级中断的外设和内存映射外设之间进行转换,以及(3)一个时序操作符$syncT$,它将CML的$sync$操作符与受TinyTimber内核启发的时序窗口相结合。我们将Synchron API实现为名为SynchronVM的虚拟机的字节码指令。SynchronVM承载一种受Caml启发的函数式语言作为其前端语言,VM的后端支持STM32F4和NRF52微控制器,其RAM规模为数百千字节。我们通过展示嵌入式系统中常见的状态机表达示例来说明Synchron API的表达能力。时序功能通过一个音乐编程练习进行演示。最后,我们提供了关于SynchronVM的响应时间、抖动率、内存和功耗的基准测试。

英文摘要:

Programming embedded systems applications involve writing concurrent, event-driven and timing-aware programs. Traditionally, such programs are written in low-level machine-oriented programming languages like C or Assembly. We present an alternative by introducing Synchron, an API that offers high-level abstractions to the programmer while supporting the low-level infrastructure in an associated runtime system and one-time-effort drivers. Embedded systems applications exhibit the general characteristics of being (i) concurrent, (ii) I/O-bound and (iii) timing-aware. To address each of these concerns, the Synchron API consists of three components: (1) a Concurrent ML (CML) inspired message-passing concurrency model, (2) a message-passing--based I/O interface that translates between low-level interrupt based and memory-mapped peripherals, and (3) a timing operator, $syncT$, that marries CML's $sync$ operator with timing windows inspired from the TinyTimber kernel. We implement the Synchron API as the bytecode instructions of a virtual machine called SynchronVM. SynchronVM hosts a Caml-inspired functional language as its frontend language, and the backend of the VM supports the STM32F4 and NRF52 microcontrollers, with RAM in the order of hundreds of kilobytes. We illustrate the expressiveness of the Synchron API by showing examples of expressing state machines commonly found in embedded systems. The timing functionality is demonstrated through a music programming exercise. Finally, we provide benchmarks on the response time, jitter rates, memory, and power usage of the SynchronVM.

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

↑