VHDL 컴파일러 후반부의 VHDL-to-C 사상에 관한 설계 및 구현

A design and implementation of VHDL-to-C mapping in the VHDL compiler back-end

  • 공진흥 (광운대학교 컴퓨터공학과) ;
  • 고형일 (광운대학교 컴퓨터공학과)
  • 발행 : 1998.12.01

초록

본 논문은 VHDL 컴파일러 시스템에서 후반부의 VHDL-to-C 사상 과정을 설계 및 구현한 연구에 관하여 기술한다. 컴파일러 전반부가 VHDL 설계 프로그램으로부터 발생시킨 중간 형식의 분석 데이터는 컴파일러 후반부의 VHDL-to-C 사상을 통해서 VHDL 어의가 구현된 C 코드 모델로 변환된다. 기본적으로 VHDL 어의를 표현하기 위한 C 코드 모델은 선언부, 구축부, 초기화부 및 실행부의 4개 기능적 템플릿으로 구성된다. 사상 과정에서는 사상 단위와 기능분류에 따른 129개 C 사상 템플릿과 반복적 알고리듬을 통하여 터미널 정보를 이용해서 C 코드를 생성하게 된다. C 프로그램의 구성은 코드를 직접 템플릿으로 출력하거나, 생성된 코드를 데이터큐에 중간 저장시키고 상위사상 결과에 결합시켜서 이루어진다. 설계 및 구현된 VHDL-to-C 사상기는 Validation Suite의 96% VHDL 구문 구조에 대해서 100% C 코드 모델을 완벽하게 사상할 수 있음을 보였다. 또한 VHDL-to-C 사상의 성능에서 생성된 코드의 메모리 오버헤드가 해석기 방식보다는 작고 직접코드 방식보다는 크지만 VHDL 프로그램 크기에 대해서 완만한 증가 경향을 보이고 있으며, 사상처리 시간에서는 사상 메카니즘의 구현에서 최적화 및 개선이 요구됨을 나타내었다.

In this paper, a design and implementation of VHDL-to-C mapping in the VHDL compiler back-end is described. The analyzed data in an intermediate format(IF), produced by the compiler front-end, is transformed into a C-code model of VHDL semantics by the VHDL-to-C mapper. The C-code model for VHDL semantics is based on a functional template, including declaration, elaboration, initialization and execution parts. The mapping is carried out by utilizing C mapping templates of 129 types classified by mapping units and functional semantics, and iterative algorithms, which are combined with terminal information, to produce C codes. In order to generate the C program, the C codes are output to the functional template either directly or by combining the higher mapping result with intermediate mapping codes in the data queue. In experiments, it is shown that the VHDL-to-C mapper could completely deal with the VHDL analyzed programs from the compiler front-end, which deal with about 96% of major VHDL syntactic programs in the Validation Suite. As for the performance, it is found that the code size of VHDL-to-C is less than that of interpreter and worse than direct code compiler of which generated code is increased more rapidly with the size of VHDL design, and that the VHDL-to-C timing overhead is needed to be improved by the optimized implementation of mapping mechanism.

키워드