透過您的圖書館登入
IP:18.191.84.33
  • 學位論文

跨平台嵌入式系統之程式碼產生器

Retargetable Code Generation for Embedded Systems

指導教授 : 李宗演

摘要


近年來,由於嵌入式系統的迅速成長,使得對嵌入式系統的功能需求愈來愈多,在設計嵌入式軟體的複雜度也愈高。尤其是大部分的使用者在設計嵌入式系統時,會面臨到一個問題,當我們轉換現有的嵌入式系統時,則嵌入式軟體就必須重新撰寫,而且程式設計師還必須重新熟悉另一個嵌入式平台,無疑地浪費相當多的時間成本。 因此,本論文提出一套可跨平台式之嵌入式系統程式碼產生器,將原始的ANSI C程式碼,可轉換成多目地的嵌入式程式碼。在此論文中,我們以MCS-51及PIC來做為我們的目地的嵌入式系統,其中,我們提出程式碼轉換用的演算法,並且提出一套驗證方法,來驗證我們的程式碼產生器所產生的嵌入式程式碼是否滿足系統的時間限制。我們亦設計了親和力高的圖形化使用者介面,讓使用者可以透過我們的介面來選取嵌入式系統之週邊設定,例如中斷、計時器、輸入輸出埠等等。 最後我們將用三個例子來驗證程式碼產生器之可行性,第一為交通號誌燈控制(Normal Traffic Light Control, NTLC)系統,第二為四相步進馬達控制(Four-Phases Stepping Motor Control, FPSMC)系統,第三則為遠端控制系統。經由驗證的方法,所產生的程式碼除了不僅功能上須正確,也符合我們的面積與時間的限制,亦即不能超越我們設定的條件之外,以達到本系統之正確性。

並列摘要


The demand for more and more complex functionalities in embedded systems is rapidly increasing such as that in portable devices automobiles, avionics and others. While developing embedded software, most designer face the problem of transferring C programs into different kind of embedded processors because the software needs to be rewritten. Hence, we propose a retargetable code generation methodology for 8051-based and PIC (Peripheral Interface Controller)-based embedded systems, namely RCGES, to generate automatically the embedded C code on retargetable embedded processors. We also present a code generation algorithm to translate C source code into the target embedded C code. After code generation, we present a verification method to verify the time constraints in a design system. In addition, we develop a graphical user interface for designers to configure the parameters of embedded processors such as timer mode, interrupt, and input/output ports, etc. Finally, three real design examples of embedded systems, normal traffic light controller (NTLC), four phases stepping motor control (FPSMC), and remote control system are used to illustrate the feasibility of the RCGES methodology.

參考文獻


[1]C. Cote and Z. Zilic, “Automated SystemC to VHDL translation in hardware/software codesign,” the 9th International Conference on Electronics, Circuits and Systems, vol. 2, pp. 717 -720, Sep. 15-18, 2002.
[7]T. S. Chen, F. Lai and R. J. Shang, “A simple tree pattern matching algorithm for code generator,” Proceedings of the 9th Annual International Computer Software and Applications Conference, COMPSAC, pp. 162-167, Aug. 1995.
[8]M. F. Parkinson, P. M. Taylor and S. Parameswaran, “C to VHDL converter in a codesign environment,” Spring Conference on VHDL International Users Forum, pp. 100-109, 1994.
[11]R. Leupers, “Compiler design issues for embedded processors,” IEEE Design & Test of Computers, vol. 19, no. 4, pp. 51-58, July-Aug, 2002.
[12]B.-S. Visser, “A framework for retargetable code generation using simulated annealing,” Proceedings of 25th EUROMICRO Conference, vol. 1, pp. 458 - 462, Sep. 1999.

延伸閱讀