簡易檢索 / 詳目顯示

研究生: 曾政傑
Txen, Tzen-Jay
論文名稱: ARM模擬器之架構描述設計與自動產生
ADL-Based Design and Generation of an ARM Simulator
指導教授: 周哲民
Jou, Jer-Min
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 電機工程學系
Department of Electrical Engineering
論文出版年: 2008
畢業學年度: 96
語文別: 中文
論文頁數: 64
中文關鍵詞: ARM模擬器轉換程式架構描述語言
外文關鍵詞: ARM Simulator, Retranslating program, ADL
相關次數: 點閱:55下載:3
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 此論文以ARM為架構,且使用架構描述語言使其自動產生ARM的模擬器,當驗證時,攥寫了應用程式並將其送至ARM Developer Suite(ADS)產生組語,執行其間為了使ADS產生的組語能配合自動產生的組譯器,故多攥寫一個轉換程式,將ARM的組語送至轉換程式產生新的組語檔,再經過產生的組譯器產生二進制檔送入產生的模擬器執行產生結果,將模擬器產生結果與在Visual C上的結果驗證,最後觀察其統計資訊。
    此篇論文在UPFAST (University of Pittsburgh Flexible Architecture Simulation Tool)系統上,使用特定的架構描述語言(ADL)自動產生cycle level的模擬器,組譯器和反組譯器,使用此套系統可以很容易的retarget到不同的模擬器,在此分別描述ADL內的微架構部份與指令集架構部份,描述完之後藉由ADL編譯器產生了模擬器程式,組譯器程式和反組譯器程式,以及配合GNU C上的套件自動產生可執行的模擬器,組譯器和反組譯器。

    In the thesis, an ARM simulator is generated from a domain specific language called the Architecture Description Language (ADL). Before generating object file from generated assembler and then executing object file on generated simulator, we wrote the application programs and translated it to assembly programs by ARM Developer Suite (ADS) then the assembly programs were retranslated by retranslating program for generated ARM assembler . Finally we could verify simulated results with results in Vissual C and observe its statistics.
    In the thesis , there are generated cycle level simulator , assembler and disassembler by writing specific ADL program on University of Pittsburgh Flexible Architecture Simulation Tool (UPFAST) system. Using UPFAST system it is easy to retarget a simulator for an existing architecture. The generated simulator program is generated from ADL compiler after writing microarchitecutre and instruction set architecture specifications on ADL program. Finally we use GNU C toolkits to generate executable simulator ,assembler and disassembler .

    摘要 I ABSTRACT II 第一章 緒論 1 1.1.研究背景與動機 1 1.2.研究目的 1 1.3.論文架構 1 第二章 背景與相關研究2 2.1. ARM的系統架構 2 2.1.1.ARM的暫存器 3 2.1.2.ARM程式設計著使用模式 3 2.1.3.ARM的exception 4 2.1.4.ARM memory Model 5 2.1.5.ARM的指令集格式 5 2.1.5.1.條件執行 6 2.1.5.2.資料處理指令 6 2.1.5.3.乘法指令 7 2.1.5.4.資料存取指令 8 2.1.5.5.分支指令 8 2.2.ADL架構描述語言 9 2.2.1.架構描述語言的分類 9 2.2.2.架構探討框架 10 第三章 模擬器和組譯器及反組譯器的產生 11 3.0.系統產生流程 11 3.1.ADL程式模型及產生模擬器示意圖 12 3.1.1.微架構規格 13 3.1.1.1.硬體物件 13 3.1.1.2.管線的宣告 14 3.1.1.2.1.有時間註解的程序 15 3.1.1.2.2.指令內容 16 3.1.2.指令集架構規格 17 3.1.2.1.欄位型態的宣告 17 3.1.2.2.屬性的宣告 18 3.1.2.3.二進碼編碼 19 3.1.2.4.指令的宣告 19 3.1.2.4.1.微指令的宣告 20 3.1.2.4.2.巨集指令的宣告 22 3.1.2.5.屬性的除錯 22 3.2.架構描述語言的編譯器 (ADL Compiler) 23 3.3.組譯器的產生 24 3.3.1.符號表格與指令表格的產生 25 3.3.2.語法規則與語意行為的產生 25 3.3.2.1.語彙分析器的輸入規格 26 3.3.2.2.文法產生器的輸入規格 26 3.4.反組譯器的產生 28 3.5.模擬器的產生 28 第四章 ARM的模擬器設計 29 4.1. ADL描述的ARM模擬器架構 29 4.1.1. ADL編譯器產生的ARM模擬器函式執行流程 30 4.1.2. ADL描述的ARM指令格式 31 4.1.2.1.指令欄位 31 4.1.2.2. 指令行為與運算碼編碼 32 4.2.微架構部份設計 33 4.2.1. 物件的宣告 33 4.2.2. 管線的宣告 34 4.2.2.1. 指令擷取 34 4.2.2.1.1.s_if_prologue: 34 4.2.2.1.2.s_if_epilogue: 34 4.2.2.2. 指令解碼 35 4.2.2.2.1.s_id_prologue: 35 4.2.2.2.2.switch (s_idopcode): 36 4.2.2.2.3.s_id_intermission: 36 4.2.2.2.4.s_id_epilogue: 37 4.2.2.3. 指令執行 37 4.2.2.3.1.s_ex_prologue: 37 4.2.2.3.2.switch (s_exopcode): 38 4.2.2.3.3.s_ex_intermission: 39 4.2.2.3.4.s_ex_epilogue: 40 4.2.2.4. 記憶體存取 40 4.2.1.4.1.s_mem_prologue: 40 4.2.1.4.2.switch (s_mem opcode): 41 4.2.1.4.3. s_mem_epilogue 41 4.2.2.5. 運算元寫回 41 4.2.2.5.1.s_wb_prologue: 41 4.2.2.5.2.s_wb_epilogue: 41 4.3.指令集架構部份的設計 41 4.3.1.欄位宣告 42 4.3.2.屬性的宣告 43 4.3.3.二進碼編碼 43 4.3.4.指令的宣告 44 4.3.4.1.運算指令描述 44 4.3.4.1.1.加法左移指令 44 4.3.4.1.2.乘加指令 45 4.3.4.1.3.條件加法指令 46 4.3.4.2.記憶體存取指令描述 47 4.3.4.2.1.有位移的載入與儲存指令 47 4.3.4.2.2.有條件的載入指令 48 4.3.4.2.3.儲存byte的指令 49 4.3.4.3.分支指令描述 50 4.4.組語轉換成程式的設計 52 4.4.1.目的和演算法 52 4.4.2.例子 53 4.5.模擬的流程 54 第五章 實驗結果 56 5.1.Bubble_sort統計資訊 57 5.2.Quick_sort統計資訊 58 5.3.DFT統計資訊 59 5.4.DCT4x4統計資訊 60 5.5評估程式在ARM與MIPS的執行週期比 61 第六章 結論與未來展望 62 參考文獻 63

    [1] Soner Onder, Rajiv Gupta, “Automatic Generation of Microarchitecture Simulators”, Department of Computer Science University of Pittsburgh, PA 15260.
    [2] Soner Onder, ”An introduction to Flexible Architecture Simulation Tool (FAST) and Architecture Description Language ADL”. Technical Report TR 05-01 Version 1.0, Department of Computing Science Michingan Technological University Houghton, MI, 49931.
    [3] Soner Onder, “Scalable Superscalar Processing”, University of Pittsburgh, 1999.
    [4] Jeff Bastian, Soner Onder, ”SPECIFICATION OF INTEL IA-32 USING AN ARCHITECTURE DESCRIPTION LANGUAGE”. Bastian Texas Instruments. Department of Computer ScienceMichigan Technological University Houghton.
    [5] PRABHAT MISHRA ,AVIRAL SHRIVASTAVA , NIKIL DUTT “Architecture Description Language(ADL)-Driven Software Toolkit Generation for Architectural Exploration of Programmable SOCs”. PRABHAT MISHRA University of Florida and AVIRAL SHRIVASTAVA and NIKIL DUTT University of California, Irvine.
    [6] Charles Price, ”MIPS IV Instruction Set” Revision 3.2, September, 1995.
    [7] Douglas C. Schmidt, ”GPERF A Perfect Hash Function Generator”. Department of Computer Science Washington University.
    [8] Charles Donnelly, Richard Stallman, ”The Yacc-compatible Parser Generator”, Bison Version 2.3, 30 May 2006.
    [9] Yi-Ping You , “Lex – A Lexical Analyzer Generator”, Spring 2005.
    [10]“ARM Architecute”, 1996-2000 ARM Limited.
    [11] The ARM Instruction Set - ARM University Program - V1.0.
    [12]George_Hansper,“Yacc-Aparsergenerator”.http://www.luv.asn.au/overheads/lex_yacc/yacc.html#rules
    [13] Richard Murray“RegistersandProcessorModes”.http://www.heyrick.co.uk/assembler/regs.html
    [14] Prabhat Mishra,Arun Kejariewal ,Nikil Dutt, ”Rapid Exploration of Pipelined Processors through Automatic Generation of Synthesizable RTL Models”. Center for Embedded Computer Systems University of California, Irvine, USA.
    [15] 鄭瑞川,系統化設計之管線處理,國立成功大學電機工程學系,碩士論文,
    2003.
    [16] 王建章,雙處理器架構之SoC平台,國立成功大學電機工程學系,碩士
    論文,2003.

    下載圖示 校內:立即公開
    校外:2008-08-25公開
    QR CODE