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

计算机工程 ›› 2006, Vol. 32 ›› Issue (9): 267-269,272.

• 开发研究与设计技术 • 上一篇    下一篇

Verilog 到C 翻译器的设计与实现

戴 笛,张福新   

  1. 中国科学院计算技术研究所,北京 100080
  • 出版日期:2006-05-05 发布日期:2006-05-05

Design and Implementation of Verilog to C Translation Tool

DAI Di, ZHANG Fuxin   

  1. Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100080
  • Online:2006-05-05 Published:2006-05-05

摘要: 介绍了一种将Verilog 硬件描述转化到等价C/C++代码的自动翻译器的实现过程,并给出了简化Verilog 行为模型的方法、非阻塞赋值串行化的优化算法和一些访存优化原则。该方法设计的翻译器的生成代码可直接由C/C++编译器汇编成可执行程序后进行仿真。采用龙芯RTL 作为系统输入的测试表明,该方法的仿真速度可比一般仿真软件有成倍的增加,并能在系统评估和分析上发挥显著的成效。

关键词: 软件仿真;Verilog;C;编译;龙芯

Abstract: A method of generating equivalent C/C++ code from Verilog hardware descriptions is proposed in this paper. Besides, a way of simplifying behavioral model of Verilog and an optimization algorithm on nonblocking assignments are given. There are also some guidelines of memory arrangement. The generated code is then compiled by C/C++ compiler to an executable program which can perform simulation directly. The test results based on Godson RTL code show that the simulation speed is much fast than that of common simulation software and this method does help a lot in performance evaluation and analysis

Key words: Software simulation; Verilog; C; Compiler; Godson