设计一个CPU模型:从伪形式化文档到快速代码
Designing a CPU model: from a pseudo-formal document to fast code
摘要:
为了验证底层嵌入式软件,工程师们使用模拟器,将真实的二进制作为输入。像真正的硬件一样,这些全系统模拟器被组织为一组组件。主要组件是CPU模拟器(ISS),因为它通常是模拟速度的瓶颈,并且它的开发是一项长期重复的任务。以前的工作表明,ISS可以从体系结构描述语言(ADL)生成。在本文报告的工作中,我们直接从参考手册的伪形式化描述生成CPU模拟器。对于每条指令,我们提取描述其行为、二进制编码和汇编语法的信息。接下来,在对提取的信息自动应用许多优化之后,我们生成SystemC/TLM ISS。我们还生成测试的解码器和一个正式的规范在Coq。实验表明,生成的ISS是快速和稳定的,我们以前的手写ISS。
英文摘要:
For validating low level embedded software, engineers use simulators that take the real binary as input. Like the real hardware, these full-system simulators are organized as a set of components. The main component is the CPU simulator (ISS), because it is the usual bottleneck for the simulation speed, and its development is a long and repetitive task. Previous work showed that an ISS can be generated from an Architecture Description Language (ADL). In the work reported in this paper, we generate a CPU simulator directly from the pseudo-formal descriptions of the reference manual. For each instruction, we extract the information describing its behavior, its binary encoding, and its assembly syntax. Next, after automatically applying many optimizations on the extracted information, we generate a SystemC/TLM ISS. We also generate tests for the decoder and a formal specification in Coq. Experiments show that the generated ISS is as fast and stable as our previous hand-written ISS.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。