Responsive image
博碩士論文 etd-0715113-211836 詳細資訊
Title page for etd-0715113-211836
論文名稱
Title
Processor-OpenOCD整合之軟硬體協同驗證
Hardware/software co-verification for processor-OpenOCD integration
系所名稱
Department
畢業學年期
Year, semester
語文別
Language
學位類別
Degree
頁數
Number of pages
128
研究生
Author
指導教授
Advisor
召集委員
Convenor
口試委員
Advisory Committee
口試日期
Date of Exam
2013-07-25
繳交日期
Date of Submission
2013-08-19
關鍵字
Keywords
整合、電路擬真器、GNU除錯器、協同驗證
OpenOCD (Open On-Chip Debugger), GNU Debugger, Co-verification, EICE (Embedded In-Circuit Emulator), JTAG
統計
Statistics
本論文已被瀏覽 5709 次,被下載 1330
The thesis/dissertation has been browsed 5709 times, has been downloaded 1330 times.
中文摘要
現今的ARM program debug都是需要藉由ARM開發的RVDS [18] (RealView Development Suite)以及MULTI-ICE (protocol converter)環境以控制ICE控制CPU,來達到對程式的偵錯,現在我們有新的選擇,就是Eclipse、GDB與OpenOCD (Open On-Chip Debugger)所組合起來的debug tool chain,配合FIDI公司出品的protocol converter型號為ft2232進行程式的偵錯。

然而對於本身實驗室有開發ARM7-like的CPU,即SYS32TM,與可控制CPU的ICE模組,不管是ARM本身開發的RVDS或者OpenOCD都無法可以簡單的看到debugger與ICE的互動,造成不管是為了驗證ICE或OpenOCD的正確性都非常的難,為了解決此問題我們思考了,使用PLI(Program Level Interface)與RTL simulator溝通再連接OpenOCD,或使用Platform Architect本身的co-simulation環境連接OpenOCD,最後決定採用Platform Architect環境,並找到embecosm EAN5裡面的JTAGSC [3]當成protocol converter 放入Platform Architect環境,並藉由shared memory機制與OpenOCD溝通已達到協同驗證的目的。
Abstract
We usually use RVDS [18] (RealView Development Suite) and MUlTI-ICE (protocol converter) as ARM program debug environment by controlling ICE module for controlling CPU. But now we have another choice, ie the debug tool chain that Eclipse, GDB and OpenOCD (Open On-Chip Debugger) combination. We achieve program debugging by using a protocol converter called ft2232 that FIDI Company produced to connect ICE module with JTAG port.

However, for ARM7-like CPU, ie. SYS32TM, ICE can control the CPU module that our laboratory develops. No matter the ARM RVDS or OpenOCD can not observate the interactive of debugger and ICE, it such that the verification of ICE and debugger is a difficult thing. In order to solve this problem, we consider PLI (Program Level Interface) to communicate with the RTL simulator and then connect to OpenOCD, or use the Platform Architect itself co-simulation environment connected OpenOCD. Finally, we chose Platform Architect environment and find the JTAGSC [4] as a protocol converter that come from embecosm EAN5 that can put into the Platform Architect environment. To achieve the purpose of co-verification, we ued shared memory mechanism to communication with OpenOCD and Platform Architect environment that JTAGSC had put into.
目次 Table of Contents
Chapter 1 簡介 1
1.1 背景 1
1.2 動機 2
1.3 提出的解法 3
1.4 本研究貢獻 4
Chapter 2 相關技術與文獻 6
2.1 雛型階段應用程式除錯方法 8
2.1.1 目標監督程式 8
2.1.2 邏輯分析儀 8
2.1.3 電路擬真器(In Circuit Emulator) 9
2.2 嵌入式系統應用程式除錯架構 10
2.2.1 即時追蹤除錯器 10
2.2.2 嵌入式電路擬真器 11
 JTAG 架構 13
 嵌入式電路擬真器 15
