近年来,全系统仿真工具在嵌入式开发中得到了广泛的应用,它可以帮助开发人员进行系统功能正确性的验证,发现软、硬件代码中的错误,从而提高开发效率、缩短产品上市时间。本文克服了现有的基于单机架构的全系统仿真工具的不足,提出了一种基于B/S架构的分布式嵌入式系统软硬件协同仿真平台,更好地适应了嵌入式开发人员位于分布式环境的特点。分布式仿真平台相较单机式可以带来易用、易同步、可配置的好处,允许仿真模型的增量式更新。此外,本文讨论了基于总线功能模型和“双向内存抽象”假设下的FPGA硬件逻辑的仿真,在B/S架构的服务器端通过引入版本控制系统来进行错误定位,通过引入“外部进程”来模拟环境及环境与嵌入式系统的接口。该仿真平台基于开源仿真工具SimSoC进行了实现。此外,本文阐释了将基于单机架构的仿真工具改成分布式的工程实践的一般规律,并给出了该仿真工具在实际案例中的应用。
Nowadays, full-system simulator has been widely used in development of embedded systems. It can facilitate developers with functional verification, and identifying HW/SW bugs, thus shorten development cycles.This paper analyzed the drawbacks of existing full-system simulators based on single-machine architecture. Alternatively, a distributed HW/SW co-simulator based on B/S model is proposed, considering the fact that embedded system developers are physically distributed. Compared with single machine based ones, it is easier to use, easier for HW/SW simulation logics to synchronize, and configurable, and it supports incremental update of simulation models. Besides, we discussed how to model FPGA logics based on ’dual ported memory’ abstraction and bus functional model, how to track errorintroducing code changes by incorporating version control system on server side, and how to emulate environment and its interface to embedded system by introducing ’external process’ on server side.This simulator is implemented based on the open-source simulator SimSoC. In addition, the general rules converting an existing single-machine based simulator to a distributed one are discussed. The application scenarios in which the system is applied are demonstrated at the end of paper.