데이타 플로우 명세로부터 직렬화된 멀티태스킹 코드 생성

Serialized Multitasking Code Generation from Dataflow Specification

  • 권성남 (서울대학교 전기 컴퓨터공학부) ;
  • 하순회 (서울대학교 전기 컴퓨터공학부)
  • 발행 : 2008.10.15

초록

갈수록 복잡해지는 임베디드 시스템을 개발하는데 있어서 소프트웨어 개발의 중요성이 점차 커지고 있다. 대부분의 임베디드 응용 소프트웨어는 멀티 태스크로 구성되어 있는 병렬 소프트웨어이며, 기존의 순차적인 프로그래밍 언어만으로 개발하는 것보다는 알고리즘의 병렬성을 명세하기에 용이한 데이타플로우 모델로부터 소프트웨어를 생성하는 것이 유망하다. 생성된 멀티태스킹 코트를 수행하기 위해선 태스크들을 병렬적으로 수행해 주고 태스크간 동기화를 담당해 줄 운영체제의 도움이 필요하다. 그러나 운영체제를 사용하기 어려운 환경이나 설계 공간 탐색 과정에서 운영체제를 매번 다양한 하드웨어 플랫폼에 포팅하기 어려운 경우에는 운영체제 없이 멀티 태스크 응용을 수행할 수 있는 방법이 필요하다. 이것을 위해서 이 연구에서는 데이타 플로우 명세로부터 직렬화 된 멀티태스킹 코드를 생성하는 방법을 제안한다. 제안하는 방법에서 하나의 태스크는 데이타 플로우 모델로 명세되며, 하나의 C 코드로 생성된다. 코드 생성은 크게 두 단계로 이루어지는데, 먼저 태스크를 구성하는 블록들을 각각 함수 형태로 코드를 생성한 후에, 생성된 여러 태스크의 함수들을 모아서 직렬화 하여 호출하는 스케줄러를 만든다. 이 때에 스케줄러를 효율적으로 만들 수 있는 자료구조 및 정보를 제공하여 사용자가 수동으로 스케줄러를 만드는 것도 가능하도록 하였다. DivX예제를 통하여 제안하는 방법으로 생성한 코드가 효율적으로 올바르게 동작함을 보였다.

As embedded system becomes more complex, software development becomes more important in the entire design process. Most embedded applications consist of multi -tasks, that are executed in parallel. So, dataflow model that expresses concurrency naturally is preferred than sequential programming language to develop multitask software. For the execution of multitasking codes, operating system is essential to schedule multi-tasks and to deal with the communication between tasks. But, it is needed to execute multitasking code without as when the target hardware platform cannot execute as or target platforms are candidates of design space exploration, because it is very costly to port as for all candidate platforms of DSE. For this reason, we propose the serialized multitasking code generation technique from dataflow specification. In the proposed technique, a task is specified with dataflow model, and generated as a C code. Code generation consists of two steps: First, a block in a task is generated as a separate function. Second, generated functions are scheduled by a multitasking scheduler that is also generated automatically. To make it easy to write customized scheduler manually, the data structure and information of each task are defined. With the preliminary experiment of DivX player, it is confirmed that the generated code from the proposed framework is efficiently and correctly executed on the target system.

키워드

참고문헌

  1. Synopsys Inc., 700 E. Middlefield Rd., Mountain View, CA94043, USA, COSSAP User's Manual
  2. Signal Processing Designer(SPW) product site of CoWare, http://www.coware.com/products/signalprocessingSPW
  3. J. T. Buck, S. Ha, E. A. Lee, and D. G. Messerschmitt, "Ptolemy: A Framework for Simulating and Prototyping Heterogeneous Systems," Intl. Journal of Computer Simulation, special issue on "Simulation Software Development," Vol.4, pp. 155-182, 1994
  4. S. Ha, S. Kim, C. Lee, Y. Yi, S. Kwon, and Y. Joo, "PeaCE: A Hardware-Software Codesign Environment for Multimedia Embedded Systems," in ACM Trans. on Design Automation of Electronic Systems(TODAES) Vol.12(3), Article 24, 2007
  5. K. Keutzer, S. Malik, R. Newton, J. Rabaey, and A. Sangiovanni-Vincentelli, "System-Level Design: Orthogonalization of Concerns and Platform-Based Design," in IEEE Trans. on Computer-Aided Design, 19(12), pp. 1523-1543, 2000 https://doi.org/10.1109/43.898830
  6. D. Kim, M. Kim, and S. Ha, "A Case Study of System Level Specification and Software Synthesis of Multi-mode Multimedia Terminal," in Proc. of Workshop on Embedded Systems for Real-Time Multimedia(ESTIMedia), 2003
  7. E. A. Lee and D. G. Messerschmitt, "Synchronous data flow," in Proc. of IEEE, 1987
  8. C. Lee and S. Ha, "Hardware-Software Cosynthesis of Multitask MPSoCs with Real-Time Constraints," in Proc. of IEEE The 6th Intl. Conf. on ASIC, Shanghai, China, Vol.2, pp. 919-924, 2005
  9. S. Kwon, C. Lee, S. Kim, Y. Yi and S. Ha, "Fast Design Space Exploration Framework with an Efficient Performance Estimation Technique," in Proc. of Intl. Second Workshop on Embedded Systems for Real Time Multimedia(ESTIMedia), pp. 27-32, 2004
  10. A. Gerstlauer, H. Yu, and D. Gajski, "RTOS Modling for System Level Design," in Proc. of Intl. Conf. on Design Automation & Test in Europe (DATE), 2003
  11. L. Gauthier, S. Yoo, and A. A. Jerraya, "Automatic Generation and Targeting of Application- Specific Operating Systems and Embedded Systems Software," in IEEE Trans. on Computer- Aided Design of Integrated Circuits and Systems, Vol.20(11), pp. 1293-1301, 2001 https://doi.org/10.1109/43.959858
  12. A. C. Nacul and T. Givargis, "Phantom: a serializing compiler for multitasking embedded software," in Proc. of American Control Conference, 2006
  13. Y. Cho, N. Zergainoh, K. Choi, and A. A. Jerraya, "Low runtime-overhead software synthesis for communicating concurrent processes," in Proc. of 18th IEEE/IFIP Intl. Workshop on Rapid System Prototyping, 2007
  14. A. C. Nacul and T. Givargis, "Code Partitioning for Synthesis of Embedded Applications with Phantom," in Proc. of ICCAD, 2004
  15. RealView SoC Designer official homepage, http:// www.arm.com/products/DevTools/MaxSim.html
  16. RealView Development Suite official homepage, http://www.arm.com/products/DevTools/RealViewDevSuite.html
  17. uC/OS-II Kernel Overview site, http://www.micrium. com/products/rtos/kernel/rtos.html