作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• 开发研究与工程应用 • 上一篇    下一篇

基于QEMU的外部总线仿真技术

胡国卿1,2,邵培南1,2,陈 磊1,2,李 翔1,2   

  1. (1. 国家工程软件产品质量监督检验中心,上海 200233;2. 中国电子科技集团公司第三十二研究所,上海 200233)
  • 收稿日期:2013-08-23 出版日期:2014-02-15 发布日期:2014-02-13
  • 作者简介:胡国卿(1988-),男,硕士研究生,主研方向:虚拟化技术,虚拟机仿真;邵培南,研究员;陈 磊,硕士研究生;李 翔,高级工程师

External Bus Simulation Technology Based on QEMU

HU Guo-qing 1,2, SHAO Pei-nan 1,2, CHEN Lei 1,2, LI Xiang 1,2   

  1. (1. National Engineering Software Quality Supervision Testing Center, Shanghai 200233, China; 2. The 32nd Research Institute of China Electronics Technology Group Corporation, Shanghai 200233, China)
  • Received:2013-08-23 Online:2014-02-15 Published:2014-02-13

摘要: 综合嵌入式系统通过外部总线实现各个子系统之间的通信连接。为解决综合嵌入式系统的接口测试问题,采用系统虚拟机仿真综合嵌入式系统的连接方式,通过在虚拟机中创建外部总线仿真模块,配置仿真模块的连接,从而实现虚拟机之间的通信。提出一种基于以太网通信的外部总线仿真结构,以CAN总线仿真为例,在全系统虚拟机QEMU的内部总线上配置与注册外部总线设备,为读写总线设备数据的接口建立共享内存,组织总线协议报文。实验结果表明,通过网络收发报文,可实现总线仿真节点模块之间的数据交换,从而达到仿真总线的数据通信功能。

关键词: 虚拟机, PCI总线, CAN总线, 功能性仿真, 总线仲裁, 中断

Abstract: The communication connection among subsystems of the integrated embedded systems is achieved by an external bus. In order to solve interface test problems of the integrated embedded system, integrated embedded systems are simulated by embedded systems virtual machines which create external bus simulation modules. And the communication among virtual machines is achieved by configuring connections of these modules. This technology presents an external bus simulation structure based on Ethernet communication, and takes Controllers Area Network(CAN) bus simulation as an example. It establishes shared memory for bus device interface reading and writing data and achieves the data exchange between simulation node modules via configurations of internal bus on QEMU which is a system virtual machine, registrations of external bus devices, organizations of bus protocol packets and sending and receiving packets through the network, so as to achieve the data communication capabilities of simulation bus.

Key words: virtual machine, Peripheral Component Interconnect(PCI) bus, Controllers Area Network(CAN) bus, functional simulation, bus arbitration, interrupt

中图分类号: