首页|基于Gem5 的CM3 仿真器的研究与实现

基于Gem5 的CM3 仿真器的研究与实现

扫码查看
在嵌入式领域,业界主要使用ARM公司Keil系列仿真工具进行ARM嵌入式系统开发,芯片仿真是其重要功能之一。然而ARM Keil是国外商业软件,购买License价格不菲,且仿真器也是影响芯片验证和软件开发的关键技术之一。针对上述情况,以Cortex-M3 芯片为例设计了一种基于开源模拟器Gem5 的系统调用仿真方法。首先,分析Gem5 模拟器的源码结构、运行过程以及指令集仿真流程,描述Gem5 仿真原理。然后,通过为Gem5 添加Cortex-M3 寄存器和指令集支持实现Cortex-M3 在AtomicSimpleCPU的SE(System Emulation)模式下的仿真。最后,设计了灵活可扩展的指令集自动化测试工具,以验证指令功能是否正确仿真。实验结果表明,经过充分测试实现的仿真器能够正确仿真,且仿真效率较高,提供了一种开源、技术可控的Cortex-M3 的软仿真方案。
Study and Implementation of Gem5-Based CM3 Simulator
In the embedded systems area,the industry mainly uses the ARM Keil series simulation tools for ARM embedded system development,where software simulation of chip is an important function.However,ARM Keil is a foreign commercial software,and purchasing a license is expensiv.To address this situation,a system call simulation method based on the open source simulator Gem5 is proposed with Cortex-M3 chip as an example.Firstly,the Gem5 simulator's source code structure,operation process and instruction set simulation flow were analyzed to describe the Gem5 simulation principle.Secondly,the simulation of Cortex-M3 in System Emulation(SE)mode of AtomicSim-pleCPU was implemented by adding Cortex-M3 registers and instruction set support to Gem5.Finally,a flexible and scalable instruction set test tool was designed to verify that the instruction functions are simulated correctly.The ex-perimental results show that the simulator implemented can work correctly and efficiently in testing,which provides an open source and technically controllable soft simulation solution for Cortex-M3.

Embedded systemsSimulationOpen source simulatorInstruction setAutomation testing

余涛、刘芹、赵紫微

展开 >

武汉大学国家网络安全学院,湖北 武汉 430079

嵌入式系统 仿真 开源模拟器 指令集 自动化测试

国家自然科学基金项目

61872431

2024

计算机仿真
中国航天科工集团公司第十七研究所

计算机仿真

CSTPCD
影响因子:0.518
ISSN:1006-9348
年,卷(期):2024.41(1)
  • 15