• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2008, Vol. 30 ›› Issue (8): 124-127.

• 论文 • 上一篇    下一篇

系统级硬件描述语言SpecC词法分析器设计与实现

范逸雪 段成华   

  • 出版日期:2008-08-01 发布日期:2010-05-19

  • Online:2008-08-01 Published:2010-05-19

摘要:

随着硬件系统复杂性的提高,在更高的抽象层次——系统级进行软硬件协同设计成为一种趋势。SpecC语言是一种用来在系统级对硬件系统进行描述的系统级硬件描述语言。S  pecC词法分析器作为SpecC综合器的基础模块,其性能是影响SpecC综合器性能的关键因素之一,而SpecC综合器是实现系统级设计综合自动化必不可少的硬件系统开发工具。 本文在Linux环境下用C设计并实现了SpecC语言的一个词法分析器SpecCLexer。它能正确地对用户输入的SpecC源代码进行预处理和词法分析,并在源代码中出现词法错误时给 给用户反馈错误信息。

关键词: 系统级 SpecC 词法分析器 综合器

Abstract:

As the complexity of hardware systems increases, it is necessary to describe the hardware system at a higher level named system level to simplify the   software-hardware codesign. The system-level hardware description language SpecC was proposed to describe the design of hardware systems. The SpecC lexi cal analyzer is the basic module of the SpecC synthesizer, and its efficiency is one of the most important factors that affect the efficiency of the Spe cC synthesizer. In this paper, we present a SpecC lexical analyzer implemented under the Linux operating system. The lexical analyzer is called SpecC _L   exer. It can correctly preprocess and analyze the SpecC source file and produce error reports on lexical errors which exist in the source file.

Key words: system-level, SpecC, lexical analyzer, synthesizer