2.3 用於控制電路擬真器之除錯器 17
2.3.1 Open On-Chip Debugger [2] 18
2.3.2 GDB [6] 20
2.4 SC-RTL 協同模擬平台 21
Chapter 3 SYS32TM-OpenOCD 協同驗證平台 22
3.1 協同驗證平台開發動機 22
3.2 協同驗證平台研究方法 25
3.3 OpenOCD與JTAGSC如何連接 27
3.3.1 基於共享記憶體技術的溝通機制 28
3.3.2 補足JTAGSC不足之處的修改 30
3.3.3 OpenOCD新增JTAGSC驅動程式與初始化流程修改 33
3.3.4 協同驗證平台總觀 39
3.4 協同驗證平台如何重複利用 39
3.4.1 SC-RTL 協同模擬平台內部用到的元件與接線說明 40
3.4.2 如何使用協同驗證平台 43
Chapter 4 實驗 47
4.1 SC model (JTAGSC)和RTL model (SYS32TM+EICE) 可以正常執行協同模擬 47
4.2 OpenOCD與SC+RTL model互動驗證 49
4.3 GDB 需要EICE幫助的除錯動作 51
4.4 Semihosting 機制 60
4.5 在協同驗證平台執行應用程式除錯範例 62
4.6 實際範例-以JPEG編碼程式與3DG SoC程式為例 72
4.6.1 JPEG 編碼程式 72
4.6.2 3D graphs SoC 應用程式 78
Chapter 5 結論與未來發展 81
Appendix A OpenOCD 架構 84
A.1 OpenOCD 架構與運作流程 84
A.1.1 OpenOCD內部模組 84
A.1.2 OpenOCD 初始化與運作流程 86
A.1.2.1 OpenOCD 初始化流程 86
A.1.2.2 OpenOCD 運作流程 87
A.2 ITRI’s Project – PACDUO(高效能平行架構核心採用ARM9以及雙DSP為發展平台) 88
A.2.1 PACDUO [15] 88
A.2.2 PACDUO除錯效能與使用GDB控制問題 90
A.2.3 尋找PACDUO 問題所使用的方法 90
A.2.4 PACDUO問題解決與最後結果 92
Appendix B EICE_control_event/JTAG 轉換器說明 95
B.1 JTAGSC 介紹 95
B.2 JTAGSC檔案目錄列表與編成元件可在SC-RTL協同模擬平台使用 97
B.2.1 JTAGSC 檔案目錄與結構 97
B2.2 JTAGSC如何可以被當成元件在SC-RTL協同模擬平台上使用 98
B.3 JTAGSC運作流程 99
B.3.1 JtagSC.cpp and JtagSC.h 100
B.3.2 JTAGSC API運作流程 104
B.3.3 TapStateMachine 106
Appendix C 藉由協同驗證平台所找到的OpenOCD與EICE錯誤 108
C.1 SYS32TM 無法被停止 108
C.2 EICE無法控制SYS32TM寫入記憶體 110
C.3 中斷點觸發之後停止的位址不是設定中斷點得位址 112
參考文獻 References
[1] I. J. Huang, Tai-An Lu, ”ICEBERG: An Embedded In-circuit Emulator Synthesizer for Microcontrollers” Proc. of the 36’th Design Automation Conference, June 1998.
[2] OpenOCD: Open On-Chip Debugger, http://openocd.berlios.de/web/, 2006.
[3] Debugger tool chain for ARM, H-JTAG company, http://www.hjtag.com/.
[4] embecosm EAN5-JTAGSC, EMBECOSM company http://www.embecosm.com/, 2006.
[5] GNU ARM compiler, http://www.gnuarm.com/, 2004.
[6] GDB: The GNU Project Debugger, http://www.gnu.org/software/gdb/gdb.html, 2006.
[7] USB to JTAG converter, FTDI chip Company, http://www.ftdichip.com/, 2004.
[8] NS Manju Nath, “On-chip debugging reaches a nexus”, EDN,May 11, 2000, page 95, http://www.edn.com/article/CA46888.html?text=on-chip+and+debugging+and+reaches+and+a+and+nexus.
[9] Mark W. Klingensmith, “Digital System Debug Techniques”, WESCON-IC EXPO, 1997,IEEE, Page(s): 98-120.
[10] IEEE-ISTO 5001™-1999, the Nexus 5001 Forum™ Standard for a Global Embedded Processor Debug Interface, http://www.ieee-isto.org/Nexus5001, 2010.
[11] Dae-Young Jung, Sung-Ho Kwak and Moon-Key Lee, “Reusable embedded debugger for 32 bit RISC processor using the JTAG boundary scan architecture”, Proceedings 2002 IEEE Asia-Pacific Conference on ASIC Aug. 2002.
[12] “IEEE Standard Test Access Port and Boundary-Scan Architecture”, IEEE Std. 1149.1-2001.
[13] A. Wieferink, T. Kogel, O. Zerres, R. Leupers, and H. Meyr, "SoC multiprocessor debugging and synchronisation using generic dynamic-connect debugger frontends", International Journal of Emerging Sciences, 2008, pp.109-118.
[14] Bradford G. Van Treuren and Jose M. Miranda, “Embedded Boundary Scan”, IEEE Design & Test of Computers, Mar. –Apr. 2003, Volume 20 Issue 2, Page 20 ~ 25.
[15] Chih-Wei Chang, D. , I-Tao Liao, Shau-Yin Tseng, Chein-Wen Jen, "PAC DSP Core and Its Applications", Solid-State Circuits Conference, 2006. ASSCC 2006. IEEE Asian, page 19~22.
[16] The ARM7TDMI Debug Architecture, ARM Ltd., http://infocenter.arm.com/help/topic/com.arm.doc.dai0028a/DAI0028A_arm7tdmi_debug_appsnote.pdf, Application Note 28, Dec. 1995.
[17] ARM7TDMI Data Sheet, ARM Ltd., http://www.heeltoe.com/weararm/pdf/ARM7vC.pdf, 1995.
[18] ARM RVDEBUG V1.8 Application, ARM INC., 1995
[19] 孫清華,”JTAG測試原理與應用”,全華科技圖書股份有限公司,1999, Chapter 2
[20] Braun, G.; Nohl, A.; Hoffmann, A.; Schliebusch, O.; Leupers, R.; Meyr, H., “A universal technique for fast and flexible instruction-set architecture simulation” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, Pages: 1625- 1639, 2004.
[21] Shyh-Ming Huang; Ing-Jer Huang; Chung-Fu Kao , “Reconfigurable real-time address trace compressor for embedded microprocessors”, Proceedings of IEEE International Conference on Field-Programmable Technology (FPT), Pages: 196- 203, 2003
[22] Sang-Young Cho, Yoojin Chung, Jung-Bae Lee. "Virtual Development Environment Based on SystemC for Embedded Systems", Computational Science – ICCS 2007
[23] 俞甲子/石凡/潘愛民,”程式設計師的自我修養-連結.載入.程式庫,碁峰資訊有限公司”,2009
[24] 陳柏舟, “應用於嵌入式電路擬真器之可參數化的軟硬體控制模組”, 國立中山大學資訊工程研究所碩士論文, 2005
電子全文 Fulltext
本電子全文僅授權使用者為學術研究之目的,進行個人非營利性質之檢索、閱讀、列印。請遵守中華民國著作權法之相關規定,切勿任意重製、散佈、改作、轉貼、播送,以免觸法。
論文使用權限 Thesis access permission:自定論文開放時間 user define
開放時間 Available:
校內 Campus: 已公開 available
校外 Off-campus: 已公開 available


紙本論文 Printed copies
紙本論文的公開資訊在102學年度以後相對較為完整。如果需要查詢101學年度以前的紙本論文公開資訊,請聯繫圖資處紙本論文服務櫃台。如有不便之處敬請見諒。
開放時間 available 已公開 available

QR Code